feat(desktop): 接入 ppt-generate Tool Skill 与通用 Artifact 架构#53
Merged
Conversation
- 将视觉模型测试错误解释逻辑抽取为可复用的 explain_vision_error - 聊天流在视觉请求失败时使用该提示,引导用户检查视界·视觉模型配置 - 支持 paper 类型的会话上下文,与 interest 一并保留 - 补充 explain_vision_error 与 scoped_context_type 单元测试
- 新增 paperListCache,合并并发加载并缓存首页全量论文列表 - 新增 usePaperLibrarySnapshot 统一论文列表状态与加载 - papersApi 在增删改、排序、分析/复现/重解析后自动失效缓存 - usePapersList 复用快照,排序后恢复本地乐观更新 - 补充 paperListCache 单元测试
- 拆分 PaperReader 页面状态到独立 hooks:useReaderPdf、useReaderPdfDocument、useReaderProgress、useReaderQuestionAnswer - 新增 ReaderSidebar、ReaderRightRail、ReaderZoomControl、ReaderQaPanel 等组合组件 - 新增 PdfTextAnnotationLayer 与 TextAnnotationInput,支持文本批注 - 新增 readerNavigation 与 useReaderDocumentNavigation,提供大纲、搜索、跳转 - 阅读进度按论文持久化到 localStorage,恢复上次阅读位置 - 批注模式拆分为 text-annotation 与 shape-annotation,工具栏按模式切换工具 - 补充 PdfReaderViewer、ReaderAnnotations、readerNavigation、useReaderProgress 测试
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目标
将 Copilot 中的
ppt-generate从普通提示词技能改为真正的 Tool Skill,通过 Tool Registry 执行并返回.pptxArtifact,同时为 DOCX/XLSX/PDF 等文件型 Skill 建立通用 Artifact 架构。主要改动
Artifact/ArtifactKind类型,ChatMessage扩展artifacts字段。toolRegistry.ts、executeToolSkill.ts、PPT Tool 定义与执行器。pptService.generatePptArtifact(),独立 PPT 页面与 Copilot 复用同一套实现。SlideLayout、完善normalizePptData,prompt 吸收 MiniMax PPTX Skill 的页面规划与质量约束思想。artifact_save/open/reveal/save_as/delete),持久化到<app-data>/artifacts/。kind === "tool"的 Skill,展示 Artifact 卡片(打开/另存为/在文件夹中显示)。检查结果
pnpm type-check:通过pnpm lint:0 error(仅历史 warning)cd apps/desktop && pnpm test:261/261 通过cargo check:通过cargo fmt --check:本次修改的 Rust 文件已格式化;仓库既有文件存在历史格式化差异,未纳入本次范围外部参考
参考 MiniMax-AI/skills @
60aaae52,仅吸收设计思想,未直接复制源码。参考副本保存在tmp/xiaoyan-reference/minimax-skills(已 gitignore)。