feat(cli): polish --add-dir / --include-directories feature - #3856
Closed
B-A-M-N wants to merge 3 commits into
Closed
feat(cli): polish --add-dir / --include-directories feature#3856B-A-M-N wants to merge 3 commits into
B-A-M-N wants to merge 3 commits into
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>
Add /directory remove subcommand with tab-completion, initial directory guards, and workspace settings persistence. Warn on startup when --add-dir paths don't exist or aren't readable. Update CLI help text to document path resolution and skip behavior. Track skipped paths in WorkspaceContext via getSkippedDirectories(). Changes: - directoryCommand.tsx: new 'remove' subcommand (action, completion, error handling) - directoryCommand.tsx: remove persists to context.includeDirectories in settings - directoryCommand.test.tsx: 5 new tests for remove subcommand - config.ts (cli): improved --add-dir help text description - en.js: 6 new i18n strings for remove subcommand - config.ts (core): startup warning via process.stderr for invalid --add-dir paths - workspaceContext.ts: track skipped directories, expose getSkippedDirectories() - workspaceContext.test.ts: 4 new tests for getSkippedDirectories()
B-A-M-N
force-pushed
the
feat/add-dir-polish
branch
from
May 5, 2026 21:47
a0daf50 to
ecbbba1
Compare
Contributor
Author
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.
Commit:
a0daf50c065f48f793c357dc3a600ca60d4672c9(a0daf50c0)Summary
/directory removesubcommand with tab-completion, initial-directory guards, and workspace settings persistence--add-dirpaths don't exist or aren't readable--add-dirCLI help text to document path resolution and skip behaviorWorkspaceContext.getSkippedDirectories()to track invalid pathsWhy
The
--add-dir/--include-directoriesfeature had four rough edges:--add-dirpaths were silently skipped with only a debug logWorkspaceContexthad no way to report which paths were skippedWhat Changed
packages/cli/src/ui/commands/directoryCommand.tsx: Newremovesubcommand with completion (filters out initial dirs), error handling for missing/initial dirs, andcontext.includeDirectoriespersistencepackages/cli/src/ui/commands/directoryCommand.test.tsx: 5 new tests covering remove validation, initial-dir guard, not-found, successful removal, and settings-write failurepackages/cli/src/config/config.ts: Improved--add-dirhelp text descriptionpackages/cli/src/i18n/locales/en.js: 6 new i18n strings for the remove subcommandpackages/core/src/config/config.ts: Startup warning viaprocess.stderrlisting skipped--include-directoriespathspackages/core/src/utils/workspaceContext.ts:skippedDirectoriestracker inaddDirectory(), exposed viagetSkippedDirectories()packages/core/src/utils/workspaceContext.test.ts: 4 new tests forgetSkippedDirectories()Validation
npx vitest run packages/core/src/utils/workspaceContext.test.ts— 48 tests passednpx vitest run packages/cli/src/ui/commands/directoryCommand.test.tsx— 18 tests passednpx vitest run packages/core/src/config/config.test.ts— 106 tests passednpx vitest run packages/cli/src/config/config.test.ts— 188 tests passed (2 skipped, pre-existing)Scope
WorkspaceContextconstructor behavior (only adds tracking).gitignoreupdated with PRForge artifact patterns (.prforge/,.prforge-run,.prforge-*)Risk / Compatibility Notes
Low risk — isolated change with full regression coverage. The startup warning only writes to
stderrwhen invalid paths are detected, so normal usage is unaffected.