Skip to content

Commit 187d445

Browse files
authored
Merge pull request #7116 from continuedev/pe/devdata-fixed
fix: standardize dev data schemas and add missing fields
2 parents 1704df4 + 9a2b36f commit 187d445

File tree

27 files changed

+52
-9
lines changed

27 files changed

+52
-9
lines changed

core/config/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ declare global {
387387
388388
export interface PromptLog {
389389
modelTitle: string;
390+
modelProvider: string;
390391
completionOptions: CompletionOptions;
391392
prompt: string;
392393
completion: string;

core/data/log.vitest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const TEST_AGENT_INTERACTION_EVENT: DevDataLogEvent = {
3434
prompt: "Hello, world!",
3535
completion: "Hello, world!",
3636
modelProvider: "openai",
37+
modelName: "gpt-4",
3738
modelTitle: "gpt-4",
3839
sessionId: "1234",
3940
tools: ["test-tool1"],

core/edit/recursiveStream.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const INFINITE_STREAM_SAFETY = 0.9;
77

88
const DUD_PROMPT_LOG: PromptLog = {
99
modelTitle: "",
10+
modelProvider: "",
1011
completionOptions: { model: "" },
1112
prompt: "",
1213
completion: "",

core/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ export type FileSymbolMap = Record<string, SymbolWithRange[]>;
455455

456456
export interface PromptLog {
457457
modelTitle: string;
458+
modelProvider: string;
458459
completionOptions: CompletionOptions;
459460
prompt: string;
460461
completion: string;

core/llm/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,7 @@ export abstract class BaseLLM implements ILLM {
779779

780780
return {
781781
modelTitle: this.title ?? completionOptions.model,
782+
modelProvider: this.underlyingProviderName,
782783
prompt,
783784
completion,
784785
completionOptions,
@@ -1094,6 +1095,7 @@ export abstract class BaseLLM implements ILLM {
10941095

10951096
return {
10961097
modelTitle: this.title ?? completionOptions.model,
1098+
modelProvider: this.underlyingProviderName,
10971099
prompt,
10981100
completion,
10991101
completionOptions,

core/llm/llm-pre-fetch.vitest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ async function dudLLMCall(llm: ILLM, messages: ChatMessage[]) {
2323
model: "",
2424
},
2525
modelTitle: "",
26+
modelProvider: "",
2627
prompt: "",
2728
});
2829
abortController.abort();

core/llm/streamChat.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export async function* llmStreamChat(
4040
// Log to return in case of error
4141
const errorPromptLog = {
4242
modelTitle: model?.title ?? model?.model,
43+
modelProvider: model?.underlyingProviderName ?? "unknown",
4344
completion: "",
4445
prompt: "",
4546
completionOptions: {

core/nextEdit/context/processNextEditData.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export const processNextEditData = async ({
6161
// undefined;
6262

6363
const modelName = "Codestral";
64+
const modelProvider = "mistral";
6465
const maxPromptTokens = randomNumberBetween(500, 12000);
6566

6667
const autocompleteContext = await getAutocompleteContext(
@@ -124,6 +125,9 @@ export const processNextEditData = async ({
124125
beforeCursorPos: cursorPosBeforeEdit,
125126
afterCursorPos: cursorPosAfterPrevEdit,
126127
context: autocompleteContext,
128+
modelProvider,
129+
modelName,
130+
modelTitle: modelName,
127131
},
128132
});
129133
}

extensions/vscode/src/diff/vertical/manager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ export class VerticalDiffManager {
536536
streamId: EDIT_MODE_STREAM_ID,
537537
timestamp: new Date().toISOString(),
538538
modelProvider: model.underlyingProviderName,
539+
modelName: model.title ?? "",
539540
modelTitle: model.title ?? "",
540541
prompt: stripImages(prompt),
541542
completion: newCode,

extensions/vscode/src/extension/EditOutcomeTracker.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export interface PendingEditData {
66
streamId: string;
77
timestamp: string;
88
modelProvider: string;
9+
modelName: string;
910
modelTitle: string;
1011
prompt: string;
1112
completion: string;
@@ -56,7 +57,8 @@ class EditOutcomeTracker {
5657
name: "editOutcome",
5758
data: {
5859
modelProvider: pendingEdit.modelProvider,
59-
modelTitle: pendingEdit.modelTitle,
60+
modelName: pendingEdit.modelName,
61+
modelTitle: pendingEdit.modelName,
6062
prompt: pendingEdit.prompt,
6163
completion: pendingEdit.completion,
6264
previousCode: pendingEdit.previousCode,

0 commit comments

Comments
 (0)