feat(tui): prefab provider templates and test-connection (#5350) - #5406
feat(tui): prefab provider templates and test-connection (#5350)#5406Hmbown wants to merge 2 commits into
Conversation
Built-in /provider templates for OpenCode Zen, OpenCode Go, Agnes, and SenseNova so setup asks only for an API key. First-class routes keep their existing guided flow; Agnes and SenseNova persist as named openai-compatible tables with a fixed URL and a common model list. T (Test Connection) probes /models and refreshes picker status. A 2xx is reachability only — LastProviderCheck::ModelsEndpointPassed, never Ready. /model cache-failed chrome now says refresh failed; catalog available, and Zen's fallback list is the full curated roster. Harvest: lanes codex/v098-provider-setup-5350 and codex/v098-provider-setup-5350-fix were not on this VM or origin. Rebuilt the smallest TUI/config templates; no new ProviderKind variants. Agent assistance: Cursor Cloud agent used for implementation. Verification pending on this revision. Co-authored-by: Hunter Bown <Hmbown@users.noreply.github.com>
The #5350 picker tests need a row-focus helper. Leaving #[test] on move_to_provider_id made the lib-test build fail because test functions cannot take arguments. Verified: cargo fmt --all -- --check; cargo test -p codewhale-config --locked provider_templates; cargo test -p codewhale-tui --lib catalog_injects_unconfigured, enter_on_agnes, p_opens_template, t_emits_test_connection, template_setup_constructor, validated_model_pick_for_agnes, custom_agnes_template_seeds, setup_subcommand_opens_agnes, setup_subcommand_opens_first_class, setup_provider_agnes, picker_identity_resolves, provider_key_submit_opens_model_pick, test_connection_records, test_connection_without_key, failed_live_catalog, models_probe_success_marks_connection_checked_not_ready. Agent assistance: Cursor Cloud agent used for implementation and verification. Co-authored-by: Hunter Bown <Hmbown@users.noreply.github.com>
|
v0.9.9 batch review (2026-08-16): NEEDS-WORK before landing — the right feature for #5350 (templates for Zen/Go first-class + Agnes/SenseNova openai-compatible, |
|
Superseded by the provider template work that shipped in v0.9.11 via #5542 ( |
Summary
Implements #5350: prefab third-party provider templates so users only enter an API key.
[providers.<id>] kind = "openai-compatible"tables with a fixed URL and a common model list. They are not newProviderKindvariants./providerPopens the template list./provider setup agnes|sensenova|opencode-zen|opencode-goand/setup provider …start the matching flow.TTest Connection probes/modelsand reopens the picker with refreshed status. A 2xx is recorded asModelsEndpointPassed→ConnectionCheckedModelUnchecked. It does not callrecord_success/Ready. Truth-boundary on main is preserved./modelno longer labels a failed Models.dev refresh ascache failed. Chrome matches/provider:refresh failed; catalog available. OpenCode Zen’s fallback list is the full curated roster.Harvest notes
Lanes
codex/v098-provider-setup-5350andcodex/v098-provider-setup-5350-fixwere not on this VM (git worktree listshowed only/workspace) and were not onorigin. This revision rebuilds the smallest honest TUI/config templates from issue intent plus currentmain(truth-boundary already landed).HEAD:
bd8482f97a65e98b379ba3618a97d6378c0c4eb2Testing
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-features --locked(warning-free under the CI allow list)cargo test --workspace --all-features --lockedTargeted, this revision:
cargo test -p codewhale-config --locked(550 passed, includingprovider_templates)cargo test -p codewhale-tui --libfilters: catalog inject, Agnes key-only,P/T, template constructor, model list,/provider setup//setup provider, identity fallback,provider_key_submit_opens_model_pick_without_persisting_on_validation_success(truth-boundary), Test Connection 2xx ≠ Ready, Test Connection without key,failed_live_catalogchrome,models_probe_success_marks_connection_checked_not_readyChecklist
No bot/tool
Co-authored-by. Not tagged or published.Closes #5350