refactor: update test structure and clean up unused code in cli and sdk

This commit is contained in:
mingholy.lmh
2025-11-25 11:45:34 +08:00
parent ad9ba914e1
commit ac6aecb622
14 changed files with 2620 additions and 401 deletions

View File

@@ -442,7 +442,7 @@ export class PermissionController extends BaseController {
// On error, use default cancel message
// Only pass payload for exec and mcp types that support it
const confirmationType = toolCall.confirmationDetails.type;
if (confirmationType === 'exec' || confirmationType === 'mcp') {
if (['edit', 'exec', 'mcp'].includes(confirmationType)) {
const execOrMcpDetails = toolCall.confirmationDetails as
| ToolExecuteConfirmationDetails
| ToolMcpConfirmationDetails;

View File

@@ -134,7 +134,7 @@ function createControlCancel(requestId: string): ControlCancelRequest {
};
}
describe('runNonInteractiveStreamJson (refactored)', () => {
describe('runNonInteractiveStreamJson', () => {
let config: Config;
let mockInputReader: {
read: () => AsyncGenerator<

View File

@@ -299,12 +299,6 @@ export interface CLIControlPermissionRequest {
blocked_path: string | null;
}
export enum AuthProviderType {
DYNAMIC_DISCOVERY = 'dynamic_discovery',
GOOGLE_CREDENTIALS = 'google_credentials',
SERVICE_ACCOUNT_IMPERSONATION = 'service_account_impersonation',
}
export interface CLIControlInitializeRequest {
subtype: 'initialize';
hooks?: HookRegistration[] | null;