From 6ca0d38fa43ba1ad287664b13965ffa2fc1c3c43 Mon Sep 17 00:00:00 2001 From: Haileyesus <118998054+blackmammoth@users.noreply.github.com> Date: Fri, 22 May 2026 16:49:40 +0300 Subject: [PATCH] fix: clarify model refresh and onboarding providers OpenCode is now a supported chat provider, but first-run onboarding still only offered Claude, Cursor, Codex, and Gemini. That made OpenCode harder to discover and forced users to finish setup before finding the provider in settings or chat. Adding it to onboarding keeps first-run setup aligned with the providers the application already supports elsewhere. The model refresh control was also doing too much visual work. In the new chat model picker, the previous Hard Refresh label looked like the dialog heading, which made the primary task unclear. Users open that dialog to choose a model; refreshing catalogs is only a secondary maintenance action for stale cached provider model lists. Rename and reposition the refresh affordance so the model picker reads as a model picker first. The copy now explains why catalogs are cached, when a refresh is useful, and that the refresh checks every provider. The /models modal gets the same clarification so both model-selection surfaces describe the cache behavior consistently. --- .../view/subcomponents/CommandResultModal.tsx | 38 +++++++++++----- .../ProviderSelectionEmptyState.tsx | 44 +++++++++---------- .../subcomponents/AgentConnectionsStep.tsx | 8 ++++ 3 files changed, 56 insertions(+), 34 deletions(-) diff --git a/src/components/chat/view/subcomponents/CommandResultModal.tsx b/src/components/chat/view/subcomponents/CommandResultModal.tsx index 4e0bbe4e..9ee66224 100644 --- a/src/components/chat/view/subcomponents/CommandResultModal.tsx +++ b/src/components/chat/view/subcomponents/CommandResultModal.tsx @@ -346,7 +346,7 @@ function ModelsContent({ return (
-
+
@@ -387,17 +387,31 @@ function ModelsContent({
- +
+
+

+ Catalog Refresh +

+ + All providers + +
+

+ Model lists are cached for 3 days. Refresh after CLI, auth, or config changes, + or when a new model is missing. +

+ +
diff --git a/src/components/chat/view/subcomponents/ProviderSelectionEmptyState.tsx b/src/components/chat/view/subcomponents/ProviderSelectionEmptyState.tsx index 99e385ac..891f90c9 100644 --- a/src/components/chat/view/subcomponents/ProviderSelectionEmptyState.tsx +++ b/src/components/chat/view/subcomponents/ProviderSelectionEmptyState.tsx @@ -265,29 +265,29 @@ export default function ProviderSelectionEmptyState({ Model Selector
-
-
-

- Hard refresh model catalogs -

-

- Bypasses the 3-day backend cache and re-fetches models for every provider. -

-

- Last updated for {getProviderDisplayName(provider)}: {formatUpdatedAt(currentProviderCache?.updatedAt)} -

+
+
+
+

Choose a model

+

+ Catalogs are cached for 3 days. Refresh after CLI/auth changes or if a model is missing. +

+
+
- +

+ Refresh checks every provider and replaces the cached catalogs. Last updated for {getProviderDisplayName(provider)}: {formatUpdatedAt(currentProviderCache?.updatedAt)} +

diff --git a/src/components/onboarding/view/subcomponents/AgentConnectionsStep.tsx b/src/components/onboarding/view/subcomponents/AgentConnectionsStep.tsx index 3dfb25a9..5c66997a 100644 --- a/src/components/onboarding/view/subcomponents/AgentConnectionsStep.tsx +++ b/src/components/onboarding/view/subcomponents/AgentConnectionsStep.tsx @@ -1,5 +1,6 @@ import type { LLMProvider } from '../../../../types/app'; import type { ProviderAuthStatusMap } from '../../../provider-auth/types'; + import AgentConnectionCard from './AgentConnectionCard'; type AgentConnectionsStepProps = { @@ -36,6 +37,13 @@ const providerCards = [ iconContainerClassName: 'bg-teal-100 dark:bg-teal-900/30', loginButtonClassName: 'bg-teal-600 hover:bg-teal-700', }, + { + provider: 'opencode' as const, + title: 'OpenCode', + connectedClassName: 'bg-zinc-100 dark:bg-zinc-800/50 border-zinc-300 dark:border-zinc-600', + iconContainerClassName: 'bg-zinc-100 dark:bg-zinc-800', + loginButtonClassName: 'bg-zinc-800 hover:bg-zinc-900 dark:bg-zinc-700 dark:hover:bg-zinc-600', + }, ]; export default function AgentConnectionsStep({