4 Commits

Author SHA1 Message Date
d957f9c649 feat(send_message): support file sending via Feishu; fix upload endpoint and message format
- OutboundMessenger trait: add media: Vec<MediaItem> param to send_message()
- send_message tool: add optional 'files' param with path-to-MediaItem conversion
- SessionManager::send_message(): forward media to OutboundMessage
- Feishu: fix image upload endpoint (/im/v1/images/upload → /im/v1/images)
- Feishu: fix post image tag (image → img)
- Feishu: fix file upload file_type mapping (use valid Feishu types)
- Feishu: send files as separate messages (file/audio/media msg_type), not embedded in post
- Feishu: add debug logging for upload/send responses
- Skip [message from] prefix for pure file messages to same session
2026-05-13 12:06:55 +08:00
98eb7bea3d 新增跨session消息发送能力 2026-05-04 00:32:24 +08:00
d5b6cd24fc feat(tools): add SchemaCleanr for cross-provider schema normalization
- Add SchemaCleanr with CleaningStrategy enum (Gemini, Anthropic, OpenAI, Conservative)
- Support cleaning JSON schemas for different LLM provider compatibility
- Add $ref resolution, anyOf/oneOf flattening, const-to-enum conversion
- Add read_only, concurrency_safe, exclusive methods to Tool trait
- Add comprehensive unit tests for all schema cleaning features
2026-04-07 23:41:20 +08:00
9834bd75cf feat: add calculator tool and integrate with agent loop
- Introduced a new CalculatorTool for performing various arithmetic and statistical calculations.
- Enhanced the AgentLoop to support tool execution, including handling tool calls in the process flow.
- Updated ChatMessage structure to include optional fields for tool call identification and names.
- Modified the Session and SessionManager to manage tool registrations and pass them to agents.
- Updated the OpenAIProvider to serialize tool-related message fields.
- Added a ToolRegistry for managing multiple tools and their definitions.
- Implemented tests for the CalculatorTool to ensure functionality and correctness.
2026-04-06 23:43:45 +08:00