@@ -54,110 +54,110 @@ import { EMPTY_TOOL_PARAMETERS } from './helpers';
54
54
55
55
interface ClientToolMap extends Record < string , {
56
56
name : string ;
57
- parameters : z . ZodObject < any > ;
57
+ inputSchema : z . ZodObject < any > ;
58
58
handler : ( args : any , editorEngine : EditorEngine ) => Promise < any > ;
59
59
} > { }
60
60
61
61
const TOOL_HANDLERS : ClientToolMap = {
62
62
// Primary Onlook tools (enhanced functionality)
63
63
[ LIST_FILES_TOOL_NAME ] : {
64
64
name : LIST_FILES_TOOL_NAME ,
65
- parameters : LIST_FILES_TOOL_PARAMETERS ,
65
+ inputSchema : LIST_FILES_TOOL_PARAMETERS ,
66
66
handler : async ( args : z . infer < typeof LIST_FILES_TOOL_PARAMETERS > , editorEngine : EditorEngine ) =>
67
67
handleListFilesTool ( args , editorEngine ) ,
68
68
} ,
69
69
[ READ_FILE_TOOL_NAME ] : {
70
70
name : READ_FILE_TOOL_NAME ,
71
- parameters : READ_FILE_TOOL_PARAMETERS ,
71
+ inputSchema : READ_FILE_TOOL_PARAMETERS ,
72
72
handler : async ( args : z . infer < typeof READ_FILE_TOOL_PARAMETERS > , editorEngine : EditorEngine ) =>
73
73
handleReadFileTool ( args , editorEngine ) ,
74
74
} ,
75
75
[ READ_STYLE_GUIDE_TOOL_NAME ] : {
76
76
name : READ_STYLE_GUIDE_TOOL_NAME ,
77
- parameters : EMPTY_TOOL_PARAMETERS ,
77
+ inputSchema : EMPTY_TOOL_PARAMETERS ,
78
78
handler : async ( editorEngine : EditorEngine ) =>
79
79
handleReadStyleGuideTool ( editorEngine ) ,
80
80
} ,
81
81
[ ONLOOK_INSTRUCTIONS_TOOL_NAME ] : {
82
82
name : ONLOOK_INSTRUCTIONS_TOOL_NAME ,
83
- parameters : EMPTY_TOOL_PARAMETERS ,
83
+ inputSchema : EMPTY_TOOL_PARAMETERS ,
84
84
handler : async ( ) => ONLOOK_INSTRUCTIONS ,
85
85
} ,
86
86
[ SEARCH_REPLACE_EDIT_FILE_TOOL_NAME ] : {
87
87
name : SEARCH_REPLACE_EDIT_FILE_TOOL_NAME ,
88
- parameters : SEARCH_REPLACE_EDIT_FILE_TOOL_PARAMETERS ,
88
+ inputSchema : SEARCH_REPLACE_EDIT_FILE_TOOL_PARAMETERS ,
89
89
handler : async ( args : z . infer < typeof SEARCH_REPLACE_EDIT_FILE_TOOL_PARAMETERS > , editorEngine : EditorEngine ) =>
90
90
handleSearchReplaceEditFileTool ( args , editorEngine ) ,
91
91
} ,
92
92
[ WRITE_FILE_TOOL_NAME ] : {
93
93
name : WRITE_FILE_TOOL_NAME ,
94
- parameters : WRITE_FILE_TOOL_PARAMETERS ,
94
+ inputSchema : WRITE_FILE_TOOL_PARAMETERS ,
95
95
handler : async ( args : z . infer < typeof WRITE_FILE_TOOL_PARAMETERS > , editorEngine : EditorEngine ) =>
96
96
handleWriteFileTool ( args , editorEngine ) ,
97
97
} ,
98
98
[ TERMINAL_COMMAND_TOOL_NAME ] : {
99
99
name : TERMINAL_COMMAND_TOOL_NAME ,
100
- parameters : TERMINAL_COMMAND_TOOL_PARAMETERS ,
100
+ inputSchema : TERMINAL_COMMAND_TOOL_PARAMETERS ,
101
101
handler : async ( args : z . infer < typeof TERMINAL_COMMAND_TOOL_PARAMETERS > , editorEngine : EditorEngine ) =>
102
102
handleTerminalCommandTool ( args , editorEngine ) ,
103
103
} ,
104
104
[ SCRAPE_URL_TOOL_NAME ] : {
105
105
name : SCRAPE_URL_TOOL_NAME ,
106
- parameters : SCRAPE_URL_TOOL_PARAMETERS ,
106
+ inputSchema : SCRAPE_URL_TOOL_PARAMETERS ,
107
107
handler : async ( args : z . infer < typeof SCRAPE_URL_TOOL_PARAMETERS > , editorEngine : EditorEngine ) =>
108
108
handleScrapeUrlTool ( args ) ,
109
109
} ,
110
110
[ SANDBOX_TOOL_NAME ] : {
111
111
name : SANDBOX_TOOL_NAME ,
112
- parameters : SANDBOX_TOOL_PARAMETERS ,
112
+ inputSchema : SANDBOX_TOOL_PARAMETERS ,
113
113
handler : async ( args : z . infer < typeof SANDBOX_TOOL_PARAMETERS > , editorEngine : EditorEngine ) =>
114
114
handleSandboxTool ( args , editorEngine ) ,
115
115
} ,
116
116
[ BASH_READ_TOOL_NAME ] : {
117
117
name : BASH_READ_TOOL_NAME ,
118
- parameters : BASH_READ_TOOL_PARAMETERS ,
118
+ inputSchema : BASH_READ_TOOL_PARAMETERS ,
119
119
handler : async ( args : z . infer < typeof BASH_READ_TOOL_PARAMETERS > , editorEngine : EditorEngine ) =>
120
120
handleBashReadTool ( args , editorEngine ) ,
121
121
} ,
122
122
[ GLOB_TOOL_NAME ] : {
123
123
name : GLOB_TOOL_NAME ,
124
- parameters : GLOB_TOOL_PARAMETERS ,
124
+ inputSchema : GLOB_TOOL_PARAMETERS ,
125
125
handler : async ( args : z . infer < typeof GLOB_TOOL_PARAMETERS > , editorEngine : EditorEngine ) =>
126
126
handleGlobTool ( args , editorEngine ) ,
127
127
} ,
128
128
[ GREP_TOOL_NAME ] : {
129
129
name : GREP_TOOL_NAME ,
130
- parameters : GREP_TOOL_PARAMETERS ,
130
+ inputSchema : GREP_TOOL_PARAMETERS ,
131
131
handler : async ( args : z . infer < typeof GREP_TOOL_PARAMETERS > , editorEngine : EditorEngine ) =>
132
132
handleGrepTool ( args , editorEngine ) ,
133
133
} ,
134
134
[ BASH_EDIT_TOOL_NAME ] : {
135
135
name : BASH_EDIT_TOOL_NAME ,
136
- parameters : BASH_EDIT_TOOL_PARAMETERS ,
136
+ inputSchema : BASH_EDIT_TOOL_PARAMETERS ,
137
137
handler : async ( args : z . infer < typeof BASH_EDIT_TOOL_PARAMETERS > , editorEngine : EditorEngine ) =>
138
138
handleBashEditTool ( args , editorEngine ) ,
139
139
} ,
140
140
[ FUZZY_EDIT_FILE_TOOL_NAME ] : {
141
141
name : FUZZY_EDIT_FILE_TOOL_NAME ,
142
- parameters : FUZZY_EDIT_FILE_TOOL_PARAMETERS ,
142
+ inputSchema : FUZZY_EDIT_FILE_TOOL_PARAMETERS ,
143
143
handler : async ( args : z . infer < typeof FUZZY_EDIT_FILE_TOOL_PARAMETERS > , editorEngine : EditorEngine ) =>
144
144
handleFuzzyEditFileTool ( args , editorEngine ) ,
145
145
} ,
146
146
[ TODO_WRITE_TOOL_NAME ] : {
147
147
name : TODO_WRITE_TOOL_NAME ,
148
- parameters : TODO_WRITE_TOOL_PARAMETERS ,
148
+ inputSchema : TODO_WRITE_TOOL_PARAMETERS ,
149
149
handler : async ( args : z . infer < typeof TODO_WRITE_TOOL_PARAMETERS > , editorEngine : EditorEngine ) =>
150
150
handleTodoWriteTool ( args , editorEngine ) ,
151
151
} ,
152
152
[ EXIT_PLAN_MODE_TOOL_NAME ] : {
153
153
name : EXIT_PLAN_MODE_TOOL_NAME ,
154
- parameters : EXIT_PLAN_MODE_TOOL_PARAMETERS ,
154
+ inputSchema : EXIT_PLAN_MODE_TOOL_PARAMETERS ,
155
155
handler : async ( args : z . infer < typeof EXIT_PLAN_MODE_TOOL_PARAMETERS > , editorEngine : EditorEngine ) =>
156
156
handleExitPlanModeTool ( args , editorEngine ) ,
157
157
} ,
158
158
[ WEB_SEARCH_TOOL_NAME ] : {
159
159
name : WEB_SEARCH_TOOL_NAME ,
160
- parameters : WEB_SEARCH_TOOL_PARAMETERS ,
160
+ inputSchema : WEB_SEARCH_TOOL_PARAMETERS ,
161
161
handler : async ( args : z . infer < typeof WEB_SEARCH_TOOL_PARAMETERS > , editorEngine : EditorEngine ) =>
162
162
handleWebSearchTool ( args ) ,
163
163
} ,
0 commit comments