Repository navigation
feat(recall): 本地回声记忆与 Wayland 主选区读取 - #3
Conversation
- 新增 glint-recall(SQLite + FTS5):记录完成轮次,划词时返回一条旧结论 - HUD 在宿主徽标下渲染单行回声;未命中不渲染,也没有空状态 - 旧结论以 <prior_answer> 数据块只进入本次请求,不写入对话与历史 - 门禁:同线索排除;双方 doc_key 都存在且不同才免 24 小时年龄门槛 - Wayland 会话优先读 PRIMARY,修正原生 Wayland 窗口读不到选区的问题 - 删除会话时同步清理回声;清空历史时整库删除 - 单测 14 条(只走公开 API)、契约测试、CI 三平台矩阵 Co-Authored-By: Claude Code <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d1bc6a6a4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| function recordRecallTurn(anchor: string, answer: string) { | ||
| if (!isTauri()) return; | ||
|
|
||
| const cleanAnchor = sanitizeEchoText(anchor).slice(0, 200); |
There was a problem hiding this comment.
Keep lookup and stored anchor lengths consistent
For a selected passage over 200 characters, this saves only its first 200 characters, while startNewQuery sends the full selection (up to 3000 characters) to recall_find_echo. If the trailing terms are absent from the stored conclusion, exact matching misses and FTS requires those absent terms, so reselecting the same passage will not produce an echo. Use a consistent anchor representation for recording and lookup, or store the full bounded selection.
Useful? React with 👍 / 👎.
| if (options?.recordAnchor) { | ||
| recordRecallTurn(options.recordAnchor, fullTurnText); |
There was a problem hiding this comment.
Prevent pending turn writes from undoing a history wipe
If a selected-text answer is still streaming when the user confirms Clear History and finishes after recall_wipe completes, the active Done handler still reaches this write and recreates the recall database with the supposedly cleared turn. That memory can then surface from another thread. Invalidate or cancel pending recall writes when clearing history.
Useful? React with 👍 / 👎.
做了什么
crates/glint-recall:SQLite + FTS5,记录 Glint 自己的完成轮次;划词时返回一条旧结论(回声)<prior_answer>数据块只进入本次请求,不进入对话记录与历史存储验证
./scripts/check.sh全绿(fmt / clippy / core+recall+shell 测试 / 前端 / 契约 / production build)<prior_answer>被模型引用、PRIMARY 选区读取注意
xdotool;Wayland 主路径不依赖它app_data_dir()/recall.sqlite3,懒创建🤖 Generated with Claude Code