diff --git a/src/vs/workbench/contrib/void/browser/aiRegexService.ts b/src/vs/workbench/contrib/void/browser/aiRegexService.ts index 4b2a919a..6495a310 100644 --- a/src/vs/workbench/contrib/void/browser/aiRegexService.ts +++ b/src/vs/workbench/contrib/void/browser/aiRegexService.ts @@ -34,7 +34,7 @@ // // const result = await new Promise((res, rej) => { // // sendLLMMessage({ // // messages, -// // tools: ['search'], +// // tools: ['text_search'], // // onFinalMessage: ({ result: r, }) => { // // res(r) // // }, @@ -73,7 +73,7 @@ // // const result = new Promise((res, rej) => { // // sendLLMMessage({ // // messages, -// // tools: ['search'], +// // tools: ['text_search'], // // onResult: (r) => { // // res(r) // // } diff --git a/src/vs/workbench/contrib/void/browser/chatThreadService.ts b/src/vs/workbench/contrib/void/browser/chatThreadService.ts index 85f74703..0a0da257 100644 --- a/src/vs/workbench/contrib/void/browser/chatThreadService.ts +++ b/src/vs/workbench/contrib/void/browser/chatThreadService.ts @@ -324,7 +324,7 @@ class ChatThreadService extends Disposable implements IChatThreadService { { role: 'tool', - name: 'search', + name: 'text_search', id: 'tool-4', paramsStr: '{"query": "function main"}', content: 'Found matches in 3 files', @@ -340,15 +340,15 @@ class ChatThreadService extends Disposable implements IChatThreadService { hasNextPage: false } }, - } satisfies ToolMessage<'search'>, + } satisfies ToolMessage<'text_search'>, // { // role: 'tool_request', - // name: 'search', + // name: 'text_search', // params: { queryStr: 'function main', pageNumber: 0 }, // paramsStr: '{"query": "function main"}', // id: 'request-4', - // } satisfies ToolRequestApproval<'search'>, + // } satisfies ToolRequestApproval<'text_search'>, // --- diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx index a03d2787..671e4571 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx @@ -1100,7 +1100,7 @@ const toolNameToTitle = { 'read_file': { past: 'Read file', proposed: 'Read file' }, 'list_dir': { past: 'Inspected folder', proposed: 'Inspect folder' }, 'pathname_search': { past: 'Searched by file name', proposed: 'Search by file name' }, - 'search': { past: 'Searched', proposed: 'Search' }, + 'text_search': { past: 'Searched', proposed: 'Search text' }, 'create_uri': { past: (isFolder: boolean) => `Created ${folderFileStr(isFolder)}`, proposed: (isFolder: boolean) => `Create ${folderFileStr(isFolder)}` }, 'delete_uri': { past: (isFolder: boolean) => `Deleted ${folderFileStr(isFolder)}`, proposed: (isFolder: boolean) => `Delete ${folderFileStr(isFolder)}` }, 'edit': { past: 'Edited file', proposed: 'Edit file' }, @@ -1122,8 +1122,8 @@ const toolNameToDesc = (toolName: ToolName, _toolParams: ToolCallParams[ToolName } else if (toolName === 'pathname_search') { const toolParams = _toolParams as ToolCallParams['pathname_search'] return `"${toolParams.queryStr}"`; - } else if (toolName === 'search') { - const toolParams = _toolParams as ToolCallParams['search'] + } else if (toolName === 'text_search') { + const toolParams = _toolParams as ToolCallParams['text_search'] return `"${toolParams.queryStr}"`; } else if (toolName === 'create_uri') { const toolParams = _toolParams as ToolCallParams['create_uri'] @@ -1380,7 +1380,7 @@ const toolNameToComponent: { [T in ToolName]: { return } }, - 'search': { + 'text_search': { requestWrapper: null, resultWrapper: ({ toolMessage }) => { const accessor = useAccessor() @@ -1881,7 +1881,7 @@ export const SidebarChat = () => { > { chatThreadsService.setCurrentlyFocusedMessageIdx(undefined) }} diff --git a/src/vs/workbench/contrib/void/common/toolsServiceTypes.ts b/src/vs/workbench/contrib/void/common/toolsServiceTypes.ts index 2c8e72da..ce8b2b95 100644 --- a/src/vs/workbench/contrib/void/common/toolsServiceTypes.ts +++ b/src/vs/workbench/contrib/void/common/toolsServiceTypes.ts @@ -69,8 +69,8 @@ export const voidTools = { required: ['query'], }, - search: { - name: 'search', + text_search: { + name: 'text_search', description: `Returns pathnames of files with an exact match of the query. The query can be any regex. This does NOT search pathname. As a follow-up, you may want to use read_file to view the full file contents of the results. ${paginationHelper.desc}`, params: { query: { type: 'string', description: undefined }, @@ -145,7 +145,7 @@ export type ToolCallParams = { 'read_file': { uri: URI, pageNumber: number }, 'list_dir': { rootURI: URI, pageNumber: number }, 'pathname_search': { queryStr: string, pageNumber: number }, - 'search': { queryStr: string, pageNumber: number }, + 'text_search': { queryStr: string, pageNumber: number }, // --- 'edit': { uri: URI, changeDescription: string }, 'create_uri': { uri: URI, isFolder: boolean }, @@ -158,7 +158,7 @@ export type ToolResultType = { 'read_file': { fileContents: string, hasNextPage: boolean }, 'list_dir': { children: ToolDirectoryItem[] | null, hasNextPage: boolean, hasPrevPage: boolean, itemsRemaining: number }, 'pathname_search': { uris: URI[], hasNextPage: boolean }, - 'search': { uris: URI[], hasNextPage: boolean }, + 'text_search': { uris: URI[], hasNextPage: boolean }, // --- 'edit': {}, 'create_uri': {},