fix(sse): correct UTF-8 handling and chunking in SSE streaming\n\n- Updated splitContentIntoSegments to handle runes instead of bytes\n- Fixed buildWebUIStreamForwarder to send delta chunks instead of cumulative content\n- Ensures proper handling of multi-byte characters in SSE streams

This commit is contained in:
whlaoding
2026-03-14 01:41:51 +08:00
parent 60195f00a0
commit ea88e1dc18
7 changed files with 89 additions and 18 deletions

View File

@@ -27,6 +27,7 @@ Now supports mutually exclusive message channels:
- If `telegram`: set `TELEGRAM_BOT_TOKEN`, keep `FEISHU_*` empty.
- If `feishu`: set `FEISHU_APP_ID` and `FEISHU_APP_SECRET`, keep `TELEGRAM_BOT_TOKEN` empty.
- If `webui`: set `WEBUI_LISTEN_ADDR` (default `:8090`).
- Optional for `webui`: set `WEBUI_EXPOSE_REASONING=true` to expose `thought/tool_call/tool_result` events to frontend.
3. Set log level with `LOG_LEVEL=debug|info|warn|error`.
- To inspect full skill/tool execution content and detailed ReAct step traces, use `LOG_LEVEL=debug`.
4. Configure knowledge and reasoning:
@@ -95,6 +96,7 @@ Minimum env config in `workspace/agent_runtime/configs/env`:
```env
MESSAGE_CHANNEL=webui
WEBUI_LISTEN_ADDR=:8090
WEBUI_EXPOSE_REASONING=false
LLM_API_KEY=your_api_key
```
@@ -115,6 +117,7 @@ docker run --rm -d \
--env-file ./workspace/agent_runtime/configs/env \
-e MESSAGE_CHANNEL=webui \
-e WEBUI_LISTEN_ADDR=:8090 \
-e WEBUI_EXPOSE_REASONING=false \
-e AGENT_WORKSPACE_DIR=/app/workspace/agent_runtime \
-v "$(pwd)/workspace/agent_runtime:/app/workspace/agent_runtime" \
laodingbot:latest