webui-dev / webui

Use any web browser or WebView as GUI, with your preferred language in the backend and modern web technologies in the frontend, all in a lightweight portable library.
https://webui.me
MIT License
2.37k stars 146 forks source link

encoding response in chunks to avoid call stack size limit #271

Closed 7flash closed 7 months ago

7flash commented 7 months ago

Apparently https://github.com/webui-dev/webui/commit/44a488025d09fe83f3d9d89ce5b6e57d915cf227 fixing different callback in 6xx line but my error was appearing in line 3xx therefore this PR solves it, particularly by encoding string result to array buffer in chunks rather than full piece causing TextEncoder to panic before

7flash commented 7 months ago

After making changes in webui_bridge.ts I run sh build.ts and it solved the issue for me; the header file had more changes probably because I was building on my macOS silicon m2, let me know if I need to commit this differently @hassandraga

7flash commented 7 months ago

This only relevant code snippet I modified

image
7flash commented 7 months ago

https://github.com/webui-dev/webui/issues/270

hassandraga commented 7 months ago

Yep, I missed this one, thank you for the fix. I cleaned the PR and now is ready to merge.

I like your coding font 👌

7flash commented 7 months ago

Yep, I missed this one, thank you for the fix. I cleaned the PR and now is ready to merge.

I like your coding font 👌

This is Monaspace Radon https://github.com/githubnext/monaspace/issues/130