feat(ui): rework permission center to reuse tool call view

This commit is contained in:
Shantur Rathore
2026-01-08 20:15:09 +00:00
parent 2e9f5b916c
commit df9fc529f9
5 changed files with 379 additions and 1043 deletions

View File

@@ -7,6 +7,7 @@ import { resolvePastedPlaceholders } from "../lib/prompt-placeholders"
import { createFileAttachment, createTextAttachment, createAgentAttachment } from "../types/attachment"
import type { Attachment } from "../types/attachment"
import type { Agent } from "../types/session"
import type { Command as SDKCommand } from "@opencode-ai/sdk/v2"
import Kbd from "./kbd"
import { getActiveInstance } from "../stores/instances"
import { agents, getSessionDraftPrompt, setSessionDraftPrompt, clearSessionDraftPrompt, executeCustomCommand } from "../stores/sessions"
@@ -767,7 +768,7 @@ export default function PromptInput(props: PromptInputProps) {
type: "file"
file: { path: string; relativePath?: string; isGitFile: boolean; isDirectory?: boolean }
}
| { type: "command"; command: { name: string; description?: string } },
| { type: "command"; command: SDKCommand },
) {
if (item.type === "command") {
const name = item.command.name