Skip to content

feat(desktop): 接入 ppt-generate Tool Skill 与通用 Artifact 架构#53

Merged
Yurken merged 5 commits into
masterfrom
feat/reader-paper-cache-vision-error
Jul 26, 2026
Merged

feat(desktop): 接入 ppt-generate Tool Skill 与通用 Artifact 架构#53
Yurken merged 5 commits into
masterfrom
feat/reader-paper-cache-vision-error

Conversation

@Yurken

@Yurken Yurken commented Jul 25, 2026

Copy link
Copy Markdown
Owner

目标

将 Copilot 中的 ppt-generate 从普通提示词技能改为真正的 Tool Skill,通过 Tool Registry 执行并返回 .pptx Artifact,同时为 DOCX/XLSX/PDF 等文件型 Skill 建立通用 Artifact 架构。

主要改动

  • 新增通用 Artifact / ArtifactKind 类型,ChatMessage 扩展 artifacts 字段。
  • 建立 Tool Registry:toolRegistry.tsexecuteToolSkill.ts、PPT Tool 定义与执行器。
  • 抽离 PPT 生成核心 pptService.generatePptArtifact(),独立 PPT 页面与 Copilot 复用同一套实现。
  • 扩展 SlideLayout、完善 normalizePptData,prompt 吸收 MiniMax PPTX Skill 的页面规划与质量约束思想。
  • 新增 Artifact 客户端存储与 Rust 后端命令(artifact_save/open/reveal/save_as/delete),持久化到 <app-data>/artifacts/
  • Copilot 识别 kind === "tool" 的 Skill,展示 Artifact 卡片(打开/另存为/在文件夹中显示)。
  • 新增/扩展测试 14 个,覆盖 Tool Registry、PPT 请求解析、Artifact 存储、Copilot Tool Skill 链路。

检查结果

  • 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)。

Yurken added 4 commits July 21, 2026 15:03
- 将视觉模型测试错误解释逻辑抽取为可复用的 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 测试
Copilot AI review requested due to automatic review settings July 25, 2026 07:55
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Yurken
Yurken merged commit 4e8658a into master Jul 26, 2026
6 checks passed
@Yurken
Yurken deleted the feat/reader-paper-cache-vision-error branch July 26, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants