fix: align merged branches with current type contracts

This commit is contained in:
can1357
2026-07-30 01:51:48 +02:00
parent 1b25ff01a2
commit 92014ab605
3 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -946,7 +946,7 @@ export class CursorExecHandlers implements ICursorExecHandlers {
*/
async mcpApprovalPreflight(call: CursorMcpCall) {
const toolName = call.toolName || call.name;
const tool = this.options.tools.get(toolName) ?? this.options.getTool?.(toolName);
const tool = this.options.getExecutableTool?.(toolName) ?? this.options.tools.get(toolName);
if (!tool) return false;
const context = this.options.getToolContext?.();
const settings = context?.settings;
@@ -3493,7 +3493,7 @@ describe("advisor", () => {
stopDetails: { type: "refusal", category: "reasoning_extraction" },
errorMessage: state.error,
timestamp: 2,
} as AgentMessage);
} as unknown as AgentMessage);
return;
}
state.error = undefined;
@@ -3502,7 +3502,7 @@ describe("advisor", () => {
content: [],
stopReason: "stop",
timestamp: 3,
} as AgentMessage);
} as unknown as AgentMessage);
},
abort: () => {},
reset: () => {},
@@ -3557,7 +3557,7 @@ describe("advisor", () => {
stopDetails: { type: "refusal", category: "reasoning_extraction" },
errorMessage: state.error,
timestamp: promptInputs.length + 1,
} as AgentMessage);
} as unknown as AgentMessage);
},
abort: () => {},
reset: () => {},
@@ -3614,7 +3614,7 @@ describe("advisor", () => {
stopDetails: { type: "refusal" },
errorMessage: state.error,
timestamp: 2,
} as AgentMessage);
} as unknown as AgentMessage);
return;
}
state.error = undefined;
@@ -3623,7 +3623,7 @@ describe("advisor", () => {
content: [],
stopReason: "stop",
timestamp: 3,
} as AgentMessage);
} as unknown as AgentMessage);
},
abort: () => {},
reset: () => {},
@@ -46,6 +46,7 @@ function createHost(
return {
agent: undefined as never,
sessionManager: undefined as never,
persistedAssistantEntryId: () => undefined,
settings,
modelRegistry,
configWarnings: [],