diff --git a/packages/ui/src/components/instance/instance-shell2.tsx b/packages/ui/src/components/instance/instance-shell2.tsx index 454ffdf0..ddd87821 100644 --- a/packages/ui/src/components/instance/instance-shell2.tsx +++ b/packages/ui/src/components/instance/instance-shell2.tsx @@ -39,8 +39,7 @@ import { import { keyboardRegistry, type KeyboardShortcut } from "../../lib/keyboard-registry" import { messageStoreBus } from "../../stores/message-v2/bus" import { clearSessionRenderCache } from "../message-block" -import { buildCustomCommandEntries } from "../../lib/command-utils" -import { getCommands as getInstanceCommands } from "../../stores/commands" + import { isOpen as isCommandPaletteOpen, hideCommandPalette, showCommandPalette } from "../../stores/command-palette" import SessionList from "../session-list" import KeyboardHint from "../keyboard-hint" @@ -373,9 +372,7 @@ const InstanceShell2: Component = (props) => { } } - const customCommands = createMemo(() => buildCustomCommandEntries(props.instance.id, getInstanceCommands(props.instance.id))) - - const instancePaletteCommands = createMemo(() => [...props.paletteCommands(), ...customCommands()]) + const instancePaletteCommands = createMemo(() => props.paletteCommands()) const paletteOpen = createMemo(() => isCommandPaletteOpen(props.instance.id)) const keyboardShortcuts = createMemo(() => diff --git a/packages/ui/src/components/prompt-input.tsx b/packages/ui/src/components/prompt-input.tsx index 22fc1f7c..e214e9ae 100644 --- a/packages/ui/src/components/prompt-input.tsx +++ b/packages/ui/src/components/prompt-input.tsx @@ -610,6 +610,11 @@ export default function PromptInput(props: PromptInputProps) { setHistoryDraft(null) + if (isKnownSlashCommand) { + // Record attempted slash commands even if execution fails. + void refreshHistory() + } + try { if (isShellMode) { if (props.onRunShell) { @@ -622,7 +627,9 @@ export default function PromptInput(props: PromptInputProps) { } else { await props.onSend(resolvedPrompt, currentAttachments) } - void refreshHistory() + if (!isKnownSlashCommand) { + void refreshHistory() + } } catch (error) { log.error("Failed to send message:", error) showAlertDialog("Failed to send message", { @@ -1023,6 +1030,7 @@ export default function PromptInput(props: PromptInputProps) { } const shellHint = () => (mode() === "shell" ? { key: "Esc", text: "to exit shell mode" } : { key: "!", text: "for shell mode" }) + const commandHint = () => ({ key: "/", text: "for commands" }) const shouldShowOverlay = () => prompt().length === 0 @@ -1215,6 +1223,11 @@ export default function PromptInput(props: PromptInputProps) { {shellHint().key} {shellHint().text} + + + • {commandHint().key} {commandHint().text} + + Shell mode active