feature: Ask User Question implementation for Claude Code & upgrade claude agent sdk to 0.1.71 to support the tool

This commit is contained in:
simosmik
2026-02-16 12:14:51 +00:00
parent 272eb00602
commit 42f13e151c
17 changed files with 851 additions and 90 deletions

View File

@@ -0,0 +1,25 @@
import type { ComponentType } from 'react';
import type { PendingPermissionRequest } from '../../types/types';
export interface PermissionPanelProps {
request: PendingPermissionRequest;
onDecision: (
requestIds: string | string[],
decision: { allow?: boolean; message?: string; updatedInput?: unknown },
) => void;
}
const registry: Record<string, ComponentType<PermissionPanelProps>> = {};
export function registerPermissionPanel(
toolName: string,
component: ComponentType<PermissionPanelProps>,
): void {
registry[toolName] = component;
}
export function getPermissionPanel(
toolName: string,
): ComponentType<PermissionPanelProps> | null {
return registry[toolName] || null;
}