Skip to content

Commit d5fcaca

Browse files
fix: update client-side tool handlers to use inputSchema for AI SDK V5
- Update ClientToolMap interface to use inputSchema instead of parameters - Replace all 16 instances of parameters: with inputSchema: in TOOL_HANDLERS - Resolves remaining TypeScript compilation errors preventing Vercel deployment Co-Authored-By: [email protected] <[email protected]>
1 parent 2b5e8f1 commit d5fcaca

File tree

1 file changed

+18
-18
lines changed
  • apps/web/client/src/components/tools

1 file changed

+18
-18
lines changed

apps/web/client/src/components/tools/tools.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,110 +54,110 @@ import { EMPTY_TOOL_PARAMETERS } from './helpers';
5454

5555
interface ClientToolMap extends Record<string, {
5656
name: string;
57-
parameters: z.ZodObject<any>;
57+
inputSchema: z.ZodObject<any>;
5858
handler: (args: any, editorEngine: EditorEngine) => Promise<any>;
5959
}> { }
6060

6161
const TOOL_HANDLERS: ClientToolMap = {
6262
// Primary Onlook tools (enhanced functionality)
6363
[LIST_FILES_TOOL_NAME]: {
6464
name: LIST_FILES_TOOL_NAME,
65-
parameters: LIST_FILES_TOOL_PARAMETERS,
65+
inputSchema: LIST_FILES_TOOL_PARAMETERS,
6666
handler: async (args: z.infer<typeof LIST_FILES_TOOL_PARAMETERS>, editorEngine: EditorEngine) =>
6767
handleListFilesTool(args, editorEngine),
6868
},
6969
[READ_FILE_TOOL_NAME]: {
7070
name: READ_FILE_TOOL_NAME,
71-
parameters: READ_FILE_TOOL_PARAMETERS,
71+
inputSchema: READ_FILE_TOOL_PARAMETERS,
7272
handler: async (args: z.infer<typeof READ_FILE_TOOL_PARAMETERS>, editorEngine: EditorEngine) =>
7373
handleReadFileTool(args, editorEngine),
7474
},
7575
[READ_STYLE_GUIDE_TOOL_NAME]: {
7676
name: READ_STYLE_GUIDE_TOOL_NAME,
77-
parameters: EMPTY_TOOL_PARAMETERS,
77+
inputSchema: EMPTY_TOOL_PARAMETERS,
7878
handler: async (editorEngine: EditorEngine) =>
7979
handleReadStyleGuideTool(editorEngine),
8080
},
8181
[ONLOOK_INSTRUCTIONS_TOOL_NAME]: {
8282
name: ONLOOK_INSTRUCTIONS_TOOL_NAME,
83-
parameters: EMPTY_TOOL_PARAMETERS,
83+
inputSchema: EMPTY_TOOL_PARAMETERS,
8484
handler: async () => ONLOOK_INSTRUCTIONS,
8585
},
8686
[SEARCH_REPLACE_EDIT_FILE_TOOL_NAME]: {
8787
name: SEARCH_REPLACE_EDIT_FILE_TOOL_NAME,
88-
parameters: SEARCH_REPLACE_EDIT_FILE_TOOL_PARAMETERS,
88+
inputSchema: SEARCH_REPLACE_EDIT_FILE_TOOL_PARAMETERS,
8989
handler: async (args: z.infer<typeof SEARCH_REPLACE_EDIT_FILE_TOOL_PARAMETERS>, editorEngine: EditorEngine) =>
9090
handleSearchReplaceEditFileTool(args, editorEngine),
9191
},
9292
[WRITE_FILE_TOOL_NAME]: {
9393
name: WRITE_FILE_TOOL_NAME,
94-
parameters: WRITE_FILE_TOOL_PARAMETERS,
94+
inputSchema: WRITE_FILE_TOOL_PARAMETERS,
9595
handler: async (args: z.infer<typeof WRITE_FILE_TOOL_PARAMETERS>, editorEngine: EditorEngine) =>
9696
handleWriteFileTool(args, editorEngine),
9797
},
9898
[TERMINAL_COMMAND_TOOL_NAME]: {
9999
name: TERMINAL_COMMAND_TOOL_NAME,
100-
parameters: TERMINAL_COMMAND_TOOL_PARAMETERS,
100+
inputSchema: TERMINAL_COMMAND_TOOL_PARAMETERS,
101101
handler: async (args: z.infer<typeof TERMINAL_COMMAND_TOOL_PARAMETERS>, editorEngine: EditorEngine) =>
102102
handleTerminalCommandTool(args, editorEngine),
103103
},
104104
[SCRAPE_URL_TOOL_NAME]: {
105105
name: SCRAPE_URL_TOOL_NAME,
106-
parameters: SCRAPE_URL_TOOL_PARAMETERS,
106+
inputSchema: SCRAPE_URL_TOOL_PARAMETERS,
107107
handler: async (args: z.infer<typeof SCRAPE_URL_TOOL_PARAMETERS>, editorEngine: EditorEngine) =>
108108
handleScrapeUrlTool(args),
109109
},
110110
[SANDBOX_TOOL_NAME]: {
111111
name: SANDBOX_TOOL_NAME,
112-
parameters: SANDBOX_TOOL_PARAMETERS,
112+
inputSchema: SANDBOX_TOOL_PARAMETERS,
113113
handler: async (args: z.infer<typeof SANDBOX_TOOL_PARAMETERS>, editorEngine: EditorEngine) =>
114114
handleSandboxTool(args, editorEngine),
115115
},
116116
[BASH_READ_TOOL_NAME]: {
117117
name: BASH_READ_TOOL_NAME,
118-
parameters: BASH_READ_TOOL_PARAMETERS,
118+
inputSchema: BASH_READ_TOOL_PARAMETERS,
119119
handler: async (args: z.infer<typeof BASH_READ_TOOL_PARAMETERS>, editorEngine: EditorEngine) =>
120120
handleBashReadTool(args, editorEngine),
121121
},
122122
[GLOB_TOOL_NAME]: {
123123
name: GLOB_TOOL_NAME,
124-
parameters: GLOB_TOOL_PARAMETERS,
124+
inputSchema: GLOB_TOOL_PARAMETERS,
125125
handler: async (args: z.infer<typeof GLOB_TOOL_PARAMETERS>, editorEngine: EditorEngine) =>
126126
handleGlobTool(args, editorEngine),
127127
},
128128
[GREP_TOOL_NAME]: {
129129
name: GREP_TOOL_NAME,
130-
parameters: GREP_TOOL_PARAMETERS,
130+
inputSchema: GREP_TOOL_PARAMETERS,
131131
handler: async (args: z.infer<typeof GREP_TOOL_PARAMETERS>, editorEngine: EditorEngine) =>
132132
handleGrepTool(args, editorEngine),
133133
},
134134
[BASH_EDIT_TOOL_NAME]: {
135135
name: BASH_EDIT_TOOL_NAME,
136-
parameters: BASH_EDIT_TOOL_PARAMETERS,
136+
inputSchema: BASH_EDIT_TOOL_PARAMETERS,
137137
handler: async (args: z.infer<typeof BASH_EDIT_TOOL_PARAMETERS>, editorEngine: EditorEngine) =>
138138
handleBashEditTool(args, editorEngine),
139139
},
140140
[FUZZY_EDIT_FILE_TOOL_NAME]: {
141141
name: FUZZY_EDIT_FILE_TOOL_NAME,
142-
parameters: FUZZY_EDIT_FILE_TOOL_PARAMETERS,
142+
inputSchema: FUZZY_EDIT_FILE_TOOL_PARAMETERS,
143143
handler: async (args: z.infer<typeof FUZZY_EDIT_FILE_TOOL_PARAMETERS>, editorEngine: EditorEngine) =>
144144
handleFuzzyEditFileTool(args, editorEngine),
145145
},
146146
[TODO_WRITE_TOOL_NAME]: {
147147
name: TODO_WRITE_TOOL_NAME,
148-
parameters: TODO_WRITE_TOOL_PARAMETERS,
148+
inputSchema: TODO_WRITE_TOOL_PARAMETERS,
149149
handler: async (args: z.infer<typeof TODO_WRITE_TOOL_PARAMETERS>, editorEngine: EditorEngine) =>
150150
handleTodoWriteTool(args, editorEngine),
151151
},
152152
[EXIT_PLAN_MODE_TOOL_NAME]: {
153153
name: EXIT_PLAN_MODE_TOOL_NAME,
154-
parameters: EXIT_PLAN_MODE_TOOL_PARAMETERS,
154+
inputSchema: EXIT_PLAN_MODE_TOOL_PARAMETERS,
155155
handler: async (args: z.infer<typeof EXIT_PLAN_MODE_TOOL_PARAMETERS>, editorEngine: EditorEngine) =>
156156
handleExitPlanModeTool(args, editorEngine),
157157
},
158158
[WEB_SEARCH_TOOL_NAME]: {
159159
name: WEB_SEARCH_TOOL_NAME,
160-
parameters: WEB_SEARCH_TOOL_PARAMETERS,
160+
inputSchema: WEB_SEARCH_TOOL_PARAMETERS,
161161
handler: async (args: z.infer<typeof WEB_SEARCH_TOOL_PARAMETERS>, editorEngine: EditorEngine) =>
162162
handleWebSearchTool(args),
163163
},

0 commit comments

Comments
 (0)