feat(desktop/tauri): 阅读器重构、论文库缓存与视觉模型错误提示 - #49
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.
变更摘要
本次 PR 将近期本地改动按功能拆分为三次提交:
1. feat(tauri): 统一视觉模型错误提示并支持论文场景上下文
explain_vision_error。paper类型的会话上下文,与interest一并保留。explain_vision_error与scoped_context_type单元测试。2. feat(desktop): 论文库列表缓存与快照复用
paperListCache,合并并发加载并缓存首页全量论文列表。usePaperLibrarySnapshot统一论文列表状态与加载。papersApi在增删改、排序、分析/复现/重解析后自动失效缓存。usePapersList复用快照,排序后恢复本地乐观更新。paperListCache单元测试。3. feat(desktop): 重构论文阅读器并新增目录导航、阅读进度与问答侧栏
PaperReader页面状态到独立 hooks:useReaderPdf、useReaderPdfDocument、useReaderProgress、useReaderQuestionAnswer。ReaderSidebar、ReaderRightRail、ReaderZoomControl、ReaderQaPanel等组合组件。PdfTextAnnotationLayer与TextAnnotationInput,支持文本批注。readerNavigation与useReaderDocumentNavigation,提供大纲、搜索、跳转。text-annotation与shape-annotation,工具栏按模式切换工具。PdfReaderViewer、ReaderAnnotations、readerNavigation、useReaderProgress测试。