feat: multi-custom provider system with TUI preset picker#6
Merged
Conversation
- Add custom_providers and custom_provider_selected fields to PrefsState
- Add PresetPicker, ProviderNameInput, CommandTemplateInput variants to OverlayMode
- Add RemoveCustomProvider variant to ConfirmAction
- Load custom_providers in Char('5') and Char('r'/'R') prefs refresh handlers
Add presets.rs with 6 built-in CLI templates (Claude-like, Codex-like, Gemini-like, Ollama-like, OpenRouter, Manual) and reserved name list. Update cycle_config_option to append custom providers from the DB to the built-in provider rotation list.
Add Down/Up/Left/Right/a/Delete key handling for the custom providers row (section_selected[4] == 2) in the Config section, and implement RemoveCustomProvider confirmation action.
Add render_preset_picker, render_provider_name_input, and render_command_template_input functions, and wire them into the overlay dispatch replacing the previous empty stubs.
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
custom_providersDB table for storing user-defined AI CLI providers with preset templatesChanges
Python backend (7 files):
core/database.py:custom_providerstable schemacore/models.py:CustomProviderConfigdataclassservices/settings_service.py: CRUD methods for custom providersservices/providers.py:get_provider()resolves custom providers dynamicallyservices/summarization.py,services/translation.py: stderr error outputcli/daily.py: exit code 1 on AI service failureRust TUI (6 files):
presets.rs: 6 preset template definitionsdb/models.rs,db/mod.rs:CustomProviderEntrymodel + DB CRUDapp.rs:PrefsStatefields, newOverlayModeandConfirmActionvariantsevents.rs: Config section navigation, overlay handlers, confirm handlermain.rs: Config section rendering, 3 new overlay render functionsTest plan