Skip to content

feat(context): Add Prompt Caching to Code Context (CODY-4807) #26174

feat(context): Add Prompt Caching to Code Context (CODY-4807)

feat(context): Add Prompt Caching to Code Context (CODY-4807) #26174

Triggered via pull request January 30, 2025 00:19
Status Failure
Total duration 10m 56s
Artifacts

ci.yml

on: pull_request
fast_tests_matrix_prep
0s
fast_tests_matrix_prep
slow_tests_matrix_prep
0s
slow_tests_matrix_prep
Matrix: test-integration
Matrix: test-unit
Matrix: test-e2e
Fit to window
Zoom out
Zoom in

Annotations

22 errors, 14 warnings, and 5 notices
src/custom-commands.test.ts > Custom Commands: agent/src/TestClient.ts#L890
Error: PollyError: [Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`.. To fix this problem, run the following commands to update the HTTP recordings: source agent/scripts/export-cody-http-recording-tokens.sh pnpm update-agent-recordings ❯ TestClient.shutdownAndExit src/TestClient.ts:890:23 ❯ TestClient.afterAll src/TestClient.ts:877:9 ❯ src/custom-commands.test.ts:32:9
src/custom-commands.test.ts > Custom Commands > commands/custom, chat command, open tabs context: agent/src/custom-commands.test.ts#L48
Error: Snapshot `Custom Commands > commands/custom, chat command, open tabs context 1` mismatched - Expected + Received - "Here are all the files you've shared: - • src/example1.ts - • src/example2.ts - • src/example3.ts" + "" ❯ src/custom-commands.test.ts:48:72
src/custom-commands.test.ts > Custom Commands > commands/custom, chat command, current directory context: agent/src/custom-commands.test.ts#L85
Error: Snapshot `Custom Commands > commands/custom, chat command, current directory context > console.error(error) ===================================================[ NOTICE ]======================================================= If you get PollyError or unexpected diff, you might need to update recordings to match your changes. Run the following commands locally to update the recordings: source agent/scripts/export-cody-http-recording-tokens.sh pnpm update-agent-recordings # Press 'u' to update the snapshots if the new behavior makes sense. It's # normal that the LLM returns minor changes to the wording. git commit -am "Update agent recordings" More details in https://github.com/sourcegraph/cody/tree/main/agent#updating-the-polly-http-recordings ==================================================================================================================== 1` mismatched Expected: ""6"" Received: """" ❯ src/custom-commands.test.ts:85:23
src/custom-commands.test.ts > Custom Commands > commands/custom, edit command, insert mode: agent/src/TestClient.ts#L594
Error: Task reached terminal state before being applied { "id": "mildiy", "state": "Error", "error": { "message": "[Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`.\n{\n \"url\": \"https://sourcegraph.com/.api/completions/stream?api-version=2&client-name=customcommandsclient&client-version=v1\",\n \"method\": \"POST\",\n \"headers\": {\n \"accept-encoding\": \"gzip;q=0\",\n \"authorization\": \"token REDACTED_fc324d3667e841181b0779375f26dedc911d26b303d23b29b1a2d7ee63dc77eb\",\n \"connection\": \"keep-alive\",\n \"content-type\": \"application/json\",\n \"traceparent\": \"00-d6563b1001307d8bb35012c8452181ee-d1a690db63d9c53b-01\",\n \"user-agent\": \"customcommandsclient/v1 (Node.js v20.18.2)\",\n \"x-requested-with\": \"customcommandsclient v1\",\n \"x-sourcegraph-interaction-id\": \"\",\n \"host\": \"sourcegraph.com\"\n },\n \"body\": \"{\\\"temperature\\\":0,\\\"topK\\\":-1,\\\"topP\\\":-1,\\\"model\\\":\\\"anthropic::2024-10-22::claude-3-5-sonnet-latest\\\",\\\"stopSequences\\\":[\\\"</CODE5711>\\\"],\\\"maxTokensToSample\\\":4000,\\\"messages\\\":[{\\\"text\\\":\\\"You are Cody, an AI coding assistant from Sourcegraph.\\\\n\\\\n- You are an AI programming assistant who is an expert in updating code to meet given instructions.\\\\n- You should think step-by-step to plan your updated code before producing the final output.\\\\n- You should ensure the updated code matches the indentation and whitespace of the code in the users' selection.\\\\n- 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.\\\\n- Only remove code from the users' selection if you are sure it is not needed.\\\\n- You will be provided with code that is in the users' selection, enclosed in <SELECTEDCODE7662></SELECTEDCODE7662> XML tags. You must use this code to help you plan your updated code.\\\\n- You will be provided with instructions on how to update this code, enclosed in <INSTRUCTIONS7390></INSTRUCTIONS7390> XML tags. You must follow these instructions carefully and to the letter.\\\\n- Only enclose your response in <CODE5711></CODE5711> XML tags. Do use any other XML tags unless they are part of the generated code.\\\\n- Do not provide any additional commentary about the changes you made. Only respond with the generated code.\\\",\\\"speaker\\\":\\\"system\\\"},{\\\"text\\\":\\\"My selected code from codebase file src/sum.ts:1-3:\\\\n```\\\\nexport function sum(a: number, b: number): number {\\\\n /* CURSOR */\\\\n}\\\\n```\\\",\\\"speaker\\\":\\\"human\\\",\\\"cache_control\\\":false},{\\\"text\\\":\\\"Ok.\\\",\\\"speaker\\\":\\\"assistant\\\"},{\\\"text\\\":\\\"This is part of the file: src/sum.ts\\\\n\\\\nThe user has the following code in their selection:\\\\n<SELECTEDCODE7662>export function sum(a: number, b: number): number {\\\\n /* CURSOR */\\\\n}\\\\n</SELECTEDCODE7662>\\\\n\\\\nThe user wants you to replace parts of the selected code or correct a problem by following their instructions.\\\\nProvide your generated code using the following instructions:\\\\n<INSTRUCTIONS7390>\\\\nAdd a '// hello' comment for the selected code, without including the selected code.\\\\n</INSTRUCTIONS7390>\\\",\\\"speaker\\\":\\\"human\\\"},{\\\"text\\\":\\\"<CODE5711>\\\",\\\"speaker\\\":\\\"assistant\\\"}]}\",\n \"recordingName\": \"customCommandsClient\",\n \"id\": \"cf7949aeda9bbad72e3ddd7ba916ea49\",\n \"order\": 0,\n \"identifiers\": {\n \"headers\": {\n \"authorization\": \"token REDACTED_fc324d3667e841181b0779375f26dedc911d26b303d23b29b1a2d7ee63dc77eb\"\n },\n \"method\": \"POST\",\n \"body\": \"{\\\"maxTokensToSample\\\":4000,\\\"messages\\\":[{\\\"speaker\\\":\\\"system\\\",\\\"text\\\":\\\"You are Cody, an AI coding assistant from Sourcegraph.\\\\n\\\\n- You are an AI programming assistant who is an expert in updating code to meet given instructions.\\\\n- You should think step-by-st
src/custom-commands.test.ts > Custom Commands > commands/custom, edit command, edit mode: agent/src/TestClient.ts#L594
Error: Task reached terminal state before being applied { "id": "mildjw", "state": "Error", "error": { "message": "[Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`.\n{\n \"url\": \"https://sourcegraph.com/.api/completions/stream?api-version=2&client-name=customcommandsclient&client-version=v1\",\n \"method\": \"POST\",\n \"headers\": {\n \"accept-encoding\": \"gzip;q=0\",\n \"authorization\": \"token REDACTED_fc324d3667e841181b0779375f26dedc911d26b303d23b29b1a2d7ee63dc77eb\",\n \"connection\": \"keep-alive\",\n \"content-type\": \"application/json\",\n \"traceparent\": \"00-727b37db4ed2cc69dc624bc115d5b90e-6481a6245810f72b-01\",\n \"user-agent\": \"customcommandsclient/v1 (Node.js v20.18.2)\",\n \"x-requested-with\": \"customcommandsclient v1\",\n \"x-sourcegraph-interaction-id\": \"\",\n \"host\": \"sourcegraph.com\"\n },\n \"body\": \"{\\\"temperature\\\":0,\\\"topK\\\":-1,\\\"topP\\\":-1,\\\"model\\\":\\\"anthropic::2024-10-22::claude-3-5-sonnet-latest\\\",\\\"stopSequences\\\":[\\\"</CODE5711>\\\"],\\\"maxTokensToSample\\\":4000,\\\"messages\\\":[{\\\"text\\\":\\\"You are Cody, an AI coding assistant from Sourcegraph.\\\\n\\\\n- You are an AI programming assistant who is an expert in updating code to meet given instructions.\\\\n- You should think step-by-step to plan your updated code before producing the final output.\\\\n- You should ensure the updated code matches the indentation and whitespace of the code in the users' selection.\\\\n- 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.\\\\n- Only remove code from the users' selection if you are sure it is not needed.\\\\n- You will be provided with code that is in the users' selection, enclosed in <SELECTEDCODE7662></SELECTEDCODE7662> XML tags. You must use this code to help you plan your updated code.\\\\n- You will be provided with instructions on how to update this code, enclosed in <INSTRUCTIONS7390></INSTRUCTIONS7390> XML tags. You must follow these instructions carefully and to the letter.\\\\n- Only enclose your response in <CODE5711></CODE5711> XML tags. Do use any other XML tags unless they are part of the generated code.\\\\n- Do not provide any additional commentary about the changes you made. Only respond with the generated code.\\\",\\\"speaker\\\":\\\"system\\\"},{\\\"text\\\":\\\"Codebase context from file path src/animal.ts: /* SELECTION_START */\\\\nexport interface Animal {\\\\n name: string\\\\n makeAnimalSound(): string\\\\n isMammal: boolean\\\\n}\\\\n/* SELECTION_END */\\\\n\\\",\\\"speaker\\\":\\\"human\\\",\\\"cache_control\\\":false},{\\\"text\\\":\\\"Ok.\\\",\\\"speaker\\\":\\\"assistant\\\"},{\\\"text\\\":\\\"This is part of the file: src/animal.ts\\\\n\\\\nThe user has the following code in their selection:\\\\n<SELECTEDCODE7662>/* SELECTION_START */\\\\nexport interface Animal {\\\\n name: string\\\\n makeAnimalSound(): string\\\\n isMammal: boolean\\\\n}\\\\n/* SELECTION_END */\\\\n</SELECTEDCODE7662>\\\\n\\\\nThe user wants you to replace parts of the selected code or correct a problem by following their instructions.\\\\nProvide your generated code using the following instructions:\\\\n<INSTRUCTIONS7390>\\\\nAdd a new field to the class that console log the name of the animal.\\\\n</INSTRUCTIONS7390>\\\",\\\"speaker\\\":\\\"human\\\"},{\\\"text\\\":\\\"<CODE5711>\\\",\\\"speaker\\\":\\\"assistant\\\"}]}\",\n \"recordingName\": \"customCommandsClient\",\n \"id\": \"cae7ba5f4a0436bcad705b2dbf3c0379\",\n \"order\": 0,\n \"identifiers\": {\n \"headers\": {\n \"authorization\": \"token REDACTED_fc324d3667e841181b0779375f26dedc911d26b303d23b29b1a2d7ee63dc77eb\"\n },\n \"method\": \"POST\",\n \"body\": \"{\\\"maxTokensToSample\\\":4000,\\\"messages\\\":[{\\\"speaker\\\":\\\"system\\\",\\\"text\\\":\\\"You are Cody, an AI coding assistant from Sourcegraph.\\\\n\\
src/document-code.test.ts > Document Code: agent/src/TestClient.ts#L890
Error: PollyError: [Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`.. To fix this problem, run the following commands to update the HTTP recordings: source agent/scripts/export-cody-http-recording-tokens.sh pnpm update-agent-recordings ❯ TestClient.shutdownAndExit src/TestClient.ts:890:23 ❯ TestClient.afterAll src/TestClient.ts:877:9 ❯ src/document-code.test.ts:22:9
src/document-code.test.ts > Document Code > commands/document (Method as part of a class): agent/src/TestClient.ts#L594
Error: Task reached terminal state before being applied { "id": "mildsjs", "state": "Error", "error": { "message": "[Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`.\n{\n \"url\": \"https://sourcegraph.com/.api/completions/stream?api-version=2&client-name=document-code&client-version=v1\",\n \"method\": \"POST\",\n \"headers\": {\n \"accept-encoding\": \"gzip;q=0\",\n \"authorization\": \"token REDACTED_fc324d3667e841181b0779375f26dedc911d26b303d23b29b1a2d7ee63dc77eb\",\n \"connection\": \"keep-alive\",\n \"content-type\": \"application/json\",\n \"traceparent\": \"00-a2fdc59991affde1f6189d8a5b1c1b04-08a88464548231a2-01\",\n \"user-agent\": \"document-code/v1 (Node.js v20.18.2)\",\n \"x-requested-with\": \"document-code v1\",\n \"x-sourcegraph-interaction-id\": \"\",\n \"host\": \"sourcegraph.com\"\n },\n \"body\": \"{\\\"temperature\\\":0,\\\"topK\\\":-1,\\\"topP\\\":-1,\\\"model\\\":\\\"anthropic/claude-3-haiku-20240307\\\",\\\"stopSequences\\\":[\\\"</CODE5711>\\\",\\\" public functionName() {\\\"],\\\"maxTokensToSample\\\":4000,\\\"messages\\\":[{\\\"text\\\":\\\"You are Cody, an AI coding assistant from Sourcegraph.\\\\n\\\\n- You are an AI programming assistant who is an expert in updating code to meet given instructions.\\\\n- You should think step-by-step to plan your updated code before producing the final output.\\\\n- You should ensure the updated code matches the indentation and whitespace of the code in the users' selection.\\\\n- 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.\\\\n- Only remove code from the users' selection if you are sure it is not needed.\\\\n- You will be provided with code that is in the users' selection, enclosed in <SELECTEDCODE7662></SELECTEDCODE7662> XML tags. You must use this code to help you plan your updated code.\\\\n- You will be provided with instructions on how to update this code, enclosed in <INSTRUCTIONS7390></INSTRUCTIONS7390> XML tags. You must follow these instructions carefully and to the letter.\\\\n- Only enclose your response in <CODE5711></CODE5711> XML tags. Do use any other XML tags unless they are part of the generated code.\\\\n- Do not provide any additional commentary about the changes you made. Only respond with the generated code.\\\",\\\"speaker\\\":\\\"system\\\"},{\\\"text\\\":\\\"Codebase context from file path src/TestClass.ts: Codebase context from file src/TestClass.ts:\\\\nconst foo = 42\\\\n// Should be present in the LLM prompt\\\\nconst longPrefix = `\\\\n longPrefix content\\\\n longPrefix content\\\\n longPrefix content\\\\n longPrefix content\\\\n longPrefix content\\\\n longPrefix content\\\\n longPrefix content\\\\n`\\\\n\\\\nexport class TestClass {\\\\n constructor(private shouldGreet: boolean) {}\\\\n\\\\n\\\",\\\"speaker\\\":\\\"human\\\",\\\"cache_control\\\":false},{\\\"text\\\":\\\"Ok.\\\",\\\"speaker\\\":\\\"assistant\\\"},{\\\"text\\\":\\\"Codebase context from file path src/TestClass.ts: Codebase context from file src/TestClass.ts:\\\\n}\\\\n\\\\n// Should be present in the LLM prompt\\\\nconst longSuffix = `\\\\n longSuffix content\\\\n longSuffix content\\\\n longSuffix content\\\\n longSuffix content\\\\n longSuffix content\\\\n longSuffix content\\\\n longSuffix content\\\\n`\\\\n\\\",\\\"speaker\\\":\\\"human\\\",\\\"cache_control\\\":false},{\\\"text\\\":\\\"Ok.\\\",\\\"speaker\\\":\\\"assistant\\\"},{\\\"text\\\":\\\"This is part of the file: src/TestClass.ts\\\\n\\\\nThe user has the following code in their selection:\\\\n<SELECTEDCODE7662> public functionName() {\\\\n if (this.shouldGreet) {\\\\n console.log(/* CURSOR */ 'Hello World!')\\\\n }\\\\n }\\\\n</SELECTEDCODE7662>\\\\n\\\\nThe user wants you to generate documentation for the selected code by following their instructions.\\\\nProvide your gener
src/document-code.test.ts > Document Code > commands/document (Function within a property): agent/src/TestClient.ts#L594
Error: Task reached terminal state before being applied { "id": "mildsmo", "state": "Error", "error": { "message": "[Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`.\n{\n \"url\": \"https://sourcegraph.com/.api/completions/stream?api-version=2&client-name=document-code&client-version=v1\",\n \"method\": \"POST\",\n \"headers\": {\n \"accept-encoding\": \"gzip;q=0\",\n \"authorization\": \"token REDACTED_fc324d3667e841181b0779375f26dedc911d26b303d23b29b1a2d7ee63dc77eb\",\n \"connection\": \"keep-alive\",\n \"content-type\": \"application/json\",\n \"traceparent\": \"00-0f5d0342f950725d1e38d7d07fc08d31-7cf2fcace35a93ab-01\",\n \"user-agent\": \"document-code/v1 (Node.js v20.18.2)\",\n \"x-requested-with\": \"document-code v1\",\n \"x-sourcegraph-interaction-id\": \"\",\n \"host\": \"sourcegraph.com\"\n },\n \"body\": \"{\\\"temperature\\\":0,\\\"topK\\\":-1,\\\"topP\\\":-1,\\\"model\\\":\\\"anthropic/claude-3-haiku-20240307\\\",\\\"stopSequences\\\":[\\\"</CODE5711>\\\",\\\" function recordLog() {\\\"],\\\"maxTokensToSample\\\":4000,\\\"messages\\\":[{\\\"text\\\":\\\"You are Cody, an AI coding assistant from Sourcegraph.\\\\n\\\\n- You are an AI programming assistant who is an expert in updating code to meet given instructions.\\\\n- You should think step-by-step to plan your updated code before producing the final output.\\\\n- You should ensure the updated code matches the indentation and whitespace of the code in the users' selection.\\\\n- 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.\\\\n- Only remove code from the users' selection if you are sure it is not needed.\\\\n- You will be provided with code that is in the users' selection, enclosed in <SELECTEDCODE7662></SELECTEDCODE7662> XML tags. You must use this code to help you plan your updated code.\\\\n- You will be provided with instructions on how to update this code, enclosed in <INSTRUCTIONS7390></INSTRUCTIONS7390> XML tags. You must follow these instructions carefully and to the letter.\\\\n- Only enclose your response in <CODE5711></CODE5711> XML tags. Do use any other XML tags unless they are part of the generated code.\\\\n- Do not provide any additional commentary about the changes you made. Only respond with the generated code.\\\",\\\"speaker\\\":\\\"system\\\"},{\\\"text\\\":\\\"Codebase context from file path src/TestLogger.ts: Codebase context from file src/TestLogger.ts:\\\\nconst foo = 42\\\\nexport const TestLogger = {\\\\n startLogging: () => {\\\\n // Do some stuff\\\\n\\\\n\\\",\\\"speaker\\\":\\\"human\\\",\\\"cache_control\\\":false},{\\\"text\\\":\\\"Ok.\\\",\\\"speaker\\\":\\\"assistant\\\"},{\\\"text\\\":\\\"Codebase context from file path src/TestLogger.ts: Codebase context from file src/TestLogger.ts:\\\\n\\\\n recordLog()\\\\n },\\\\n}\\\\n\\\",\\\"speaker\\\":\\\"human\\\",\\\"cache_control\\\":false},{\\\"text\\\":\\\"Ok.\\\",\\\"speaker\\\":\\\"assistant\\\"},{\\\"text\\\":\\\"This is part of the file: src/TestLogger.ts\\\\n\\\\nThe user has the following code in their selection:\\\\n<SELECTEDCODE7662> function recordLog() {\\\\n console.log(/* CURSOR */ 'Recording the log')\\\\n }\\\\n</SELECTEDCODE7662>\\\\n\\\\nThe user wants you to generate documentation for the selected code by following their instructions.\\\\nProvide your generated documentation using the following instructions:\\\\n<INSTRUCTIONS7390>\\\\nWrite a brief documentation comment for the selected code. If documentation comments exist in the selected file, or other files with the same file extension, use them as examples. Pay attention to the scope of the selected code (e.g. exported function/API vs implementation detail in a function), and use the idiomatic style for that type of code scope. Only generate the documentation for the selected code, do not generate the code. Do
src/document-code.test.ts > Document Code > commands/document (nested test case): agent/src/TestClient.ts#L594
Error: Task reached terminal state before being applied { "id": "mildsnp", "state": "Error", "error": { "message": "[Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`.\n{\n \"url\": \"https://sourcegraph.com/.api/completions/stream?api-version=2&client-name=document-code&client-version=v1\",\n \"method\": \"POST\",\n \"headers\": {\n \"accept-encoding\": \"gzip;q=0\",\n \"authorization\": \"token REDACTED_fc324d3667e841181b0779375f26dedc911d26b303d23b29b1a2d7ee63dc77eb\",\n \"connection\": \"keep-alive\",\n \"content-type\": \"application/json\",\n \"traceparent\": \"00-d324790850ee0db271bcefe40eb81c5f-4217093717d99c55-01\",\n \"user-agent\": \"document-code/v1 (Node.js v20.18.2)\",\n \"x-requested-with\": \"document-code v1\",\n \"x-sourcegraph-interaction-id\": \"\",\n \"host\": \"sourcegraph.com\"\n },\n \"body\": \"{\\\"temperature\\\":0,\\\"topK\\\":-1,\\\"topP\\\":-1,\\\"model\\\":\\\"anthropic/claude-3-haiku-20240307\\\",\\\"stopSequences\\\":[\\\"</CODE5711>\\\",\\\" const startTime = performance.now(/* CURSOR */)\\\"],\\\"maxTokensToSample\\\":4000,\\\"messages\\\":[{\\\"text\\\":\\\"You are Cody, an AI coding assistant from Sourcegraph.\\\\n\\\\n- You are an AI programming assistant who is an expert in updating code to meet given instructions.\\\\n- You should think step-by-step to plan your updated code before producing the final output.\\\\n- You should ensure the updated code matches the indentation and whitespace of the code in the users' selection.\\\\n- 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.\\\\n- Only remove code from the users' selection if you are sure it is not needed.\\\\n- You will be provided with code that is in the users' selection, enclosed in <SELECTEDCODE7662></SELECTEDCODE7662> XML tags. You must use this code to help you plan your updated code.\\\\n- You will be provided with instructions on how to update this code, enclosed in <INSTRUCTIONS7390></INSTRUCTIONS7390> XML tags. You must follow these instructions carefully and to the letter.\\\\n- Only enclose your response in <CODE5711></CODE5711> XML tags. Do use any other XML tags unless they are part of the generated code.\\\\n- Do not provide any additional commentary about the changes you made. Only respond with the generated code.\\\",\\\"speaker\\\":\\\"system\\\"},{\\\"text\\\":\\\"Codebase context from file path src/example.test.ts: Codebase context from file src/example.test.ts:\\\\nimport { expect } from 'vitest'\\\\nimport { it } from 'vitest'\\\\nimport { describe } from 'vitest'\\\\n\\\\ndescribe('test block', () => {\\\\n it('does 1', () => {\\\\n expect(true).toBe(true)\\\\n })\\\\n\\\\n it('does 2', () => {\\\\n expect(true).toBe(true)\\\\n })\\\\n\\\\n it('does something else', () => {\\\\n // This line will error due to incorrect usage of `performance.now`\\\\n\\\",\\\"speaker\\\":\\\"human\\\",\\\"cache_control\\\":false},{\\\"text\\\":\\\"Ok.\\\",\\\"speaker\\\":\\\"assistant\\\"},{\\\"text\\\":\\\"Codebase context from file path src/example.test.ts: Codebase context from file src/example.test.ts:\\\\n })\\\\n})\\\\n\\\",\\\"speaker\\\":\\\"human\\\",\\\"cache_control\\\":false},{\\\"text\\\":\\\"Ok.\\\",\\\"speaker\\\":\\\"assistant\\\"},{\\\"text\\\":\\\"This is part of the file: src/example.test.ts\\\\n\\\\nThe user has the following code in their selection:\\\\n<SELECTEDCODE7662> const startTime = performance.now(/* CURSOR */)\\\\n</SELECTEDCODE7662>\\\\n\\\\nThe user wants you to generate documentation for the selected code by following their instructions.\\\\nProvide your generated documentation using the following instructions:\\\\n<INSTRUCTIONS7390>\\\\nWrite a brief documentation comment for the selected code. If documentation comments exist in the selected file, or other files with the same file extension, use them
src/edit.test.ts > Edit: agent/src/TestClient.ts#L890
Error: PollyError: [Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`.. To fix this problem, run the following commands to update the HTTP recordings: source agent/scripts/export-cody-http-recording-tokens.sh pnpm update-agent-recordings ❯ TestClient.shutdownAndExit src/TestClient.ts:890:23 ❯ TestClient.afterAll src/TestClient.ts:877:9 ❯ src/edit.test.ts:27:9
src/custom-commands.test.ts > Custom Commands: agent/src/TestClient.ts#L890
Error: PollyError: [Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`.. To fix this problem, run the following commands to update the HTTP recordings: source agent/scripts/export-cody-http-recording-tokens.sh pnpm update-agent-recordings ❯ TestClient.shutdownAndExit src/TestClient.ts:890:23 ❯ TestClient.afterAll src/TestClient.ts:877:9 ❯ src/custom-commands.test.ts:32:9
src/custom-commands.test.ts > Custom Commands > commands/custom, chat command, open tabs context: agent/src/custom-commands.test.ts#L48
Error: Snapshot `Custom Commands > commands/custom, chat command, open tabs context 1` mismatched - Expected + Received - "Here are all the files you've shared: - • src/example1.ts - • src/example2.ts - • src/example3.ts" + "" ❯ src/custom-commands.test.ts:48:72
src/custom-commands.test.ts > Custom Commands > commands/custom, chat command, current directory context: agent/src/custom-commands.test.ts#L85
Error: Snapshot `Custom Commands > commands/custom, chat command, current directory context > console.error(error) ===================================================[ NOTICE ]======================================================= If you get PollyError or unexpected diff, you might need to update recordings to match your changes. Run the following commands locally to update the recordings: source agent/scripts/export-cody-http-recording-tokens.sh pnpm update-agent-recordings # Press 'u' to update the snapshots if the new behavior makes sense. It's # normal that the LLM returns minor changes to the wording. git commit -am "Update agent recordings" More details in https://github.com/sourcegraph/cody/tree/main/agent#updating-the-polly-http-recordings ==================================================================================================================== 1` mismatched Expected: ""6"" Received: """" ❯ src/custom-commands.test.ts:85:23
src/custom-commands.test.ts > Custom Commands > commands/custom, edit command, insert mode: agent/src/TestClient.ts#L594
Error: Task reached terminal state before being applied { "id": "mildm", "state": "Error", "error": { "message": "[Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`.\n{\n \"url\": \"https://sourcegraph.com/.api/completions/stream?api-version=2&client-name=customcommandsclient&client-version=v1\",\n \"method\": \"POST\",\n \"headers\": {\n \"accept-encoding\": \"gzip;q=0\",\n \"authorization\": \"token REDACTED_fc324d3667e841181b0779375f26dedc911d26b303d23b29b1a2d7ee63dc77eb\",\n \"connection\": \"keep-alive\",\n \"content-type\": \"application/json\",\n \"traceparent\": \"00-c81dc9f9c7a160159eaf9f22114afa90-c681d8d3b8902730-01\",\n \"user-agent\": \"customcommandsclient/v1 (Node.js v18.20.6)\",\n \"x-requested-with\": \"customcommandsclient v1\",\n \"x-sourcegraph-interaction-id\": \"\",\n \"host\": \"sourcegraph.com\"\n },\n \"body\": \"{\\\"temperature\\\":0,\\\"topK\\\":-1,\\\"topP\\\":-1,\\\"model\\\":\\\"anthropic::2024-10-22::claude-3-5-sonnet-latest\\\",\\\"stopSequences\\\":[\\\"</CODE5711>\\\"],\\\"maxTokensToSample\\\":4000,\\\"messages\\\":[{\\\"text\\\":\\\"You are Cody, an AI coding assistant from Sourcegraph.\\\\n\\\\n- You are an AI programming assistant who is an expert in updating code to meet given instructions.\\\\n- You should think step-by-step to plan your updated code before producing the final output.\\\\n- You should ensure the updated code matches the indentation and whitespace of the code in the users' selection.\\\\n- 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.\\\\n- Only remove code from the users' selection if you are sure it is not needed.\\\\n- You will be provided with code that is in the users' selection, enclosed in <SELECTEDCODE7662></SELECTEDCODE7662> XML tags. You must use this code to help you plan your updated code.\\\\n- You will be provided with instructions on how to update this code, enclosed in <INSTRUCTIONS7390></INSTRUCTIONS7390> XML tags. You must follow these instructions carefully and to the letter.\\\\n- Only enclose your response in <CODE5711></CODE5711> XML tags. Do use any other XML tags unless they are part of the generated code.\\\\n- Do not provide any additional commentary about the changes you made. Only respond with the generated code.\\\",\\\"speaker\\\":\\\"system\\\"},{\\\"text\\\":\\\"My selected code from codebase file src/sum.ts:1-3:\\\\n```\\\\nexport function sum(a: number, b: number): number {\\\\n /* CURSOR */\\\\n}\\\\n```\\\",\\\"speaker\\\":\\\"human\\\",\\\"cache_control\\\":false},{\\\"text\\\":\\\"Ok.\\\",\\\"speaker\\\":\\\"assistant\\\"},{\\\"text\\\":\\\"This is part of the file: src/sum.ts\\\\n\\\\nThe user has the following code in their selection:\\\\n<SELECTEDCODE7662>export function sum(a: number, b: number): number {\\\\n /* CURSOR */\\\\n}\\\\n</SELECTEDCODE7662>\\\\n\\\\nThe user wants you to replace parts of the selected code or correct a problem by following their instructions.\\\\nProvide your generated code using the following instructions:\\\\n<INSTRUCTIONS7390>\\\\nAdd a '// hello' comment for the selected code, without including the selected code.\\\\n</INSTRUCTIONS7390>\\\",\\\"speaker\\\":\\\"human\\\"},{\\\"text\\\":\\\"<CODE5711>\\\",\\\"speaker\\\":\\\"assistant\\\"}]}\",\n \"recordingName\": \"customCommandsClient\",\n \"id\": \"cf7949aeda9bbad72e3ddd7ba916ea49\",\n \"order\": 0,\n \"identifiers\": {\n \"headers\": {\n \"authorization\": \"token REDACTED_fc324d3667e841181b0779375f26dedc911d26b303d23b29b1a2d7ee63dc77eb\"\n },\n \"method\": \"POST\",\n \"body\": \"{\\\"maxTokensToSample\\\":4000,\\\"messages\\\":[{\\\"speaker\\\":\\\"system\\\",\\\"text\\\":\\\"You are Cody, an AI coding assistant from Sourcegraph.\\\\n\\\\n- You are an AI programming assistant who is an expert in updating code to meet given instructions.\\\\n- You should think step-by-ste
src/custom-commands.test.ts > Custom Commands > commands/custom, edit command, edit mode: agent/src/TestClient.ts#L594
Error: Task reached terminal state before being applied { "id": "mildnk", "state": "Error", "error": { "message": "[Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`.\n{\n \"url\": \"https://sourcegraph.com/.api/completions/stream?api-version=2&client-name=customcommandsclient&client-version=v1\",\n \"method\": \"POST\",\n \"headers\": {\n \"accept-encoding\": \"gzip;q=0\",\n \"authorization\": \"token REDACTED_fc324d3667e841181b0779375f26dedc911d26b303d23b29b1a2d7ee63dc77eb\",\n \"connection\": \"keep-alive\",\n \"content-type\": \"application/json\",\n \"traceparent\": \"00-04b470570c66fa179ad53324c40228a5-8a150ed2332ae326-01\",\n \"user-agent\": \"customcommandsclient/v1 (Node.js v18.20.6)\",\n \"x-requested-with\": \"customcommandsclient v1\",\n \"x-sourcegraph-interaction-id\": \"\",\n \"host\": \"sourcegraph.com\"\n },\n \"body\": \"{\\\"temperature\\\":0,\\\"topK\\\":-1,\\\"topP\\\":-1,\\\"model\\\":\\\"anthropic::2024-10-22::claude-3-5-sonnet-latest\\\",\\\"stopSequences\\\":[\\\"</CODE5711>\\\"],\\\"maxTokensToSample\\\":4000,\\\"messages\\\":[{\\\"text\\\":\\\"You are Cody, an AI coding assistant from Sourcegraph.\\\\n\\\\n- You are an AI programming assistant who is an expert in updating code to meet given instructions.\\\\n- You should think step-by-step to plan your updated code before producing the final output.\\\\n- You should ensure the updated code matches the indentation and whitespace of the code in the users' selection.\\\\n- 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.\\\\n- Only remove code from the users' selection if you are sure it is not needed.\\\\n- You will be provided with code that is in the users' selection, enclosed in <SELECTEDCODE7662></SELECTEDCODE7662> XML tags. You must use this code to help you plan your updated code.\\\\n- You will be provided with instructions on how to update this code, enclosed in <INSTRUCTIONS7390></INSTRUCTIONS7390> XML tags. You must follow these instructions carefully and to the letter.\\\\n- Only enclose your response in <CODE5711></CODE5711> XML tags. Do use any other XML tags unless they are part of the generated code.\\\\n- Do not provide any additional commentary about the changes you made. Only respond with the generated code.\\\",\\\"speaker\\\":\\\"system\\\"},{\\\"text\\\":\\\"Codebase context from file path src/animal.ts: /* SELECTION_START */\\\\nexport interface Animal {\\\\n name: string\\\\n makeAnimalSound(): string\\\\n isMammal: boolean\\\\n}\\\\n/* SELECTION_END */\\\\n\\\",\\\"speaker\\\":\\\"human\\\",\\\"cache_control\\\":false},{\\\"text\\\":\\\"Ok.\\\",\\\"speaker\\\":\\\"assistant\\\"},{\\\"text\\\":\\\"This is part of the file: src/animal.ts\\\\n\\\\nThe user has the following code in their selection:\\\\n<SELECTEDCODE7662>/* SELECTION_START */\\\\nexport interface Animal {\\\\n name: string\\\\n makeAnimalSound(): string\\\\n isMammal: boolean\\\\n}\\\\n/* SELECTION_END */\\\\n</SELECTEDCODE7662>\\\\n\\\\nThe user wants you to replace parts of the selected code or correct a problem by following their instructions.\\\\nProvide your generated code using the following instructions:\\\\n<INSTRUCTIONS7390>\\\\nAdd a new field to the class that console log the name of the animal.\\\\n</INSTRUCTIONS7390>\\\",\\\"speaker\\\":\\\"human\\\"},{\\\"text\\\":\\\"<CODE5711>\\\",\\\"speaker\\\":\\\"assistant\\\"}]}\",\n \"recordingName\": \"customCommandsClient\",\n \"id\": \"cae7ba5f4a0436bcad705b2dbf3c0379\",\n \"order\": 0,\n \"identifiers\": {\n \"headers\": {\n \"authorization\": \"token REDACTED_fc324d3667e841181b0779375f26dedc911d26b303d23b29b1a2d7ee63dc77eb\"\n },\n \"method\": \"POST\",\n \"body\": \"{\\\"maxTokensToSample\\\":4000,\\\"messages\\\":[{\\\"speaker\\\":\\\"system\\\",\\\"text\\\":\\\"You are Cody, an AI coding assistant from Sourcegraph.\\\\n\\
src/document-code.test.ts > Document Code: agent/src/TestClient.ts#L890
Error: PollyError: [Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`.. To fix this problem, run the following commands to update the HTTP recordings: source agent/scripts/export-cody-http-recording-tokens.sh pnpm update-agent-recordings ❯ TestClient.shutdownAndExit src/TestClient.ts:890:23 ❯ TestClient.afterAll src/TestClient.ts:877:9 ❯ src/document-code.test.ts:22:9
src/document-code.test.ts > Document Code > commands/document (Method as part of a class): agent/src/TestClient.ts#L594
Error: Task reached terminal state before being applied { "id": "mileg", "state": "Error", "error": { "message": "[Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`.\n{\n \"url\": \"https://sourcegraph.com/.api/completions/stream?api-version=2&client-name=document-code&client-version=v1\",\n \"method\": \"POST\",\n \"headers\": {\n \"accept-encoding\": \"gzip;q=0\",\n \"authorization\": \"token REDACTED_fc324d3667e841181b0779375f26dedc911d26b303d23b29b1a2d7ee63dc77eb\",\n \"connection\": \"keep-alive\",\n \"content-type\": \"application/json\",\n \"traceparent\": \"00-9a44b580b23605f3d96b51e23d9133a8-e09bd581fa3aaa78-01\",\n \"user-agent\": \"document-code/v1 (Node.js v18.20.6)\",\n \"x-requested-with\": \"document-code v1\",\n \"x-sourcegraph-interaction-id\": \"\",\n \"host\": \"sourcegraph.com\"\n },\n \"body\": \"{\\\"temperature\\\":0,\\\"topK\\\":-1,\\\"topP\\\":-1,\\\"model\\\":\\\"anthropic/claude-3-haiku-20240307\\\",\\\"stopSequences\\\":[\\\"</CODE5711>\\\",\\\" public functionName() {\\\"],\\\"maxTokensToSample\\\":4000,\\\"messages\\\":[{\\\"text\\\":\\\"You are Cody, an AI coding assistant from Sourcegraph.\\\\n\\\\n- You are an AI programming assistant who is an expert in updating code to meet given instructions.\\\\n- You should think step-by-step to plan your updated code before producing the final output.\\\\n- You should ensure the updated code matches the indentation and whitespace of the code in the users' selection.\\\\n- 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.\\\\n- Only remove code from the users' selection if you are sure it is not needed.\\\\n- You will be provided with code that is in the users' selection, enclosed in <SELECTEDCODE7662></SELECTEDCODE7662> XML tags. You must use this code to help you plan your updated code.\\\\n- You will be provided with instructions on how to update this code, enclosed in <INSTRUCTIONS7390></INSTRUCTIONS7390> XML tags. You must follow these instructions carefully and to the letter.\\\\n- Only enclose your response in <CODE5711></CODE5711> XML tags. Do use any other XML tags unless they are part of the generated code.\\\\n- Do not provide any additional commentary about the changes you made. Only respond with the generated code.\\\",\\\"speaker\\\":\\\"system\\\"},{\\\"text\\\":\\\"Codebase context from file path src/TestClass.ts: Codebase context from file src/TestClass.ts:\\\\nconst foo = 42\\\\n// Should be present in the LLM prompt\\\\nconst longPrefix = `\\\\n longPrefix content\\\\n longPrefix content\\\\n longPrefix content\\\\n longPrefix content\\\\n longPrefix content\\\\n longPrefix content\\\\n longPrefix content\\\\n`\\\\n\\\\nexport class TestClass {\\\\n constructor(private shouldGreet: boolean) {}\\\\n\\\\n\\\",\\\"speaker\\\":\\\"human\\\",\\\"cache_control\\\":false},{\\\"text\\\":\\\"Ok.\\\",\\\"speaker\\\":\\\"assistant\\\"},{\\\"text\\\":\\\"Codebase context from file path src/TestClass.ts: Codebase context from file src/TestClass.ts:\\\\n}\\\\n\\\\n// Should be present in the LLM prompt\\\\nconst longSuffix = `\\\\n longSuffix content\\\\n longSuffix content\\\\n longSuffix content\\\\n longSuffix content\\\\n longSuffix content\\\\n longSuffix content\\\\n longSuffix content\\\\n`\\\\n\\\",\\\"speaker\\\":\\\"human\\\",\\\"cache_control\\\":false},{\\\"text\\\":\\\"Ok.\\\",\\\"speaker\\\":\\\"assistant\\\"},{\\\"text\\\":\\\"This is part of the file: src/TestClass.ts\\\\n\\\\nThe user has the following code in their selection:\\\\n<SELECTEDCODE7662> public functionName() {\\\\n if (this.shouldGreet) {\\\\n console.log(/* CURSOR */ 'Hello World!')\\\\n }\\\\n }\\\\n</SELECTEDCODE7662>\\\\n\\\\nThe user wants you to generate documentation for the selected code by following their instructions.\\\\nProvide your generat
src/document-code.test.ts > Document Code > commands/document (Function within a property): agent/src/TestClient.ts#L594
Error: Task reached terminal state before being applied { "id": "mileht", "state": "Error", "error": { "message": "[Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`.\n{\n \"url\": \"https://sourcegraph.com/.api/completions/stream?api-version=2&client-name=document-code&client-version=v1\",\n \"method\": \"POST\",\n \"headers\": {\n \"accept-encoding\": \"gzip;q=0\",\n \"authorization\": \"token REDACTED_fc324d3667e841181b0779375f26dedc911d26b303d23b29b1a2d7ee63dc77eb\",\n \"connection\": \"keep-alive\",\n \"content-type\": \"application/json\",\n \"traceparent\": \"00-e6532b548c8a7d1eaf018d8beaa9b192-cef6b69e09407bfc-01\",\n \"user-agent\": \"document-code/v1 (Node.js v18.20.6)\",\n \"x-requested-with\": \"document-code v1\",\n \"x-sourcegraph-interaction-id\": \"\",\n \"host\": \"sourcegraph.com\"\n },\n \"body\": \"{\\\"temperature\\\":0,\\\"topK\\\":-1,\\\"topP\\\":-1,\\\"model\\\":\\\"anthropic/claude-3-haiku-20240307\\\",\\\"stopSequences\\\":[\\\"</CODE5711>\\\",\\\" function recordLog() {\\\"],\\\"maxTokensToSample\\\":4000,\\\"messages\\\":[{\\\"text\\\":\\\"You are Cody, an AI coding assistant from Sourcegraph.\\\\n\\\\n- You are an AI programming assistant who is an expert in updating code to meet given instructions.\\\\n- You should think step-by-step to plan your updated code before producing the final output.\\\\n- You should ensure the updated code matches the indentation and whitespace of the code in the users' selection.\\\\n- 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.\\\\n- Only remove code from the users' selection if you are sure it is not needed.\\\\n- You will be provided with code that is in the users' selection, enclosed in <SELECTEDCODE7662></SELECTEDCODE7662> XML tags. You must use this code to help you plan your updated code.\\\\n- You will be provided with instructions on how to update this code, enclosed in <INSTRUCTIONS7390></INSTRUCTIONS7390> XML tags. You must follow these instructions carefully and to the letter.\\\\n- Only enclose your response in <CODE5711></CODE5711> XML tags. Do use any other XML tags unless they are part of the generated code.\\\\n- Do not provide any additional commentary about the changes you made. Only respond with the generated code.\\\",\\\"speaker\\\":\\\"system\\\"},{\\\"text\\\":\\\"Codebase context from file path src/TestLogger.ts: Codebase context from file src/TestLogger.ts:\\\\nconst foo = 42\\\\nexport const TestLogger = {\\\\n startLogging: () => {\\\\n // Do some stuff\\\\n\\\\n\\\",\\\"speaker\\\":\\\"human\\\",\\\"cache_control\\\":false},{\\\"text\\\":\\\"Ok.\\\",\\\"speaker\\\":\\\"assistant\\\"},{\\\"text\\\":\\\"Codebase context from file path src/TestLogger.ts: Codebase context from file src/TestLogger.ts:\\\\n\\\\n recordLog()\\\\n },\\\\n}\\\\n\\\",\\\"speaker\\\":\\\"human\\\",\\\"cache_control\\\":false},{\\\"text\\\":\\\"Ok.\\\",\\\"speaker\\\":\\\"assistant\\\"},{\\\"text\\\":\\\"This is part of the file: src/TestLogger.ts\\\\n\\\\nThe user has the following code in their selection:\\\\n<SELECTEDCODE7662> function recordLog() {\\\\n console.log(/* CURSOR */ 'Recording the log')\\\\n }\\\\n</SELECTEDCODE7662>\\\\n\\\\nThe user wants you to generate documentation for the selected code by following their instructions.\\\\nProvide your generated documentation using the following instructions:\\\\n<INSTRUCTIONS7390>\\\\nWrite a brief documentation comment for the selected code. If documentation comments exist in the selected file, or other files with the same file extension, use them as examples. Pay attention to the scope of the selected code (e.g. exported function/API vs implementation detail in a function), and use the idiomatic style for that type of code scope. Only generate the documentation for the selected code, do not generate the code. Do
src/document-code.test.ts > Document Code > commands/document (nested test case): agent/src/TestClient.ts#L594
Error: Task reached terminal state before being applied { "id": "mileir", "state": "Error", "error": { "message": "[Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`.\n{\n \"url\": \"https://sourcegraph.com/.api/completions/stream?api-version=2&client-name=document-code&client-version=v1\",\n \"method\": \"POST\",\n \"headers\": {\n \"accept-encoding\": \"gzip;q=0\",\n \"authorization\": \"token REDACTED_fc324d3667e841181b0779375f26dedc911d26b303d23b29b1a2d7ee63dc77eb\",\n \"connection\": \"keep-alive\",\n \"content-type\": \"application/json\",\n \"traceparent\": \"00-ba408408f0f980227942da67f428b8fb-bb768477a13db509-01\",\n \"user-agent\": \"document-code/v1 (Node.js v18.20.6)\",\n \"x-requested-with\": \"document-code v1\",\n \"x-sourcegraph-interaction-id\": \"\",\n \"host\": \"sourcegraph.com\"\n },\n \"body\": \"{\\\"temperature\\\":0,\\\"topK\\\":-1,\\\"topP\\\":-1,\\\"model\\\":\\\"anthropic/claude-3-haiku-20240307\\\",\\\"stopSequences\\\":[\\\"</CODE5711>\\\",\\\" const startTime = performance.now(/* CURSOR */)\\\"],\\\"maxTokensToSample\\\":4000,\\\"messages\\\":[{\\\"text\\\":\\\"You are Cody, an AI coding assistant from Sourcegraph.\\\\n\\\\n- You are an AI programming assistant who is an expert in updating code to meet given instructions.\\\\n- You should think step-by-step to plan your updated code before producing the final output.\\\\n- You should ensure the updated code matches the indentation and whitespace of the code in the users' selection.\\\\n- 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.\\\\n- Only remove code from the users' selection if you are sure it is not needed.\\\\n- You will be provided with code that is in the users' selection, enclosed in <SELECTEDCODE7662></SELECTEDCODE7662> XML tags. You must use this code to help you plan your updated code.\\\\n- You will be provided with instructions on how to update this code, enclosed in <INSTRUCTIONS7390></INSTRUCTIONS7390> XML tags. You must follow these instructions carefully and to the letter.\\\\n- Only enclose your response in <CODE5711></CODE5711> XML tags. Do use any other XML tags unless they are part of the generated code.\\\\n- Do not provide any additional commentary about the changes you made. Only respond with the generated code.\\\",\\\"speaker\\\":\\\"system\\\"},{\\\"text\\\":\\\"Codebase context from file path src/example.test.ts: Codebase context from file src/example.test.ts:\\\\nimport { expect } from 'vitest'\\\\nimport { it } from 'vitest'\\\\nimport { describe } from 'vitest'\\\\n\\\\ndescribe('test block', () => {\\\\n it('does 1', () => {\\\\n expect(true).toBe(true)\\\\n })\\\\n\\\\n it('does 2', () => {\\\\n expect(true).toBe(true)\\\\n })\\\\n\\\\n it('does something else', () => {\\\\n // This line will error due to incorrect usage of `performance.now`\\\\n\\\",\\\"speaker\\\":\\\"human\\\",\\\"cache_control\\\":false},{\\\"text\\\":\\\"Ok.\\\",\\\"speaker\\\":\\\"assistant\\\"},{\\\"text\\\":\\\"Codebase context from file path src/example.test.ts: Codebase context from file src/example.test.ts:\\\\n })\\\\n})\\\\n\\\",\\\"speaker\\\":\\\"human\\\",\\\"cache_control\\\":false},{\\\"text\\\":\\\"Ok.\\\",\\\"speaker\\\":\\\"assistant\\\"},{\\\"text\\\":\\\"This is part of the file: src/example.test.ts\\\\n\\\\nThe user has the following code in their selection:\\\\n<SELECTEDCODE7662> const startTime = performance.now(/* CURSOR */)\\\\n</SELECTEDCODE7662>\\\\n\\\\nThe user wants you to generate documentation for the selected code by following their instructions.\\\\nProvide your generated documentation using the following instructions:\\\\n<INSTRUCTIONS7390>\\\\nWrite a brief documentation comment for the selected code. If documentation comments exist in the selected file, or other files with the same file extension, use them
src/edit.test.ts > Edit: agent/src/TestClient.ts#L890
Error: PollyError: [Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`.. To fix this problem, run the following commands to update the HTTP recordings: source agent/scripts/export-cody-http-recording-tokens.sh pnpm update-agent-recordings ❯ TestClient.shutdownAndExit src/TestClient.ts:890:23 ❯ TestClient.afterAll src/TestClient.ts:877:9 ❯ src/edit.test.ts:27:9
test-unit (windows, 20)
The job running on runner GitHub Actions 15 has exceeded the maximum execution time of 10 minutes.
test-unit (windows, 20)
The operation was canceled.
Slow Test: vscode/auth.test.ts#L1
vscode/auth.test.ts took 34.1s
Slow Test: vscode/attribution.test.ts#L1
vscode/attribution.test.ts took 24.6s
Slow Test: vscode/initial-context.test.ts#L1
vscode/initial-context.test.ts took 56.3s
Slow Test: vscode/support-menu-items.test.ts#L1
vscode/support-menu-items.test.ts took 21.8s
Slow Test: vscode/chat-atFile.test.ts#L1
vscode/chat-atFile.test.ts took 1.5m
Slow Test: vscode/chat-input.test.ts#L1
vscode/chat-input.test.ts took 31.6s
Slow Test: vscode/chat-history.test.ts#L1
vscode/chat-history.test.ts took 24.0s
Slow Test: vscode/command-core.test.ts#L1
vscode/command-core.test.ts took 46.3s
Slow Test: vscode/code-actions.test.ts#L1
vscode/code-actions.test.ts took 36.5s
Slow Test: vscode/chat-rateLimit.test.ts#L1
vscode/chat-rateLimit.test.ts took 35.2s
Slow Test: vscode/chat-messages.test.ts#L1
vscode/chat-messages.test.ts took 21.4s
Slow Test: vscode/command-custom.test.ts#L1
vscode/command-custom.test.ts took 1.3m
Slow Test: vscode/command-edit.test.ts#L1
vscode/command-edit.test.ts took 47.1s
Slow Test: vscode/enterprise-cody-ignore.test.ts#L1
vscode/enterprise-cody-ignore.test.ts took 19.0s
🎭 Playwright Run Summary
8 skipped 5 passed (1.0m)
🎭 Playwright Run Summary
4 skipped 7 passed (1.6m)
🎭 Playwright Run Summary
3 skipped 9 passed (2.5m)
🎭 Playwright Run Summary
2 skipped 10 passed (2.6m)
🎭 Playwright Run Summary
10 passed (2.9m)