diff --git a/src/renderer/src/components/terminal-pane/TerminalPane.tsx b/src/renderer/src/components/terminal-pane/TerminalPane.tsx
index c08e9bec7..064b17d63 100644
--- a/src/renderer/src/components/terminal-pane/TerminalPane.tsx
+++ b/src/renderer/src/components/terminal-pane/TerminalPane.tsx
@@ -89,6 +89,7 @@ import {
subscribeTerminalPaneAttention
} from './terminal-pane-attention-subscriptions'
import { getCachedTerminalTabForWorktree } from './terminal-tab-lookup'
+import { useRepoById } from '@/store/selectors'
type TerminalPaneProps = {
tabId: string
@@ -106,6 +107,31 @@ type TerminalPaneProps = {
onCloseTab: () => void
}
+type TerminalQuickCommandEditorDialogProps = {
+ command: TerminalQuickCommand
+ onOpenChange: (open: boolean) => void
+ onSave: (command: TerminalQuickCommand) => void
+}
+
+function TerminalQuickCommandEditorDialog({
+ command,
+ onOpenChange,
+ onSave
+}: TerminalQuickCommandEditorDialogProps): React.JSX.Element {
+ const repos = useAppStore((store) => store.repos)
+
+ return (
+
+ )
+}
+
function formatClipboardImagePasteError(error: unknown): string {
const detail = error instanceof Error ? error.message : String(error)
return `Image paste failed: ${detail}`
@@ -359,7 +385,6 @@ export default function TerminalPane({
const openSpacePage = useAppStore((store) => store.openSpacePage)
const refreshWorkspaceSpace = useAppStore((store) => store.refreshWorkspaceSpace)
const settings = useAppStore((store) => store.settings)
- const repos = useAppStore((store) => store.repos)
const updateSettings = useAppStore((store) => store.updateSettings)
const keybindings = useAppStore((store) => store.keybindings)
// Why: Windows is the only platform where bare right-click is repurposed as
@@ -393,7 +418,7 @@ export default function TerminalPane({
const quickCommandRepoId =
worktreeId === FLOATING_TERMINAL_WORKTREE_ID ? null : getRepoIdFromWorktreeId(worktreeId)
- const quickCommandRepo = repos.find((repo) => repo.id === quickCommandRepoId) ?? null
+ const quickCommandRepo = useRepoById(quickCommandRepoId)
const quickCommandRepoLabel = quickCommandRepo
? quickCommandRepo.displayName || quickCommandRepo.path
: quickCommandRepoId
@@ -1764,14 +1789,14 @@ export default function TerminalPane({
onSetTitle={contextMenu.onSetTitle}
onCopyPaneId={contextMenu.onCopyPaneId}
/>
-
+ {/* Why: repos is a broad store slice; only subscribe while the editor is visible. */}
+ {quickCommandEditorOpen ? (
+
+ ) : null}
{/* Title bar overlays — portaled into each pane container that has a title
or is currently being renamed (so the inline input appears even for
untitled panes when "Set Title..." is triggered).