Skip to content

Commit 08c6a8e

Browse files
committed
Tighten manual-model hint wording for the CLI-present-but-empty case
Show 'Desktop detected, CLI not installed' only when detection actually reported a Desktop-only install; an empty model list with the CLI present gets neutral 'No models found' phrasing.
1 parent 6f1a5c7 commit 08c6a8e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

packages/dashboard/src/components/ConfigEditor/ConfigEditor.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,14 +350,18 @@ function ConfigForm(props: {
350350
const models = () => props.models;
351351
const showManualModelHint = () =>
352352
props.opencodeInstallState === "desktop" || models().length === 0;
353+
// The "Desktop detected" wording is only accurate when detection actually
354+
// reported a Desktop-only install. An empty model list with the CLI present
355+
// (e.g. `opencode models` returned nothing) gets the neutral phrasing.
353356
const manualModelHint = () => (
354357
<Show when={showManualModelHint()}>
355358
<span
356359
class="config-field-desc"
357360
style={{ color: "var(--text-muted)", "font-style": "italic" }}
358361
>
359-
OpenCode Desktop detected, CLI not installed. Type a model id manually, or install the
360-
OpenCode CLI to auto-populate models.
362+
{props.opencodeInstallState === "desktop"
363+
? "OpenCode Desktop detected, CLI not installed. Type a model id manually, or install the OpenCode CLI to auto-populate models."
364+
: "No models found. Type a model id manually, or install/configure the OpenCode CLI to auto-populate models."}
361365
</span>
362366
</Show>
363367
);

0 commit comments

Comments
 (0)