diff --git a/site/src/pages/AgentsPage/AgentDetail/ConversationTimeline.tsx b/site/src/pages/AgentsPage/AgentDetail/ConversationTimeline.tsx index 805d690c76..aba7a8844d 100644 --- a/site/src/pages/AgentsPage/AgentDetail/ConversationTimeline.tsx +++ b/site/src/pages/AgentsPage/AgentDetail/ConversationTimeline.tsx @@ -61,18 +61,12 @@ const ReasoningDisclosure: FC<{ return (
{hasText ? ( -
setIsOpen((prev) => !prev)} - onKeyDown={(event) => { - if (event.key === "Enter" || event.key === " ") { - setIsOpen((prev) => !prev); - } - }} > {labelContent} -
+ ) : (
{labelContent} diff --git a/site/src/pages/AgentsPage/ChatModelAdminPanel/ModelForm.tsx b/site/src/pages/AgentsPage/ChatModelAdminPanel/ModelForm.tsx index aa9193cd3f..6fbe00ef2a 100644 --- a/site/src/pages/AgentsPage/ChatModelAdminPanel/ModelForm.tsx +++ b/site/src/pages/AgentsPage/ChatModelAdminPanel/ModelForm.tsx @@ -230,27 +230,14 @@ export const ModelForm: FC = ({ if (!selectedProviderState || modelConfigsUnavailable) { return (
-
{ - if (e.key === "Enter") { - onCancel(); - e.stopPropagation(); - } - }} - onKeyUp={(e) => { - if (e.key === " ") { - onCancel(); - e.stopPropagation(); - } - }} - className="mb-4 inline-flex cursor-pointer items-center gap-0.5 text-sm text-content-secondary transition-colors hover:text-content-primary" + className="mb-4 inline-flex cursor-pointer items-center gap-0.5 bg-transparent border-0 p-0 text-sm text-content-secondary transition-colors hover:text-content-primary" > Back -
{" "} + {" "}

{isEditing ? "Edit Model" : "Add Model"}

@@ -264,27 +251,14 @@ export const ModelForm: FC = ({ if (!canManageModels && !isEditing) { return (
-
{ - if (e.key === "Enter") { - onCancel(); - e.stopPropagation(); - } - }} - onKeyUp={(e) => { - if (e.key === " ") { - onCancel(); - e.stopPropagation(); - } - }} - className="mb-4 inline-flex cursor-pointer items-center gap-0.5 text-sm text-content-secondary transition-colors hover:text-content-primary" + className="mb-4 inline-flex cursor-pointer items-center gap-0.5 bg-transparent border-0 p-0 text-sm text-content-secondary transition-colors hover:text-content-primary" > Back -
+

Add Model

{" "} @@ -310,27 +284,15 @@ export const ModelForm: FC = ({ return (
{/* Back */} -
{ - if (e.key === "Enter") { - onCancel(); - e.stopPropagation(); - } - }} - onKeyUp={(e) => { - if (e.key === " ") { - onCancel(); - e.stopPropagation(); - } - }} - className="mb-4 inline-flex cursor-pointer items-center gap-0.5 text-sm text-content-secondary transition-colors hover:text-content-primary" + className="mb-4 inline-flex cursor-pointer items-center gap-0.5 bg-transparent border-0 p-0 text-sm text-content-secondary transition-colors hover:text-content-primary" > Back -
+ + {/* Header — editable display name */}
{selectedProviderState && ( @@ -439,23 +401,10 @@ export const ModelForm: FC = ({ {/* Advanced — toggle */}
-
setShowAdvanced((v) => !v)} - onKeyDown={(e) => { - if (e.key === "Enter") { - setShowAdvanced((v) => !v); - e.stopPropagation(); - } - }} - onKeyUp={(e) => { - if (e.key === " ") { - setShowAdvanced((v) => !v); - e.stopPropagation(); - } - }} - className="inline-flex cursor-pointer items-center gap-1 text-sm font-medium text-content-secondary transition-colors hover:text-content-primary" + className="inline-flex cursor-pointer items-center gap-1 bg-transparent border-0 p-0 text-sm font-medium text-content-secondary transition-colors hover:text-content-primary" > {showAdvanced ? ( @@ -463,7 +412,7 @@ export const ModelForm: FC = ({ )} Advanced -
{" "} + {" "} {showAdvanced && (
diff --git a/site/src/pages/AgentsPage/ChatModelAdminPanel/ModelsSection.tsx b/site/src/pages/AgentsPage/ChatModelAdminPanel/ModelsSection.tsx index 88fd4b4e29..47228f788d 100644 --- a/site/src/pages/AgentsPage/ChatModelAdminPanel/ModelsSection.tsx +++ b/site/src/pages/AgentsPage/ChatModelAdminPanel/ModelsSection.tsx @@ -194,28 +194,15 @@ export const ModelsSection: FC = ({ {/* Star for default */} -
{ e.stopPropagation(); handleSetDefault(modelConfig); }} - onKeyDown={(e) => { - if (e.key === "Enter") { - e.stopPropagation(); - handleSetDefault(modelConfig); - } - }} - onKeyUp={(e) => { - if (e.key === " ") { - e.stopPropagation(); - handleSetDefault(modelConfig); - } - }} aria-disabled={isUpdating || modelConfig.is_default} className={cn( - "flex h-7 w-7 shrink-0 items-center justify-center rounded-md transition-colors", + "flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-transparent border-0 p-0 transition-colors", modelConfig.is_default ? "text-yellow-400" : "cursor-pointer text-content-secondary/30 hover:text-content-secondary", @@ -227,7 +214,7 @@ export const ModelsSection: FC = ({ modelConfig.is_default && "fill-current", )} /> -
+
{modelConfig.is_default @@ -236,25 +223,11 @@ export const ModelsSection: FC = ({
{/* Clickable row content */} -
setView({ mode: "edit", model: modelConfig })} - onKeyDown={(e) => { - if (e.key === "Enter") { - setView({ mode: "edit", model: modelConfig }); - e.stopPropagation(); - } - }} - onKeyUp={(e) => { - if (e.key === " ") { - setView({ mode: "edit", model: modelConfig }); - e.stopPropagation(); - } - }} - className="flex min-w-0 flex-1 cursor-pointer items-center gap-3.5 transition-colors hover:opacity-80" + className="flex min-w-0 flex-1 cursor-pointer items-center gap-3.5 bg-transparent border-0 p-0 text-left transition-colors hover:opacity-80" > - {" "} = ({ )} -
{" "} + {" "}
))}
diff --git a/site/src/pages/AgentsPage/ChatModelAdminPanel/ProviderForm.tsx b/site/src/pages/AgentsPage/ChatModelAdminPanel/ProviderForm.tsx index a4c971db42..cf0d3dfad6 100644 --- a/site/src/pages/AgentsPage/ChatModelAdminPanel/ProviderForm.tsx +++ b/site/src/pages/AgentsPage/ChatModelAdminPanel/ProviderForm.tsx @@ -155,27 +155,15 @@ export const ProviderForm: FC = ({ return (
{/* Back */} -
{ - if (e.key === "Enter") { - onBack(); - e.stopPropagation(); - } - }} - onKeyUp={(e) => { - if (e.key === " ") { - onBack(); - e.stopPropagation(); - } - }} - className="mb-4 inline-flex cursor-pointer items-center gap-0.5 text-sm text-content-secondary transition-colors hover:text-content-primary" + className="mb-4 inline-flex cursor-pointer items-center gap-0.5 bg-transparent border-0 p-0 text-sm text-content-secondary transition-colors hover:text-content-primary" > Back -
+ + {/* Provider header — editable name */}
diff --git a/site/src/pages/AgentsPage/ChatModelAdminPanel/ProvidersSection.tsx b/site/src/pages/AgentsPage/ChatModelAdminPanel/ProvidersSection.tsx index 4f37a47562..a02cbcb1f8 100644 --- a/site/src/pages/AgentsPage/ChatModelAdminPanel/ProvidersSection.tsx +++ b/site/src/pages/AgentsPage/ChatModelAdminPanel/ProvidersSection.tsx @@ -85,10 +85,9 @@ export const ProvidersSection: FC = ({ )}
{providerStates.map((providerState, i) => ( -
{ onSelectedProviderChange(providerState.provider); @@ -97,28 +96,8 @@ export const ProvidersSection: FC = ({ provider: providerState.provider, }); }} - onKeyDown={(e) => { - if (e.key === "Enter") { - onSelectedProviderChange(providerState.provider); - setView({ - mode: "detail", - provider: providerState.provider, - }); - e.stopPropagation(); - } - }} - onKeyUp={(e) => { - if (e.key === " ") { - onSelectedProviderChange(providerState.provider); - setView({ - mode: "detail", - provider: providerState.provider, - }); - e.stopPropagation(); - } - }} className={cn( - "flex cursor-pointer items-center gap-3.5 px-3 py-3 transition-colors hover:bg-surface-secondary/30", + "flex w-full cursor-pointer items-center gap-3.5 bg-transparent border-0 p-0 px-3 py-3 text-left transition-colors hover:bg-surface-secondary/30", i > 0 && "border-0 border-t border-solid border-border/50", )} > @@ -126,7 +105,7 @@ export const ProvidersSection: FC = ({ provider={providerState.provider} className="h-8 w-8 shrink-0" /> - + {providerState.label} {providerState.hasEffectiveAPIKey ? ( @@ -135,7 +114,7 @@ export const ProvidersSection: FC = ({ )} -
+ ))}{" "}