fix: resolve build errors after merge with main

This commit is contained in:
Adam Weidman
2026-02-09 13:24:17 -05:00
parent dd4df1bd11
commit 9f7a3d30ea
5 changed files with 667 additions and 6 deletions
+18 -5
View File
@@ -24,6 +24,7 @@ import {
type ServerGeminiErrorEvent,
type ServerGeminiStreamEvent,
type ToolCallConfirmationDetails,
type SerializableConfirmationDetails,
type Config,
type UserTierId,
type AnsiOutput,
@@ -65,7 +66,10 @@ export class Task {
scheduler: CoreToolScheduler;
config: Config;
geminiClient: GeminiClient;
pendingToolConfirmationDetails: Map<string, ToolCallConfirmationDetails>;
pendingToolConfirmationDetails: Map<
string,
ToolCallConfirmationDetails | SerializableConfirmationDetails
>;
taskState: TaskState;
eventBus?: ExecutionEventBus;
completedToolCalls: CompletedToolCall[];
@@ -411,10 +415,12 @@ export class Task {
);
toolCalls.forEach((tc: ToolCall) => {
if (tc.status === 'awaiting_approval' && tc.confirmationDetails) {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
(tc.confirmationDetails).onConfirm(
ToolConfirmationOutcome.ProceedOnce,
);
if ('onConfirm' in tc.confirmationDetails) {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
tc.confirmationDetails.onConfirm(
ToolConfirmationOutcome.ProceedOnce,
);
}
this.pendingToolConfirmationDetails.delete(tc.request.callId);
}
});
@@ -803,6 +809,13 @@ export class Task {
// This will trigger the scheduler to continue or cancel the specific tool.
// The scheduler's onToolCallsUpdate will then reflect the new state (e.g., executing or cancelled).
if (!('onConfirm' in confirmationDetails)) {
logger.error(
`[Task] Serializable confirmation details not supported yet in a2a-server for callId: ${callId}`,
);
return false;
}
// If `edit` tool call, pass updated payload if presesent
if (confirmationDetails.type === 'edit') {
const payload = part.data['newContent']
+76
View File
@@ -1552,6 +1552,82 @@ const SETTINGS_SCHEMA = {
description: 'Enable planning features (Plan Mode and tools).',
showInDialog: true,
},
codebaseInvestigatorSettings: {
type: 'object',
label: 'Codebase Investigator Settings',
category: 'Experimental',
requiresRestart: true,
default: {},
description: 'Configuration for Codebase Investigator subagent.',
showInDialog: false,
properties: {
enabled: {
type: 'boolean',
label: 'Enable Codebase Investigator',
category: 'Experimental',
requiresRestart: true,
default: true,
description: 'Enable the Codebase Investigator subagent.',
showInDialog: true,
},
maxNumTurns: {
type: 'number',
label: 'Max Turns',
category: 'Experimental',
requiresRestart: true,
default: 10,
description: 'Maximum number of conversational turns.',
showInDialog: true,
},
maxTimeMinutes: {
type: 'number',
label: 'Max Time (Minutes)',
category: 'Experimental',
requiresRestart: true,
default: 3,
description: 'Maximum execution time in minutes.',
showInDialog: true,
},
thinkingBudget: {
type: 'number',
label: 'Thinking Budget',
category: 'Experimental',
requiresRestart: true,
default: 8192,
description: 'The thinking budget for the model.',
showInDialog: true,
},
model: {
type: 'string',
label: 'Model',
category: 'Experimental',
requiresRestart: true,
default: undefined as string | undefined,
description: 'The model to use for the subagent.',
showInDialog: true,
},
},
},
introspectionAgentSettings: {
type: 'object',
label: 'Introspection Agent Settings',
category: 'Experimental',
requiresRestart: true,
default: {},
description: 'Configuration for Introspection Agent.',
showInDialog: false,
properties: {
enabled: {
type: 'boolean',
label: 'Enable Introspection Agent',
category: 'Experimental',
requiresRestart: true,
default: false,
description: 'Enable the Introspection Agent.',
showInDialog: true,
},
},
},
adaptiveThinking: {
type: 'object',
label: 'Adaptive Thinking Settings',
+21
View File
@@ -56,6 +56,7 @@ import {
DEFAULT_GEMINI_MODEL_AUTO,
isPreviewModel,
PREVIEW_GEMINI_MODEL,
DEFAULT_THINKING_MODE,
} from './models.js';
import { shouldAttemptBrowserLaunch } from '../utils/browser.js';
import type { MCPOAuthConfig } from '../mcp/oauth-provider.js';
@@ -187,6 +188,18 @@ export interface AgentSettings {
overrides?: Record<string, AgentOverride>;
}
export interface CodebaseInvestigatorSettings {
enabled?: boolean;
maxNumTurns?: number;
maxTimeMinutes?: number;
thinkingBudget?: number;
model?: string;
}
export interface IntrospectionAgentSettings {
enabled?: boolean;
}
export interface CustomTheme {
type: 'custom';
name: string;
@@ -1840,6 +1853,14 @@ export class Config {
return this.agents;
}
getCodebaseInvestigatorSettings(): CodebaseInvestigatorSettings {
return this.codebaseInvestigatorSettings;
}
getIntrospectionAgentSettings(): IntrospectionAgentSettings {
return this.introspectionAgentSettings;
}
isBrowserLaunchSuppressed(): boolean {
return this.getNoBrowser() || !shouldAttemptBrowserLaunch();
}