File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1- import type { ToolConfig , ToolResponse } from '@/tools/types'
1+ import type { ToolConfig , ToolResponse , WorkflowToolExecutionContext } from '@/tools/types'
22
33interface FileWriteParams {
44 fileName ?: string
@@ -7,6 +7,7 @@ interface FileWriteParams {
77 contentType ?: string
88 append ?: boolean
99 workspaceId ?: string
10+ _context ?: WorkflowToolExecutionContext
1011}
1112
1213export const fileWriteTool : ToolConfig < FileWriteParams , ToolResponse > = {
@@ -64,7 +65,7 @@ export const fileWriteTool: ToolConfig<FileWriteParams, ToolResponse> = {
6465 content : params . content ,
6566 contentType : params . contentType ,
6667 append : params . append ?? false ,
67- workspaceId : params . workspaceId || ( params as Record < string , unknown > ) . _context ?. workspaceId ,
68+ workspaceId : params . workspaceId || params . _context ?. workspaceId ,
6869 } ) ,
6970 } ,
7071
You can’t perform that action at this time.
0 commit comments