fix(memory): address code review feedback for auto-memory recall#3866
Conversation
The model-driven relevance selector (selectRelevantAutoMemoryDocumentsByModel) currently uses the main session model for its LLM call. Since this is a background side-query that runs in parallel with the user's main request, route it to config.getFastModel() instead — consistent with sessionRecap, sessionTitle, toolUseSummary, and forkedAgent which all prefer the fast model for background work. When no fast model is configured, getFastModel() returns undefined and runSideQuery falls back to config.getModel(), so behavior is unchanged for users without a fast model set. Co-Authored-By: Claude <noreply@anthropic.com>
eee67f1 to
4387f95
Compare
| * @param p - The path to expand. | ||
| * @returns The expanded path. | ||
| */ | ||
| export function expandHomeDir(p: string): string { |
There was a problem hiding this comment.
[Suggestion] This adds expandHomeDir() as a new exported core helper, but the existing CLI implementation in packages/cli/src/ui/commands/directoryCommand.tsx is still the only production call site. That leaves the new export unused while the same path-expansion behavior now exists in two places, so future changes to ~ or %userprofile% handling can drift and the API intent is unclear.
Either remove this new helper if it is not needed for the memory-recall fix, or complete the extraction by importing the core helper from the CLI command and deleting the local duplicate implementation.
— gpt-5.5 via Qwen Code /review
wenshao
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅ — gpt-5.5 via Qwen Code /review
…nLM#3866) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(memory): route auto-memory recall selector to fast model The model-driven relevance selector (selectRelevantAutoMemoryDocumentsByModel) currently uses the main session model for its LLM call. Since this is a background side-query that runs in parallel with the user's main request, route it to config.getFastModel() instead — consistent with sessionRecap, sessionTitle, toolUseSummary, and forkedAgent which all prefer the fast model for background work. When no fast model is configured, getFastModel() returns undefined and runSideQuery falls back to config.getModel(), so behavior is unchanged for users without a fast model set. Co-Authored-By: Claude <noreply@anthropic.com> * fix(memory): address code review feedback for auto-memory recall * fix(core): move expandHomeDir to core to resolve import errors in CLI * test(memory): fix document path in mock to match test data * test(core): add unit tests for expandHomeDir --------- Co-authored-by: Claude <noreply@anthropic.com>
…nLM#3866) * fix(memory): route auto-memory recall selector to fast model The model-driven relevance selector (selectRelevantAutoMemoryDocumentsByModel) currently uses the main session model for its LLM call. Since this is a background side-query that runs in parallel with the user's main request, route it to config.getFastModel() instead — consistent with sessionRecap, sessionTitle, toolUseSummary, and forkedAgent which all prefer the fast model for background work. When no fast model is configured, getFastModel() returns undefined and runSideQuery falls back to config.getModel(), so behavior is unchanged for users without a fast model set. Co-Authored-By: Claude <noreply@anthropic.com> * fix(memory): address code review feedback for auto-memory recall * fix(core): move expandHomeDir to core to resolve import errors in CLI * test(memory): fix document path in mock to match test data * test(core): add unit tests for expandHomeDir --------- Co-authored-by: Claude <noreply@anthropic.com>
Surgical fixes for auto-memory recall: