diff --git a/src/core/message-parsing/directives/index.ts b/src/core/message-parsing/directives/index.ts index b834a60ba1..df597511d4 100644 --- a/src/core/message-parsing/directives/index.ts +++ b/src/core/message-parsing/directives/index.ts @@ -20,6 +20,7 @@ export type { SwitchModeToolDirective, NewTaskToolDirective, SearchAndReplaceToolDirective, + FetchInstructionsToolDirective, } from "./tool-directives" export { type LogDirective, logLevels } from "./LogDirective" diff --git a/src/core/message-parsing/directives/tool-directives/index.ts b/src/core/message-parsing/directives/tool-directives/index.ts index 39d137b423..55dec78b20 100644 --- a/src/core/message-parsing/directives/tool-directives/index.ts +++ b/src/core/message-parsing/directives/tool-directives/index.ts @@ -2,7 +2,7 @@ export type { ToolResponse } from "./ToolResponse" export type { ToolParamName } from "./ToolParamName" export type { ExecuteCommandToolDirective } from "./ExecuteCommandToolDirective" export type { ReadFileToolDirective } from "./ReadFileToolDirective" -// export type { FetchInstructionsToolDirective } from "./FetchInstructionsToolDirective" +export type { FetchInstructionsToolDirective } from "./FetchInstructionsToolDirective" export type { WriteToFileToolDirective } from "./WriteToFileToolDirective" export type { InsertCodeBlockToolDirective } from "./InsertCodeBlockToolDirective" export type { CodebaseSearchToolDirective } from "./CodebaseSearchToolDirective" diff --git a/src/core/message-parsing/presentAssistantMessage.ts b/src/core/message-parsing/presentAssistantMessage.ts index 89b8454800..c4a4d55bdf 100644 --- a/src/core/message-parsing/presentAssistantMessage.ts +++ b/src/core/message-parsing/presentAssistantMessage.ts @@ -23,6 +23,7 @@ import type { NewTaskToolDirective, AttemptCompletionToolDirective, BrowserActionToolDirective, + FetchInstructionsToolDirective, } from "./directives" import { defaultModeSlug, getModeBySlug } from "../../shared/modes" @@ -504,7 +505,13 @@ export async function presentAssistantMessage(cline: Task) { break case "fetch_instructions": - await fetchInstructionsTool(cline, block, askApproval, handleError, pushToolResult) + await fetchInstructionsTool( + cline, + block as FetchInstructionsToolDirective, + askApproval, + handleError, + pushToolResult, + ) break case "list_files": await listFilesTool( diff --git a/src/core/tools/fetchInstructionsTool.ts b/src/core/tools/fetchInstructionsTool.ts index 67a22ad460..1f229b0e77 100644 --- a/src/core/tools/fetchInstructionsTool.ts +++ b/src/core/tools/fetchInstructionsTool.ts @@ -3,11 +3,11 @@ import { fetchInstructions } from "../prompts/instructions/instructions" import { ClineSayTool } from "../../shared/ExtensionMessage" import { formatResponse } from "../prompts/responses" import { AskApproval, HandleError, PushToolResult } from "../../shared/tools" -import { ToolDirective } from "../message-parsing/directives" +import { FetchInstructionsToolDirective } from "../message-parsing/directives" export async function fetchInstructionsTool( cline: Task, - block: ToolDirective, + block: FetchInstructionsToolDirective, askApproval: AskApproval, handleError: HandleError, pushToolResult: PushToolResult,