diff --git a/core/config/load.ts b/core/config/load.ts index a21989522..1a3acd6c6 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -500,7 +500,7 @@ async function intermediateToFinalConfig( ...config, contextProviders, models, - tools: allTools, + tools: [...allTools], mcpServerStatuses: [], slashCommands: config.slashCommands ?? [], modelsByRole: { @@ -529,7 +529,7 @@ async function intermediateToFinalConfig( (config.experimental?.modelContextProtocolServers ?? []).map( (server, index) => ({ id: `continue-mcp-server-${index + 1}`, - name: `MCP Server ${index + 1}`, + name: `MCP Server`, ...server, }), ), diff --git a/core/config/profile/doLoadConfig.ts b/core/config/profile/doLoadConfig.ts index cc4401003..6351c4474 100644 --- a/core/config/profile/doLoadConfig.ts +++ b/core/config/profile/doLoadConfig.ts @@ -135,7 +135,6 @@ export default async function doLoadConfig( faviconUrl: server.faviconUrl, readonly: false, type: "function" as const, - wouldLikeTo: "", uri: encodeMCPToolUri(server.id, tool.name), group: server.name, })); diff --git a/core/index.d.ts b/core/index.d.ts index 9c5ffe7aa..ba97377d3 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -903,7 +903,9 @@ export interface Tool { }; displayTitle: string; - wouldLikeTo: string; + wouldLikeTo?: string; + isCurrently?: string; + hasAlready?: string; readonly: boolean; uri?: string; faviconUrl?: string; diff --git a/core/llm/llm.test.ts b/core/llm/llm.test.ts index efd98ae00..2ce2d93b2 100644 --- a/core/llm/llm.test.ts +++ b/core/llm/llm.test.ts @@ -140,7 +140,9 @@ function testLLM( }, }, type: "function", - wouldLikeTo: "Say hello", + wouldLikeTo: "say hello", + isCurrently: "saying hello", + hasAlready: "said hello", readonly: true, group: "Hello", }, diff --git a/core/tools/definitions/createNewFile.ts b/core/tools/definitions/createNewFile.ts index f932ae87b..46db25cb9 100644 --- a/core/tools/definitions/createNewFile.ts +++ b/core/tools/definitions/createNewFile.ts @@ -4,7 +4,9 @@ import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn"; export const createNewFileTool: Tool = { type: "function", displayTitle: "Create New File", - wouldLikeTo: "create a new file", + wouldLikeTo: "create a new file at {{{ filepath }}}", + isCurrently: "creating a new file at {{{ filepath }}}", + hasAlready: "created a new file at {{{ filepath }}}", group: BUILT_IN_GROUP_NAME, readonly: false, function: { diff --git a/core/tools/definitions/exactSearch.ts b/core/tools/definitions/exactSearch.ts index 400adbd9e..d20db3cec 100644 --- a/core/tools/definitions/exactSearch.ts +++ b/core/tools/definitions/exactSearch.ts @@ -5,6 +5,8 @@ export const exactSearchTool: Tool = { type: "function", displayTitle: "Exact Search", wouldLikeTo: 'search for "{{{ query }}}" in the repository', + isCurrently: 'getting search results for "{{{ query }}}"', + hasAlready: 'retreived search results for "{{{ query }}}"', readonly: true, group: BUILT_IN_GROUP_NAME, function: { diff --git a/core/tools/definitions/readCurrentlyOpenFile.ts b/core/tools/definitions/readCurrentlyOpenFile.ts index 75a0e8169..f4df8e1e5 100644 --- a/core/tools/definitions/readCurrentlyOpenFile.ts +++ b/core/tools/definitions/readCurrentlyOpenFile.ts @@ -5,6 +5,8 @@ export const readCurrentlyOpenFileTool: Tool = { type: "function", displayTitle: "Read Currently Open File", wouldLikeTo: "read the current file", + isCurrently: "reading the current file", + hasAlready: "read the current file", readonly: true, group: BUILT_IN_GROUP_NAME, function: { diff --git a/core/tools/definitions/readFile.ts b/core/tools/definitions/readFile.ts index 53d381e62..0133b54b0 100644 --- a/core/tools/definitions/readFile.ts +++ b/core/tools/definitions/readFile.ts @@ -5,6 +5,8 @@ export const readFileTool: Tool = { type: "function", displayTitle: "Read File", wouldLikeTo: "read {{{ filepath }}}", + isCurrently: "reading {{{ filepath }}}", + hasAlready: "read {{{ filepath }}}", readonly: true, group: BUILT_IN_GROUP_NAME, function: { diff --git a/core/tools/definitions/runTerminalCommand.ts b/core/tools/definitions/runTerminalCommand.ts index 2b7882167..e7f48ea32 100644 --- a/core/tools/definitions/runTerminalCommand.ts +++ b/core/tools/definitions/runTerminalCommand.ts @@ -4,7 +4,9 @@ import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn"; export const runTerminalCommandTool: Tool = { type: "function", displayTitle: "Run Terminal Command", - wouldLikeTo: "run a terminal command", + wouldLikeTo: "run the following terminal command:", + isCurrently: "running the following terminal command:", + hasAlready: "ran the following terminal command:", readonly: false, group: BUILT_IN_GROUP_NAME, function: { diff --git a/core/tools/definitions/searchWeb.ts b/core/tools/definitions/searchWeb.ts index 7e2724a7c..0f98f382c 100644 --- a/core/tools/definitions/searchWeb.ts +++ b/core/tools/definitions/searchWeb.ts @@ -6,6 +6,8 @@ export const searchWebTool: Tool = { type: "function", displayTitle: "Search Web", wouldLikeTo: 'search the web for "{{{ query }}}"', + isCurrently: 'searching the web for "{{{ query }}}"', + hasAlready: 'searched the web fore "{{{ query }}}"', readonly: true, group: BUILT_IN_GROUP_NAME, function: { diff --git a/core/tools/definitions/viewDiff.ts b/core/tools/definitions/viewDiff.ts index 3da0c71a9..e7ce716a8 100644 --- a/core/tools/definitions/viewDiff.ts +++ b/core/tools/definitions/viewDiff.ts @@ -5,7 +5,9 @@ import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn"; export const viewDiffTool: Tool = { type: "function", displayTitle: "View Diff", - wouldLikeTo: "view a diff", + wouldLikeTo: "view the git diff", + isCurrently: "getting the git diff", + hasAlready: "viewed the git diff", readonly: true, group: BUILT_IN_GROUP_NAME, function: { diff --git a/core/tools/definitions/viewRepoMap.ts b/core/tools/definitions/viewRepoMap.ts index 60d671177..21c8050a6 100644 --- a/core/tools/definitions/viewRepoMap.ts +++ b/core/tools/definitions/viewRepoMap.ts @@ -6,6 +6,8 @@ export const viewRepoMapTool: Tool = { type: "function", displayTitle: "View Repo Map", wouldLikeTo: "view the repository map", + isCurrently: "getting the repository map", + hasAlready: "viewed the repository map", readonly: true, group: BUILT_IN_GROUP_NAME, function: { diff --git a/core/tools/definitions/viewSubdirectory.ts b/core/tools/definitions/viewSubdirectory.ts index b78daba76..2f9093c54 100644 --- a/core/tools/definitions/viewSubdirectory.ts +++ b/core/tools/definitions/viewSubdirectory.ts @@ -4,7 +4,9 @@ import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn"; export const viewSubdirectoryTool: Tool = { type: "function", displayTitle: "View Subdirectory", - wouldLikeTo: 'view the contents of "{{{ directory_path }}}"', + wouldLikeTo: 'view a map of "{{{ directory_path }}}"', + isCurrently: 'getting a map of "{{{ directory_path }}}"', + hasAlready: 'viewed a map of "{{{ directory_path }}}"', readonly: true, group: BUILT_IN_GROUP_NAME, function: { diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 00ae46772..97512d3c4 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.15", + "version": "1.1.16", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.15", + "version": "1.1.16", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", diff --git a/gui/src/components/modelSelection/platform/AssistantSelect.tsx b/gui/src/components/modelSelection/platform/AssistantSelect.tsx index 02755be30..151277c9a 100644 --- a/gui/src/components/modelSelection/platform/AssistantSelect.tsx +++ b/gui/src/components/modelSelection/platform/AssistantSelect.tsx @@ -224,7 +224,7 @@ export default function AssistantSelect() { >
{tool.displayTitle ?? tool.function.name} tool
+ >
+ );
+
+ const futureMessage = tool.wouldLikeTo ? (
+ Mustache.render(tool.wouldLikeTo, props.toolCallState.parsedArgs)
+ ) : (
+ <>
+ use the {defaultToolDescription}
+ >
+ );
+
+ let intro = "";
+ let message: ReactNode = "";
+
+ if (props.toolCallState.status === "generating") {
+ intro = "is generating output to";
+ message = futureMessage;
+ } else if (props.toolCallState.status === "generated") {
+ intro = "wants to";
+ message = futureMessage;
+ } else if (props.toolCallState.status === "calling") {
+ intro = "is";
+ message = tool.isCurrently ? (
+ Mustache.render(tool.isCurrently, props.toolCallState.parsedArgs)
+ ) : (
+ <>
+ using the {defaultToolDescription}
+ >
+ );
+ } else if (props.toolCallState.status === "done") {
+ intro = "";
+ message = tool.hasAlready ? (
+ Mustache.render(tool.hasAlready, props.toolCallState.parsedArgs)
+ ) : (
+ <>
+ used the {defaultToolDescription}
+ >
+ );
+ } else if (props.toolCallState.status === "canceled") {
+ intro = "tried to";
+ message = futureMessage;
+ }
+ return (
+ {tool?.displayTitle}{" "}
- tool
- >
- )}
-