From 0c0f20dddd6fc39dd6c54d5817a6a3576f6f745a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kondratek?= Date: Tue, 1 Jul 2025 18:15:25 +0200 Subject: [PATCH 1/7] wip --- agent/src/__tests__/autoedit/src/Point.cs | 30 ++++++++++++++ agent/src/autoedit.test.ts | 50 +++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 agent/src/__tests__/autoedit/src/Point.cs diff --git a/agent/src/__tests__/autoedit/src/Point.cs b/agent/src/__tests__/autoedit/src/Point.cs new file mode 100644 index 000000000000..f595cd501ab6 --- /dev/null +++ b/agent/src/__tests__/autoedit/src/Point.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConsoleApp1 +{ + public class Point3d/* CURSOR */ + { + private int x; + private int y; + + public Point(int x, int y) + { + this.x = x; + this.y = y; + } + + public double GetDistance(Point other) + { + return Math.Sqrt((x - other.x) * (x - other.x) + (y - other.y) * (y - other.y)); + } + + public override string ToString() + { + return $"two-dimensional point: ({x},{y})"; + } + } +} diff --git a/agent/src/autoedit.test.ts b/agent/src/autoedit.test.ts index f45e5d93adf6..11514d29398c 100644 --- a/agent/src/autoedit.test.ts +++ b/agent/src/autoedit.test.ts @@ -495,6 +495,56 @@ describe('Autoedit', () => { expect(modifiedLines.length).toBeGreaterThan(0) expect(unchangedLines.length).toBeGreaterThan(0) }, 10_000) + + it('Point.cs 2d -> 3d', async () => { + const file = workspace.file('src', 'Point.cs') + + for (let i = 0; i < 100; i++) { + console.log(`[my_log] running #${i}`) + const result = await getAutoEditSuggestion(client, file, { line: 8, character: 24 }) + + // Prediction accurately reflects the edit that should be made. + expect(result.insertText).toMatchInlineSnapshot(` + "{ + public class Point3d : Point + { + private int z; + + public Point3d(int x, int y, int z) : base(x, y) + { + this.z = z; + } + + public double GetDistance(Point3d other) + { + return Math.Sqrt((x - other.x) * (x - other.x) + (y - other.y) * (y - other.y) + (z - other.z) * (z - other.z)); + } + + public override string ToString() + { + return $"three-dimensional point: ({x},{y},{z})"; + } + } + } + " + `) + + const { aside, inline } = result.render + + // No inline diff provided (client only supports aside) + expect(inline.changes).toBeNull() + + // No image provided (client will render the aside diff in their own way) + expect(aside.image).toBeNull() + + // Diff object is provided + expect(aside.diff).not.toBeNull() + const { modifiedLines, unchangedLines } = aside.diff! + // Check the diff has contents, we don't snapshot this as it is quite a large object + expect(modifiedLines.length).toBeGreaterThan(0) + expect(unchangedLines.length).toBeGreaterThan(0) + } + }, 10_000_000) }) describe('client can render both inline and aside diffs', () => { From 3e9ce5169bab3df93f214ab0907bb333705b4fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kondratek?= Date: Mon, 7 Jul 2025 11:08:39 +0200 Subject: [PATCH 2/7] Update recordings --- .../recording.har.yaml | 194 ++++++++++++++++++ 1 file changed, 194 insertions(+) diff --git a/agent/recordings/autoedit-aside-custom_2361404853/recording.har.yaml b/agent/recordings/autoedit-aside-custom_2361404853/recording.har.yaml index 25eece014414..c652a602c4bf 100644 --- a/agent/recordings/autoedit-aside-custom_2361404853/recording.har.yaml +++ b/agent/recordings/autoedit-aside-custom_2361404853/recording.har.yaml @@ -429,6 +429,200 @@ log: send: 0 ssl: -1 wait: 399 + - _id: d218cd067a5a1f2f505df3c5751a4d72 + _order: 0 + cache: {} + request: + bodySize: 1816 + cookies: [] + headers: + - _fromType: array + name: accept + value: application/json + - _fromType: array + name: accept-encoding + value: gzip;q=0 + - _fromType: array + name: authorization + value: token + REDACTED_69e9f79ce29352d014eeb80b56510341844eb82ad9abac7cab3631c7e873e4ce + - _fromType: array + name: content-type + value: application/json; charset=utf-8 + - _fromType: array + name: user-agent + value: autoedit-aside-custom/v1 (Node.js v23.7.0) + - _fromType: array + name: x-requested-with + value: autoedit-aside-custom v1 + - _fromType: array + name: x-sourcegraph-api-client-name + value: autoedit-aside-custom + - _fromType: array + name: x-sourcegraph-api-client-version + value: v1 + - _fromType: array + name: x-timeout-ms + value: "5000" + - _fromType: array + name: content-length + value: "1816" + - name: host + value: demo.sourcegraph.com + headersSize: 569 + httpVersion: HTTP/1.1 + method: POST + postData: + mimeType: application/json; charset=utf-8 + params: [] + textJSON: + maxTokensToSample: 528 + messages: + - speaker: human + text: >- + You are an intelligent programmer and an expert at coding. + Your goal is to help a colleague finish a code change. + + + User: Help me finish a coding change. You will see snippets from current open files in my editor, files I have recently viewed, the file I am editing, then a history of my recent codebase changes, then current compiler and linter errors, content I copied from my codebase. You will then rewrite the , to match what you think I would do next in the codebase. Note: I might have stopped in the middle of typing. + + Code snippets just I viewed: + + The file currently open:(`src/Point.cs`) + + + + <<>> + this.x = x; + this.y = y; + } + + public double GetDistance(Point other) + { + return Math.Sqrt((x - other.x) * (x - other.x) + (y - other.y) * (y - other.y)); + } + + public override string ToString() + { + return $"two-dimensional point: ({x},{y})"; + } + } + } + + + + + + + using System; + + using System.Collections.Generic; + + using System.Linq; + + using System.Text; + + using System.Threading.Tasks; + + + namespace ConsoleApp1 + + + + + { + public class Point3d + { + private int x; + + + private int y; + + public Point(int x, int y) + { + + + + Continue where I left off and finish my change by rewriting "code_to_rewrite": + + + Assistant: + model: fireworks::v1::autoedits-deepseek-lite-default + prediction: + content: | + { + public class Point3d + { + private int x; + type: content + stream: true + temperature: 0.1 + timeoutMs: 5000 + queryString: + - name: client-name + value: autoedit-aside-custom + - name: client-version + value: v1 + - name: api-version + value: "8" + url: https://demo.sourcegraph.com/.api/completions/code?client-name=autoedit-aside-custom&client-version=v1&api-version=8 + response: + bodySize: 1215 + content: + mimeType: text/event-stream + size: 1215 + text: >+ + event: completion + + data: {"deltaText":"{\n public class Point3d : Point\n {\n private int z;\n\n public Point3d(int x, int y, int z) : base(x, y)\n {\n this.z = z;\n }\n\n public double GetDistance(Point3d other)\n {\n return Math.Sqrt((x - other.x) * (x - other.x) + (y - other.y) * (y - other.y) + (z - other.z) * (z - other.z));\n }\n\n public override string ToString()\n {\n return $\"three-dimensional point: ({x},{y},{z})\";\n }\n }\n}\n"} + + + event: done + + data: {} + + cookies: [] + headers: + - name: date + value: Mon, 07 Jul 2025 09:05:57 GMT + - name: content-type + value: text/event-stream + - name: transfer-encoding + value: chunked + - name: connection + value: close + - name: access-control-allow-credentials + value: "true" + - name: access-control-allow-origin + value: "" + - name: cache-control + value: no-cache + - name: vary + value: Accept-Encoding, Authorization, Authorization, Cookie, Authorization, + X-Requested-With, Cookie + - name: x-content-type-options + value: nosniff + - name: x-frame-options + value: DENY + - name: x-xss-protection + value: 1; mode=block + - name: strict-transport-security + value: max-age=31536000; includeSubDomains; preload + headersSize: 1245 + httpVersion: HTTP/1.1 + redirectURL: "" + status: 200 + statusText: OK + startedDateTime: 2025-07-07T09:05:56.632Z + time: 1480 + timings: + blocked: -1 + connect: -1 + dns: -1 + receive: 0 + send: 0 + ssl: -1 + wait: 1480 - _id: 404a28d2461ea66da470804476c21f26 _order: 0 cache: {} From 4c278a326b026a6717ee5508959c247b2d1379a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kondratek?= Date: Mon, 7 Jul 2025 11:59:06 +0200 Subject: [PATCH 3/7] Use Invoke instead of Manual --- agent/src/autoedit.test.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/agent/src/autoedit.test.ts b/agent/src/autoedit.test.ts index 11514d29398c..a47c7cc1a5cd 100644 --- a/agent/src/autoedit.test.ts +++ b/agent/src/autoedit.test.ts @@ -205,7 +205,8 @@ describe('Autoedit', () => { async function getAutoEditSuggestion( client: TestClient, uri: vscode.Uri, - position: Position + position: Position, + triggerKind: 'Automatic' | 'Invoke' = 'Automatic' ): Promise { await client.openFile(uri) @@ -219,7 +220,7 @@ describe('Autoedit', () => { const result = (await client.request('autocomplete/execute', { uri: uri.toString(), position, - triggerKind: 'Automatic', + triggerKind: triggerKind, })) as AutocompleteResult const id = result.decoratedEditItems[0].id @@ -501,7 +502,12 @@ describe('Autoedit', () => { for (let i = 0; i < 100; i++) { console.log(`[my_log] running #${i}`) - const result = await getAutoEditSuggestion(client, file, { line: 8, character: 24 }) + const result = await getAutoEditSuggestion( + client, + file, + { line: 8, character: 24 }, + 'Invoke' + ) // Prediction accurately reflects the edit that should be made. expect(result.insertText).toMatchInlineSnapshot(` From 0423421ac5b2ec883bfb69a18be139a42593d510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kondratek?= Date: Mon, 7 Jul 2025 12:23:02 +0200 Subject: [PATCH 4/7] Re-instantiate the client in the loop --- agent/src/autoedit.test.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/agent/src/autoedit.test.ts b/agent/src/autoedit.test.ts index a47c7cc1a5cd..85de57112d3f 100644 --- a/agent/src/autoedit.test.ts +++ b/agent/src/autoedit.test.ts @@ -496,12 +496,32 @@ describe('Autoedit', () => { expect(modifiedLines.length).toBeGreaterThan(0) expect(unchangedLines.length).toBeGreaterThan(0) }, 10_000) + }) + describe('insertText vs originalText inconsistency repro', () => { it('Point.cs 2d -> 3d', async () => { const file = workspace.file('src', 'Point.cs') for (let i = 0; i < 100; i++) { console.log(`[my_log] running #${i}`) + + const client = TestClient.create({ + workspaceRootUri: workspace.rootUri, + name: 'autoedit-aside-custom', + credentials: TESTING_CREDENTIALS.enterprise, + extraConfiguration: { + 'cody.suggestions.mode': 'auto-edit', + }, + capabilities: { + ...allClientCapabilitiesEnabled, + autoedit: 'enabled', + autoeditInlineDiff: 'none', + autoeditAsideDiff: 'diff', + }, + }) + + await client.beforeAll() + const result = await getAutoEditSuggestion( client, file, @@ -549,6 +569,8 @@ describe('Autoedit', () => { // Check the diff has contents, we don't snapshot this as it is quite a large object expect(modifiedLines.length).toBeGreaterThan(0) expect(unchangedLines.length).toBeGreaterThan(0) + + await client.afterAll() } }, 10_000_000) }) From 2683e6a3d93b0ea9859f758ba91de2cb7dc10f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kondratek?= Date: Mon, 7 Jul 2025 13:29:22 +0200 Subject: [PATCH 5/7] Update recording.har.yaml --- .../recording.har.yaml | 917 ++++++------------ 1 file changed, 312 insertions(+), 605 deletions(-) diff --git a/agent/recordings/autoedit-aside-custom_2361404853/recording.har.yaml b/agent/recordings/autoedit-aside-custom_2361404853/recording.har.yaml index c652a602c4bf..ae503be96112 100644 --- a/agent/recordings/autoedit-aside-custom_2361404853/recording.har.yaml +++ b/agent/recordings/autoedit-aside-custom_2361404853/recording.har.yaml @@ -24,385 +24,54 @@ log: value: application/json; charset=utf-8 - _fromType: array name: user-agent - value: autoedit-aside-custom/v1 (Node.js v20.4.0) + value: autoedit-aside-custom/v1 (Node.js v23.7.0) - _fromType: array name: x-requested-with value: autoedit-aside-custom v1 + - _fromType: array + name: x-sourcegraph-api-client-name + value: autoedit-aside-custom + - _fromType: array + name: x-sourcegraph-api-client-version + value: v1 - _fromType: array name: accept-encoding value: gzip,deflate - name: host value: demo.sourcegraph.com - headersSize: 436 + headersSize: 528 httpVersion: HTTP/1.1 method: GET queryString: [] url: https://demo.sourcegraph.com/.api/client-config response: - bodySize: 216 + bodySize: 235 content: encoding: base64 mimeType: text/plain; charset=utf-8 - size: 216 - text: "[\"H4sIAAAAAAAAA2zOsQrDMAwE0D1fYTL3A0q2EDpkCwTaWakFNVhSsM40pfTfu2T0/O6O+\ - 3YhhNA/LX5uSlvm2A8BpfLlhBehCVRhk8meGdxuVofJZCKk0dsbQElbRTJtugsVTKbg\ - A4+k0d7NmFjk7OMyNzUT2LHWfbcCjufnZOorCpOMy3zn4sm0H8K1+3V/AAAA//8DAHn\ - aXXATAQAA\"]" + size: 235 + text: "[\"H4sIAAAAAAAAA4SPOwrDMBBEe59CqM4F4s6YFO4MhqSWo4UI\",\"tFqhHeVDyN1TRKUg\ + 9Zt5zLwHY4yxV/GvU3J7JG9Hg1Lp0MDNoQtchczCORKo36wK4VmYXfLadwAl7BVB0j9\ + uR2MzFQ6q4U62BZRdwSwJ9MQlJC+ProfFU9RpXbo0OpBiqzlLAfl2KkjSDYUcT+typq\ + K/EcfhM3wBAAD//wMA+qjbzTQBAAA=\"]" cookies: [] headers: - name: date - value: Fri, 14 Mar 2025 16:10:20 GMT + value: Mon, 07 Jul 2025 11:24:42 GMT - name: content-type value: text/plain; charset=utf-8 - name: transfer-encoding value: chunked - name: connection value: close - - name: retry-after - value: "418" - - name: access-control-allow-credentials - value: "true" - - name: access-control-allow-origin - value: "" - - name: cache-control - value: no-cache, max-age=0 - - name: vary - value: Accept-Encoding, Authorization, Cookie, Authorization, X-Requested-With, - Cookie - - name: x-content-type-options - value: nosniff - - name: x-frame-options - value: DENY - - name: x-xss-protection - value: 1; mode=block - - name: strict-transport-security - value: max-age=31536000; includeSubDomains; preload - name: content-encoding value: gzip - headersSize: 1380 - httpVersion: HTTP/1.1 - redirectURL: "" - status: 200 - statusText: OK - startedDateTime: 2025-03-14T16:10:20.718Z - time: 212 - timings: - blocked: -1 - connect: -1 - dns: -1 - receive: 0 - send: 0 - ssl: -1 - wait: 212 - - _id: fa05e59f6abf6bf3388aec1f7331bb19 - _order: 0 - cache: {} - request: - bodySize: 1383 - cookies: [] - headers: - - _fromType: array - name: accept - value: application/json - - _fromType: array - name: accept-encoding - value: gzip;q=0 - - _fromType: array - name: authorization - value: token - REDACTED_69e9f79ce29352d014eeb80b56510341844eb82ad9abac7cab3631c7e873e4ce - - _fromType: array - name: content-type - value: application/json; charset=utf-8 - - _fromType: array - name: user-agent - value: autoedit-aside-custom/v1 (Node.js v20.4.0) - - _fromType: array - name: x-requested-with - value: autoedit-aside-custom v1 - - _fromType: array - name: x-sourcegraph-api-client-name - value: autoedit-aside-custom - - _fromType: array - name: x-sourcegraph-api-client-version - value: v1 - - _fromType: array - name: x-timeout-ms - value: "5000" - - _fromType: array - name: content-length - value: "1383" - - name: host - value: demo.sourcegraph.com - headersSize: 569 - httpVersion: HTTP/1.1 - method: POST - postData: - mimeType: application/json; charset=utf-8 - params: [] - textJSON: - maxTokensToSample: 540 - messages: - - speaker: human - text: >- - You are an intelligent programmer and an expert at coding. - Your goal is to help a colleague finish a code change. - - - User: Help me finish a coding change. You will see snippets from current open files in my editor, files I have recently viewed, the file I am editing, then a history of my recent codebase changes, then current compiler and linter errors, content I copied from my codebase. You will then rewrite the , to match what you think I would do next in the codebase. Note: I might have stopped in the middle of typing. - - Code snippets just I viewed: - - The file currently open:(`src/sum-ages.ts`) - - - - <<>> - - - - - - interface Person { - name: string - age: number - - - - } - - - export function sumAge(humanA: Human, humanB: Human): number { - return humanA.age + humanB.age - - - - } - - - - - Continue where I left off and finish my change by rewriting "code_to_rewrite": - - - Assistant: - model: fireworks::v1::autoedits-deepseek-lite-default - prediction: - content: | - } - - export function sumAge(humanA: Human, humanB: Human): number { - return humanA.age + humanB.age - type: content - stream: true - temperature: 0.1 - timeoutMs: 5000 - queryString: - - name: client-name - value: autoedit-aside-custom - - name: client-version - value: v1 - - name: api-version - value: "8" - url: https://demo.sourcegraph.com/.api/completions/code?client-name=autoedit-aside-custom&client-version=v1&api-version=8 - response: - bodySize: 510 - content: - mimeType: text/event-stream - size: 510 - text: >+ - event: completion - - data: {"deltaText":"}\n\nexport function sumAge(humanA: Person, humanB: Person): number {\n return humanA.age + humanB.age\n"} - - - event: done - - data: {} - - cookies: [] - headers: - - name: date - value: Wed, 02 Jul 2025 21:34:33 GMT - - name: content-type - value: text/event-stream - - name: transfer-encoding - value: chunked - - name: connection - value: close - - name: access-control-allow-credentials - value: "true" - - name: access-control-allow-origin - value: "" - - name: cache-control - value: no-cache - - name: vary - value: Accept-Encoding, Authorization, Authorization, Cookie, Authorization, - X-Requested-With, Cookie - - name: x-content-type-options - value: nosniff - - name: x-frame-options - value: DENY - - name: x-xss-protection - value: 1; mode=block - - name: strict-transport-security - value: max-age=31536000; includeSubDomains; preload - headersSize: 1245 - httpVersion: HTTP/1.1 - redirectURL: "" - status: 200 - statusText: OK - startedDateTime: 2025-07-02T21:34:33.464Z - time: 486 - timings: - blocked: -1 - connect: -1 - dns: -1 - receive: 0 - send: 0 - ssl: -1 - wait: 486 - - _id: eaf92c8e60416845cc3e0139350ea948 - _order: 0 - cache: {} - request: - bodySize: 1304 - cookies: [] - headers: - - _fromType: array - name: accept - value: application/json - - _fromType: array - name: accept-encoding - value: gzip;q=0 - - _fromType: array - name: authorization - value: token - REDACTED_69e9f79ce29352d014eeb80b56510341844eb82ad9abac7cab3631c7e873e4ce - - _fromType: array - name: content-type - value: application/json; charset=utf-8 - - _fromType: array - name: user-agent - value: autoedit-aside-custom/v1 (Node.js v20.4.0) - - _fromType: array - name: x-requested-with - value: autoedit-aside-custom v1 - - _fromType: array - name: x-sourcegraph-api-client-name - value: autoedit-aside-custom - - _fromType: array - name: x-sourcegraph-api-client-version - value: v1 - - _fromType: array - name: x-timeout-ms - value: "5000" - - _fromType: array - name: content-length - value: "1304" - - name: host - value: demo.sourcegraph.com - headersSize: 569 - httpVersion: HTTP/1.1 - method: POST - postData: - mimeType: application/json; charset=utf-8 - params: [] - textJSON: - maxTokensToSample: 528 - messages: - - speaker: human - text: >- - You are an intelligent programmer and an expert at coding. - Your goal is to help a colleague finish a code change. - - - User: Help me finish a coding change. You will see snippets from current open files in my editor, files I have recently viewed, the file I am editing, then a history of my recent codebase changes, then current compiler and linter errors, content I copied from my codebase. You will then rewrite the , to match what you think I would do next in the codebase. Note: I might have stopped in the middle of typing. - - Code snippets just I viewed: - - The file currently open:(`src/sum-ages-complex-diff.ts`) - - - - <<>> - - - - - - interface Person { - name: string - age: number - } - - - - - - export function sumAge(a: Human, a: Human): number { - - - } - - - - - - - Continue where I left off and finish my change by rewriting "code_to_rewrite": - - - Assistant: - model: fireworks::v1::autoedits-deepseek-lite-default - prediction: - content: | - export function sumAge(a: Human, a: Human): number { - - } - type: content - stream: true - temperature: 0.1 - timeoutMs: 5000 - queryString: - - name: client-name - value: autoedit-aside-custom - - name: client-version - value: v1 - - name: api-version - value: "8" - url: https://demo.sourcegraph.com/.api/completions/code?client-name=autoedit-aside-custom&client-version=v1&api-version=8 - response: - bodySize: 488 - content: - mimeType: text/event-stream - size: 488 - text: >+ - event: completion - - data: {"deltaText":"export function sumAge(a: Person, b: Person): number {\n return a.age + b.age\n}\n"} - - - event: done - - data: {} - - cookies: [] - headers: - - name: date - value: Wed, 02 Jul 2025 21:34:34 GMT - - name: content-type - value: text/event-stream - - name: transfer-encoding - value: chunked - - name: connection - value: close - name: access-control-allow-credentials value: "true" - name: access-control-allow-origin value: "" - name: cache-control - value: no-cache + value: no-cache, max-age=0 - name: vary value: Accept-Encoding, Authorization, Authorization, Cookie, Authorization, X-Requested-With, Cookie @@ -414,13 +83,13 @@ log: value: 1; mode=block - name: strict-transport-security value: max-age=31536000; includeSubDomains; preload - headersSize: 1245 + headersSize: 1288 httpVersion: HTTP/1.1 redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-07-02T21:34:33.966Z - time: 399 + startedDateTime: 2025-07-07T11:24:42.418Z + time: 394 timings: blocked: -1 connect: -1 @@ -428,8 +97,8 @@ log: receive: 0 send: 0 ssl: -1 - wait: 399 - - _id: d218cd067a5a1f2f505df3c5751a4d72 + wait: 394 + - _id: cecbe2ff6c6039e7042b6a75beda7091 _order: 0 cache: {} request: @@ -564,13 +233,13 @@ log: - name: client-version value: v1 - name: api-version - value: "8" - url: https://demo.sourcegraph.com/.api/completions/code?client-name=autoedit-aside-custom&client-version=v1&api-version=8 + value: "9" + url: https://demo.sourcegraph.com/.api/completions/code?client-name=autoedit-aside-custom&client-version=v1&api-version=9 response: - bodySize: 1215 + bodySize: 1015 content: mimeType: text/event-stream - size: 1215 + size: 1015 text: >+ event: completion @@ -584,7 +253,7 @@ log: cookies: [] headers: - name: date - value: Mon, 07 Jul 2025 09:05:57 GMT + value: Mon, 07 Jul 2025 11:24:47 GMT - name: content-type value: text/event-stream - name: transfer-encoding @@ -613,8 +282,8 @@ log: redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-07-07T09:05:56.632Z - time: 1480 + startedDateTime: 2025-07-07T11:24:46.711Z + time: 3790 timings: blocked: -1 connect: -1 @@ -622,7 +291,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 1480 + wait: 3790 - _id: 404a28d2461ea66da470804476c21f26 _order: 0 cache: {} @@ -642,10 +311,16 @@ log: value: application/json; charset=utf-8 - _fromType: array name: user-agent - value: autoedit-aside-custom/v1 (Node.js v20.4.0) + value: autoedit-aside-custom/v1 (Node.js v23.7.0) - _fromType: array name: x-requested-with value: autoedit-aside-custom v1 + - _fromType: array + name: x-sourcegraph-api-client-name + value: autoedit-aside-custom + - _fromType: array + name: x-sourcegraph-api-client-version + value: v1 - _fromType: array name: content-length value: "136" @@ -654,7 +329,7 @@ log: value: gzip,deflate - name: host value: demo.sourcegraph.com - headersSize: 470 + headersSize: 562 httpVersion: HTTP/1.1 method: POST postData: @@ -680,15 +355,13 @@ log: cookies: [] headers: - name: date - value: Fri, 14 Mar 2025 16:10:21 GMT + value: Mon, 07 Jul 2025 11:24:43 GMT - name: content-type value: application/json - name: content-length value: "35" - name: connection value: close - - name: retry-after - value: "418" - name: access-control-allow-credentials value: "true" - name: access-control-allow-origin @@ -696,8 +369,8 @@ log: - name: cache-control value: no-cache, max-age=0 - name: vary - value: Accept-Encoding, Authorization, Cookie, Authorization, X-Requested-With, - Cookie + value: Accept-Encoding, Authorization, Authorization, Cookie, Authorization, + X-Requested-With, Cookie - name: x-content-type-options value: nosniff - name: x-frame-options @@ -706,13 +379,13 @@ log: value: 1; mode=block - name: strict-transport-security value: max-age=31536000; includeSubDomains; preload - headersSize: 1479 + headersSize: 1247 httpVersion: HTTP/1.1 redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-03-14T16:10:20.965Z - time: 260 + startedDateTime: 2025-07-07T11:24:42.825Z + time: 345 timings: blocked: -1 connect: -1 @@ -720,7 +393,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 260 + wait: 345 - _id: 8f874601be80bbe63d0652f1110280e3 _order: 0 cache: {} @@ -740,10 +413,16 @@ log: value: application/json; charset=utf-8 - _fromType: array name: user-agent - value: autoedit-aside-custom/v1 (Node.js v20.4.0) + value: autoedit-aside-custom/v1 (Node.js v23.7.0) - _fromType: array name: x-requested-with value: autoedit-aside-custom v1 + - _fromType: array + name: x-sourcegraph-api-client-name + value: autoedit-aside-custom + - _fromType: array + name: x-sourcegraph-api-client-version + value: v1 - _fromType: array name: content-length value: "144" @@ -752,7 +431,7 @@ log: value: gzip,deflate - name: host value: demo.sourcegraph.com - headersSize: 467 + headersSize: 559 httpVersion: HTTP/1.1 method: POST postData: @@ -774,25 +453,25 @@ log: value: null url: https://demo.sourcegraph.com/.api/graphql?ContextFilters response: - bodySize: 111 + bodySize: 107 content: encoding: base64 mimeType: application/json - size: 111 - text: "[\"H4sIAAAAAAAAA6pWSkksSVSyqlYqzixJBdHJ+SmVzvl5JakVJW6ZOSWpRcUg0aLEciWrv\ - NKcnNra2loAAAAA//8=\",\"AwA2LshlNQAAAA==\"]" + size: 107 + text: "[\"H4sIAAAAAAAAA6pWSkksSVSyqlYqzixJBdHJ+SmVzvl5JakVJW6ZOSWpRcUg\",\"0aLE\ + ciWrvNKcnNra2loAAAAA//8DADYuyGU1AAAA\"]" cookies: [] headers: - name: date - value: Fri, 14 Mar 2025 16:10:20 GMT + value: Mon, 07 Jul 2025 11:24:42 GMT - name: content-type value: application/json - name: transfer-encoding value: chunked - name: connection value: close - - name: retry-after - value: "418" + - name: content-encoding + value: gzip - name: access-control-allow-credentials value: "true" - name: access-control-allow-origin @@ -800,8 +479,8 @@ log: - name: cache-control value: no-cache, max-age=0 - name: vary - value: Accept-Encoding, Authorization, Cookie, Authorization, X-Requested-With, - Cookie + value: Accept-Encoding, Authorization, Authorization, Cookie, Authorization, + X-Requested-With, Cookie - name: x-content-type-options value: nosniff - name: x-frame-options @@ -810,15 +489,13 @@ log: value: 1; mode=block - name: strict-transport-security value: max-age=31536000; includeSubDomains; preload - - name: content-encoding - value: gzip - headersSize: 1511 + headersSize: 1279 httpVersion: HTTP/1.1 redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-03-14T16:10:20.685Z - time: 309 + startedDateTime: 2025-07-07T11:24:42.409Z + time: 348 timings: blocked: -1 connect: -1 @@ -826,7 +503,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 309 + wait: 348 - _id: c094940ca4210fcb4809cd04c9d916db _order: 0 cache: {} @@ -846,10 +523,16 @@ log: value: application/json; charset=utf-8 - _fromType: array name: user-agent - value: autoedit-aside-custom/v1 (Node.js v20.4.0) + value: autoedit-aside-custom/v1 (Node.js v23.7.0) - _fromType: array name: x-requested-with value: autoedit-aside-custom v1 + - _fromType: array + name: x-sourcegraph-api-client-name + value: autoedit-aside-custom + - _fromType: array + name: x-sourcegraph-api-client-version + value: v1 - _fromType: array name: content-length value: "318" @@ -858,7 +541,7 @@ log: value: gzip,deflate - name: host value: demo.sourcegraph.com - headersSize: 484 + headersSize: 576 httpVersion: HTTP/1.1 method: POST postData: @@ -885,37 +568,27 @@ log: value: null url: https://demo.sourcegraph.com/.api/graphql?CurrentSiteCodyLlmConfiguration response: - bodySize: 256 + bodySize: 259 content: encoding: base64 mimeType: application/json - size: 256 - text: "[\"H4sIAAAAAAAAA3yOzQrCMBCE32XPBkutKL322t58gTXZ2tKYLdmNP0jfXSqIYsHTwPDNx\ - zzAoSKUD5BeaU7L7l7XTcWh7U8povYcXn2H2rAjDyWkMAS+hrX1mByZjdkZ4RBIjUcl\ - UVh98AZvBx4oCJTFNsuyFbQoWv2z8ZgEfrilxvJ59DTfe4uEU7R0ijh2a0c0CtFgLDu\ - K5pIb3yuZIwrBYvslz7NiP03T9AQAAP//AwCi2KUiGQEAAA==\"]" - textDecoded: - data: - site: - codyLLMConfiguration: - chatModel: unknown/claude-3-7-sonnet-latest - chatModelMaxTokens: 45000 - completionModel: sourcegraph/deepseek-coder-v2-lite-base - completionModelMaxTokens: 2048 - fastChatModel: unknown/claude-3-opus - fastChatModelMaxTokens: 45000 + size: 259 + text: "[\"H4sIAAAAAAAAA3SOSwqDQBBE79JrByUxENy61V0u0JlpPziZFrsnH8S7BwMh\",\"IZJV\ + QfHqUTM4VIRiBumV1rTsHlVVlxyavo0Tas/h1XeoNTvyUEAMQ+BbSK3H6MgIh0BqcuN\ + RSRSSD1zj/cQDBYEiP2RZlkCDouV/197wGAV+uK3G8mX0tJ57i4TjZKmdcOxSRzQK0W\ + AsO5rMdWd8r2TOKASb7Zd8l+XHZVmWJwAAAP//AwA+hQi+FwEAAA==\"]" cookies: [] headers: - name: date - value: Fri, 14 Mar 2025 16:10:20 GMT + value: Mon, 07 Jul 2025 11:24:42 GMT - name: content-type value: application/json - name: transfer-encoding value: chunked - name: connection value: close - - name: retry-after - value: "418" + - name: content-encoding + value: gzip - name: access-control-allow-credentials value: "true" - name: access-control-allow-origin @@ -923,8 +596,8 @@ log: - name: cache-control value: no-cache, max-age=0 - name: vary - value: Accept-Encoding, Authorization, Cookie, Authorization, X-Requested-With, - Cookie + value: Accept-Encoding, Authorization, Authorization, Cookie, Authorization, + X-Requested-With, Cookie - name: x-content-type-options value: nosniff - name: x-frame-options @@ -933,15 +606,13 @@ log: value: 1; mode=block - name: strict-transport-security value: max-age=31536000; includeSubDomains; preload - - name: content-encoding - value: gzip - headersSize: 1511 + headersSize: 1279 httpVersion: HTTP/1.1 redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-03-14T16:10:20.272Z - time: 401 + startedDateTime: 2025-07-07T11:24:41.965Z + time: 428 timings: blocked: -1 connect: -1 @@ -949,7 +620,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 401 + wait: 428 - _id: 6d678ba98ff2e3959de5001c07326f28 _order: 0 cache: {} @@ -969,10 +640,16 @@ log: value: application/json; charset=utf-8 - _fromType: array name: user-agent - value: autoedit-aside-custom/v1 (Node.js v20.4.0) + value: autoedit-aside-custom/v1 (Node.js v23.7.0) - _fromType: array name: x-requested-with value: autoedit-aside-custom v1 + - _fromType: array + name: x-sourcegraph-api-client-name + value: autoedit-aside-custom + - _fromType: array + name: x-sourcegraph-api-client-version + value: v1 - _fromType: array name: content-length value: "165" @@ -981,7 +658,7 @@ log: value: gzip,deflate - name: host value: demo.sourcegraph.com - headersSize: 484 + headersSize: 576 httpVersion: HTTP/1.1 method: POST postData: @@ -1003,30 +680,26 @@ log: value: null url: https://demo.sourcegraph.com/.api/graphql?CurrentSiteCodyLlmConfiguration response: - bodySize: 136 + bodySize: 139 content: encoding: base64 mimeType: application/json - size: 136 - text: "[\"H4sIAAAAAAAAA6pWSkksSVSyqlYqzixJBdHJ+SmVPj6+zvl5aZnppUWJJZn5eWD53MSiE\ - uf8vJLUipLwzLyU/HIlK6WUzOLEpJzUFKXa2tpaAAAAAP//AwArMNn0TAAAAA==\"]" - textDecoded: - data: - site: - codyLLMConfiguration: - smartContextWindow: disabled + size: 139 + text: "[\"H4sIAAAAAAAAA6pWSkksSVSyqlYqzixJBdHJ+SmVPj6+zvl5aZnppUWJJZn5\",\"eWD5\ + 3MSiEuf8vJLUipLwzLyU/HIlK6WUzOLEpJzUFKXa2tpaAAAAAP//AwArMNn0TAAAAA==\ + \"]" cookies: [] headers: - name: date - value: Fri, 14 Mar 2025 16:10:20 GMT + value: Mon, 07 Jul 2025 11:24:42 GMT - name: content-type value: application/json - name: transfer-encoding value: chunked - name: connection value: close - - name: retry-after - value: "418" + - name: content-encoding + value: gzip - name: access-control-allow-credentials value: "true" - name: access-control-allow-origin @@ -1034,8 +707,8 @@ log: - name: cache-control value: no-cache, max-age=0 - name: vary - value: Accept-Encoding, Authorization, Cookie, Authorization, X-Requested-With, - Cookie + value: Accept-Encoding, Authorization, Authorization, Cookie, Authorization, + X-Requested-With, Cookie - name: x-content-type-options value: nosniff - name: x-frame-options @@ -1044,15 +717,13 @@ log: value: 1; mode=block - name: strict-transport-security value: max-age=31536000; includeSubDomains; preload - - name: content-encoding - value: gzip - headersSize: 1511 + headersSize: 1279 httpVersion: HTTP/1.1 redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-03-14T16:10:20.343Z - time: 329 + startedDateTime: 2025-07-07T11:24:41.983Z + time: 422 timings: blocked: -1 connect: -1 @@ -1060,7 +731,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 329 + wait: 422 - _id: 6f796c152fe09bf6f9bca1fc88478f87 _order: 0 cache: {} @@ -1080,10 +751,16 @@ log: value: application/json; charset=utf-8 - _fromType: array name: user-agent - value: autoedit-aside-custom/v1 (Node.js v20.4.0) + value: autoedit-aside-custom/v1 (Node.js v23.7.0) - _fromType: array name: x-requested-with value: autoedit-aside-custom v1 + - _fromType: array + name: x-sourcegraph-api-client-name + value: autoedit-aside-custom + - _fromType: array + name: x-sourcegraph-api-client-version + value: v1 - _fromType: array name: content-length value: "150" @@ -1092,7 +769,7 @@ log: value: gzip,deflate - name: host value: demo.sourcegraph.com - headersSize: 479 + headersSize: 571 httpVersion: HTTP/1.1 method: POST postData: @@ -1119,20 +796,20 @@ log: encoding: base64 mimeType: application/json size: 131 - text: "[\"H4sIAAAAAAAAA6pWSkksSVSyqlYqzixJBdHJ+SmVPj6+zvl5aZnppUWJJZn5eSDxgqL8s\ - syU1CIlK6Xi/NKi5NT0osSCDKXa2tpaAAAAAP//\",\"AwAfFAXARQAAAA==\"]" + text: "[\"H4sIAAAAAAAAA6pWSkksSVSyqlYqzixJBdHJ+SmVPj6+zvl5aZnppUWJJZn5\",\"eSDx\ + gqL8ssyU1CIlK6Xi/NKi5NT0osSCDKXa2tpaAAAAAP//AwAfFAXARQAAAA==\"]" cookies: [] headers: - name: date - value: Fri, 14 Mar 2025 16:10:20 GMT + value: Mon, 07 Jul 2025 11:24:42 GMT - name: content-type value: application/json - name: transfer-encoding value: chunked - name: connection value: close - - name: retry-after - value: "418" + - name: content-encoding + value: gzip - name: access-control-allow-credentials value: "true" - name: access-control-allow-origin @@ -1140,8 +817,8 @@ log: - name: cache-control value: no-cache, max-age=0 - name: vary - value: Accept-Encoding, Authorization, Cookie, Authorization, X-Requested-With, - Cookie + value: Accept-Encoding, Authorization, Authorization, Cookie, Authorization, + X-Requested-With, Cookie - name: x-content-type-options value: nosniff - name: x-frame-options @@ -1150,15 +827,13 @@ log: value: 1; mode=block - name: strict-transport-security value: max-age=31536000; includeSubDomains; preload - - name: content-encoding - value: gzip - headersSize: 1511 + headersSize: 1279 httpVersion: HTTP/1.1 redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-03-14T16:10:20.306Z - time: 366 + startedDateTime: 2025-07-07T11:24:41.974Z + time: 415 timings: blocked: -1 connect: -1 @@ -1166,7 +841,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 366 + wait: 415 - _id: 2717d54335f4500a7f7edd3c1b77c615 _order: 0 cache: {} @@ -1186,10 +861,16 @@ log: value: application/json; charset=utf-8 - _fromType: array name: user-agent - value: autoedit-aside-custom/v1 (Node.js v20.4.0) + value: autoedit-aside-custom/v1 (Node.js v23.7.0) - _fromType: array name: x-requested-with value: autoedit-aside-custom v1 + - _fromType: array + name: x-sourcegraph-api-client-name + value: autoedit-aside-custom + - _fromType: array + name: x-sourcegraph-api-client-version + value: v1 - _fromType: array name: content-length value: "341" @@ -1198,7 +879,7 @@ log: value: gzip,deflate - name: host value: demo.sourcegraph.com - headersSize: 464 + headersSize: 556 httpVersion: HTTP/1.1 method: POST postData: @@ -1231,40 +912,27 @@ log: value: null url: https://demo.sourcegraph.com/.api/graphql?CurrentUser response: - bodySize: 260 + bodySize: 263 content: encoding: base64 mimeType: application/json - size: 260 - text: "[\"H4sIAAAAAAAAAzSOwQrCQAxE/yXnevK24NGLaAWxRRAPoRtrZJstyVassv8u1Xp8wzDz3\ - uAxIbg3NIMqSaqMdEL24KA+laG5x1d53K2ggBtaTcpXJr/ukAO4KwajAjxbH3AssSNw\ - MoRQwGCk8mVooh8TWWJpoQB8YEKtDtt/s1fuUMd58ZdFbVH4hYmj2KQj0ZOBO89ix+V\ - G9vdqkppPWIzbW7IFPbHrAxnkS845fwAAAP//AwC8qhJW4QAAAA==\"]" - textDecoded: - data: - currentUser: - avatarURL: null - displayName: null - hasVerifiedEmail: false - id: VXNlcjozNTM= - organizations: - nodes: - - id: T3JnOjU= - name: insights-examples - primaryEmail: null - username: codytesting + size: 263 + text: "[\"H4sIAAAAAAAAAzSOwQrCQAxE/yXnevK24NGLaAWxRRAPoRtrZJstyVassv8u\",\"1Xp8\ + wzDz3uAxIbg3NIMqSaqMdEL24KA+laG5x1d53K2ggBtaTcpXJr/ukAO4KwajAjxbH3A\ + ssSNwMoRQwGCk8mVooh8TWWJpoQB8YEKtDtt/s1fuUMd58ZdFbVH4hYmj2KQj0ZOBO8\ + 9ix+VG9vdqkppPWIzbW7IFPbHrAxnkS845fwAAAP//AwC8qhJW4QAAAA==\"]" cookies: [] headers: - name: date - value: Fri, 14 Mar 2025 16:10:20 GMT + value: Mon, 07 Jul 2025 11:24:41 GMT - name: content-type value: application/json - name: transfer-encoding value: chunked - name: connection value: close - - name: retry-after - value: "419" + - name: content-encoding + value: gzip - name: access-control-allow-credentials value: "true" - name: access-control-allow-origin @@ -1272,8 +940,8 @@ log: - name: cache-control value: no-cache, max-age=0 - name: vary - value: Accept-Encoding, Authorization, Cookie, Authorization, X-Requested-With, - Cookie + value: Accept-Encoding, Authorization, Authorization, Cookie, Authorization, + X-Requested-With, Cookie - name: x-content-type-options value: nosniff - name: x-frame-options @@ -1282,15 +950,13 @@ log: value: 1; mode=block - name: strict-transport-security value: max-age=31536000; includeSubDomains; preload - - name: content-encoding - value: gzip - headersSize: 1511 + headersSize: 1279 httpVersion: HTTP/1.1 redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-03-14T16:10:19.889Z - time: 292 + startedDateTime: 2025-07-07T11:24:41.298Z + time: 526 timings: blocked: -1 connect: -1 @@ -1298,7 +964,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 292 + wait: 526 - _id: 7c8561ba03f1b53b0087b29b8c3519cb _order: 0 cache: {} @@ -1318,10 +984,16 @@ log: value: application/json; charset=utf-8 - _fromType: array name: user-agent - value: autoedit-aside-custom/v1 (Node.js v20.4.0) + value: autoedit-aside-custom/v1 (Node.js v23.7.0) - _fromType: array name: x-requested-with value: autoedit-aside-custom v1 + - _fromType: array + name: x-sourcegraph-api-client-name + value: autoedit-aside-custom + - _fromType: array + name: x-sourcegraph-api-client-version + value: v1 - _fromType: array name: content-length value: "101" @@ -1330,7 +1002,7 @@ log: value: gzip,deflate - name: host value: demo.sourcegraph.com - headersSize: 471 + headersSize: 563 httpVersion: HTTP/1.1 method: POST postData: @@ -1350,23 +1022,21 @@ log: value: null url: https://demo.sourcegraph.com/.api/graphql?SiteProductVersion response: - bodySize: 47 + bodySize: 44 content: mimeType: application/json - size: 47 - text: "{\"data\":{\"site\":{\"productVersion\":\"6.1.2889\"}}}" + size: 44 + text: "{\"data\":{\"site\":{\"productVersion\":\"6.5.0\"}}}" cookies: [] headers: - name: date - value: Fri, 14 Mar 2025 16:10:20 GMT + value: Mon, 07 Jul 2025 11:24:42 GMT - name: content-type value: application/json - name: content-length - value: "47" + value: "44" - name: connection value: close - - name: retry-after - value: "418" - name: access-control-allow-credentials value: "true" - name: access-control-allow-origin @@ -1374,8 +1044,8 @@ log: - name: cache-control value: no-cache, max-age=0 - name: vary - value: Accept-Encoding, Authorization, Cookie, Authorization, X-Requested-With, - Cookie + value: Accept-Encoding, Authorization, Authorization, Cookie, Authorization, + X-Requested-With, Cookie - name: x-content-type-options value: nosniff - name: x-frame-options @@ -1384,13 +1054,13 @@ log: value: 1; mode=block - name: strict-transport-security value: max-age=31536000; includeSubDomains; preload - headersSize: 1479 + headersSize: 1247 httpVersion: HTTP/1.1 redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-03-14T16:10:20.236Z - time: 437 + startedDateTime: 2025-07-07T11:24:41.955Z + time: 448 timings: blocked: -1 connect: -1 @@ -1398,7 +1068,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 437 + wait: 448 - _id: 18db51344af131baf45ba049965cba0f _order: 0 cache: {} @@ -1418,10 +1088,16 @@ log: value: application/json; charset=utf-8 - _fromType: array name: user-agent - value: autoedit-aside-custom/v1 (Node.js v20.4.0) + value: autoedit-aside-custom/v1 (Node.js v23.7.0) - _fromType: array name: x-requested-with value: autoedit-aside-custom v1 + - _fromType: array + name: x-sourcegraph-api-client-name + value: autoedit-aside-custom + - _fromType: array + name: x-sourcegraph-api-client-version + value: v1 - _fromType: array name: content-length value: "92" @@ -1430,7 +1106,7 @@ log: value: gzip,deflate - name: host value: demo.sourcegraph.com - headersSize: 466 + headersSize: 558 httpVersion: HTTP/1.1 method: POST postData: @@ -1450,60 +1126,58 @@ log: value: null url: https://demo.sourcegraph.com/.api/graphql?ViewerSettings response: - bodySize: 1812 + bodySize: 1837 content: encoding: base64 mimeType: application/json - size: 1812 - text: "[\"H4sIAAAAAAAA/7RYbVPcOBL+KyrXVh3sYTPM8Dau2spxXOByR3YhkNoPmFTJUttWRpYcS\ - R7gOPa3X0nyvNvDTG6TqoCxWt1PP93qbvkloNjgIH4JxgweQd2CMUzk2r7JmMA8iIOX\ - JCCSwgdhgEdcsywJYqNq2PPvbw02+oPQLC+Mjph/iDgW+WeNc0iC+CUJpClA3RUKdCE\ - 5TYK4F/UGe0mgoJKaGamekyBOgpyZok4jIst9LWtFIFe4Kuafk2AvCQwzHNyGKyxy1N\ - h5bQXUZrnfKvmthgaGRRV/8WCSJEnWAfrJIbIsUpnfghozAh9xFeGK/Ru8OkKzHs2OB\ - /2j4UH/AJ+c9NNBn/YIwZQMhnjYqaHijGDDpJho6g8G2TGF/vAUU0J76fEp7qdD2ssG\ - lEB2NKRDcjLoH/Q6NBKp9Jl4fixAwWfFncrCmErH+/MuhRRKGVrhEDfSUQFKjmpcWSV\ - lh3oQY6eSwjg88DJM45TDWW3kJTOfK4oN6Fn6UKZLpjVLXTSbl/BUgWIlCIP5BWBTK7\ - flJQlSbEhxXmCRg37/BKS21Cwm4ySY57KsagOLix+lsKnGRP47pP+UcjQHRQNWpD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Hvf//WdPcH4t\ + /H8neMielPDwee571duQUbq4vIFs1FeP9wKQkj2yCUk9eKafIzqaz/HARFvz+El8LYV\ + pcXI89gW4Sgk8mn2xMMlTXYuz9zGJx3Q6XGl1pNbbpHVLyiINctcGFr394cl9NshbGe\ + X2ZvCD6FlDH8Pdjnsr9Xk7tdgEtqJuZzZz6f/38A3n/p1G8ZAAA=\"]" cookies: [] headers: - name: date - value: Fri, 14 Mar 2025 16:10:21 GMT + value: Mon, 07 Jul 2025 11:24:43 GMT - name: content-type value: application/json - name: content-length - value: "1812" + value: "1837" - name: connection value: close - - name: retry-after - value: "418" - name: access-control-allow-credentials value: "true" - name: access-control-allow-origin @@ -1513,8 +1187,8 @@ log: - name: content-encoding value: gzip - name: vary - value: Accept-Encoding, Authorization, Cookie, Authorization, X-Requested-With, - Cookie + value: Accept-Encoding, Authorization, Authorization, Cookie, Authorization, + X-Requested-With, Cookie - name: x-content-type-options value: nosniff - name: x-frame-options @@ -1523,13 +1197,13 @@ log: value: 1; mode=block - name: strict-transport-security value: max-age=31536000; includeSubDomains; preload - headersSize: 1505 + headersSize: 1273 httpVersion: HTTP/1.1 redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-03-14T16:10:20.936Z - time: 302 + startedDateTime: 2025-07-07T11:24:42.816Z + time: 394 timings: blocked: -1 connect: -1 @@ -1537,7 +1211,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 302 + wait: 394 - _id: ceee2078500ebaad09c6a34055ed9d99 _order: 0 cache: {} @@ -1551,10 +1225,16 @@ log: REDACTED_69e9f79ce29352d014eeb80b56510341844eb82ad9abac7cab3631c7e873e4ce - _fromType: array name: user-agent - value: autoedit-aside-custom/v1 (Node.js v20.4.0) + value: autoedit-aside-custom/v1 (Node.js v23.7.0) - _fromType: array name: x-requested-with value: autoedit-aside-custom v1 + - _fromType: array + name: x-sourcegraph-api-client-name + value: autoedit-aside-custom + - _fromType: array + name: x-sourcegraph-api-client-version + value: v1 - _fromType: array name: accept value: "*/*" @@ -1563,67 +1243,94 @@ log: value: gzip,deflate - name: host value: demo.sourcegraph.com - headersSize: 329 + headersSize: 421 httpVersion: HTTP/1.1 method: GET queryString: [] url: https://demo.sourcegraph.com/.api/modelconfig/supported-models.json response: - bodySize: 1864 + bodySize: 4469 content: encoding: base64 mimeType: text/plain; charset=utf-8 - size: 1864 - text: "[\"H4sIAAAAAAAA/+ydUXPaPhLA3/MpNDy1cxWxTQgpT5em7V3nmkvm0knn5j99EPYCmhjLI\ - 8uETCff/T+ywQQssBRsgov7RPFqV3Z/rHe10vb3CUIItSJ3DBNyDzyiLGj1UctuW60P\ - 6TUOU7r42mpbbesfHkwXF0POptQDHrX66K/kK/nnd/YpEaKeHEsCMeYspO58bHbZo1H\ - ok6f/kglIuctMLhN7/rBd9ZByeGT8ISpQ/TWT01Y9YmzkQ4Hef6VC2kpZCAGhBUpvQg\ - guv+krndBIcOIXaL2eS2mr/cn4A/Do8luB4qWc4bPFumCkTxmp+Eg+/ZozOWEe+FuBT\ - CT+B8MVLPt9x3LOsG1hx+n3XZ/EHuAO7uGIBQEI7BMBkSiY41UyDHXaPXSXDFuXT0wv\ - pHWNuCQkA+pTQWH1vpYSYyJaK1//yukQMGL8Kbln1405cZ/W7USCiFhakJ8GeewFBS6\ - vQiCAh5xGOQmXBQJm4icNPPbY6q89+PQJkNm3IIzFD/YAgTR21rUs64NS8CYWK5KWZa\ - 3IPa+Zh0jQCRHgXcvHfMUioZ5DHFCR/GYEe2gpTNNsgrcQBOlT7ygnyZYzXIra3fV5a\ - vwmTKDsvg7KrhGUBUaKoQSPro9CGayK7+fvGcUVwZgf7Y/vIYeG7H2Q3cHWObbsF2Sz\ - MC56iy9wRjcKWTXKUiuWvyTLcT6WDLI2lUyMgW9G0oOQg5T3NmEZcnZEVErUdLHsVe9\ - wx4Q+xMb+9t9ylK673WaiGFISC+aySeiDWHde6DXe2NDnRiHkyW0crhLtC22wzyp2t2\ - MVn5v8rQHMKcqJx+1YvT3DXBazxR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: - name: date - value: Fri, 14 Mar 2025 16:10:21 GMT + value: Mon, 07 Jul 2025 11:24:43 GMT - name: content-type value: text/plain; charset=utf-8 - - name: content-length - value: "1864" + - name: transfer-encoding + value: chunked - name: connection value: close - - name: retry-after - value: "417" - name: access-control-allow-credentials value: "true" - name: access-control-allow-origin @@ -1633,8 +1340,8 @@ log: - name: content-encoding value: gzip - name: vary - value: Accept-Encoding, Authorization, Cookie, Authorization, X-Requested-With, - Cookie + value: Accept-Encoding, Authorization, Authorization, Cookie, Authorization, + X-Requested-With, Cookie - name: x-content-type-options value: nosniff - name: x-frame-options @@ -1643,13 +1350,13 @@ log: value: 1; mode=block - name: strict-transport-security value: max-age=31536000; includeSubDomains; preload - headersSize: 1374 + headersSize: 1288 httpVersion: HTTP/1.1 redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-03-14T16:10:21.246Z - time: 283 + startedDateTime: 2025-07-07T11:24:43.216Z + time: 358 timings: blocked: -1 connect: -1 @@ -1657,6 +1364,6 @@ log: receive: 0 send: 0 ssl: -1 - wait: 283 + wait: 358 pages: [] version: "1.2" From b75938fb75806d8feeef76f290b004f385074267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kondratek?= Date: Wed, 9 Jul 2025 08:34:50 +0200 Subject: [PATCH 6/7] wip --- .../recording.har.yaml | 441 ++++++++++++------ agent/src/__tests__/autoedit/src/Point.cs | 2 +- agent/src/agent.ts | 7 +- agent/src/auto-edit-response.json | 0 agent/src/autoedit.test.ts | 46 +- vscode/src/autoedits/adapters/cody-gateway.ts | 1 + 6 files changed, 330 insertions(+), 167 deletions(-) create mode 100644 agent/src/auto-edit-response.json diff --git a/agent/recordings/autoedit-aside-custom_2361404853/recording.har.yaml b/agent/recordings/autoedit-aside-custom_2361404853/recording.har.yaml index ae503be96112..2e59bb5a825c 100644 --- a/agent/recordings/autoedit-aside-custom_2361404853/recording.har.yaml +++ b/agent/recordings/autoedit-aside-custom_2361404853/recording.har.yaml @@ -57,7 +57,7 @@ log: cookies: [] headers: - name: date - value: Mon, 07 Jul 2025 11:24:42 GMT + value: Tue, 08 Jul 2025 12:26:11 GMT - name: content-type value: text/plain; charset=utf-8 - name: transfer-encoding @@ -88,8 +88,8 @@ log: redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-07-07T11:24:42.418Z - time: 394 + startedDateTime: 2025-07-08T12:26:11.331Z + time: 306 timings: blocked: -1 connect: -1 @@ -97,12 +97,12 @@ log: receive: 0 send: 0 ssl: -1 - wait: 394 - - _id: cecbe2ff6c6039e7042b6a75beda7091 + wait: 306 + - _id: e226d8a97571c92936e789f63c0b569c _order: 0 cache: {} request: - bodySize: 1816 + bodySize: 1304 cookies: [] headers: - _fromType: array @@ -135,7 +135,7 @@ log: value: "5000" - _fromType: array name: content-length - value: "1816" + value: "1304" - name: host value: demo.sourcegraph.com headersSize: 569 @@ -157,58 +157,199 @@ log: Code snippets just I viewed: - The file currently open:(`src/Point.cs`) + The file currently open:(`src/sum-ages-complex-diff.ts`) <<>> - this.x = x; - this.y = y; - } - public double GetDistance(Point other) - { - return Math.Sqrt((x - other.x) * (x - other.x) + (y - other.y) * (y - other.y)); - } + - public override string ToString() - { - return $"two-dimensional point: ({x},{y})"; - } - } + + + interface Person { + name: string + age: number } - - + + + export function sumAge(a: Human, a: Human): number { + + + } + + + + + + + Continue where I left off and finish my change by rewriting "code_to_rewrite": + + + Assistant: + model: fireworks::v1::autoedits-deepseek-lite-default + prediction: + content: | + export function sumAge(a: Human, a: Human): number { + + } + type: content + stream: true + temperature: 0.1 + timeoutMs: 5000 + queryString: + - name: client-name + value: autoedit-aside-custom + - name: client-version + value: v1 + - name: api-version + value: "9" + url: https://demo.sourcegraph.com/.api/completions/code?client-name=autoedit-aside-custom&client-version=v1&api-version=9 + response: + bodySize: 530 + content: + mimeType: text/event-stream + size: 530 + text: >+ + event: completion + + data: {"deltaText":"export function sumAge(a: Person, b: Person): number {\n return a.age + b.age\n}\n"} + + + event: done + + data: {} + + cookies: [] + headers: + - name: date + value: Tue, 08 Jul 2025 12:26:12 GMT + - name: content-type + value: text/event-stream + - name: transfer-encoding + value: chunked + - name: connection + value: close + - name: access-control-allow-credentials + value: "true" + - name: access-control-allow-origin + value: "" + - name: cache-control + value: no-cache + - name: vary + value: Accept-Encoding, Authorization, Authorization, Cookie, Authorization, + X-Requested-With, Cookie + - name: x-content-type-options + value: nosniff + - name: x-frame-options + value: DENY + - name: x-xss-protection + value: 1; mode=block + - name: strict-transport-security + value: max-age=31536000; includeSubDomains; preload + headersSize: 1245 + httpVersion: HTTP/1.1 + redirectURL: "" + status: 200 + statusText: OK + startedDateTime: 2025-07-08T12:26:12.451Z + time: 584 + timings: + blocked: -1 + connect: -1 + dns: -1 + receive: 0 + send: 0 + ssl: -1 + wait: 584 + - _id: b0b67aa1409ec5502419a33567d73205 + _order: 0 + cache: {} + request: + bodySize: 1383 + cookies: [] + headers: + - _fromType: array + name: accept + value: application/json + - _fromType: array + name: accept-encoding + value: gzip;q=0 + - _fromType: array + name: authorization + value: token + REDACTED_69e9f79ce29352d014eeb80b56510341844eb82ad9abac7cab3631c7e873e4ce + - _fromType: array + name: content-type + value: application/json; charset=utf-8 + - _fromType: array + name: user-agent + value: autoedit-aside-custom/v1 (Node.js v23.7.0) + - _fromType: array + name: x-requested-with + value: autoedit-aside-custom v1 + - _fromType: array + name: x-sourcegraph-api-client-name + value: autoedit-aside-custom + - _fromType: array + name: x-sourcegraph-api-client-version + value: v1 + - _fromType: array + name: x-timeout-ms + value: "5000" + - _fromType: array + name: content-length + value: "1383" + - name: host + value: demo.sourcegraph.com + headersSize: 569 + httpVersion: HTTP/1.1 + method: POST + postData: + mimeType: application/json; charset=utf-8 + params: [] + textJSON: + maxTokensToSample: 540 + messages: + - speaker: human + text: >- + You are an intelligent programmer and an expert at coding. + Your goal is to help a colleague finish a code change. - using System; - using System.Collections.Generic; + User: Help me finish a coding change. You will see snippets from current open files in my editor, files I have recently viewed, the file I am editing, then a history of my recent codebase changes, then current compiler and linter errors, content I copied from my codebase. You will then rewrite the , to match what you think I would do next in the codebase. Note: I might have stopped in the middle of typing. - using System.Linq; + Code snippets just I viewed: - using System.Text; + The file currently open:(`src/sum-ages.ts`) + + - using System.Threading.Tasks; + <<>> + - namespace ConsoleApp1 + + interface Person { + name: string + age: number - { - public class Point3d - { - private int x; + } + + + export function sumAge(humanA: Human, humanB: Human): number { + return humanA.age + humanB.age - private int y; - public Point(int x, int y) - { + } + @@ -219,10 +360,10 @@ log: model: fireworks::v1::autoedits-deepseek-lite-default prediction: content: | - { - public class Point3d - { - private int x; + } + + export function sumAge(humanA: Human, humanB: Human): number { + return humanA.age + humanB.age type: content stream: true temperature: 0.1 @@ -236,14 +377,14 @@ log: value: "9" url: https://demo.sourcegraph.com/.api/completions/code?client-name=autoedit-aside-custom&client-version=v1&api-version=9 response: - bodySize: 1015 + bodySize: 510 content: mimeType: text/event-stream - size: 1015 + size: 510 text: >+ event: completion - data: {"deltaText":"{\n public class Point3d : Point\n {\n private int z;\n\n public Point3d(int x, int y, int z) : base(x, y)\n {\n this.z = z;\n }\n\n public double GetDistance(Point3d other)\n {\n return Math.Sqrt((x - other.x) * (x - other.x) + (y - other.y) * (y - other.y) + (z - other.z) * (z - other.z));\n }\n\n public override string ToString()\n {\n return $\"three-dimensional point: ({x},{y},{z})\";\n }\n }\n}\n"} + data: {"deltaText":"}\n\nexport function sumAge(humanA: Person, humanB: Person): number {\n return humanA.age + humanB.age\n"} event: done @@ -253,7 +394,7 @@ log: cookies: [] headers: - name: date - value: Mon, 07 Jul 2025 11:24:47 GMT + value: Tue, 08 Jul 2025 12:28:59 GMT - name: content-type value: text/event-stream - name: transfer-encoding @@ -282,8 +423,8 @@ log: redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-07-07T11:24:46.711Z - time: 3790 + startedDateTime: 2025-07-08T12:28:59.029Z + time: 614 timings: blocked: -1 connect: -1 @@ -291,7 +432,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 3790 + wait: 614 - _id: 404a28d2461ea66da470804476c21f26 _order: 0 cache: {} @@ -355,7 +496,7 @@ log: cookies: [] headers: - name: date - value: Mon, 07 Jul 2025 11:24:43 GMT + value: Tue, 08 Jul 2025 12:26:12 GMT - name: content-type value: application/json - name: content-length @@ -384,8 +525,8 @@ log: redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-07-07T11:24:42.825Z - time: 345 + startedDateTime: 2025-07-08T12:26:11.651Z + time: 348 timings: blocked: -1 connect: -1 @@ -393,7 +534,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 345 + wait: 348 - _id: 8f874601be80bbe63d0652f1110280e3 _order: 0 cache: {} @@ -463,7 +604,7 @@ log: cookies: [] headers: - name: date - value: Mon, 07 Jul 2025 11:24:42 GMT + value: Tue, 08 Jul 2025 12:26:11 GMT - name: content-type value: application/json - name: transfer-encoding @@ -494,8 +635,8 @@ log: redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-07-07T11:24:42.409Z - time: 348 + startedDateTime: 2025-07-08T12:26:11.321Z + time: 356 timings: blocked: -1 connect: -1 @@ -503,7 +644,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 348 + wait: 356 - _id: c094940ca4210fcb4809cd04c9d916db _order: 0 cache: {} @@ -580,7 +721,7 @@ log: cookies: [] headers: - name: date - value: Mon, 07 Jul 2025 11:24:42 GMT + value: Tue, 08 Jul 2025 12:26:11 GMT - name: content-type value: application/json - name: transfer-encoding @@ -611,8 +752,8 @@ log: redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-07-07T11:24:41.965Z - time: 428 + startedDateTime: 2025-07-08T12:26:10.864Z + time: 440 timings: blocked: -1 connect: -1 @@ -620,7 +761,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 428 + wait: 440 - _id: 6d678ba98ff2e3959de5001c07326f28 _order: 0 cache: {} @@ -691,7 +832,7 @@ log: cookies: [] headers: - name: date - value: Mon, 07 Jul 2025 11:24:42 GMT + value: Tue, 08 Jul 2025 12:26:11 GMT - name: content-type value: application/json - name: transfer-encoding @@ -722,8 +863,8 @@ log: redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-07-07T11:24:41.983Z - time: 422 + startedDateTime: 2025-07-08T12:26:10.882Z + time: 423 timings: blocked: -1 connect: -1 @@ -731,7 +872,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 422 + wait: 423 - _id: 6f796c152fe09bf6f9bca1fc88478f87 _order: 0 cache: {} @@ -801,7 +942,7 @@ log: cookies: [] headers: - name: date - value: Mon, 07 Jul 2025 11:24:42 GMT + value: Tue, 08 Jul 2025 12:26:11 GMT - name: content-type value: application/json - name: transfer-encoding @@ -832,8 +973,8 @@ log: redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-07-07T11:24:41.974Z - time: 415 + startedDateTime: 2025-07-08T12:26:10.873Z + time: 468 timings: blocked: -1 connect: -1 @@ -841,7 +982,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 415 + wait: 468 - _id: 2717d54335f4500a7f7edd3c1b77c615 _order: 0 cache: {} @@ -924,7 +1065,7 @@ log: cookies: [] headers: - name: date - value: Mon, 07 Jul 2025 11:24:41 GMT + value: Tue, 08 Jul 2025 12:26:10 GMT - name: content-type value: application/json - name: transfer-encoding @@ -955,8 +1096,8 @@ log: redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-07-07T11:24:41.298Z - time: 526 + startedDateTime: 2025-07-08T12:26:10.465Z + time: 363 timings: blocked: -1 connect: -1 @@ -964,7 +1105,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 526 + wait: 363 - _id: 7c8561ba03f1b53b0087b29b8c3519cb _order: 0 cache: {} @@ -1030,7 +1171,7 @@ log: cookies: [] headers: - name: date - value: Mon, 07 Jul 2025 11:24:42 GMT + value: Tue, 08 Jul 2025 12:26:11 GMT - name: content-type value: application/json - name: content-length @@ -1059,8 +1200,8 @@ log: redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-07-07T11:24:41.955Z - time: 448 + startedDateTime: 2025-07-08T12:26:10.854Z + time: 461 timings: blocked: -1 connect: -1 @@ -1068,7 +1209,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 448 + wait: 461 - _id: 18db51344af131baf45ba049965cba0f _order: 0 cache: {} @@ -1171,7 +1312,7 @@ log: cookies: [] headers: - name: date - value: Mon, 07 Jul 2025 11:24:43 GMT + value: Tue, 08 Jul 2025 12:26:12 GMT - name: content-type value: application/json - name: content-length @@ -1202,8 +1343,8 @@ log: redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-07-07T11:24:42.816Z - time: 394 + startedDateTime: 2025-07-08T12:26:11.641Z + time: 356 timings: blocked: -1 connect: -1 @@ -1211,7 +1352,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 394 + wait: 356 - _id: ceee2078500ebaad09c6a34055ed9d99 _order: 0 cache: {} @@ -1249,82 +1390,82 @@ log: queryString: [] url: https://demo.sourcegraph.com/.api/modelconfig/supported-models.json response: - bodySize: 4469 + bodySize: 4465 content: encoding: base64 mimeType: text/plain; charset=utf-8 - size: 4469 + size: 4465 text: "[\"H4sIAAAJbogA/+xdXZPaOBZ951e4eJqpbRFbxtDN03R6ZrI=\",\"qc1sstu9SW1t7YPA\ - AlQYy2vLdKem8t+3ZIPBRliycYNpxFM6XH1YHJ977tW1/GfHMAyjG03meIm+4jAi1O+\ - OjK7VM7s36XchXpHNf5s9s2f+xcWrzZdBSFfExWHUHRn/Sez558/sX/zTJS7vEvlsHt\ - KATLo3+a9dEgUe+v53tMTc7j6zy3r5cVPe9ZSE+JmGi0jS9e+ZnXLXM0pnHpb0+yE1U\ - p4vDbCPiKTTzwH27z+qd7okEQuRJ+n1j7WVcrffaLjAYXT/UdLx1k75Z0vXFqgCI11l\ - Q4SPpPf/rjG5pC72SgGZWPwTT3OwHI2gCfvAMgGEo9HEQ7GLQUR9HzPQBx5iOGKSNXh\ - IGhmPSSOjX7ROht3YFgeAJnRMx9prNEEBGhOPMILz17T5dCd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xB/IGIr1ikLkH5HqsSkPfYHBu38tXnKt8XORt\ + fbwfzF8WrrQ032vbxGKUByzpaXvCYP9Gy8OXKEjg2gOvcw1JzdkGQJQ42Hmh7jBL2IK\ + zEBXYvA24RANIo3fzKfXtEubPL9qIRGvIaimNbc0njYxwlGM8At4zBAmbf0wRDVAJD8\ + ZX8VT8E338ovsjZblmWZf1o/Wj9fwBdn+YsZ/IAAA==\"]" cookies: [] headers: - name: date - value: Mon, 07 Jul 2025 11:24:43 GMT + value: Tue, 08 Jul 2025 12:26:12 GMT - name: content-type value: text/plain; charset=utf-8 - name: transfer-encoding @@ -1355,8 +1496,8 @@ log: redirectURL: "" status: 200 statusText: OK - startedDateTime: 2025-07-07T11:24:43.216Z - time: 358 + startedDateTime: 2025-07-08T12:26:12.004Z + time: 430 timings: blocked: -1 connect: -1 @@ -1364,6 +1505,6 @@ log: receive: 0 send: 0 ssl: -1 - wait: 358 + wait: 430 pages: [] version: "1.2" diff --git a/agent/src/__tests__/autoedit/src/Point.cs b/agent/src/__tests__/autoedit/src/Point.cs index f595cd501ab6..aa165fa56b57 100644 --- a/agent/src/__tests__/autoedit/src/Point.cs +++ b/agent/src/__tests__/autoedit/src/Point.cs @@ -6,7 +6,7 @@ namespace ConsoleApp1 { - public class Point3d/* CURSOR */ + public class Point/* CURSOR */ { private int x; private int y; diff --git a/agent/src/agent.ts b/agent/src/agent.ts index ee5cbbdbb604..c1c18248e9bb 100644 --- a/agent/src/agent.ts +++ b/agent/src/agent.ts @@ -973,16 +973,13 @@ export class Agent extends MessageHandler implements ExtensionClient { } try { - if (params.triggerKind === 'Invoke') { - await provider?.manuallyTriggerCompletion?.() - } + await provider?.manuallyTriggerCompletion?.() const result = await provider.provideInlineCompletionItems( document, new vscode.Position(params.position.line, params.position.character), { - triggerKind: - vscode.InlineCompletionTriggerKind[params.triggerKind ?? 'Automatic'], + triggerKind: vscode.InlineCompletionTriggerKind['Invoke'], selectedCompletionInfo: params.selectedCompletionInfo?.text === undefined || params.selectedCompletionInfo?.text === null diff --git a/agent/src/auto-edit-response.json b/agent/src/auto-edit-response.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/agent/src/autoedit.test.ts b/agent/src/autoedit.test.ts index 85de57112d3f..69119209b940 100644 --- a/agent/src/autoedit.test.ts +++ b/agent/src/autoedit.test.ts @@ -205,8 +205,7 @@ describe('Autoedit', () => { async function getAutoEditSuggestion( client: TestClient, uri: vscode.Uri, - position: Position, - triggerKind: 'Automatic' | 'Invoke' = 'Automatic' + position: Position ): Promise { await client.openFile(uri) @@ -220,7 +219,7 @@ describe('Autoedit', () => { const result = (await client.request('autocomplete/execute', { uri: uri.toString(), position, - triggerKind: triggerKind, + triggerKind: 'Automatic', })) as AutocompleteResult const id = result.decoratedEditItems[0].id @@ -500,14 +499,12 @@ describe('Autoedit', () => { describe('insertText vs originalText inconsistency repro', () => { it('Point.cs 2d -> 3d', async () => { - const file = workspace.file('src', 'Point.cs') - for (let i = 0; i < 100; i++) { console.log(`[my_log] running #${i}`) const client = TestClient.create({ workspaceRootUri: workspace.rootUri, - name: 'autoedit-aside-custom', + name: 'autoedit-repro', credentials: TESTING_CREDENTIALS.enterprise, extraConfiguration: { 'cody.suggestions.mode': 'auto-edit', @@ -522,13 +519,40 @@ describe('Autoedit', () => { await client.beforeAll() - const result = await getAutoEditSuggestion( - client, - file, - { line: 8, character: 24 }, - 'Invoke' + const file = workspace.file('src', 'Point.cs') + await client.openFile(file) + + const document = client.workspace.getDocument(file)! + const offset = document.offsetAt({ line: 8, character: 22 }) + const contentPrefix = document.getText().substring(0, offset) + const contentSuffix = document.getText().substring(offset) + await client.changeFile(file, { + text: contentPrefix + '3D' + contentSuffix, + }) + + // Set a small visibility delay for testing purposes. + const visibilityDelay = 100 + await client.request('testing/autocomplete/setCompletionVisibilityDelay', { + delay: visibilityDelay, + }) + + const position = { line: 8, character: 24 } + await client.changeFile(file, { + selection: { start: position, end: position }, + }) + + console.log( + `[my_log] document.getText(): ${client.workspace.getDocument(file)?.getText()}` ) + const result = ( + await client.request('autocomplete/execute', { + uri: file.toString(), + position, + triggerKind: 'Automatic', + }) + ).decoratedEditItems[0] + // Prediction accurately reflects the edit that should be made. expect(result.insertText).toMatchInlineSnapshot(` "{ diff --git a/vscode/src/autoedits/adapters/cody-gateway.ts b/vscode/src/autoedits/adapters/cody-gateway.ts index 93eb8ba5b04f..945f002a28db 100644 --- a/vscode/src/autoedits/adapters/cody-gateway.ts +++ b/vscode/src/autoedits/adapters/cody-gateway.ts @@ -23,6 +23,7 @@ export class CodyGatewayAdapter implements AutoeditsModelAdapter { 'X-Sourcegraph-Feature': 'code_completions', } const body = this.getMessageBody(options) + console.log(`[my_log] CodyGatewayAdapter.getModelResponse: body: ${JSON.stringify(body)}`) try { const apiKey = await this.getApiKey() const abortController = forkSignal(options.abortSignal) From a6b622fddef995f5d9385914f90a2470567da38a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kondratek?= Date: Mon, 14 Jul 2025 12:50:11 +0200 Subject: [PATCH 7/7] Add a test --- agent/src/agent.ts | 7 +- agent/src/auto-edit-response.json | 0 .../src/autoedits/autoedits-provider.test.ts | 80 +++++++++++++++++++ vscode/src/autoedits/autoedits-provider.ts | 2 +- vscode/src/autoedits/test-helpers.ts | 20 ++++- 5 files changed, 102 insertions(+), 7 deletions(-) delete mode 100644 agent/src/auto-edit-response.json diff --git a/agent/src/agent.ts b/agent/src/agent.ts index c1c18248e9bb..ee5cbbdbb604 100644 --- a/agent/src/agent.ts +++ b/agent/src/agent.ts @@ -973,13 +973,16 @@ export class Agent extends MessageHandler implements ExtensionClient { } try { - await provider?.manuallyTriggerCompletion?.() + if (params.triggerKind === 'Invoke') { + await provider?.manuallyTriggerCompletion?.() + } const result = await provider.provideInlineCompletionItems( document, new vscode.Position(params.position.line, params.position.character), { - triggerKind: vscode.InlineCompletionTriggerKind['Invoke'], + triggerKind: + vscode.InlineCompletionTriggerKind[params.triggerKind ?? 'Automatic'], selectedCompletionInfo: params.selectedCompletionInfo?.text === undefined || params.selectedCompletionInfo?.text === null diff --git a/agent/src/auto-edit-response.json b/agent/src/auto-edit-response.json deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/vscode/src/autoedits/autoedits-provider.test.ts b/vscode/src/autoedits/autoedits-provider.test.ts index e2abb4ad197c..df861635f8d8 100644 --- a/vscode/src/autoedits/autoedits-provider.test.ts +++ b/vscode/src/autoedits/autoedits-provider.test.ts @@ -15,6 +15,7 @@ import * as vscode from 'vscode' import { CLIENT_CAPABILITIES_FIXTURE, + CodyIDE, DOTCOM_URL, mockAuthStatus, mockClientCapabilities, @@ -794,4 +795,83 @@ describe('AutoeditsProvider', () => { }) }) }) + + describe('scope overflow detection', () => { + it('should discard suggestions with scope overflow (LLM returns content beyond intended replacement range)', async () => { + const prediction = `{ + public class Point3d : Point + { + private int z; + + public Point3d(int x, int y, int z) : base(x, y) + { + this.z = z; + } + + public double GetDistance(Point3d other) + { + return Math.Sqrt((x - other.x) * (x - other.x) + (y - other.y) * (y - other.y) + (z - other.z) * (z - other.z)); + } + + public override string ToString() + { + return $"three-dimensional point: ({x},{y},{z})"; + } + } +}` + + mockClientCapabilities({ + agentIDE: CodyIDE.JetBrains, + isVSCode: false, + isCodyWeb: false, + autoedit: 'enabled', + autoeditInlineDiff: 'none', + autoeditAsideDiff: 'diff', + }) + const { result } = await autoeditResultFor( + `using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConsoleApp1 +{ + public class Point3dâ–ˆ + { + private int x; + private int y; + + public Point(int x, int y) + { + this.x = x; + this.y = y; + } + + public double GetDistance(Point other) + { + return Math.Sqrt((x - other.x) * (x - other.x) + (y - other.y) * (y - other.y)); + } + + public override string ToString() + { + return $"two-dimensional point: ({x},{y})"; + } + } +}`, + { + prediction, + providerFeatures: { + shouldHotStreak: false, + allowUsingWebSocket: false, + }, + isAgent: true, + } + ) + + // With the fix, the suggestion should be discarded due to scope overflow + // The LLM prediction contains GetDistance and ToString methods that already exist in suffixAfterArea + expect(result).toBeNull() + }, 10_000) + }) }) diff --git a/vscode/src/autoedits/autoedits-provider.ts b/vscode/src/autoedits/autoedits-provider.ts index 5f7b969de160..3c703a159cbd 100644 --- a/vscode/src/autoedits/autoedits-provider.ts +++ b/vscode/src/autoedits/autoedits-provider.ts @@ -146,7 +146,7 @@ export type AutoeditClientCapabilities = Pick< 'autoedit' | 'autoeditInlineDiff' | 'autoeditAsideDiff' > -interface AutoeditsFeatures { +export interface AutoeditsFeatures { shouldHotStreak: boolean allowUsingWebSocket: boolean } diff --git a/vscode/src/autoedits/test-helpers.ts b/vscode/src/autoedits/test-helpers.ts index 297ff6e81cf7..cb381fce6adf 100644 --- a/vscode/src/autoedits/test-helpers.ts +++ b/vscode/src/autoedits/test-helpers.ts @@ -8,12 +8,14 @@ import { defaultVSCodeExtensionClient } from '../extension-client' import { FixupController } from '../non-stop/FixupController' import { WorkspaceEdit, vsCodeMocks } from '../testutils/mocks' +import * as isRunningInsideAgentModule from '../jsonrpc/isRunningInsideAgent' import type { CodyStatusBar } from '../services/StatusBar' import { AutoeditStopReason } from './adapters/base' import * as fireworksAdapter from './adapters/model-response/fireworks' import { autoeditTriggerKind } from './analytics-logger' import { AUTOEDIT_INITIAL_DEBOUNCE_INTERVAL_MS, + type AutoeditsFeatures, AutoeditsProvider, type AutoeditsResult, } from './autoedits-provider' @@ -35,13 +37,19 @@ export async function autoeditResultFor( prediction, documentVersion = 1, provider: existingProvider, + providerFeatures = { + shouldHotStreak: true, + allowUsingWebSocket: false, + }, getModelResponse, isAutomaticTimersAdvancementDisabled = false, + isAgent = false, }: { prediction: string documentVersion?: number /** provide to reuse an existing provider instance */ provider?: AutoeditsProvider + providerFeatures?: AutoeditsFeatures inlineCompletionContext?: vscode.InlineCompletionContext /** * In the test environment, the autoedit provider uses cody-gateway adapter, @@ -49,6 +57,8 @@ export async function autoeditResultFor( */ getModelResponse?: typeof fireworksAdapter.getFireworksModelResponse isAutomaticTimersAdvancementDisabled?: boolean + /** Mock running in agent mode (e.g., JetBrains) instead of VS Code */ + isAgent?: boolean } ): Promise<{ result: AutoeditsResult | null @@ -58,6 +68,11 @@ export async function autoeditResultFor( provider: AutoeditsProvider editBuilder: WorkspaceEdit }> { + // Mock agent mode if requested + if (isAgent) { + vi.spyOn(isRunningInsideAgentModule, 'isRunningInsideAgent').mockReturnValue(true) + } + const getModelResponseMock: typeof fireworksAdapter.getFireworksModelResponse = async function* () { // Simulate response latency. vi.advanceTimersByTime(100) @@ -107,10 +122,7 @@ export async function autoeditResultFor( } as any as CodyStatusBar const provider = existingProvider ?? - new AutoeditsProvider(chatClient, fixupController, mockStatusBar, { - shouldHotStreak: true, - allowUsingWebSocket: false, - }) + new AutoeditsProvider(chatClient, fixupController, mockStatusBar, providerFeatures) let result: AutoeditsResult | null = null