21 Commits

Author SHA1 Message Date
09dd15f557 feat(feishu): 支持引用回复消息 - 使用飞书 reply API (POST /im/v1/messages/{id}/reply) - 仅 AssistantResponse 使用回复接口,工具消息走普通发送 - 提取公共逻辑到 prepare_payload / check_send_response - 新增 reply_to_feishu_message / dispatch_send 方法 2026-06-14 14:15:21 +08:00
fc7df67474 feat(streaming): 支持流式文本增量与结束信号功能
- 新增 StreamDelta 和 StreamEnd 类型,支持流式数据增量传输
- 扩展 LLMProvider trait,添加带回调的 chat_with_streaming 接口
- 修改 OpenAI Provider 实现,支持流式聊天回调传输增量数据
- Agent 流处理改为异步消费增量消息并传递给前端
- 保证流式增量和最终消息使用相同消息 ID 以便前端替换
- 修改消息总线和协议层,支持携带和识别流式消息的消息 ID
- 客户端 CLI 通过增量输出实现交互式流式响应显示
- Web 前端接收流式增量消息,追加到对应消息,实现实时显示
- 各通道(飞书、微信)支持转发流式增量和结束消息
- 任务工具运行时添加消息 ID 支持,保持消息一致性
- 统一消息构造函数新增流式增量和结束信号的构建方法
2026-06-14 10:24:52 +08:00
oudecheng
a783abd0e3 feat: 添加恢复代码块占位符的功能,优化文本处理逻辑 2026-06-03 08:54:08 +08:00
oudecheng
4cb26b5b67 feat: 子智能体任务消息查看,实时广播工具调用事件
- 新增 LoadTaskMessages 命令,加载子智能体任务的历史消息
- SubAgentEmitter 通过 MessageBus 实时广播子智能体工具调用
- 前端新增子智能体视图,支持导航进入/退出子智能体会话
- 外部渠道过滤子智能体事件,避免推送到飞书/微信
- ToolCall/ToolResult 新增 subagent_task_id 字段

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 11:15:38 +08:00
oudecheng
34011a6fa3 feat: 优化工具面板UI,外部渠道过滤工具消息
- 飞书/微信渠道不再推送 ToolResult/ToolPending 消息
- 聊天面板过滤 tool_call 消息,工具调用仅在工具面板展示
- 工具面板增加折叠预览、JSON格式化、状态动画等视觉优化

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 08:46:50 +08:00
oudecheng
3128abe3c6 feat: 优化 parse_post_content 函数,支持处理包含内容数组的代码块,并添加相关单元测试以确保向后兼容性 2026-05-21 17:17:44 +08:00
597881f72e feat: Implement WeChatBot SDK with error handling and message protocol
- Add WeChatBotError enum for error handling with various error types.
- Create a Result type alias for easier error management.
- Implement ILinkClient for low-level API interactions including QR code generation, message sending, and updates retrieval.
- Define message types and structures for handling incoming messages and media content.
- Add tests for error handling and message parsing to ensure reliability.

Co-authored-by: Copilot <copilot@github.com>
2026-05-06 14:18:47 +08:00
260266b90f feat: 添加会话消息发送工具,支持文本和附件的发送,优化消息发送逻辑 2026-05-02 09:15:36 +08:00
73dab09bfe Refactor code for improved readability and consistency
- Adjusted formatting and indentation in various files for better clarity.
- Consolidated multi-line statements into single lines where appropriate.
- Enhanced error handling messages for better debugging.
- Added a new InboundProcessor struct to handle inbound messages more effectively.
- Updated test cases to ensure they align with the new code structure.
2026-04-28 10:33:31 +08:00
4b74fabb98 feat: 添加字符计数和文本截断功能,增强文本处理能力 2026-04-24 14:34:06 +08:00
09ccd71cc7 feat(feishu): 优化文件下载文件名推断逻辑,支持从响应头和内容中提取文件名 2026-04-22 09:55:37 +08:00
a0fe7c57bd feat(feishu): 支持 markdown 格式的消息处理,优化内容解析逻辑 2026-04-21 21:21:49 +08:00
dcf04279a7 feat(feishu): add reply context handling for messages and improve content fetching 2026-04-12 13:31:55 +08:00
3d72f3dfa8 feat(feishu): enhance message sending with dynamic format detection and support for interactive cards 2026-04-12 11:38:31 +08:00
21b4e60c44 feat(feishu): add reaction handling and metadata forwarding in messages 2026-04-08 10:24:15 +08:00
075b92f231 fix: truncate long text content before sending to Feishu
Feishu API rejects messages with content exceeding ~64KB with error
230001 "invalid message content". Added truncation at 60,000 characters
to prevent this, with a notice appended to truncated content.
2026-04-08 08:42:56 +08:00
2dada36bc6 feat: introduce multimodal content handling with media support
- Added ContentBlock enum for multimodal content representation (text, image).
- Enhanced ChatMessage struct to include media references.
- Updated InboundMessage and OutboundMessage to use MediaItem for media handling.
- Implemented media download and upload functionality in FeishuChannel.
- Modified message processing in the gateway to handle media items.
- Improved logging for message processing and media handling in debug mode.
- Refactored message serialization for LLM providers to support content blocks.
2026-04-07 23:09:31 +08:00
a051f83050 Refactor AgentLoop to manage history externally via SessionManager
- Removed internal history management from AgentLoop.
- Updated process method to accept conversation history as a parameter.
- Adjusted continue_with_tool_results to work with external history.
- Added OutboundDispatcher for handling outbound messages from MessageBus.
- Introduced InboundMessage and OutboundMessage structs for message handling.
- Updated Channel trait to include message handling and publishing to MessageBus.
- Refactored Session to manage chat histories instead of AgentLoop instances.
- Enhanced GatewayState to start message processing loops for inbound and outbound messages.
2026-04-07 21:53:37 +08:00
4ed2f986a1 添加 tracing 日志支持,替换 println! 输出,增强错误处理和调试信息 2026-04-06 23:11:41 +08:00
34ab439067 重构消息处理逻辑,添加 MessageHandler trait,支持多用户会话,更新 FeishuChannel 和 SessionManager,增强错误处理 2026-04-06 22:38:41 +08:00
04736f9f46 添加 Feishu 通道支持,重构配置以包含通道设置,更新依赖项,增强错误处理 2026-04-06 18:43:53 +08:00