Changesets · Branches · Tags · Compare
| Changeset | 32fb411252de7bbff0ebf56a3a6ea08dc22890de0b3b91e74cc71dda0e9d100f |
|---|---|
| Author | Patrick Erichsen <patrick.a.erichsen@gmail.com> · 2025-08-13 22:06 -07:00 |
| Committer | Patrick Erichsen <patrick.a.erichsen@gmail.com> · 2025-08-13 22:06 -07:00 |
| Parents | 7b07261ecd77 |
25 files changed
modified core/config/types.ts +1 −0
| @@ -387,6 +387,7 @@ | ||
| 387 | 387 | |
| 388 | 388 | export interface PromptLog { |
| 389 | 389 | modelTitle: string; |
| 390 | + modelProvider: string; | |
| 390 | 391 | completionOptions: CompletionOptions; |
| 391 | 392 | prompt: string; |
| 392 | 393 | completion: string; |
modified core/index.d.ts +1 −0
| @@ -455,6 +455,7 @@ | ||
| 455 | 455 | |
| 456 | 456 | export interface PromptLog { |
| 457 | 457 | modelTitle: string; |
| 458 | + modelProvider: string; | |
| 458 | 459 | completionOptions: CompletionOptions; |
| 459 | 460 | prompt: string; |
| 460 | 461 | completion: string; |
modified core/llm/index.ts +2 −0
| @@ -779,6 +779,7 @@ | ||
| 779 | 779 | |
| 780 | 780 | return { |
| 781 | 781 | modelTitle: this.title ?? completionOptions.model, |
| 782 | + modelProvider: this.underlyingProviderName, | |
| 782 | 783 | prompt, |
| 783 | 784 | completion, |
| 784 | 785 | completionOptions, |
| @@ -1094,6 +1095,7 @@ | ||
| 1094 | 1095 | |
| 1095 | 1096 | return { |
| 1096 | 1097 | modelTitle: this.title ?? completionOptions.model, |
| 1098 | + modelProvider: this.underlyingProviderName, | |
| 1097 | 1099 | prompt, |
| 1098 | 1100 | completion, |
| 1099 | 1101 | completionOptions, |
modified core/llm/llm-pre-fetch.vitest.ts +1 −0
| @@ -23,6 +23,7 @@ | ||
| 23 | 23 | model: "", |
| 24 | 24 | }, |
| 25 | 25 | modelTitle: "", |
| 26 | + modelProvider: "", | |
| 26 | 27 | prompt: "", |
| 27 | 28 | }); |
| 28 | 29 | abortController.abort(); |
modified core/llm/streamChat.ts +1 −0
| @@ -40,6 +40,7 @@ | ||
| 40 | 40 | // Log to return in case of error |
| 41 | 41 | const errorPromptLog = { |
| 42 | 42 | modelTitle: model?.title ?? model?.model, |
| 43 | + modelProvider: model?.underlyingProviderName ?? "unknown", | |
| 43 | 44 | completion: "", |
| 44 | 45 | prompt: "", |
| 45 | 46 | completionOptions: { |
modified core/nextEdit/context/processNextEditData.ts +1 −0
| @@ -127,6 +127,7 @@ | ||
| 127 | 127 | context: autocompleteContext, |
| 128 | 128 | modelProvider, |
| 129 | 129 | modelName, |
| 130 | + modelTitle: modelName, | |
| 130 | 131 | }, |
| 131 | 132 | }); |
| 132 | 133 | } |
modified extensions/vscode/src/diff/vertical/manager.ts +1 −0
| @@ -537,6 +537,7 @@ | ||
| 537 | 537 | timestamp: new Date().toISOString(), |
| 538 | 538 | modelProvider: model.underlyingProviderName, |
| 539 | 539 | modelName: model.title ?? "", |
| 540 | + modelTitle: model.title ?? "", | |
| 540 | 541 | prompt: stripImages(prompt), |
| 541 | 542 | completion: newCode, |
| 542 | 543 | previousCode, |
modified extensions/vscode/src/extension/EditOutcomeTracker.ts +2 −0
| @@ -7,6 +7,7 @@ | ||
| 7 | 7 | timestamp: string; |
| 8 | 8 | modelProvider: string; |
| 9 | 9 | modelName: string; |
| 10 | + modelTitle: string; | |
| 10 | 11 | prompt: string; |
| 11 | 12 | completion: string; |
| 12 | 13 | previousCode: string; |
| @@ -57,6 +58,7 @@ | ||
| 57 | 58 | data: { |
| 58 | 59 | modelProvider: pendingEdit.modelProvider, |
| 59 | 60 | modelName: pendingEdit.modelName, |
| 61 | + modelTitle: pendingEdit.modelName, | |
| 60 | 62 | prompt: pendingEdit.prompt, |
| 61 | 63 | completion: pendingEdit.completion, |
| 62 | 64 | previousCode: pendingEdit.previousCode, |
modified extensions/vscode/src/extension/VsCodeMessenger.ts +2 −0
| @@ -30,6 +30,7 @@ | ||
| 30 | 30 | import { getExtensionUri } from "../util/vscode"; |
| 31 | 31 | import { VsCodeIde } from "../VsCodeIde"; |
| 32 | 32 | import { VsCodeWebviewProtocol } from "../webviewProtocol"; |
| 33 | + | |
| 33 | 34 | import { VsCodeExtension } from "./VsCodeExtension"; |
| 34 | 35 | |
| 35 | 36 | type ToIdeOrWebviewFromCoreProtocol = ToIdeFromCoreProtocol & |
| @@ -241,6 +242,7 @@ | ||
| 241 | 242 | completion: fileAfterEdit ?? "", |
| 242 | 243 | modelProvider: model.underlyingProviderName, |
| 243 | 244 | modelName: model.title ?? "", |
| 245 | + modelTitle: model.title ?? "", | |
| 244 | 246 | filepath: msg.data.range.filepath, |
| 245 | 247 | }, |
| 246 | 248 | }); |
modified extensions/vscode/src/quickEdit/QuickEditQuickPick.ts +3 −3
| @@ -238,15 +238,15 @@ | ||
| 238 | 238 | prompt: string, |
| 239 | 239 | path: string | undefined, |
| 240 | 240 | ) => { |
| 241 | - const model = await this.getCurModel(); | |
| 242 | - if (!model) { | |
| 241 | + const modelTitle = await this.getCurModel(); | |
| 242 | + if (!modelTitle) { | |
| 243 | 243 | throw new Error("No model selected"); |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | const { config } = await this.configHandler.loadConfig(); |
| 247 | 247 | const rules = config?.rules ?? []; // no need to error - getCurModel above will handle |
| 248 | 248 | |
| 249 | - await this._streamEditWithInputAndContext(prompt, model, rules); | |
| 249 | + await this._streamEditWithInputAndContext(prompt, modelTitle, rules); | |
| 250 | 250 | this.openAcceptRejectMenu(prompt, path); |
| 251 | 251 | }; |
| 252 | 252 |
modified gui/src/components/FeedbackButtons.tsx +3 −2
| @@ -21,13 +21,14 @@ | ||
| 21 | 21 | setFeedback(feedback); |
| 22 | 22 | if (item.promptLogs?.length) { |
| 23 | 23 | for (const promptLog of item.promptLogs) { |
| 24 | - const { modelTitle, ...logData } = promptLog; | |
| 24 | + const { modelTitle, modelProvider, ...logData } = promptLog; | |
| 25 | 25 | ideMessenger.post("devdata/log", { |
| 26 | 26 | name: "chatFeedback", |
| 27 | 27 | data: { |
| 28 | 28 | ...logData, |
| 29 | - modelProvider: "unknown", | |
| 29 | + modelProvider: modelProvider || "unknown", | |
| 30 | 30 | modelName: modelTitle, |
| 31 | + modelTitle: modelTitle, | |
| 31 | 32 | feedback, |
| 32 | 33 | sessionId, |
| 33 | 34 | }, |
modified gui/src/redux/thunks/streamNormalInput.ts +2 −2
| @@ -3,7 +3,6 @@ | ||
| 3 | 3 | import { getRuleId } from "core/llm/rules/getSystemMessageWithRules"; |
| 4 | 4 | import { ToCoreProtocol } from "core/protocol"; |
| 5 | 5 | import { BuiltInToolNames } from "core/tools/builtIn"; |
| 6 | -import posthog from "posthog-js"; | |
| 7 | 6 | import { selectActiveTools } from "../selectors/selectActiveTools"; |
| 8 | 7 | import { selectUseSystemMessageTools } from "../selectors/selectUseSystemMessageTools"; |
| 9 | 8 | import { selectSelectedChatModel } from "../slices/configSlice"; |
| @@ -27,9 +26,9 @@ | ||
| 27 | 26 | import { interceptSystemToolCalls } from "core/tools/systemMessageTools/interceptSystemToolCalls"; |
| 28 | 27 | import { SystemMessageToolCodeblocksFramework } from "core/tools/systemMessageTools/toolCodeblocks"; |
| 29 | 28 | import { selectCurrentToolCalls } from "../selectors/selectToolCalls"; |
| 29 | +import { DEFAULT_TOOL_SETTING } from "../slices/uiSlice"; | |
| 30 | 30 | import { getBaseSystemMessage } from "../util/getBaseSystemMessage"; |
| 31 | 31 | import { callToolById } from "./callToolById"; |
| 32 | -import { DEFAULT_TOOL_SETTING } from "../slices/uiSlice"; | |
| 33 | 32 | /** |
| 34 | 33 | * Handles the execution of tool calls that may be automatically accepted. |
| 35 | 34 | * Sets all tools as generated first, then executes auto-approved tool calls. |
| @@ -275,6 +274,7 @@ | ||
| 275 | 274 | completion: next.value.completion, |
| 276 | 275 | modelProvider: selectedChatModel.underlyingProviderName, |
| 277 | 276 | modelName: selectedChatModel.title, |
| 277 | + modelTitle: selectedChatModel.title, | |
| 278 | 278 | sessionId: state.session.id, |
| 279 | 279 | ...(!!activeTools.length && { |
| 280 | 280 | tools: activeTools.map((tool) => tool.function.name), |
modified gui/src/redux/thunks/streamResponse.test.ts +1 −0
| @@ -462,6 +462,7 @@ | ||
| 462 | 462 | completion: "Hi there!", |
| 463 | 463 | modelProvider: "anthropic", |
| 464 | 464 | modelName: "Claude 3.5 Sonnet", |
| 465 | + modelTitle: "Claude 3.5 Sonnet", | |
| 465 | 466 | sessionId: "session-123", |
| 466 | 467 | }, |
| 467 | 468 | }); |
modified gui/src/util/editOutcomeLogger.ts +3 −0
| @@ -8,6 +8,7 @@ | ||
| 8 | 8 | function extractModelInfo(toolCallState: ToolCallState): { |
| 9 | 9 | modelProvider: string; |
| 10 | 10 | modelName: string; |
| 11 | + modelTitle: string; | |
| 11 | 12 | } { |
| 12 | 13 | // Get the conversation history to find the model info |
| 13 | 14 | const history = store.getState().session.history; |
| @@ -29,6 +30,7 @@ | ||
| 29 | 30 | return { |
| 30 | 31 | modelProvider: modelParts[0] || "unknown", |
| 31 | 32 | modelName: modelParts[1] || String(assistantMessage.message.model), |
| 33 | + modelTitle: modelParts[1] || String(assistantMessage.message.model), | |
| 32 | 34 | }; |
| 33 | 35 | } |
| 34 | 36 | |
| @@ -39,6 +41,7 @@ | ||
| 39 | 41 | return { |
| 40 | 42 | modelProvider: chatModel?.provider || "unknown", |
| 41 | 43 | modelName: chatModel?.model || "unknown", |
| 44 | + modelTitle: chatModel?.model || "unknown", | |
| 42 | 45 | }; |
| 43 | 46 | } |
| 44 | 47 |
modified packages/config-yaml/src/schemas/data/chatFeedback/index.ts +1 −0
| @@ -4,6 +4,7 @@ | ||
| 4 | 4 | export const chatFeedbackEventAllSchema = baseDevDataAllSchema.extend({ |
| 5 | 5 | modelProvider: z.string(), |
| 6 | 6 | modelName: z.string(), |
| 7 | + modelTitle: z.string(), | |
| 7 | 8 | completionOptions: z.object({}), |
| 8 | 9 | prompt: z.string(), |
| 9 | 10 | completion: z.string(), |
modified packages/config-yaml/src/schemas/data/chatFeedback/v0.1.0.ts +0 −1
| @@ -1,7 +1,6 @@ | ||
| 1 | 1 | import { chatFeedbackEventAllSchema } from "./index.js"; |
| 2 | 2 | |
| 3 | 3 | export const chatFeedbackEventSchema_0_1_0 = chatFeedbackEventAllSchema.pick({ |
| 4 | - modelProvider: true, | |
| 5 | 4 | modelName: true, |
| 6 | 5 | completionOptions: true, |
| 7 | 6 | prompt: true, |
modified packages/config-yaml/src/schemas/data/chatFeedback/v0.2.0.ts +1 −0
| @@ -14,6 +14,7 @@ | ||
| 14 | 14 | completion: true, |
| 15 | 15 | modelProvider: true, |
| 16 | 16 | modelName: true, |
| 17 | + modelTitle: true, | |
| 17 | 18 | feedback: true, |
| 18 | 19 | sessionId: true, |
| 19 | 20 | }); |
modified packages/config-yaml/src/schemas/data/chatInteraction/index.ts +1 −0
| @@ -4,6 +4,7 @@ | ||
| 4 | 4 | export const chatInteractionEventAllSchema = baseDevDataAllSchema.extend({ |
| 5 | 5 | modelProvider: z.string(), |
| 6 | 6 | modelName: z.string(), |
| 7 | + modelTitle: z.string(), | |
| 7 | 8 | prompt: z.string(), |
| 8 | 9 | completion: z.string(), |
| 9 | 10 | sessionId: z.string(), |
modified packages/config-yaml/src/schemas/data/chatInteraction/v0.2.0.ts +1 −0
| @@ -14,6 +14,7 @@ | ||
| 14 | 14 | prompt: true, |
| 15 | 15 | completion: true, |
| 16 | 16 | modelName: true, |
| 17 | + modelTitle: true, | |
| 17 | 18 | modelProvider: true, |
| 18 | 19 | sessionId: true, |
| 19 | 20 | tools: true, |
modified packages/config-yaml/src/schemas/data/editInteraction/index.ts +1 −0
| @@ -7,6 +7,7 @@ | ||
| 7 | 7 | export const editInteractionEventAllSchema = baseDevDataAllSchema.extend({ |
| 8 | 8 | modelProvider: z.string(), |
| 9 | 9 | modelName: z.string(), |
| 10 | + modelTitle: z.string(), | |
| 10 | 11 | prompt: z.string(), |
| 11 | 12 | completion: z.string(), |
| 12 | 13 | filepath: z.string(), |
modified packages/config-yaml/src/schemas/data/editInteraction/v0.2.0.ts +1 −0
| @@ -14,6 +14,7 @@ | ||
| 14 | 14 | prompt: true, |
| 15 | 15 | completion: true, |
| 16 | 16 | modelName: true, |
| 17 | + modelTitle: true, | |
| 17 | 18 | modelProvider: true, |
| 18 | 19 | filepath: true, |
| 19 | 20 | }); |
modified packages/config-yaml/src/schemas/data/editOutcome/index.ts +1 −0
| @@ -4,6 +4,7 @@ | ||
| 4 | 4 | export const editOutcomeEventAllSchema = baseDevDataAllSchema.extend({ |
| 5 | 5 | modelProvider: z.string(), |
| 6 | 6 | modelName: z.string(), |
| 7 | + modelTitle: z.string(), | |
| 7 | 8 | prompt: z.string(), |
| 8 | 9 | completion: z.string(), |
| 9 | 10 | previousCode: z.string(), |
modified packages/config-yaml/src/schemas/data/editOutcome/v0.2.0.ts +1 −0
| @@ -13,6 +13,7 @@ | ||
| 13 | 13 | prompt: true, |
| 14 | 14 | completion: true, |
| 15 | 15 | modelName: true, |
| 16 | + modelTitle: true, | |
| 16 | 17 | modelProvider: true, |
| 17 | 18 | accepted: true, |
| 18 | 19 | previousCode: true, |
modified packages/config-yaml/src/schemas/data/nextEditWithHistory/index.ts +1 −0
| @@ -17,4 +17,5 @@ | ||
| 17 | 17 | context: z.string(), |
| 18 | 18 | modelProvider: z.string(), |
| 19 | 19 | modelName: z.string(), |
| 20 | + modelTitle: z.string(), | |
| 20 | 21 | }); |
modified packages/config-yaml/src/schemas/data/nextEditWithHistory/v0.2.0.ts +1 −0
| @@ -20,6 +20,7 @@ | ||
| 20 | 20 | context: true, |
| 21 | 21 | modelProvider: true, |
| 22 | 22 | modelName: true, |
| 23 | + modelTitle: true, | |
| 23 | 24 | }); |
| 24 | 25 | |
| 25 | 26 | export const nextEditEventSchema_0_2_0_noCode = nextEditEventSchema_0_2_0.omit({ |