Commit Graph

10 Commits

Author SHA1 Message Date
carry 6e98170a7d feat: 更新场景 B 的工具调用流程,支持代码执行和语言选择 2026-06-07 22:11:02 +08:00
carry bab102538d feat: 添加服务器配置,允许从所有主机访问 2026-06-07 21:57:11 +08:00
carry a4b06c7284 feat: tool_call_request/result 拆分为独立 role:tool 消息气泡
- protocol.ts: Message.role 增加 'tool'
- MessageBubble: 新增 tool 角色配置(琥珀色,小写 label 统一)
- MessageList: 新增 extractToolMessages(),将 tool segment
  从 assistant/user 消息中拆分出来作为独立 tool 角色消息
- role label 改为小写(system/user/assistant/tool),字号 text-xs
- demos.ts: e-4 改为 tool_call_result 形式
2026-06-07 15:18:57 +08:00
carry 92ecb139ad refactor: 静态变量提到对话外 + System Prompt 模板展开可视化
- 新建 SessionBar:会话变量独立于消息气泡,显示在对话顶部
- 重写 SystemPromptView:解析 {{var}} 占位符并内联展示模板→变量映射
- 重构 MessageList:提取 static_var 到 varMap,过滤后传入气泡
- 更新 SegmentRenderer + MessageBubble:传递 varMap 到 SystemPromptView
- 更新所有 Demo:static_var 从 user 消息迁移到 system 消息,使用真实会话配置(current_date、language、knowledge_cutoff)
- 更新导出逻辑:system 消息中收集 static_var 并在模板中展开 {{var}}
- 更新测试:新增模板展开用例,18 tests pass
2026-06-07 14:44:29 +08:00
carry 483b1a7f39 feat: Skills 渐进式披露 — Anthropic 3层展开机制 + Agent 主动触发 skill
- protocol.ts: SkillItem 新增 detail/triggers/instructions 渐进式披露字段
- SkillsView.tsx: 重写为 3 层展开组件(名称→详情→完整指令),skill 触发时指令作为独立 system 消息追加到对话
- demos.ts: Demo C/D skills 升级为 5 个真实 Anthropic skills(deep-research/code-review/verify/simplify/loop);新增 Demo E 展示 Agent 主动触发 /deep-research 的完整流程
- ChatContext.tsx: 默认激活 Demo E
2026-06-07 14:23:55 +08:00
carry f22c9f8aeb feat: 添加 CLAUDE.md 文件,提供项目指导和架构概述 2026-06-07 13:56:46 +08:00
carry fec598af62 feat: add Markdown rendering to text segments
- Add react-markdown + remark-gfm for GFM-compatible markdown rendering
- Create MarkdownRenderer component with custom Tailwind-styled elements
- Update TextSegmentView to render markdown instead of plain text
- Update LongTextView to render markdown when expanded
- Fix Lucide icon type in DocumentCard
2026-06-07 13:53:57 +08:00
carry 241156853c feat: add description field to Memory & Skills segments for better context transparency 2026-06-07 13:49:58 +08:00
carry 34b3f44856 refactor: wrap tool call request args as labeled key-value rows instead of raw JSON 2026-06-07 13:46:55 +08:00
carry a9881eac26 feat: Prompt Envelope Protocol MVP
- 定义 11 种 Segment 类型(text, static_var, system_prompt, memory, skills, tool_overview, tool_call_request/result, document, long_text, media)
- 每种 Segment 有独立的颜色编码和折叠交互
- 通用 CollapsiblePanel + SegmentRenderer 路由架构
- 4 个 Demo 场景覆盖全部 9 种上下文类型
- 导出为 OpenAI Chat Completions Format(model + messages + tools)
- tool_overview -> 请求级 tools[](含 JSON Schema)
- tool_call_request -> assistant.tool_calls[]
- tool_call_result -> tool-role message(ID 配对)
- 17 个单元测试全部通过
- React 18 + TypeScript + Vite + Tailwind CSS
2026-06-07 13:44:36 +08:00