fix: enable web tools in planning interviews
This commit is contained in:
@@ -715,6 +715,7 @@ describe("mission-interview module", () => {
|
||||
expect(mockCreateFnAgent).toHaveBeenCalled();
|
||||
const lastCall = mockCreateFnAgent.mock.calls[mockCreateFnAgent.mock.calls.length - 1];
|
||||
expect(lastCall[0].systemPrompt).toMatch(/^You are a mission planning assistant/);
|
||||
expect(lastCall[0].builtinToolsAllowlist).toEqual(["WebSearch", "WebFetch"]);
|
||||
});
|
||||
|
||||
it("uses override prompt when promptOverrides provided", async () => {
|
||||
@@ -827,6 +828,7 @@ describe("mission-interview module", () => {
|
||||
expect(agentConfig).toHaveProperty("cwd");
|
||||
expect(agentConfig).toHaveProperty("systemPrompt");
|
||||
expect(agentConfig).toHaveProperty("tools");
|
||||
expect(agentConfig).toHaveProperty("builtinToolsAllowlist");
|
||||
expect(agentConfig).toHaveProperty("onThinking");
|
||||
expect(agentConfig).toHaveProperty("onText");
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ import { createFnAgent as engineCreateFnAgent } from "@fusion/engine";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
type AgentResult = any;
|
||||
const MISSION_INTERVIEW_BUILTIN_WEB_TOOLS = ["WebSearch", "WebFetch"] as const;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const createFnAgent: any = engineCreateFnAgent;
|
||||
|
||||
@@ -834,6 +835,7 @@ async function createMissionInterviewAgent(
|
||||
cwd: rootDir,
|
||||
systemPrompt: effectivePrompt,
|
||||
tools: "readonly",
|
||||
builtinToolsAllowlist: [...MISSION_INTERVIEW_BUILTIN_WEB_TOOLS],
|
||||
...(session.modelProvider && session.modelId
|
||||
? {
|
||||
defaultProvider: session.modelProvider,
|
||||
|
||||
@@ -1300,9 +1300,9 @@ describe("createFnAgent", () => {
|
||||
"grep",
|
||||
"find",
|
||||
"ls",
|
||||
"WebSearch",
|
||||
"WebFetch",
|
||||
]));
|
||||
expect(createSessionArgs.tools).not.toContain("WebSearch");
|
||||
expect(createSessionArgs.tools).not.toContain("WebFetch");
|
||||
});
|
||||
|
||||
it("keeps caller customTools in coding sessions", async () => {
|
||||
|
||||
@@ -6,6 +6,8 @@ export const READONLY_ALLOWLIST = [
|
||||
"grep",
|
||||
"find",
|
||||
"ls",
|
||||
"WebSearch",
|
||||
"WebFetch",
|
||||
"fn_web_fetch",
|
||||
"fn_task_show",
|
||||
"fn_task_list",
|
||||
|
||||
Reference in New Issue
Block a user