feat: hooks

This commit is contained in:
Gab
2026-03-27 14:00:04 +11:00
parent 8e05565e84
commit c39a97bb7d
12 changed files with 208 additions and 10 deletions

View File

@@ -14,6 +14,7 @@ import { useTerminal } from "@/context/terminal"
import { DialogSelectFile } from "@/components/dialog-select-file"
import { DialogSelectModel } from "@/components/dialog-select-model"
import { DialogSelectMcp } from "@/components/dialog-select-mcp"
import { DialogSelectPrompt } from "@/components/dialog-select-prompt"
import { DialogFork } from "@/components/dialog-fork"
import { showToast } from "@opencode-ai/ui/toast"
import { findLast } from "@opencode-ai/util/array"
@@ -376,6 +377,13 @@ export const useSessionCommands = (actions: SessionCommandContext) => {
keybind: "shift+mod+.",
onSelect: () => local.agent.move(-1),
}),
agentCommand({
id: "prompts.select",
title: language.t("command.prompts.select"),
description: language.t("command.prompts.select.description"),
slash: "prompts",
onSelect: () => dialog.show(() => <DialogSelectPrompt />),
}),
modelCommand({
id: "model.variant.cycle",
title: language.t("command.model.variant.cycle"),