fix(import): 支持导入 OpenCode v1 SQLite 会话 - #725
Closed
Blue-Berrys wants to merge 1 commit into
Closed
Blue-Berrys wants to merge 1 commit into
Blue-Berrys wants to merge 1 commit into
Conversation
Read OpenCode v1 session data from its SQLite store while retaining legacy JSON fallback and read-only WAL-safe behavior. Fixes vastsa#682
Owner
|
您好,感谢 pr,导入功能可以 pr 到导入插件哦,后面宿主的导入会下掉了 |
Contributor
Author
|
收到,感谢说明。这个修复不再放在宿主中继续推进。 同一问题的插件侧修复已在 vastsa/pi-desktop-plugins#56 处理:现有导入插件已经支持 OpenCode v1.x SQLite,实际缺失的是 Windows |
Owner
感谢您的时间! |
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.
修复 OpenCode v1.x 已迁移到 SQLite 后,PI-Desktop 仍只扫描旧 JSON 目录而检测不到会话的问题。
导入器现在会只读扫描
opencode.db中的 v1session、message和part表,同时保留旧 JSON 导入。数据库与 JSON 中存在同一会话时以数据库副本为准;损坏、锁定或不兼容的数据库不会阻断旧 JSON 扫描。读取覆盖 WAL 已提交数据、完整键集分页、稳定消息/部件顺序和转换前完整性校验。验证:
范围:支持经 OpenCode v1.18.26 核对的 v1 表结构;暂不导入独立的 v2
session_message投影、reasoning、附件及结构性 parts。Fixes #682