mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
fix: follow up prompt preservation changes (#292)
* fix: remove unused disabled prop, throttle SW update checks, precache icon * fix: retract transient send error and restored prompt once server confirms send When a long-running prompt request drops (gateway timeout or network error) while the agent is actually working, the send error banner and the restored prompt text were left in place. Tag send errors as 'network' and clear them when the server confirms session activity (message.updated / session.idle), also clearing the restored input text. Genuine server-reported session errors (kind 'session') are preserved. * style: restyle ErrorBanner with neutral card fill and destructive accent bar Replace the all-red destructive Alert variant (transparent background, full red text) with a neutral card-filled banner, a left destructive accent bar, red icon, foreground title, and muted body/detail text. Improves the send-error and git-error banners on the dark theme.
This commit is contained in:
1 parent
71ba7371bc
commit
8d93f2f1f9
11 files changed
+215
-31
No files matched your search
@@ -17,7 +17,6 @@ interface AgentQuickSelectProps {
|
||||
currentAgent: string
|
||||
onAgentChange: (agent: string) => void
|
||||
isBashMode?: boolean
|
||||
disabled?: boolean
|
||||
}
|
||||
|
||||
interface AgentInfo {
|
||||
@@ -55,7 +54,6 @@ export function AgentQuickSelect({
|
||||
currentAgent,
|
||||
onAgentChange,
|
||||
isBashMode = false,
|
||||
disabled = false,
|
||||
}: AgentQuickSelectProps) {
|
||||
const { data: agents = [] } = useAgents(opcodeUrl, directory)
|
||||
|
||||
@@ -79,7 +77,6 @@ export function AgentQuickSelect({
|
||||
const buttonContent = (
|
||||
<button
|
||||
data-toggle-mode
|
||||
disabled={disabled}
|
||||
style={styleVars as React.CSSProperties}
|
||||
className="px-2 md:px-3.5 py-1 h-[36px] rounded-lg text-sm font-medium border min-w-[56px] max-w-[80px] md:max-w-[100px] flex-shrink-0 flex items-center justify-center transition-all duration-200 active:scale-95 hover:scale-105 shadow-md text-[var(--agent-color-light)] dark:text-[var(--agent-color-dark)] bg-[var(--agent-bg-light)] dark:bg-[var(--agent-bg-dark)] border-[var(--agent-border-light)] dark:border-[var(--agent-border-dark)] hover:bg-[var(--agent-bg-hover-light)] dark:hover:bg-[var(--agent-bg-hover-dark)] hover:border-[var(--agent-border-hover-light)] dark:hover:border-[var(--agent-border-hover-dark)] shadow-[var(--agent-shadow-light)] dark:shadow-[var(--agent-shadow-dark)] hover:shadow-[var(--agent-shadow-hover-light)] dark:hover:shadow-[var(--agent-shadow-hover-dark)]"
|
||||
>
|
||||
@@ -89,7 +86,7 @@ export function AgentQuickSelect({
|
||||
|
||||
return (
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild disabled={disabled}>
|
||||
<DropdownMenuTrigger asChild>
|
||||
{buttonContent}
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="start" className="w-64">
|
||||
|
||||
Reference in new issue
Block a user