mirror of
https://github.com/aljazceru/claude-code-viewer.git
synced 2026-01-21 14:34:21 +01:00
feat: UI許可システムの実装
- permissionModeを設定可能に変更(bypassPermissions, default, acceptEdits, plan) - defaultモード時のUI許可ダイアログを実装 - canUseTool callbackによるプログラマティックな許可処理 - SSEを使用したリアルタイム通信 - 許可/拒否の選択UI - PermissionDialog機能 - 大きなダイアログサイズ(max-w-4xl, max-h-[80vh]) - パラメータの折りたたみ表示 - 各パラメータのコピーボタン - 長いテキストのスクロール対応 - レスポンシブデザイン対応
This commit is contained in:
13
src/types/permissions.ts
Normal file
13
src/types/permissions.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export type PermissionRequest = {
|
||||
id: string;
|
||||
taskId: string;
|
||||
sessionId?: string;
|
||||
toolName: string;
|
||||
toolInput: Record<string, unknown>;
|
||||
timestamp: number;
|
||||
};
|
||||
|
||||
export type PermissionResponse = {
|
||||
permissionRequestId: string;
|
||||
decision: "allow" | "deny";
|
||||
};
|
||||
@@ -1,4 +1,7 @@
|
||||
import type { AliveClaudeCodeTask } from "../server/service/claude-code/types";
|
||||
import type {
|
||||
AliveClaudeCodeTask,
|
||||
PermissionRequest,
|
||||
} from "../server/service/claude-code/types";
|
||||
|
||||
export type SSEEventDeclaration = {
|
||||
// biome-ignore lint/complexity/noBannedTypes: correct type
|
||||
@@ -19,6 +22,10 @@ export type SSEEventDeclaration = {
|
||||
taskChanged: {
|
||||
aliveTasks: AliveClaudeCodeTask[];
|
||||
};
|
||||
|
||||
permission_requested: {
|
||||
permissionRequest: PermissionRequest;
|
||||
};
|
||||
};
|
||||
|
||||
export type SSEEventMap = {
|
||||
|
||||
Reference in New Issue
Block a user