The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): confirm before deleting a session in the Command Center
zqy1-1b811350c563d
diff --git a/apps/desktop/src/app/command-center/index.tsx b/apps/desktop/src/app/command-center/index.tsxindex 14fe739f2f3..14ff798274b 100644--- a/apps/desktop/src/app/command-center/index.tsx+++ b/apps/desktop/src/app/command-center/index.tsx@@ -3,12 +3,13 @@ import { type MouseEvent, type ReactNode, useCallback, useEffect, useMemo, useReimport { LogTail } from '@/components/chat/log-tail'import { PageLoader } from '@/components/page-loader'import { Button } from '@/components/ui/button'+import { ConfirmDialog } from '@/components/ui/confirm-dialog'import { SearchField } from '@/components/ui/search-field'import { SegmentedControl } from '@/components/ui/segmented-control'import { ResponsiveTabs } from '@/components/ui/tab-dropdown'import { Tip } from '@/components/ui/tooltip'import { getActionStatus, getLogs, getStatus, getUsageAnalytics, restartGateway, updateHermes } from '@/hermes'-import type { ActionStatusResponse, AnalyticsResponse, StatusResponse } from '@/hermes'+import type { ActionStatusResponse, AnalyticsResponse, SessionInfo, StatusResponse } from '@/hermes'import { useI18n } from '@/i18n'import { sessionTitle } from '@/lib/chat-runtime'import { compactNumber } from '@/lib/format'@@ -143,6 +144,7 @@ export function CommandCenterView({ initialSection, onClose, onDeleteSession, onconst pinnedSessionIds = useStoreSelector($pinnedSessionIds, s => (section === 'sessions' ? s : EMPTY_PINNED))const [query, setQuery] = useState('')+ const [pendingDelete, setPendingDelete] = useState<SessionInfo | null>(null)const [status, setStatus] = useState<StatusResponse | null>(null)const [logs, setLogs] = useState<string[]>([])const [logFile, setLogFile] = useState<(typeof LOG_FILES)[number]>('agent')@@ -395,7 +397,7 @@ export function CommandCenterView({ initialSection, onClose, onDeleteSession, on</RowIconButton><RowIconButtonclassName="hover:text-destructive"- onClick={() => void onDeleteSession(session.id)}+ onClick={() => setPendingDelete(session)}title={cc.deleteSession}><Trash2 className="size-3.5" />@@ -509,6 +511,19 @@ export function CommandCenterView({ initialSection, onClose, onDeleteSession, on)}</OverlayMain></OverlaySplitLayout>+ {pendingDelete && (+ <ConfirmDialog+ busyLabel={t.sidebar.row.deleting}+ confirmLabel={t.common.delete}+ description={t.sidebar.row.deleteDesc(sessionTitle(pendingDelete))}+ destructive+ doneLabel={t.sidebar.row.deleted}+ onClose={() => setPendingDelete(null)}+ onConfirm={() => void onDeleteSession(pendingDelete.id)}+ open+ title={t.sidebar.row.deleteTitle}+ />+ )}</OverlayView>)}