From 76c216999bc518a4b68223081c5fa567523c628e Mon Sep 17 00:00:00 2001 From: adarshramiyer Date: Thu, 26 Jun 2025 13:14:31 -0700 Subject: [PATCH 1/7] working toolUsage devdata events added --- core/core.ts | 10 ++++++- core/protocol/webview.ts | 4 +++ gui/src/hooks/ParallelListeners.tsx | 29 +++++++++++++++++++ gui/src/redux/slices/sessionSlice.ts | 21 -------------- gui/src/redux/thunks/callCurrentTool.ts | 20 +++++++++++++ .../src/schemas/data/toolUsage/index.ts | 1 + .../src/schemas/data/toolUsage/v0.2.0.ts | 1 + 7 files changed, 64 insertions(+), 22 deletions(-) diff --git a/core/core.ts b/core/core.ts index 5e8d4d060..71451de51 100644 --- a/core/core.ts +++ b/core/core.ts @@ -809,7 +809,7 @@ export class Core { this.messenger.send("toolCallPartialOutput", params); }; - return await callTool(tool, toolCall, { + const result = await callTool(tool, toolCall, { config, ide: this.ide, llm: config.selectedModelByRole.chat, @@ -820,6 +820,14 @@ export class Core { onPartialOutput, codeBaseIndexer: this.codeBaseIndexer, }); + + this.messenger.send("toolCallCompleted", { + toolCallId: toolCall.id, + contextItems: result.contextItems, + succeeded: !result.errorMessage, + }); + + return result; } private async isItemTooBig(item: ContextItemWithId) { diff --git a/core/protocol/webview.ts b/core/protocol/webview.ts index 1a8d40313..524975031 100644 --- a/core/protocol/webview.ts +++ b/core/protocol/webview.ts @@ -43,5 +43,9 @@ export type ToWebviewFromIdeOrCoreProtocol = { "jetbrains/setColors": [Record, void]; sessionUpdate: [{ sessionInfo: ControlPlaneSessionInfo | undefined }, void]; toolCallPartialOutput: [{ toolCallId: string; contextItems: any[] }, void]; + toolCallCompleted: [ + { toolCallId: string; contextItems: any[]; succeeded: boolean }, + void, + ]; freeTrialExceeded: [undefined, void]; }; diff --git a/gui/src/hooks/ParallelListeners.tsx b/gui/src/hooks/ParallelListeners.tsx index 5bf2c977a..2036dc365 100644 --- a/gui/src/hooks/ParallelListeners.tsx +++ b/gui/src/hooks/ParallelListeners.tsx @@ -27,10 +27,13 @@ import { setTTSActive } from "../redux/slices/uiSlice"; import { exitEdit } from "../redux/thunks/edit"; import { streamResponseAfterToolCall } from "../redux/thunks/streamResponseAfterToolCall"; +import { safeParseToolCallArgs } from "core/tools/parseArgs"; +import { store } from "../redux/store"; import { cancelStream } from "../redux/thunks/cancelStream"; import { refreshSessionMetadata } from "../redux/thunks/session"; import { streamResponseThunk } from "../redux/thunks/streamResponse"; import { updateFileSymbolsFromHistory } from "../redux/thunks/updateFileSymbols"; +import { findToolCall } from "../redux/util"; import { setDocumentStylesFromLocalStorage, setDocumentStylesFromTheme, @@ -285,6 +288,32 @@ function ParallelListeners() { [currentToolCallApplyState, history], ); + useWebviewListener( + "toolCallCompleted", + async (data) => { + const state = store.getState(); + const toolCallState = findToolCall( + state.session.history, + data.toolCallId, + ); + if (toolCallState) { + ideMessenger.post("devdata/log", { + name: "toolUsage", + data: { + toolCallId: toolCallState.toolCallId, + functionName: toolCallState.toolCall.function.name, + functionArgs: toolCallState.toolCall.function.arguments, + toolCallArgs: safeParseToolCallArgs(toolCallState.toolCall), + parsedArgs: toolCallState.parsedArgs, + output: data.contextItems, + succeeded: data.succeeded, + }, + }); + } + }, + [ideMessenger, store], + ); + useEffect(() => { if (!isInEdit) { dispatch(setLastNonEditSessionEmpty(history.length === 0)); diff --git a/gui/src/redux/slices/sessionSlice.ts b/gui/src/redux/slices/sessionSlice.ts index 50ff37320..1794559a6 100644 --- a/gui/src/redux/slices/sessionSlice.ts +++ b/gui/src/redux/slices/sessionSlice.ts @@ -18,9 +18,7 @@ import { RuleWithSource, Session, SessionMetadata, - ToolCallState, } from "core"; -import { safeParseToolCallArgs } from "core/tools/parseArgs"; import { NEW_SESSION_TITLE } from "core/util/constants"; import { renderChatMessage } from "core/util/messageContent"; import { findUriInDirs, getUriPathBasename } from "core/util/uri"; @@ -32,23 +30,6 @@ import { findCurrentToolCall, findToolCall } from "../util"; const getIdeMessenger = () => (window as any).ideMessenger; -const logToolUsage = (toolCallState: ToolCallState, success: boolean) => { - const ideMessenger = getIdeMessenger(); - if (ideMessenger) { - ideMessenger.post("devdata/log", { - name: "toolUsage", - data: { - toolCallId: toolCallState.toolCallId, - functionName: toolCallState.toolCall.function.name, - functionArgs: toolCallState.toolCall.function.arguments, - parsedArgs: safeParseToolCallArgs(toolCallState.toolCall), - succeeded: success, - output: toolCallState.output || [], - }, - }); - } -}; - // We need this to handle reorderings (e.g. a mid-array deletion) of the messages array. // The proper fix is adding a UUID to all chat messages, but this is the temp workaround. export type ChatHistoryItemWithMessageId = ChatHistoryItem & { @@ -580,7 +561,6 @@ export const sessionSlice = createSlice({ ); if (toolCallState) { toolCallState.status = "errored"; - logToolUsage(toolCallState, false); } }, acceptToolCall: ( @@ -595,7 +575,6 @@ export const sessionSlice = createSlice({ ); if (toolCallState) { toolCallState.status = "done"; - logToolUsage(toolCallState, true); } }, setToolCallCalling: ( diff --git a/gui/src/redux/thunks/callCurrentTool.ts b/gui/src/redux/thunks/callCurrentTool.ts index 02137d822..a9a823a65 100644 --- a/gui/src/redux/thunks/callCurrentTool.ts +++ b/gui/src/redux/thunks/callCurrentTool.ts @@ -1,6 +1,7 @@ import { createAsyncThunk, unwrapResult } from "@reduxjs/toolkit"; import { ContextItem } from "core"; import { CLIENT_TOOLS_IMPLS } from "core/tools/builtIn"; +import { safeParseToolCallArgs } from "core/tools/parseArgs"; import posthog from "posthog-js"; import { callClientTool } from "../../util/clientTools/callClientTool"; import { selectCurrentToolCall } from "../selectors/selectCurrentToolCall"; @@ -28,6 +29,21 @@ export const callCurrentTool = createAsyncThunk( return; } + const logToolUsage = (success: boolean, finalOutput?: ContextItem[]) => { + extra.ideMessenger.post("devdata/log", { + name: "toolUsage", + data: { + toolCallId: toolCallState.toolCallId, + functionName: toolCallState.toolCall.function.name, + functionArgs: toolCallState.toolCall.function.arguments, + toolCallArgs: safeParseToolCallArgs(toolCallState.toolCall), + parsedArgs: toolCallState.parsedArgs, + output: finalOutput || toolCallState.output || [], + succeeded: success, + }, + }); + }; + const selectedChatModel = selectSelectedChatModel(state); if (!selectedChatModel) { @@ -105,6 +121,8 @@ export const callCurrentTool = createAsyncThunk( ], }), ); + + logToolUsage(false, output); } else if (output?.length) { dispatch( updateToolCallOutput({ @@ -112,6 +130,8 @@ export const callCurrentTool = createAsyncThunk( contextItems: output, }), ); + + logToolUsage(true, output); } // Because we don't have access to use hooks, we check `allowAnonymousTelemetry` diff --git a/packages/config-yaml/src/schemas/data/toolUsage/index.ts b/packages/config-yaml/src/schemas/data/toolUsage/index.ts index 8119366f3..225b5c0ab 100644 --- a/packages/config-yaml/src/schemas/data/toolUsage/index.ts +++ b/packages/config-yaml/src/schemas/data/toolUsage/index.ts @@ -5,6 +5,7 @@ export const toolUsageEventAllSchema = baseDevDataAllSchema.extend({ toolCallId: z.string(), functionName: z.string(), functionArgs: z.string(), + toolCallArgs: z.any(), parsedArgs: z.any(), succeeded: z.boolean(), output: z.array(z.any()).optional(), diff --git a/packages/config-yaml/src/schemas/data/toolUsage/v0.2.0.ts b/packages/config-yaml/src/schemas/data/toolUsage/v0.2.0.ts index 533e33218..c1045104a 100644 --- a/packages/config-yaml/src/schemas/data/toolUsage/v0.2.0.ts +++ b/packages/config-yaml/src/schemas/data/toolUsage/v0.2.0.ts @@ -13,6 +13,7 @@ export const toolUsageEventSchema_0_2_0 = toolUsageEventAllSchema.pick({ toolCallId: true, functionName: true, functionArgs: true, + toolCallArgs: true, parsedArgs: true, succeeded: true, output: true, From 90c1c0486e1f4094e7bf3480bad44f6bcb6c5079 Mon Sep 17 00:00:00 2001 From: adarshramiyer Date: Thu, 26 Jun 2025 13:29:59 -0700 Subject: [PATCH 2/7] optional chaining to for recurse bot --- gui/src/redux/thunks/callCurrentTool.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/src/redux/thunks/callCurrentTool.ts b/gui/src/redux/thunks/callCurrentTool.ts index a9a823a65..4b76c7201 100644 --- a/gui/src/redux/thunks/callCurrentTool.ts +++ b/gui/src/redux/thunks/callCurrentTool.ts @@ -34,8 +34,8 @@ export const callCurrentTool = createAsyncThunk( name: "toolUsage", data: { toolCallId: toolCallState.toolCallId, - functionName: toolCallState.toolCall.function.name, - functionArgs: toolCallState.toolCall.function.arguments, + functionName: toolCallState.toolCall?.function?.name, + functionArgs: toolCallState.toolCall?.function?.arguments, toolCallArgs: safeParseToolCallArgs(toolCallState.toolCall), parsedArgs: toolCallState.parsedArgs, output: finalOutput || toolCallState.output || [], From b4a2ad8af7390ca4bfd0381d3ee98ed4696c0514 Mon Sep 17 00:00:00 2001 From: adarshramiyer Date: Tue, 1 Jul 2025 10:26:24 -0700 Subject: [PATCH 3/7] moved logToolUsage to outside thunk --- extensions/vscode/package-lock.json | 8 ++++---- gui/package-lock.json | 11 ++++++++--- gui/src/redux/thunks/callCurrentTool.ts | 21 +++------------------ gui/src/redux/util/index.ts | 24 +++++++++++++++++++++++- packages/config-yaml/package-lock.json | 4 ++-- 5 files changed, 40 insertions(+), 28 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 9ebbad2d0..29de81832 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.50", + "version": "1.1.52", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.50", + "version": "1.1.52", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.14", @@ -108,9 +108,9 @@ "@aws-sdk/credential-providers": "^3.778.0", "@continuedev/config-types": "^1.0.13", "@continuedev/config-yaml": "file:../packages/config-yaml", - "@continuedev/fetch": "^1.0.13", + "@continuedev/fetch": "^1.0.14", "@continuedev/llm-info": "^1.0.8", - "@continuedev/openai-adapters": "file:../packages/openai-adapters", + "@continuedev/openai-adapters": "1.0.42", "@modelcontextprotocol/sdk": "^1.12.0", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.1.1", diff --git a/gui/package-lock.json b/gui/package-lock.json index 62eea45da..5cbf9ede7 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -114,9 +114,9 @@ "@aws-sdk/credential-providers": "^3.778.0", "@continuedev/config-types": "^1.0.13", "@continuedev/config-yaml": "file:../packages/config-yaml", - "@continuedev/fetch": "^1.0.13", + "@continuedev/fetch": "^1.0.14", "@continuedev/llm-info": "^1.0.8", - "@continuedev/openai-adapters": "file:../packages/openai-adapters", + "@continuedev/openai-adapters": "1.0.42", "@modelcontextprotocol/sdk": "^1.12.0", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.1.1", @@ -215,7 +215,7 @@ }, "../packages/config-yaml": { "name": "@continuedev/config-yaml", - "version": "1.0.94", + "version": "1.0.95", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.14", @@ -226,10 +226,15 @@ "config-yaml": "dist/cli.js" }, "devDependencies": { + "@semantic-release/changelog": "^6.0.3", + "@semantic-release/git": "^10.0.1", + "@semantic-release/github": "^9.2.6", + "@semantic-release/npm": "^10.0.6", "@types/jest": "^29.5.14", "@types/node": "^20.0.0", "cross-env": "^7.0.3", "jest": "^29.7.0", + "semantic-release": "^21.1.2", "ts-jest": "^29.2.3", "ts-node": "^10.9.2", "zod-to-json-schema": "^3.24.5" diff --git a/gui/src/redux/thunks/callCurrentTool.ts b/gui/src/redux/thunks/callCurrentTool.ts index 4b76c7201..997b01225 100644 --- a/gui/src/redux/thunks/callCurrentTool.ts +++ b/gui/src/redux/thunks/callCurrentTool.ts @@ -1,7 +1,6 @@ import { createAsyncThunk, unwrapResult } from "@reduxjs/toolkit"; import { ContextItem } from "core"; import { CLIENT_TOOLS_IMPLS } from "core/tools/builtIn"; -import { safeParseToolCallArgs } from "core/tools/parseArgs"; import posthog from "posthog-js"; import { callClientTool } from "../../util/clientTools/callClientTool"; import { selectCurrentToolCall } from "../selectors/selectCurrentToolCall"; @@ -13,6 +12,7 @@ import { updateToolCallOutput, } from "../slices/sessionSlice"; import { ThunkApiType } from "../store"; +import { logToolUsage } from "../util"; import { streamResponseAfterToolCall } from "./streamResponseAfterToolCall"; export const callCurrentTool = createAsyncThunk( @@ -29,21 +29,6 @@ export const callCurrentTool = createAsyncThunk( return; } - const logToolUsage = (success: boolean, finalOutput?: ContextItem[]) => { - extra.ideMessenger.post("devdata/log", { - name: "toolUsage", - data: { - toolCallId: toolCallState.toolCallId, - functionName: toolCallState.toolCall?.function?.name, - functionArgs: toolCallState.toolCall?.function?.arguments, - toolCallArgs: safeParseToolCallArgs(toolCallState.toolCall), - parsedArgs: toolCallState.parsedArgs, - output: finalOutput || toolCallState.output || [], - succeeded: success, - }, - }); - }; - const selectedChatModel = selectSelectedChatModel(state); if (!selectedChatModel) { @@ -122,7 +107,7 @@ export const callCurrentTool = createAsyncThunk( }), ); - logToolUsage(false, output); + logToolUsage(toolCallState, false, extra.ideMessenger, output); } else if (output?.length) { dispatch( updateToolCallOutput({ @@ -131,7 +116,7 @@ export const callCurrentTool = createAsyncThunk( }), ); - logToolUsage(true, output); + logToolUsage(toolCallState, true, extra.ideMessenger, output); } // Because we don't have access to use hooks, we check `allowAnonymousTelemetry` diff --git a/gui/src/redux/util/index.ts b/gui/src/redux/util/index.ts index eab18ae60..175b304c1 100644 --- a/gui/src/redux/util/index.ts +++ b/gui/src/redux/util/index.ts @@ -1,4 +1,6 @@ -import { ToolCallState } from "core"; +import { ContextItem, ToolCallState } from "core"; +import { safeParseToolCallArgs } from "core/tools/parseArgs"; +import { IIdeMessenger } from "../../context/IdeMessenger"; import { RootState } from "../store"; export function findCurrentToolCall( @@ -15,3 +17,23 @@ export function findToolCall( (item) => item.toolCallState?.toolCallId === toolCallId, )?.toolCallState; } + +export function logToolUsage( + toolCallState: ToolCallState, + success: boolean, + messenger: IIdeMessenger, + finalOutput?: ContextItem[], +) { + messenger.post("devdata/log", { + name: "toolUsage", + data: { + toolCallId: toolCallState.toolCallId, + functionName: toolCallState.toolCall?.function?.name, + functionArgs: toolCallState.toolCall?.function?.arguments, + toolCallArgs: safeParseToolCallArgs(toolCallState.toolCall), + parsedArgs: toolCallState.parsedArgs, + output: finalOutput || toolCallState.output || [], + succeeded: success, + }, + }); +} diff --git a/packages/config-yaml/package-lock.json b/packages/config-yaml/package-lock.json index 7f2b8b2f2..014ecac95 100644 --- a/packages/config-yaml/package-lock.json +++ b/packages/config-yaml/package-lock.json @@ -1,12 +1,12 @@ { "name": "@continuedev/config-yaml", - "version": "1.0.94", + "version": "1.0.95", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@continuedev/config-yaml", - "version": "1.0.94", + "version": "1.0.95", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.14", From 30d8b14d58a3457f7a9981355b52527c1fc59949 Mon Sep 17 00:00:00 2001 From: adarshramiyer Date: Tue, 1 Jul 2025 10:47:10 -0700 Subject: [PATCH 4/7] removed toolCallCompleted message --- core/core.ts | 6 ----- core/protocol/webview.ts | 4 ---- core/tools/callTool.ts | 23 ++++++++++++++++++++ gui/src/hooks/ParallelListeners.tsx | 29 ------------------------- gui/src/redux/thunks/callCurrentTool.ts | 2 ++ 5 files changed, 25 insertions(+), 39 deletions(-) diff --git a/core/core.ts b/core/core.ts index 71451de51..22719d5e6 100644 --- a/core/core.ts +++ b/core/core.ts @@ -821,12 +821,6 @@ export class Core { codeBaseIndexer: this.codeBaseIndexer, }); - this.messenger.send("toolCallCompleted", { - toolCallId: toolCall.id, - contextItems: result.contextItems, - succeeded: !result.errorMessage, - }); - return result; } diff --git a/core/protocol/webview.ts b/core/protocol/webview.ts index 524975031..1a8d40313 100644 --- a/core/protocol/webview.ts +++ b/core/protocol/webview.ts @@ -43,9 +43,5 @@ export type ToWebviewFromIdeOrCoreProtocol = { "jetbrains/setColors": [Record, void]; sessionUpdate: [{ sessionInfo: ControlPlaneSessionInfo | undefined }, void]; toolCallPartialOutput: [{ toolCallId: string; contextItems: any[] }, void]; - toolCallCompleted: [ - { toolCallId: string; contextItems: any[]; succeeded: boolean }, - void, - ]; freeTrialExceeded: [undefined, void]; }; diff --git a/core/tools/callTool.ts b/core/tools/callTool.ts index 40dd7abe2..c1510713e 100644 --- a/core/tools/callTool.ts +++ b/core/tools/callTool.ts @@ -1,5 +1,6 @@ import { ContextItem, Tool, ToolCall, ToolExtras } from ".."; import { MCPManagerSingleton } from "../context/mcp/MCPManagerSingleton"; +import { DataLogger } from "../data/log"; import { canParseUrl } from "../util/url"; import { BuiltInToolNames } from "./builtIn"; @@ -169,6 +170,26 @@ async function callBuiltInTool( } } +function logToolUsage( + toolCall: ToolCall, + args: Record, + contextItems: ContextItem[], + success: boolean, +) { + void DataLogger.getInstance().logDevData({ + name: "toolUsage", + data: { + toolCallId: toolCall.id, + functionName: toolCall.function.name, + functionArgs: toolCall.function.arguments, + toolCallArgs: args, + parsedArgs: args, + output: contextItems, + succeeded: success, + }, + }); +} + // Handles calls for core/non-client tools // Returns an error context item if the tool call fails // Note: Edit tool is handled on client @@ -190,6 +211,7 @@ export async function callTool( item.icon = tool.faviconUrl; }); } + logToolUsage(toolCall, args, contextItems, true); return { contextItems, errorMessage: undefined, @@ -199,6 +221,7 @@ export async function callTool( if (e instanceof Error) { errorMessage = e.message; } + logToolUsage(toolCall, {}, [], false); return { contextItems: [], errorMessage, diff --git a/gui/src/hooks/ParallelListeners.tsx b/gui/src/hooks/ParallelListeners.tsx index 2036dc365..5bf2c977a 100644 --- a/gui/src/hooks/ParallelListeners.tsx +++ b/gui/src/hooks/ParallelListeners.tsx @@ -27,13 +27,10 @@ import { setTTSActive } from "../redux/slices/uiSlice"; import { exitEdit } from "../redux/thunks/edit"; import { streamResponseAfterToolCall } from "../redux/thunks/streamResponseAfterToolCall"; -import { safeParseToolCallArgs } from "core/tools/parseArgs"; -import { store } from "../redux/store"; import { cancelStream } from "../redux/thunks/cancelStream"; import { refreshSessionMetadata } from "../redux/thunks/session"; import { streamResponseThunk } from "../redux/thunks/streamResponse"; import { updateFileSymbolsFromHistory } from "../redux/thunks/updateFileSymbols"; -import { findToolCall } from "../redux/util"; import { setDocumentStylesFromLocalStorage, setDocumentStylesFromTheme, @@ -288,32 +285,6 @@ function ParallelListeners() { [currentToolCallApplyState, history], ); - useWebviewListener( - "toolCallCompleted", - async (data) => { - const state = store.getState(); - const toolCallState = findToolCall( - state.session.history, - data.toolCallId, - ); - if (toolCallState) { - ideMessenger.post("devdata/log", { - name: "toolUsage", - data: { - toolCallId: toolCallState.toolCallId, - functionName: toolCallState.toolCall.function.name, - functionArgs: toolCallState.toolCall.function.arguments, - toolCallArgs: safeParseToolCallArgs(toolCallState.toolCall), - parsedArgs: toolCallState.parsedArgs, - output: data.contextItems, - succeeded: data.succeeded, - }, - }); - } - }, - [ideMessenger, store], - ); - useEffect(() => { if (!isInEdit) { dispatch(setLastNonEditSessionEmpty(history.length === 0)); diff --git a/gui/src/redux/thunks/callCurrentTool.ts b/gui/src/redux/thunks/callCurrentTool.ts index 997b01225..7e8ff9ab1 100644 --- a/gui/src/redux/thunks/callCurrentTool.ts +++ b/gui/src/redux/thunks/callCurrentTool.ts @@ -107,6 +107,7 @@ export const callCurrentTool = createAsyncThunk( }), ); + console.log("logging Tool from callCurrentTool"); logToolUsage(toolCallState, false, extra.ideMessenger, output); } else if (output?.length) { dispatch( @@ -116,6 +117,7 @@ export const callCurrentTool = createAsyncThunk( }), ); + console.log("logging Tool from callCurrentTool"); logToolUsage(toolCallState, true, extra.ideMessenger, output); } From b0902368f444fa24413d756a94459da824a6ef22 Mon Sep 17 00:00:00 2001 From: adarshramiyer Date: Tue, 1 Jul 2025 10:50:48 -0700 Subject: [PATCH 5/7] remove console logs --- gui/src/redux/thunks/callCurrentTool.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/gui/src/redux/thunks/callCurrentTool.ts b/gui/src/redux/thunks/callCurrentTool.ts index 7e8ff9ab1..997b01225 100644 --- a/gui/src/redux/thunks/callCurrentTool.ts +++ b/gui/src/redux/thunks/callCurrentTool.ts @@ -107,7 +107,6 @@ export const callCurrentTool = createAsyncThunk( }), ); - console.log("logging Tool from callCurrentTool"); logToolUsage(toolCallState, false, extra.ideMessenger, output); } else if (output?.length) { dispatch( @@ -117,7 +116,6 @@ export const callCurrentTool = createAsyncThunk( }), ); - console.log("logging Tool from callCurrentTool"); logToolUsage(toolCallState, true, extra.ideMessenger, output); } From 100dce546185eee7e14b36f30661406abf55ddfb Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 1 Jul 2025 10:51:20 -0700 Subject: [PATCH 6/7] bump --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index ba7a88c27..cf8b8f679 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "1.1.53", + "version": "1.1.54", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 517f439c666e12039fe07aa7cdc74f2d2280f2fb Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 1 Jul 2025 11:20:42 -0700 Subject: [PATCH 7/7] fix type errors --- packages/config-yaml/src/schemas/data/index.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/config-yaml/src/schemas/data/index.ts b/packages/config-yaml/src/schemas/data/index.ts index 1353d9c54..57c820ab3 100644 --- a/packages/config-yaml/src/schemas/data/index.ts +++ b/packages/config-yaml/src/schemas/data/index.ts @@ -28,6 +28,7 @@ import { editInteractionEventSchema_0_2_0, editInteractionEventSchema_0_2_0_noCode, } from "./editInteraction/v0.2.0.js"; +import { editOutcomeEventAllSchema } from "./editOutcome/index.js"; import { editOutcomeEventSchema_0_2_0, editOutcomeEventSchema_0_2_0_noCode, @@ -51,6 +52,11 @@ import { tokensGeneratedEventSchema_0_2_0, tokensGeneratedEventSchema_0_2_0_noCode, } from "./tokensGenerated/v0.2.0.js"; +import { toolUsageEventAllSchema } from "./toolUsage/index.js"; +import { + toolUsageEventSchema_0_2_0, + toolUsageEventSchema_0_2_0_noCode, +} from "./toolUsage/v0.2.0.js"; const semverRegex = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9A-Za-z-][0-9A-Za-z-]*)(?:\.(?:0|[1-9A-Za-z-][0-9A-Za-z-]*))*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/; @@ -81,7 +87,9 @@ const devEventAllVersionDataSchemas = z.object({ tokensGenerated: tokensGeneratedEventAllSchema, chatInteraction: chatInteractionEventAllSchema, editInteraction: editInteractionEventAllSchema, + editOutcome: editOutcomeEventAllSchema, nextEdit: nextEditEventAllSchema, + toolUsage: toolUsageEventAllSchema, }); // Version and level specific schemas are organized here @@ -109,6 +117,7 @@ export const devDataVersionedSchemas = { editInteraction: editInteractionEventSchema_0_2_0, editOutcome: editOutcomeEventSchema_0_2_0, nextEdit: nextEditEventSchema_0_2_0, + toolUsage: toolUsageEventSchema_0_2_0, }, noCode: { autocomplete: autocompleteEventSchema_0_2_0_noCode, @@ -118,6 +127,7 @@ export const devDataVersionedSchemas = { editInteraction: editInteractionEventSchema_0_2_0_noCode, editOutcome: editOutcomeEventSchema_0_2_0_noCode, nextEdit: nextEditEventSchema_0_2_0_noCode, + toolUsage: toolUsageEventSchema_0_2_0_noCode, }, }, };