Fixing the permissions

This commit is contained in:
2026-02-06 11:15:56 -05:00
parent 101300b103
commit 5830b1da42
5 changed files with 258 additions and 191 deletions

View File

@@ -2,7 +2,11 @@ import { tui } from "@tui-solid/app";
import { getProviderInfo } from "@services/chat-tui-service";
import type { ChatServiceState } from "@services/chat-tui-service";
import type { AgentConfig } from "@/types/agent-config";
import type { PermissionScope, LearningScope } from "@/types/tui";
import type {
PermissionScope,
LearningScope,
PlanApprovalPromptResponse,
} from "@/types/tui";
export interface RenderAppSolidProps {
sessionId: string;
@@ -15,6 +19,7 @@ export interface RenderAppSolidProps {
allowed: boolean,
scope?: PermissionScope,
) => void;
handlePlanApprovalResponse?: (response: PlanApprovalPromptResponse) => void;
handleLearningResponse?: (
save: boolean,
scope?: LearningScope,
@@ -47,6 +52,7 @@ export const renderAppSolid = async (
onModelSelect: props.handleModelSelect,
onThemeSelect: props.handleThemeSelect,
onPermissionResponse: props.handlePermissionResponse ?? (() => {}),
onPlanApprovalResponse: props.handlePlanApprovalResponse ?? (() => {}),
onLearningResponse: props.handleLearningResponse ?? (() => {}),
plan: props.plan,
});

View File

@@ -5,7 +5,11 @@ import { addServer, connectServer } from "@services/mcp/manager";
import * as brainService from "@services/brain";
import type { ChatServiceState } from "@services/chat-tui-service";
import type { AgentConfig } from "@/types/agent-config";
import type { PermissionScope, LearningScope } from "@/types/tui";
import type {
PermissionScope,
LearningScope,
PlanApprovalPromptResponse,
} from "@/types/tui";
import type { ProviderModel } from "@/types/providers";
import type { MCPAddFormData } from "@/types/mcp";
@@ -29,6 +33,7 @@ export interface RenderAppProps {
allowed: boolean,
scope?: PermissionScope,
) => void;
handlePlanApprovalResponse?: (response: PlanApprovalPromptResponse) => void;
handleLearningResponse?: (
save: boolean,
scope?: LearningScope,
@@ -189,6 +194,7 @@ export const renderApp = async (props: RenderAppProps): Promise<void> => {
},
onMCPAdd: props.handleMCPAdd ?? defaultHandleMCPAdd,
onPermissionResponse: props.handlePermissionResponse ?? (() => {}),
onPlanApprovalResponse: props.handlePlanApprovalResponse ?? (() => {}),
onLearningResponse: props.handleLearningResponse ?? (() => {}),
onBrainSetJwtToken:
props.handleBrainSetJwtToken ?? defaultHandleBrainSetJwtToken,