Skip to content

feat(config): make assistants configuration project-scoped#207

Merged
8nevil8 merged 1 commit intomainfrom
EPMCDME-10896
Mar 9, 2026
Merged

feat(config): make assistants configuration project-scoped#207
8nevil8 merged 1 commit intomainfrom
EPMCDME-10896

Conversation

@8nevil8
Copy link
Collaborator

@8nevil8 8nevil8 commented Mar 9, 2026

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 the codemie setup assistants flow after configuring registration modes. Project-scoped config overrides global; global remains the fallback for projects without local config.

Changes

  • src/utils/config.ts — New ConfigLoader.saveAssistantsToProjectConfig() method: updates only the codemieAssistants field 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 as promptModeSelection) inserted before applyChanges. Guards against showing the prompt when no changes are detected. Uses the class-level LOCAL_CONFIG constant 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.tsdisplaySummary now accepts and displays configLocation (global or local path).

Impact

Before: codemie setup assistants always saved to ~/.codemie/codemie-cli.config.json regardless of context.

After: Users are prompted with a full-screen TUI selection:

  Where would you like to save assistant configuration?

  ● Global (~/.codemie/) - Available across all projects
  ○ Local  (.codemie/) - Only for this project

  ↑↓ Navigate   Enter Confirm

Selecting Local writes only the codemieAssistants field to .codemie/codemie-cli.config.json in the current repository. Existing global-only users pressing Enter (default = Global) are unaffected.

Checklist

  • Self-reviewed
  • Manual testing performed
  • Documentation updated (if needed)
  • No breaking changes (or clearly documented)

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>
@8nevil8 8nevil8 merged commit e51200d into main Mar 9, 2026
5 checks passed
@8nevil8 8nevil8 deleted the EPMCDME-10896 branch March 9, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants