feat(config): make assistants configuration project-scoped#207
Merged
Conversation
Allow users to save assistant registrations to a project-local config (.codemie/codemie-cli.config.json) in addition to the global config (~/.codemie/codemie-cli.config.json). Adds a raw-mode TUI scope selection screen after the registration mode step. Project-scoped assistants override global ones; global config remains the fallback. Generated with AI Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
TarasSpashchenko
approved these changes
Mar 9, 2026
codemie-ai
approved these changes
Mar 9, 2026
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.
Summary
Implements EPMCDME-10896. Allows users to save assistant registrations at the project level (
.codemie/codemie-cli.config.json) instead of only globally (~/.codemie/codemie-cli.config.json). A new scope selection screen appears in thecodemie setup assistantsflow after configuring registration modes. Project-scoped config overrides global; global remains the fallback for projects without local config.Changes
src/utils/config.ts— NewConfigLoader.saveAssistantsToProjectConfig()method: updates only thecodemieAssistantsfield in the local config file (creates file if absent), preserving all other local profile fields.src/cli/commands/assistants/setup/index.ts— Scope selection screen (raw-mode TUI, same pattern aspromptModeSelection) inserted beforeapplyChanges. Guards against showing the prompt when no changes are detected. Uses the class-levelLOCAL_CONFIGconstant for the save path.src/cli/commands/assistants/constants.ts— New message constants for the scope prompt UI and summary output.src/cli/commands/assistants/setup/summary/index.ts—displaySummarynow accepts and displaysconfigLocation(global or local path).Impact
Before:
codemie setup assistantsalways saved to~/.codemie/codemie-cli.config.jsonregardless of context.After: Users are prompted with a full-screen TUI selection:
Selecting Local writes only the
codemieAssistantsfield to.codemie/codemie-cli.config.jsonin the current repository. Existing global-only users pressing Enter (default = Global) are unaffected.Checklist