Changesets · Branches · Tags · Compare
| Changeset | fa56c1e07ee24e4acc6c93e68530da5d9a118c3555b95532d633aa57445d1be3 |
|---|---|
| Author | Dallin Romney <dallinromney@gmail.com> · 2025-08-14 13:23 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-08-14 13:23 -07:00 |
| Parents | 7afbc8ab1fe5, 8f9e08cc0c4a |
27 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/data/log.vitest.ts +1 −0
| @@ -34,6 +34,7 @@ | ||
| 34 | 34 | prompt: "Hello, world!", |
| 35 | 35 | completion: "Hello, world!", |
| 36 | 36 | modelProvider: "openai", |
| 37 | + modelName: "gpt-4", | |
| 37 | 38 | modelTitle: "gpt-4", |
| 38 | 39 | sessionId: "1234", |
| 39 | 40 | tools: ["test-tool1"], |
modified core/edit/recursiveStream.ts +1 −0
| @@ -7,6 +7,7 @@ | ||
| 7 | 7 | |
| 8 | 8 | const DUD_PROMPT_LOG: PromptLog = { |
| 9 | 9 | modelTitle: "", |
| 10 | + modelProvider: "", | |
| 10 | 11 | completionOptions: { model: "" }, |
| 11 | 12 | prompt: "", |
| 12 | 13 | completion: "", |
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 +4 −0
| @@ -61,6 +61,7 @@ | ||
| 61 | 61 | // undefined; |
| 62 | 62 | |
| 63 | 63 | const modelName = "Codestral"; |
| 64 | + const modelProvider = "mistral"; | |
| 64 | 65 | const maxPromptTokens = randomNumberBetween(500, 12000); |
| 65 | 66 | |
| 66 | 67 | const autocompleteContext = await getAutocompleteContext( |
| @@ -124,6 +125,9 @@ | ||
| 124 | 125 | beforeCursorPos: cursorPosBeforeEdit, |
| 125 | 126 | afterCursorPos: cursorPosAfterPrevEdit, |
| 126 | 127 | context: autocompleteContext, |
| 128 | + modelProvider, | |
| 129 | + modelName, | |
| 130 | + modelTitle: modelName, | |
| 127 | 131 | }, |
| 128 | 132 | }); |
| 129 | 133 | } |
modified extensions/vscode/src/diff/vertical/manager.ts +1 −0
| @@ -536,6 +536,7 @@ | ||
| 536 | 536 | streamId: EDIT_MODE_STREAM_ID, |
| 537 | 537 | timestamp: new Date().toISOString(), |
| 538 | 538 | modelProvider: model.underlyingProviderName, |
| 539 | + modelName: model.title ?? "", | |
| 539 | 540 | modelTitle: model.title ?? "", |
| 540 | 541 | prompt: stripImages(prompt), |
| 541 | 542 | completion: newCode, |
modified extensions/vscode/src/extension/EditOutcomeTracker.ts +3 −1
| @@ -6,6 +6,7 @@ | ||
| 6 | 6 | streamId: string; |
| 7 | 7 | timestamp: string; |
| 8 | 8 | modelProvider: string; |
| 9 | + modelName: string; | |
| 9 | 10 | modelTitle: string; |
| 10 | 11 | prompt: string; |
| 11 | 12 | completion: string; |
| @@ -56,7 +57,8 @@ | ||
| 56 | 57 | name: "editOutcome", |
| 57 | 58 | data: { |
| 58 | 59 | modelProvider: pendingEdit.modelProvider, |
| 59 | - modelTitle: pendingEdit.modelTitle, | |
| 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 & |
| @@ -240,6 +241,7 @@ | ||
| 240 | 241 | prompt: stripImages(prompt), |
| 241 | 242 | completion: fileAfterEdit ?? "", |
| 242 | 243 | modelProvider: model.underlyingProviderName, |
| 244 | + modelName: model.title ?? "", | |
| 243 | 245 | modelTitle: model.title ?? "", |
| 244 | 246 | filepath: msg.data.range.filepath, |
| 245 | 247 | }, |
modified extensions/vscode/src/quickEdit/QuickEditQuickPick.ts +5 −5
| @@ -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 | |
| @@ -352,9 +352,9 @@ | ||
| 352 | 352 | label: QuickEditInitialItemLabels | undefined; |
| 353 | 353 | value: string | undefined; |
| 354 | 354 | }> { |
| 355 | - const modelTitle = await this.getCurModel(); | |
| 355 | + const model = await this.getCurModel(); | |
| 356 | 356 | |
| 357 | - if (!modelTitle) { | |
| 357 | + if (!model) { | |
| 358 | 358 | this.ide.showToast("error", "Please configure a model to use Quick Edit"); |
| 359 | 359 | return { label: undefined, value: undefined }; |
| 360 | 360 | } |
modified gui/src/components/FeedbackButtons.tsx +5 −1
| @@ -21,10 +21,14 @@ | ||
| 21 | 21 | setFeedback(feedback); |
| 22 | 22 | if (item.promptLogs?.length) { |
| 23 | 23 | for (const promptLog of item.promptLogs) { |
| 24 | + const { modelTitle, modelProvider, ...logData } = promptLog; | |
| 24 | 25 | ideMessenger.post("devdata/log", { |
| 25 | 26 | name: "chatFeedback", |
| 26 | 27 | data: { |
| 27 | - ...promptLog, | |
| 28 | + ...logData, | |
| 29 | + modelProvider: modelProvider || "unknown", | |
| 30 | + modelName: modelTitle, | |
| 31 | + modelTitle: modelTitle, | |
| 28 | 32 | feedback, |
| 29 | 33 | sessionId, |
| 30 | 34 | }, |
modified gui/src/redux/thunks/streamNormalInput.ts +1 −0
| @@ -273,6 +273,7 @@ | ||
| 273 | 273 | prompt: next.value.prompt, |
| 274 | 274 | completion: next.value.completion, |
| 275 | 275 | modelProvider: selectedChatModel.underlyingProviderName, |
| 276 | + modelName: selectedChatModel.title, | |
| 276 | 277 | modelTitle: selectedChatModel.title, |
| 277 | 278 | sessionId: state.session.id, |
| 278 | 279 | ...(!!activeTools.length && { |
modified gui/src/redux/thunks/streamResponse.test.ts +1 −0
| @@ -461,6 +461,7 @@ | ||
| 461 | 461 | prompt: "Hello", |
| 462 | 462 | completion: "Hi there!", |
| 463 | 463 | modelProvider: "anthropic", |
| 464 | + modelName: "Claude 3.5 Sonnet", | |
| 464 | 465 | modelTitle: "Claude 3.5 Sonnet", |
| 465 | 466 | sessionId: "session-123", |
| 466 | 467 | }, |
modified gui/src/util/editOutcomeLogger.ts +5 −1
| @@ -7,6 +7,7 @@ | ||
| 7 | 7 | */ |
| 8 | 8 | function extractModelInfo(toolCallState: ToolCallState): { |
| 9 | 9 | modelProvider: string; |
| 10 | + modelName: string; | |
| 10 | 11 | modelTitle: string; |
| 11 | 12 | } { |
| 12 | 13 | // Get the conversation history to find the model info |
| @@ -28,6 +29,7 @@ | ||
| 28 | 29 | const modelParts = String(assistantMessage.message.model).split("::"); |
| 29 | 30 | return { |
| 30 | 31 | modelProvider: modelParts[0] || "unknown", |
| 32 | + modelName: modelParts[1] || String(assistantMessage.message.model), | |
| 31 | 33 | modelTitle: modelParts[1] || String(assistantMessage.message.model), |
| 32 | 34 | }; |
| 33 | 35 | } |
| @@ -38,6 +40,7 @@ | ||
| 38 | 40 | |
| 39 | 41 | return { |
| 40 | 42 | modelProvider: chatModel?.provider || "unknown", |
| 43 | + modelName: chatModel?.model || "unknown", | |
| 41 | 44 | modelTitle: chatModel?.model || "unknown", |
| 42 | 45 | }; |
| 43 | 46 | } |
| @@ -153,7 +156,8 @@ | ||
| 153 | 156 | streamId: applyState.streamId, |
| 154 | 157 | timestamp: new Date().toISOString(), |
| 155 | 158 | modelProvider: modelInfo.modelProvider, |
| 156 | - modelTitle: modelInfo.modelTitle, | |
| 159 | + modelName: modelInfo.modelName, | |
| 160 | + modelTitle: modelInfo.modelName, | |
| 157 | 161 | prompt: promptAndCompletion.prompt, |
| 158 | 162 | completion: promptAndCompletion.completion, |
| 159 | 163 | previousCode: codeChanges.previousCode, |
modified packages/config-yaml/src/schemas/data/chatFeedback/index.ts +2 −0
| @@ -2,6 +2,8 @@ | ||
| 2 | 2 | import { baseDevDataAllSchema } from "../base.js"; |
| 3 | 3 | |
| 4 | 4 | export const chatFeedbackEventAllSchema = baseDevDataAllSchema.extend({ |
| 5 | + modelProvider: z.string(), | |
| 6 | + modelName: z.string(), | |
| 5 | 7 | modelTitle: z.string(), |
| 6 | 8 | completionOptions: z.object({}), |
| 7 | 9 | prompt: z.string(), |
modified packages/config-yaml/src/schemas/data/chatFeedback/v0.1.0.ts +1 −1
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | import { chatFeedbackEventAllSchema } from "./index.js"; |
| 2 | 2 | |
| 3 | 3 | export const chatFeedbackEventSchema_0_1_0 = chatFeedbackEventAllSchema.pick({ |
| 4 | - modelTitle: true, | |
| 4 | + modelName: true, | |
| 5 | 5 | completionOptions: true, |
| 6 | 6 | prompt: true, |
| 7 | 7 | completion: true, |
modified packages/config-yaml/src/schemas/data/chatFeedback/v0.2.0.ts +2 −0
| @@ -12,6 +12,8 @@ | ||
| 12 | 12 | // other |
| 13 | 13 | prompt: true, |
| 14 | 14 | completion: true, |
| 15 | + modelProvider: true, | |
| 16 | + modelName: true, | |
| 15 | 17 | modelTitle: true, |
| 16 | 18 | feedback: true, |
| 17 | 19 | sessionId: true, |
modified packages/config-yaml/src/schemas/data/chatInteraction/index.ts +1 −0
| @@ -3,6 +3,7 @@ | ||
| 3 | 3 | |
| 4 | 4 | export const chatInteractionEventAllSchema = baseDevDataAllSchema.extend({ |
| 5 | 5 | modelProvider: z.string(), |
| 6 | + modelName: z.string(), | |
| 6 | 7 | modelTitle: z.string(), |
| 7 | 8 | prompt: z.string(), |
| 8 | 9 | completion: z.string(), |
modified packages/config-yaml/src/schemas/data/chatInteraction/v0.2.0.ts +1 −0
| @@ -13,6 +13,7 @@ | ||
| 13 | 13 | // other |
| 14 | 14 | prompt: true, |
| 15 | 15 | completion: true, |
| 16 | + modelName: true, | |
| 16 | 17 | modelTitle: true, |
| 17 | 18 | modelProvider: true, |
| 18 | 19 | sessionId: true, |
modified packages/config-yaml/src/schemas/data/editInteraction/index.ts +1 −0
| @@ -6,6 +6,7 @@ | ||
| 6 | 6 | */ |
| 7 | 7 | export const editInteractionEventAllSchema = baseDevDataAllSchema.extend({ |
| 8 | 8 | modelProvider: z.string(), |
| 9 | + modelName: z.string(), | |
| 9 | 10 | modelTitle: z.string(), |
| 10 | 11 | prompt: z.string(), |
| 11 | 12 | completion: z.string(), |
modified packages/config-yaml/src/schemas/data/editInteraction/v0.2.0.ts +1 −0
| @@ -13,6 +13,7 @@ | ||
| 13 | 13 | // other |
| 14 | 14 | prompt: true, |
| 15 | 15 | completion: true, |
| 16 | + modelName: true, | |
| 16 | 17 | modelTitle: true, |
| 17 | 18 | modelProvider: true, |
| 18 | 19 | filepath: true, |
modified packages/config-yaml/src/schemas/data/editOutcome/index.ts +1 −0
| @@ -3,6 +3,7 @@ | ||
| 3 | 3 | |
| 4 | 4 | export const editOutcomeEventAllSchema = baseDevDataAllSchema.extend({ |
| 5 | 5 | modelProvider: z.string(), |
| 6 | + modelName: z.string(), | |
| 6 | 7 | modelTitle: z.string(), |
| 7 | 8 | prompt: z.string(), |
| 8 | 9 | completion: z.string(), |
modified packages/config-yaml/src/schemas/data/editOutcome/v0.2.0.ts +1 −0
| @@ -12,6 +12,7 @@ | ||
| 12 | 12 | // other |
| 13 | 13 | prompt: true, |
| 14 | 14 | completion: true, |
| 15 | + modelName: true, | |
| 15 | 16 | modelTitle: true, |
| 16 | 17 | modelProvider: true, |
| 17 | 18 | accepted: true, |
modified packages/config-yaml/src/schemas/data/nextEditWithHistory/index.ts +3 −0
| @@ -15,4 +15,7 @@ | ||
| 15 | 15 | beforeCursorPos: z.object({ line: z.number(), character: z.number() }), |
| 16 | 16 | afterCursorPos: z.object({ line: z.number(), character: z.number() }), |
| 17 | 17 | context: z.string(), |
| 18 | + modelProvider: z.string(), | |
| 19 | + modelName: z.string(), | |
| 20 | + modelTitle: z.string(), | |
| 18 | 21 | }); |
modified packages/config-yaml/src/schemas/data/nextEditWithHistory/v0.2.0.ts +3 −0
| @@ -18,6 +18,9 @@ | ||
| 18 | 18 | beforeCursorPos: true, |
| 19 | 19 | afterCursorPos: true, |
| 20 | 20 | context: true, |
| 21 | + modelProvider: true, | |
| 22 | + modelName: true, | |
| 23 | + modelTitle: true, | |
| 21 | 24 | }); |
| 22 | 25 | |
| 23 | 26 | export const nextEditEventSchema_0_2_0_noCode = nextEditEventSchema_0_2_0.omit({ |