feat: add AI assistant message type support#12
Conversation
- Add new msg_type: ai_assistant - Implement AI assistant to Feishu card conversion - Support structured sections: header, summary, code, metrics, text, divider, actions - Add comprehensive test cases - Update documentation with usage examples - Resolves Open-Source-Bazaar#11
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis pull request introduces support for a new Changes
Sequence Diagram(s)sequenceDiagram
participant Workflow as GitHub Workflow
participant Main as main.ts
participant Parser as ai-assistant.ts
participant Feishu as Feishu API
Workflow->>Main: POST with msg_type: 'ai_assistant'
Main->>Main: Detect msg_type === 'ai_assistant'
Main->>Parser: parseAIAssistantContent(content)
Parser->>Parser: Parse YAML structure
Parser->>Parser: Extract AIAssistantConfig
Parser->>Parser: convertAIAssistantToCard(config)
Parser->>Parser: Build header, sections, actions
Parser-->>Main: Return Feishu card JSON
Main->>Feishu: POST with msg_type: 'interactive'
Feishu-->>Workflow: Message delivered
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
关闭来自 AI 的 pr |
🚀 新增功能:AI助手消息类型支持
解决的问题
随着AI助手(如Clawdbot、ChatGPT等)在GitHub workflows中的普及,现有的消息类型无法很好地展示AI生成的复杂内容,如代码块、结构化数据、任务状态等。
新增功能
ai_assistant使用示例
技术实现
src/ai-assistant.ts- AI助手消息转换器src/main.ts- 支持新的消息类型action.yml- 添加ai_assistant到支持的msg_type__tests__/ai-assistant.test.ts- 完整的单元测试README.md- 详细的使用文档文件变更
测试覆盖
相关issue
Resolves #11
审查要点:
建议测试:
贡献者: @hu-qi
Summary by CodeRabbit
Release Notes
New Features
Documentation
Tests