Repository navigation
Conversation
"Clean up this doc" got "I don't find that in your notes" because ask retrieved by the question text alone. Vault::ask now takes an optional focus note. Its first FOCUS_PASSAGES (8) passages are numbered first, retrieval at ASK_PASSAGES fills in behind them minus repeats, and the grounded and condense prompts both say the user is viewing that path. A note longer than the cap adds one line saying how many of its passages were included. With no focus the request is unchanged, pinned by a recording-provider test against the request spelled out field by field. - CLI: `b2 ask --note PATH` and `b2 chat --note PATH`; --json unchanged. - Desktop: the ask command takes `focus`; the pane sends the open note's path and shows an "about: <title>" chip by the composer. - Docs: quickstart documents --note; index-engine flow 4 and the constants table gain the focus step and FOCUS_PASSAGES. Fixes #253 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A cap is configurable and loud, so the focus note's passage cap gets
the same treatment as the tool-call cap. Vault::ask now takes a
chat::FocusRequest { note, max_passages } instead of a bare path, and
FOCUS_PASSAGES stays as the default. A test proves a smaller cap takes
the same opening passages and the trim line follows it.
- b2-llm: LlmConfig::focus_passages, B2_LLM_FOCUS_PASSAGES (1 to 64,
default 8), parse_focus_passages, with_focus_passages. ToolCallCap
becomes CapSetting so both caps share one view, and ChatSetup carries
focus_passages for Settings.
- CLI: ask and chat read the cap from LlmConfig (env only).
- Desktop: ChatPrefs::focus_passages with the three-state apply rule
shared with the tool-call cap; ask passes the cap in force.
- UI: a "Focus passages" field beside "Tool calls per reply", judged by
focusCapInput.
- quickstart documents B2_LLM_FOCUS_PASSAGES.
Part of #253
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…fuse Ported from PR #254's 821fd33, which recorded the finding on the user's vault: with every passage of the open note present, gemma4 still answered "I don't find that in your notes" to "clean up this note", because the grounded prompt frames everything as a question the passages must answer. When the focus note has text, the grounded prompt now adds one sentence saying a request to summarise, clean up, rewrite, outline or shorten the note is a task to do with its text, and to keep the no-evidence reply for questions the passages don't cover. The condense prompt and the no-focus request are unchanged. Part of #253 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
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.
Reading a note with the chat pane open and asking "can you clean up this doc" got "I don't find that in your notes", because chat was sent only the question and the history. Step one of #255 (ADR-0023).
What changed
Vault::asktakes an optional focus note (chat::FocusRequest { note, max_passages }). Its passages are numbered first, retrieval atASK_PASSAGESfills the rest minus repeats, the grounded prompt and the condense prompt name the note, and the answer prompt tells the model that work on the note (clean up, summarise, rewrite) is a task on its text, not a question to refuse. That last sentence is ported from PR #254's 821fd33, where it was reproduced against the real vault with gemma4. If the cap trimmed the note, the prompt says how many of its passages were included. With no focus the request is byte-identical to before (pinned by a test).B2_LLM_FOCUS_PASSAGES(1 to 64, default 8) and a "Focus passages" field in Settings → Chat, following the tool-call cap's three-state pattern.b2 ask --note PATHandb2 chat --note PATH.askcommand passes the open note; the pane shows an "about: <title>" chip so what the model was told is visible.quickstart.md(flag and env var),index-engine.md§6.Judgment calls
Not verified
The real-app check: "clean up this doc" answering about the open note under
make appwith gemma4.Fixes #253
🤖 Generated with Claude Code