Files
gemini-cli/plans/TASK-02.md
T
Taylor Mullen 1c5646b68d feat(cli): implement startup team selection dialog and UI integration
- Add TeamSelectionDialog component for team discovery UX
- Intercept startup flow in AppContainer to show team selection if needed
- Update DialogManager to orchestrate team selection UI
- Add handleTeamSelect and isTeamSelectionActive to UI contexts
- Fix pre-existing StyledLine compilation error in TableRenderer
- Refactor promptProvider-teams.test.ts to resolve type errors
- Add unit tests for TeamSelectionDialog
- Fix ESLint warnings for exhaustive-deps in AppContainer
- Resolve syntax corruptions in AppContainer.tsx and DialogManager.tsx
2026-04-01 15:58:16 -07:00

41 lines
1.4 KiB
Markdown

# TASK-02: Integrating Team Registry and Discovery into Config
## Objective
Embed the `TeamRegistry` into the `Config` service and manage the team discovery
lifecycle during application startup and configuration reloads.
## Implementation Details
### 1. Config Modifications (`packages/core/src/config/config.ts`)
- [ ] Add a private `teamRegistry` member:
`private teamRegistry!: TeamRegistry;`.
- [ ] In the `Config` constructor or initializer:
- [ ] Initialize `teamRegistry = new TeamRegistry(this);`.
- [ ] Call `await this.teamRegistry.initialize();`.
- [ ] Update `reloadAgents()` to also reload the `TeamRegistry`.
- [ ] Provide a public accessor: `getTeamRegistry(): TeamRegistry`.
- [ ] Implement `getActiveTeam()` and `setActiveTeam(name: string | undefined)`
delegates to the registry.
### 2. Discovery Path
- [ ] Ensure `TeamRegistry` scans the correct paths:
- [ ] User-level: `~/.gemini/teams/`
- [ ] Project-level: `.gemini/teams/`
### 3. State Persistence
- [ ] While the MVP can use memory, consider if the active team should be saved
in `settings.json` via the `SettingsService` so it persists across
sessions.
## Verification
- Unit tests for `Config.getTeamRegistry()`.
- Integration tests ensuring that a team in `.gemini/teams/` is discovered and
loaded during `Config` initialization.
- Test that reloading the configuration correctly refreshes the list of
available teams.