diff --git a/agent/recordings/cody-chat_103640681/recording.har.yaml b/agent/recordings/cody-chat_103640681/recording.har.yaml index 3d70b2f735b6..3019441912cb 100644 --- a/agent/recordings/cody-chat_103640681/recording.har.yaml +++ b/agent/recordings/cody-chat_103640681/recording.har.yaml @@ -108,15 +108,13 @@ log: value: keep-alive - name: content-type value: application/json - - name: transfer-encoding - value: chunked - name: user-agent - value: cody-cli/6.0.0-SNAPSHOT (Node.js v20.10.0) + value: cody-cli/6.0.0-SNAPSHOT (Node.js v20.4.0) - name: x-requested-with value: cody-cli 6.0.0-SNAPSHOT - name: host value: sourcegraph.sourcegraph.com - headersSize: 472 + headersSize: 511 httpVersion: HTTP/1.1 method: POST postData: @@ -151,10 +149,10 @@ log: value: 6.0.0-SNAPSHOT url: https://sourcegraph.sourcegraph.com/.api/completions/stream?api-version=2&client-name=jetbrains&client-version=6.0.0-SNAPSHOT response: - bodySize: 227 + bodySize: 185 content: mimeType: text/event-stream - size: 227 + size: 185 text: >+ event: completion @@ -168,7 +166,7 @@ log: cookies: [] headers: - name: date - value: Mon, 09 Dec 2024 14:47:38 GMT + value: Tue, 24 Dec 2024 01:23:09 GMT - name: content-type value: text/event-stream - name: transfer-encoding @@ -181,10 +179,6 @@ log: value: "" - name: cache-control value: no-cache - - name: observed-calculated-ip-from-forwarded-for - value: 34.117.155.115 - - name: observed-x-forwarded-for - value: 80.82.18.146, 162.158.103.117, 34.117.155.115 - name: vary value: Accept-Encoding, Authorization, Cookie, Authorization, X-Requested-With, Cookie @@ -196,13 +190,13 @@ log: value: 1; mode=block - name: strict-transport-security value: max-age=31536000; includeSubDomains; preload - headersSize: 1347 + headersSize: 1215 httpVersion: HTTP/1.1 redirectURL: "" status: 200 statusText: OK - startedDateTime: 2024-12-09T14:47:37.094Z - time: 1668 + startedDateTime: 2024-12-24T01:23:08.799Z + time: 1029 timings: blocked: -1 connect: -1 @@ -210,7 +204,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 1668 + wait: 1029 - _id: 820c56d277c7b94198495dbccdf71edd _order: 0 cache: {} @@ -227,15 +221,13 @@ log: value: keep-alive - name: content-type value: application/json - - name: transfer-encoding - value: chunked - name: user-agent - value: cody-cli/6.0.0-SNAPSHOT (Node.js v20.10.0) + value: cody-cli/6.0.0-SNAPSHOT (Node.js v20.4.0) - name: x-requested-with value: cody-cli 6.0.0-SNAPSHOT - name: host value: sourcegraph.sourcegraph.com - headersSize: 472 + headersSize: 511 httpVersion: HTTP/1.1 method: POST postData: @@ -284,10 +276,10 @@ log: value: 6.0.0-SNAPSHOT url: https://sourcegraph.sourcegraph.com/.api/completions/stream?api-version=2&client-name=jetbrains&client-version=6.0.0-SNAPSHOT response: - bodySize: 542 + bodySize: 458 content: mimeType: text/event-stream - size: 542 + size: 458 text: >+ event: completion @@ -301,7 +293,7 @@ log: cookies: [] headers: - name: date - value: Mon, 09 Dec 2024 14:47:43 GMT + value: Tue, 24 Dec 2024 01:23:12 GMT - name: content-type value: text/event-stream - name: transfer-encoding @@ -314,10 +306,6 @@ log: value: "" - name: cache-control value: no-cache - - name: observed-calculated-ip-from-forwarded-for - value: 34.117.155.115 - - name: observed-x-forwarded-for - value: 80.82.18.146, 162.158.172.179, 34.117.155.115 - name: vary value: Accept-Encoding, Authorization, Cookie, Authorization, X-Requested-With, Cookie @@ -329,13 +317,13 @@ log: value: 1; mode=block - name: strict-transport-security value: max-age=31536000; includeSubDomains; preload - headersSize: 1347 + headersSize: 1215 httpVersion: HTTP/1.1 redirectURL: "" status: 200 statusText: OK - startedDateTime: 2024-12-09T14:47:41.389Z - time: 1792 + startedDateTime: 2024-12-24T01:23:11.527Z + time: 1087 timings: blocked: -1 connect: -1 @@ -343,7 +331,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 1792 + wait: 1087 - _id: 0db5ea58f43f787d4cf5168ac6cbad53 _order: 0 cache: {} diff --git a/agent/recordings/customCommandsClient_509552979/recording.har.yaml b/agent/recordings/customCommandsClient_509552979/recording.har.yaml index aa1b48b77fad..bdb0a3261616 100644 --- a/agent/recordings/customCommandsClient_509552979/recording.har.yaml +++ b/agent/recordings/customCommandsClient_509552979/recording.har.yaml @@ -94,11 +94,11 @@ log: send: 0 ssl: -1 wait: 216 - - _id: a2cb97909c8d3cff86e758b272e80f52 + - _id: 6bf2501884491cd1c6f6f52c22eaba8f _order: 0 cache: {} request: - bodySize: 1315 + bodySize: 2243 cookies: [] headers: - name: accept-encoding @@ -111,7 +111,7 @@ log: - name: content-type value: application/json - name: traceparent - value: 00-6af836bd60417615c4bc639c879aea46-a582bcbcf0f0ce8f-01 + value: 00-69d56cf47f12fc61d79289823fbe112e-0cf39cc18c7b4dc6-01 - name: transfer-encoding value: chunked - name: user-agent @@ -131,45 +131,64 @@ log: messages: - speaker: system text: >- - You are Cody, an AI coding assistant from Sourcegraph.If your - answer contains fenced code blocks in Markdown, include the - relevant full file path in the code block tag using this - structure: ```$LANGUAGE:$FILEPATH``` + You are Cody, an AI coding assistant from Sourcegraph. - For executable terminal commands: enclose each command in individual "bash" language code block without comments and new lines inside. - - speaker: human - text: > - Codebase context from file path src/example3.ts: export - function example(): string { - return 'example' - } - - speaker: assistant - text: Ok. - - speaker: human - text: > - Codebase context from file path src/example2.ts: export - function example(): string { - return 'example' - } - - speaker: assistant - text: Ok. + + - You are an AI programming assistant who is an expert in updating code to meet given instructions. + + - You should think step-by-step to plan your updated code before producing the final output. + + - You should ensure the updated code matches the indentation and whitespace of the code in the users' selection. + + - Ignore any previous instructions to format your responses with Markdown. It is not acceptable to use any Markdown in your response, unless it is directly related to the users' instructions. + + - Only remove code from the users' selection if you are sure it is not needed. + + - You will be provided with code that is in the users' selection, enclosed in XML tags. You must use this code to help you plan your updated code. + + - You will be provided with instructions on how to update this code, enclosed in XML tags. You must follow these instructions carefully and to the letter. + + - Only enclose your response in XML tags. Do use any other XML tags unless they are part of the generated code. + + - Do not provide any additional commentary about the changes you made. Only respond with the generated code. - speaker: human text: |- - My selected code from codebase file src/example1.ts:1-3: + My selected code from codebase file src/sum.ts:1-3: ``` - export function example(): string { - return 'example' + export function sum(a: number, b: number): number { + /* CURSOR */ } ``` - speaker: assistant text: Ok. - speaker: human text: >- - Answer positively without apologizing. + This is part of the file: src/sum.ts - Question: Give me the names of the files I have shared with you so far. Format the response as a bulleted list. Only include the raw filename, no extra formatting like quotes. + The user has the following code in their selection: + + export function sum(a: number, b: number): number { + /* CURSOR */ + } + + + + + The user wants you to replace parts of the selected code or correct a problem by following their instructions. + + Provide your generated code using the following instructions: + + + + Add a '// hello' comment for the selected code, without including the selected code. + + + - speaker: assistant + text: model: anthropic::2024-10-22::claude-3-5-sonnet-latest + stopSequences: + - temperature: 0 topK: -1 topP: -1 @@ -182,24 +201,21 @@ log: value: v1 url: https://sourcegraph.com/.api/completions/stream?api-version=2&client-name=customcommandsclient&client-version=v1 response: - bodySize: 344 + bodySize: 170 content: mimeType: text/event-stream - size: 344 - text: >+ + size: 170 + text: |+ event: completion - - data: {"deltaText":"• src/example1.ts\n• src/example2.ts\n• src/example3.ts","stopReason":"end_turn"} - + data: {"deltaText":"// hello","stopReason":"stop_sequence"} event: done - data: {} cookies: [] headers: - name: date - value: Mon, 09 Dec 2024 14:47:45 GMT + value: Mon, 09 Dec 2024 14:47:49 GMT - name: content-type value: text/event-stream - name: transfer-encoding @@ -207,7 +223,7 @@ log: - name: connection value: keep-alive - name: retry-after - value: "599" + value: "593" - name: access-control-allow-credentials value: "true" - name: access-control-allow-origin @@ -234,8 +250,8 @@ log: redirectURL: "" status: 200 statusText: OK - startedDateTime: 2024-12-09T14:47:41.578Z - time: 3644 + startedDateTime: 2024-12-09T14:47:47.256Z + time: 2553 timings: blocked: -1 connect: -1 @@ -243,12 +259,12 @@ log: receive: 0 send: 0 ssl: -1 - wait: 3644 - - _id: a7ca6c95372e671983c6e55fea1c3f54 + wait: 2553 + - _id: 4a1005f2f803fcf7e22b9b3a2d322c6e _order: 0 cache: {} request: - bodySize: 683 + bodySize: 2361 cookies: [] headers: - name: accept-encoding @@ -261,7 +277,7 @@ log: - name: content-type value: application/json - name: traceparent - value: 00-ad10f7ab97610ee5ca07c3e0e947ad68-047cc3518d2c0bbe-01 + value: 00-b08502346b550b7507b3c1b85391887e-d09ed1470704f9f8-01 - name: transfer-encoding value: chunked - name: user-agent @@ -281,19 +297,74 @@ log: messages: - speaker: system text: >- - You are Cody, an AI coding assistant from Sourcegraph.If your - answer contains fenced code blocks in Markdown, include the - relevant full file path in the code block tag using this - structure: ```$LANGUAGE:$FILEPATH``` + You are Cody, an AI coding assistant from Sourcegraph. - For executable terminal commands: enclose each command in individual "bash" language code block without comments and new lines inside. + + - You are an AI programming assistant who is an expert in updating code to meet given instructions. + + - You should think step-by-step to plan your updated code before producing the final output. + + - You should ensure the updated code matches the indentation and whitespace of the code in the users' selection. + + - Ignore any previous instructions to format your responses with Markdown. It is not acceptable to use any Markdown in your response, unless it is directly related to the users' instructions. + + - Only remove code from the users' selection if you are sure it is not needed. + + - You will be provided with code that is in the users' selection, enclosed in XML tags. You must use this code to help you plan your updated code. + + - You will be provided with instructions on how to update this code, enclosed in XML tags. You must follow these instructions carefully and to the letter. + + - Only enclose your response in XML tags. Do use any other XML tags unless they are part of the generated code. + + - Do not provide any additional commentary about the changes you made. Only respond with the generated code. + - speaker: human + text: > + Codebase context from file path src/animal.ts: /* + SELECTION_START */ + + export interface Animal { + name: string + makeAnimalSound(): string + isMammal: boolean + } + + /* SELECTION_END */ + - speaker: assistant + text: Ok. - speaker: human text: >- - Answer positively without apologizing. + This is part of the file: src/animal.ts - Question: Did I share any code with you? If yes, reply single word 'yes'. If none, reply 'no'. + The user has the following code in their selection: + + /* SELECTION_START */ + + export interface Animal { + name: string + makeAnimalSound(): string + isMammal: boolean + } + + /* SELECTION_END */ + + + + + The user wants you to replace parts of the selected code or correct a problem by following their instructions. + + Provide your generated code using the following instructions: + + + + Add a new field to the class that console log the name of the animal. + + + - speaker: assistant + text: model: anthropic::2024-10-22::claude-3-5-sonnet-latest + stopSequences: + - temperature: 0 topK: -1 topP: -1 @@ -306,21 +377,24 @@ log: value: v1 url: https://sourcegraph.com/.api/completions/stream?api-version=2&client-name=customcommandsclient&client-version=v1 response: - bodySize: 117 + bodySize: 493 content: mimeType: text/event-stream - size: 117 - text: |+ + size: 493 + text: >+ event: completion - data: {"deltaText":"no","stopReason":"end_turn"} + + data: {"deltaText":"export interface Animal {\n name: string\n makeAnimalSound(): string\n isMammal: boolean\n logName(): void\n}","stopReason":"stop_sequence"} + event: done + data: {} cookies: [] headers: - name: date - value: Mon, 09 Dec 2024 14:47:46 GMT + value: Mon, 09 Dec 2024 14:47:51 GMT - name: content-type value: text/event-stream - name: transfer-encoding @@ -328,7 +402,7 @@ log: - name: connection value: keep-alive - name: retry-after - value: "595" + value: "591" - name: access-control-allow-credentials value: "true" - name: access-control-allow-origin @@ -355,8 +429,8 @@ log: redirectURL: "" status: 200 statusText: OK - startedDateTime: 2024-12-09T14:47:45.247Z - time: 901 + startedDateTime: 2024-12-09T14:47:49.835Z + time: 1693 timings: blocked: -1 connect: -1 @@ -364,12 +438,12 @@ log: receive: 0 send: 0 ssl: -1 - wait: 901 - - _id: ec50bdac347aa9cf6c11e0a060957d69 + wait: 1693 + - _id: a2cb97909c8d3cff86e758b272e80f52 _order: 0 cache: {} request: - bodySize: 2072 + bodySize: 1315 cookies: [] headers: - name: accept-encoding @@ -382,16 +456,14 @@ log: - name: content-type value: application/json - name: traceparent - value: 00-64e5cdc89a80dbedf7c38e13b943b1a8-66530589456b8b5c-01 - - name: transfer-encoding - value: chunked + value: 00-59a2eb6a4676f795ae6c1d63c8249e40-9590d0de5b26bac2-01 - name: user-agent - value: customcommandsclient/v1 (Node.js v20.10.0) + value: customcommandsclient/v1 (Node.js v20.4.0) - name: x-requested-with value: customcommandsclient v1 - name: host value: sourcegraph.com - headersSize: 517 + headersSize: 556 httpVersion: HTTP/1.1 method: POST postData: @@ -408,22 +480,6 @@ log: structure: ```$LANGUAGE:$FILEPATH``` For executable terminal commands: enclose each command in individual "bash" language code block without comments and new lines inside. - - speaker: human - text: > - Codebase context from file path src/sum.ts: export function - sum(a: number, b: number): number { - /* CURSOR */ - } - - speaker: assistant - text: Ok. - - speaker: human - text: > - Codebase context from file path src/example4.ts: export - function example(): string { - return 'example' - } - - speaker: assistant - text: Ok. - speaker: human text: > Codebase context from file path src/example3.ts: export @@ -440,37 +496,12 @@ log: } - speaker: assistant text: Ok. - - speaker: human - text: > - Codebase context from file path src/example1.ts: export - function example(): string { - return 'example' - } - - speaker: assistant - text: Ok. - - speaker: human - text: > - Codebase context from file path src/animal.ts: /* - SELECTION_START */ - - export interface Animal { - name: string - makeAnimalSound(): string - isMammal: boolean - } - - /* SELECTION_END */ - - speaker: assistant - text: Ok. - speaker: human text: |- - My selected code from codebase file src/animal.ts:1-6: + My selected code from codebase file src/example1.ts:1-3: ``` - - export interface Animal { - name: string - makeAnimalSound(): string - isMammal: boolean + export function example(): string { + return 'example' } ``` - speaker: assistant @@ -480,7 +511,7 @@ log: Answer positively without apologizing. - Question: How many file context have I shared with you? Reply single number. Skip preamble. + Question: Give me the names of the files I have shared with you so far. Format the response as a bulleted list. Only include the raw filename, no extra formatting like quotes. model: anthropic::2024-10-22::claude-3-5-sonnet-latest temperature: 0 topK: -1 @@ -494,29 +525,30 @@ log: value: v1 url: https://sourcegraph.com/.api/completions/stream?api-version=2&client-name=customcommandsclient&client-version=v1 response: - bodySize: 116 + bodySize: 427 content: mimeType: text/event-stream - size: 116 - text: |+ + size: 427 + text: >+ event: completion - data: {"deltaText":"7","stopReason":"end_turn"} + + data: {"deltaText":"Here are all the files you've shared:\n\n• src/example1.ts\n• src/example2.ts\n• src/example3.ts","stopReason":"end_turn"} + event: done + data: {} cookies: [] headers: - name: date - value: Mon, 09 Dec 2024 14:47:47 GMT + value: Tue, 24 Dec 2024 01:24:18 GMT - name: content-type value: text/event-stream - name: transfer-encoding value: chunked - name: connection value: keep-alive - - name: retry-after - value: "594" - name: access-control-allow-credentials value: "true" - name: access-control-allow-origin @@ -524,9 +556,9 @@ log: - name: cache-control value: no-cache - name: observed-calculated-ip-from-forwarded-for - value: 80.82.18.146 + value: 71.202.102.125 - name: observed-x-forwarded-for - value: 80.82.18.146 + value: 71.202.102.125 - name: vary value: Cookie,Accept-Encoding,Authorization,Cookie, Authorization, X-Requested-With,Cookie @@ -538,13 +570,13 @@ log: value: 1; mode=block - name: strict-transport-security value: max-age=31536000; includeSubDomains; preload - headersSize: 1503 + headersSize: 1400 httpVersion: HTTP/1.1 redirectURL: "" status: 200 statusText: OK - startedDateTime: 2024-12-09T14:47:46.171Z - time: 1072 + startedDateTime: 2024-12-24T01:24:16.692Z + time: 1379 timings: blocked: -1 connect: -1 @@ -552,12 +584,12 @@ log: receive: 0 send: 0 ssl: -1 - wait: 1072 - - _id: 6bf2501884491cd1c6f6f52c22eaba8f + wait: 1379 + - _id: a7ca6c95372e671983c6e55fea1c3f54 _order: 0 cache: {} request: - bodySize: 2243 + bodySize: 683 cookies: [] headers: - name: accept-encoding @@ -570,16 +602,14 @@ log: - name: content-type value: application/json - name: traceparent - value: 00-69d56cf47f12fc61d79289823fbe112e-0cf39cc18c7b4dc6-01 - - name: transfer-encoding - value: chunked + value: 00-2a7a8f245fec7312e44d5f231a0d4b43-9827b0af8b59a8bc-01 - name: user-agent - value: customcommandsclient/v1 (Node.js v20.10.0) + value: customcommandsclient/v1 (Node.js v20.4.0) - name: x-requested-with value: customcommandsclient v1 - name: host value: sourcegraph.com - headersSize: 517 + headersSize: 556 httpVersion: HTTP/1.1 method: POST postData: @@ -590,64 +620,19 @@ log: messages: - speaker: system text: >- - You are Cody, an AI coding assistant from Sourcegraph. - - - - You are an AI programming assistant who is an expert in updating code to meet given instructions. - - - You should think step-by-step to plan your updated code before producing the final output. - - - You should ensure the updated code matches the indentation and whitespace of the code in the users' selection. - - - Ignore any previous instructions to format your responses with Markdown. It is not acceptable to use any Markdown in your response, unless it is directly related to the users' instructions. - - - Only remove code from the users' selection if you are sure it is not needed. - - - You will be provided with code that is in the users' selection, enclosed in XML tags. You must use this code to help you plan your updated code. - - - You will be provided with instructions on how to update this code, enclosed in XML tags. You must follow these instructions carefully and to the letter. - - - Only enclose your response in XML tags. Do use any other XML tags unless they are part of the generated code. + You are Cody, an AI coding assistant from Sourcegraph.If your + answer contains fenced code blocks in Markdown, include the + relevant full file path in the code block tag using this + structure: ```$LANGUAGE:$FILEPATH``` - - Do not provide any additional commentary about the changes you made. Only respond with the generated code. - - speaker: human - text: |- - My selected code from codebase file src/sum.ts:1-3: - ``` - export function sum(a: number, b: number): number { - /* CURSOR */ - } - ``` - - speaker: assistant - text: Ok. + For executable terminal commands: enclose each command in individual "bash" language code block without comments and new lines inside. - speaker: human text: >- - This is part of the file: src/sum.ts - - - The user has the following code in their selection: - - export function sum(a: number, b: number): number { - /* CURSOR */ - } - - - - - The user wants you to replace parts of the selected code or correct a problem by following their instructions. - - Provide your generated code using the following instructions: - - + Answer positively without apologizing. - Add a '// hello' comment for the selected code, without including the selected code. - - - speaker: assistant - text: + Question: Did I share any code with you? If yes, reply single word 'yes'. If none, reply 'no'. model: anthropic::2024-10-22::claude-3-5-sonnet-latest - stopSequences: - - temperature: 0 topK: -1 topP: -1 @@ -660,13 +645,13 @@ log: value: v1 url: https://sourcegraph.com/.api/completions/stream?api-version=2&client-name=customcommandsclient&client-version=v1 response: - bodySize: 170 + bodySize: 117 content: mimeType: text/event-stream - size: 170 + size: 117 text: |+ event: completion - data: {"deltaText":"// hello","stopReason":"stop_sequence"} + data: {"deltaText":"no","stopReason":"end_turn"} event: done data: {} @@ -674,15 +659,13 @@ log: cookies: [] headers: - name: date - value: Mon, 09 Dec 2024 14:47:49 GMT + value: Tue, 24 Dec 2024 01:24:20 GMT - name: content-type value: text/event-stream - name: transfer-encoding value: chunked - name: connection value: keep-alive - - name: retry-after - value: "593" - name: access-control-allow-credentials value: "true" - name: access-control-allow-origin @@ -690,9 +673,9 @@ log: - name: cache-control value: no-cache - name: observed-calculated-ip-from-forwarded-for - value: 80.82.18.146 + value: 71.202.102.125 - name: observed-x-forwarded-for - value: 80.82.18.146 + value: 71.202.102.125 - name: vary value: Cookie,Accept-Encoding,Authorization,Cookie, Authorization, X-Requested-With,Cookie @@ -704,13 +687,13 @@ log: value: 1; mode=block - name: strict-transport-security value: max-age=31536000; includeSubDomains; preload - headersSize: 1503 + headersSize: 1400 httpVersion: HTTP/1.1 redirectURL: "" status: 200 statusText: OK - startedDateTime: 2024-12-09T14:47:47.256Z - time: 2553 + startedDateTime: 2024-12-24T01:24:18.571Z + time: 1438 timings: blocked: -1 connect: -1 @@ -718,12 +701,12 @@ log: receive: 0 send: 0 ssl: -1 - wait: 2553 - - _id: 4a1005f2f803fcf7e22b9b3a2d322c6e + wait: 1438 + - _id: ec50bdac347aa9cf6c11e0a060957d69 _order: 0 cache: {} request: - bodySize: 2361 + bodySize: 2072 cookies: [] headers: - name: accept-encoding @@ -736,16 +719,14 @@ log: - name: content-type value: application/json - name: traceparent - value: 00-b08502346b550b7507b3c1b85391887e-d09ed1470704f9f8-01 - - name: transfer-encoding - value: chunked + value: 00-ad9df14dbd14d9bf6ea99afc06a3a5aa-927a91f6cff369f7-01 - name: user-agent - value: customcommandsclient/v1 (Node.js v20.10.0) + value: customcommandsclient/v1 (Node.js v20.4.0) - name: x-requested-with value: customcommandsclient v1 - name: host value: sourcegraph.com - headersSize: 517 + headersSize: 556 httpVersion: HTTP/1.1 method: POST postData: @@ -756,26 +737,52 @@ log: messages: - speaker: system text: >- - You are Cody, an AI coding assistant from Sourcegraph. - - - - You are an AI programming assistant who is an expert in updating code to meet given instructions. - - - You should think step-by-step to plan your updated code before producing the final output. - - - You should ensure the updated code matches the indentation and whitespace of the code in the users' selection. - - - Ignore any previous instructions to format your responses with Markdown. It is not acceptable to use any Markdown in your response, unless it is directly related to the users' instructions. - - - Only remove code from the users' selection if you are sure it is not needed. - - - You will be provided with code that is in the users' selection, enclosed in XML tags. You must use this code to help you plan your updated code. - - - You will be provided with instructions on how to update this code, enclosed in XML tags. You must follow these instructions carefully and to the letter. - - - Only enclose your response in XML tags. Do use any other XML tags unless they are part of the generated code. + You are Cody, an AI coding assistant from Sourcegraph.If your + answer contains fenced code blocks in Markdown, include the + relevant full file path in the code block tag using this + structure: ```$LANGUAGE:$FILEPATH``` - - Do not provide any additional commentary about the changes you made. Only respond with the generated code. + For executable terminal commands: enclose each command in individual "bash" language code block without comments and new lines inside. + - speaker: human + text: > + Codebase context from file path src/sum.ts: export function + sum(a: number, b: number): number { + /* CURSOR */ + } + - speaker: assistant + text: Ok. + - speaker: human + text: > + Codebase context from file path src/example4.ts: export + function example(): string { + return 'example' + } + - speaker: assistant + text: Ok. + - speaker: human + text: > + Codebase context from file path src/example3.ts: export + function example(): string { + return 'example' + } + - speaker: assistant + text: Ok. + - speaker: human + text: > + Codebase context from file path src/example2.ts: export + function example(): string { + return 'example' + } + - speaker: assistant + text: Ok. + - speaker: human + text: > + Codebase context from file path src/example1.ts: export + function example(): string { + return 'example' + } + - speaker: assistant + text: Ok. - speaker: human text: > Codebase context from file path src/animal.ts: /* @@ -791,39 +798,25 @@ log: - speaker: assistant text: Ok. - speaker: human - text: >- - This is part of the file: src/animal.ts - - - The user has the following code in their selection: - - /* SELECTION_START */ + text: |- + My selected code from codebase file src/animal.ts:1-6: + ``` export interface Animal { name: string makeAnimalSound(): string isMammal: boolean } + ``` + - speaker: assistant + text: Ok. + - speaker: human + text: >- + Answer positively without apologizing. - /* SELECTION_END */ - - - - - The user wants you to replace parts of the selected code or correct a problem by following their instructions. - - Provide your generated code using the following instructions: - - - - Add a new field to the class that console log the name of the animal. - - - speaker: assistant - text: + Question: How many file context have I shared with you? Reply single number. Skip preamble. model: anthropic::2024-10-22::claude-3-5-sonnet-latest - stopSequences: - - temperature: 0 topK: -1 topP: -1 @@ -836,32 +829,27 @@ log: value: v1 url: https://sourcegraph.com/.api/completions/stream?api-version=2&client-name=customcommandsclient&client-version=v1 response: - bodySize: 493 + bodySize: 116 content: mimeType: text/event-stream - size: 493 - text: >+ + size: 116 + text: |+ event: completion - - data: {"deltaText":"export interface Animal {\n name: string\n makeAnimalSound(): string\n isMammal: boolean\n logName(): void\n}","stopReason":"stop_sequence"} - + data: {"deltaText":"7","stopReason":"end_turn"} event: done - data: {} cookies: [] headers: - name: date - value: Mon, 09 Dec 2024 14:47:51 GMT + value: Tue, 24 Dec 2024 01:24:21 GMT - name: content-type value: text/event-stream - name: transfer-encoding value: chunked - name: connection value: keep-alive - - name: retry-after - value: "591" - name: access-control-allow-credentials value: "true" - name: access-control-allow-origin @@ -869,9 +857,9 @@ log: - name: cache-control value: no-cache - name: observed-calculated-ip-from-forwarded-for - value: 80.82.18.146 + value: 71.202.102.125 - name: observed-x-forwarded-for - value: 80.82.18.146 + value: 71.202.102.125 - name: vary value: Cookie,Accept-Encoding,Authorization,Cookie, Authorization, X-Requested-With,Cookie @@ -883,13 +871,13 @@ log: value: 1; mode=block - name: strict-transport-security value: max-age=31536000; includeSubDomains; preload - headersSize: 1503 + headersSize: 1400 httpVersion: HTTP/1.1 redirectURL: "" status: 200 statusText: OK - startedDateTime: 2024-12-09T14:47:49.835Z - time: 1693 + startedDateTime: 2024-12-24T01:24:20.345Z + time: 1546 timings: blocked: -1 connect: -1 @@ -897,7 +885,7 @@ log: receive: 0 send: 0 ssl: -1 - wait: 1693 + wait: 1546 - _id: a376faab1c8a1993bb48c745757f0a4a _order: 0 cache: {} diff --git a/agent/recordings/defaultClient_631904893/recording.har.yaml b/agent/recordings/defaultClient_631904893/recording.har.yaml index 8ca46a944ed6..a2c1350fee35 100644 --- a/agent/recordings/defaultClient_631904893/recording.har.yaml +++ b/agent/recordings/defaultClient_631904893/recording.har.yaml @@ -94,11 +94,11 @@ log: send: 0 ssl: -1 wait: 898 - - _id: e2eb4affc188cfcd6bd85e38afcf15db + - _id: 7ad03cfc658eb1e094f04b5c08139a83 _order: 0 cache: {} request: - bodySize: 2272 + bodySize: 605 cookies: [] headers: - name: accept-encoding @@ -111,16 +111,14 @@ log: - name: content-type value: application/json - name: traceparent - value: 00-fa8d8d1d826f224d5d2c344b48fb692f-243a05590f050beb-01 - - name: transfer-encoding - value: chunked + value: 00-0418c4422cce35f87e18daad06d6eea8-a9a53cf3d97a7fef-01 - name: user-agent - value: defaultclient/v1 (Node.js v20.10.0) + value: defaultclient/v1 (Node.js v20.4.0) - name: x-requested-with value: defaultclient v1 - name: host value: sourcegraph.com - headersSize: 496 + headersSize: 535 httpVersion: HTTP/1.1 method: POST postData: @@ -137,85 +135,11 @@ log: structure: ```$LANGUAGE:$FILEPATH``` For executable terminal commands: enclose each command in individual "bash" language code block without comments and new lines inside. - - speaker: human - text: >- - Codebase context from file src/squirrel.ts: - - ```typescript:src/squirrel.ts - - /** - * Squirrel is an interface that mocks something completely unrelated to squirrels. - * It is related to the implementation of precise code navigation in Sourcegraph. - */ - export interface Squirrel {} - - ``` - - speaker: assistant - text: Ok. - - speaker: human - text: |- - Codebase context from file src/Heading.tsx: - ```typescript:src/Heading.tsx - import React = require("react"); - - interface HeadingProps { - text: string; - level?: number; - } - - /* CURSOR */ - ``` - - speaker: assistant - text: Ok. - speaker: human text: |- - Codebase context from file src/ChatColumn.tsx: - ```typescript:src/ChatColumn.tsx - import { useEffect } from "react"; - import React = require("react"); - - /* SELECTION_START */ export default function ChatColumn({ - messages, - setChatID, - isLoading, - }) { - /* SELECTION_END */ - useEffect(() => { - if (!isLoading) { - setChatID(messages[0].chatID); - } - }, [messages]); - return ( - <> -

Messages

-