- core/llm.py: 加 chat_stream() generator(stream=True + include_usage), generator finally 关底层 httpx 连接;_build_kwargs 抽出来 chat/chat_stream 共用 - core/loop.py: 主循环 _stream_llm() 流式迭代,chunk 间 poll cancel 命中 break, litellm.stream_chunk_builder 拼回 response 给 tool_calls 解析 + usage 记账; content delta 即时 emit text 事件激活前端打字机渲染 - web/static/dev.html: chat-send + chat-cancel 合并 chat-action 单按钮, setActionMode(idle/streaming/cancelling) 切态;streaming 期间 Enter 不触发停止 - cancel 延迟从「整轮 generation 时长」(几十秒)降到「单 chunk 间隔」(100ms 级) - 文档:DESIGN §3.1 + API 表 + risks 表翻转 tradeoff;RUN 接口 + 故障兜底同步; web/app.py docstring 对齐;PROGRESS 加条目 + 文件清单行数 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| storage | ||
| __init__.py | ||
| agent_builder.py | ||
| ark_client.py | ||
| capabilities.py | ||
| export_docx.py | ||
| llm.py | ||
| loop.py | ||
| memory.py | ||
| paths.py | ||
| probe.py | ||
| session.py | ||
| sinks.py | ||
| skills.py | ||
| task.py | ||
| ui.py | ||