diff --git a/desktop/src/features/agents/ui/AgentModelProviderFields.tsx b/desktop/src/features/agents/ui/AgentModelProviderFields.tsx index 9f3249800..2aaa79821 100644 --- a/desktop/src/features/agents/ui/AgentModelProviderFields.tsx +++ b/desktop/src/features/agents/ui/AgentModelProviderFields.tsx @@ -124,6 +124,9 @@ export function AgentModelProviderFields({ : trimmedProvider || AUTO_PROVIDER_DROPDOWN_VALUE; const providerDropdownOptions: PersonaDropdownOption[] = [ ...providerOptions.map((option) => ({ + // The "Default" option means "no explicit provider" — render it faded + // in the trigger, like placeholder text. + isPlaceholder: option.id === "", label: option.label, value: option.id || AUTO_PROVIDER_DROPDOWN_VALUE, })), @@ -131,6 +134,8 @@ export function AgentModelProviderFields({ ]; const modelDropdownOptions: PersonaDropdownOption[] = [ ...modelOptions.map((option) => ({ + // Same treatment for "Default model" — it's the absence of a choice. + isPlaceholder: option.id === "", label: option.label, value: option.id || AUTO_MODEL_DROPDOWN_VALUE, })), diff --git a/desktop/src/features/agents/ui/CreateAgentDialog.tsx b/desktop/src/features/agents/ui/CreateAgentDialog.tsx index ba8200fb4..a84188360 100644 --- a/desktop/src/features/agents/ui/CreateAgentDialog.tsx +++ b/desktop/src/features/agents/ui/CreateAgentDialog.tsx @@ -40,6 +40,7 @@ import { ProviderConfigFields, } from "./ProviderConfigFields"; import { CreateAgentRespondToField } from "./RespondToField"; +import { PersonaDropdownField } from "./PersonaDropdownField"; import { RelayMeshAgentSection } from "@/features/mesh-compute/ui/RelayMeshAgentSection"; import { meshPrepareRelayMeshClient } from "@/shared/api/tauriMesh"; import type { MeshServeTarget } from "@/shared/api/tauriMesh"; @@ -501,8 +502,12 @@ export function CreateAgentDialog({
Detected via{" "} diff --git a/desktop/src/features/agents/ui/PersonaDropdownField.tsx b/desktop/src/features/agents/ui/PersonaDropdownField.tsx index 90aa3fc06..df7522ba4 100644 --- a/desktop/src/features/agents/ui/PersonaDropdownField.tsx +++ b/desktop/src/features/agents/ui/PersonaDropdownField.tsx @@ -34,6 +34,7 @@ export function PersonaDropdownField({ }) { const [open, setOpen] = React.useState(false); const selectedOption = options.find((option) => option.value === value); + const showAsPlaceholder = !selectedOption || selectedOption.isPlaceholder; return (
Controls which Nostr authors the agent listens to (@mentions, DMs, thread replies). The agent's owner can always shut it down with diff --git a/desktop/src/features/agents/ui/personaDialogPickers.tsx b/desktop/src/features/agents/ui/personaDialogPickers.tsx index e3b51cfcb..03f68b593 100644 --- a/desktop/src/features/agents/ui/personaDialogPickers.tsx +++ b/desktop/src/features/agents/ui/personaDialogPickers.tsx @@ -30,6 +30,12 @@ export type PersonaModelOption = { export type PersonaDropdownOption = { disabled?: boolean; + /** + * Marks an "auto"/default option that stands in for "no explicit choice". + * The trigger renders it faded, like placeholder text, so it reads as + * helper copy rather than an actively selected value. + */ + isPlaceholder?: boolean; label: string; value: string; }; diff --git a/desktop/tests/e2e/persona-env-vars.spec.ts b/desktop/tests/e2e/persona-env-vars.spec.ts index 7098a7f0e..dd90ab946 100644 --- a/desktop/tests/e2e/persona-env-vars.spec.ts +++ b/desktop/tests/e2e/persona-env-vars.spec.ts @@ -320,7 +320,7 @@ test("agent model options follow the selected LLM provider", async ({ const runtime = page.locator("#agent-runtime"); const llmProvider = page.locator("#agent-llm-provider"); const model = page.locator("#persona-model"); - await expect(runtime).toHaveValue("buzz-agent"); + await expect(runtime).toContainText("Buzz Agent"); await expect(llmProvider).toBeVisible(); await expect(model).toBeVisible(); // Without live discovery, the only static option is "Default model".