microsoft / vscode-copilot-release

Feedback on GitHub Copilot Chat UX in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat
Creative Commons Attribution 4.0 International
328 stars 31 forks source link

can't provide a fix because the line xxx ... not provided YET the @workspace writes above that it included that exact line #706

Open diablodale opened 10 months ago

diablodale commented 10 months ago

copilot self-conflicting error that it can't provide a fix because it doesn't have the line...yet it gathered that exact same reference

image

Setup

Version: 1.85.1 (system setup) Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2 Date: 2023-12-13T09:49:37.021Z Electron: 25.9.7 ElectronBuildId: 25551756 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.22631

Github Copilot: v1.143.601 Github Copilot chat: v0.11.1

Repro

  1. open project
  2. compile project that has an error on a line
  3. ask the workspace agent to fix the error on that specific line with @workspace how fix line 831

I was asking less to get help... ...and more to be inquisitive on how copilot might suggest a change.

Result

Copilot failed to provide any useful answer. And copilot was self-conflicting by complaining it doesn't have needed context yet wrote specifically it gathered that context.

Used 1 reference
    k4a.hpp:831

I'm sorry, but I can't provide a fix because the line 831 from the file k4a.hpp is not provided in the workspace information. The line you've provided, reinterpret_cast, is incomplete and without the full context of the code, it's impossible to provide a specific solution.

Please provide the full line of code and the error message you're seeing, and I'll be able to help you fix it.

It complains it doesn't have...the thing it gathered as a reference.

Expected

No complains. And some dialog about the pro/cons of reinterpret_cast

Logs

[INFO] [code-referencing] [2023-12-28T15:58:03.106Z] Public code references are enabled.
[INFO] [default] [2023-12-28T16:17:11.116Z] [fetchCompletions] engine https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex
[INFO] [default] [2023-12-28T16:17:11.728Z] request.response: [https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex/completions] took 610 ms
[INFO] [streamChoices] [2023-12-28T16:17:11.730Z] solution 0 returned. finish reason: [stop]
[INFO] [streamChoices] [2023-12-28T16:17:11.740Z] request done: headerRequestId: [698e3504-d6ec-4360-9915-8595b10f0660] model deployment ID: [w9bda9c6b4b91]
[INFO] [default] [2023-12-28T16:17:18.900Z] [fetchCompletions] engine https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex
[INFO] [default] [2023-12-28T16:17:19.304Z] request.response: [https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex/completions] took 403 ms
[INFO] [streamChoices] [2023-12-28T16:17:19.306Z] solution 0 returned. finish reason: [stop]
[INFO] [streamChoices] [2023-12-28T16:17:19.306Z] request done: headerRequestId: [82cdb115-9b3d-42b1-bbb2-1903fcc5bcf3] model deployment ID: [w9bda9c6b4b91]
[INFO] [default] [2023-12-28T16:17:26.323Z] [fetchCompletions] engine https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex
[INFO] [default] [2023-12-28T16:17:31.362Z] [fetchCompletions] engine https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex
[INFO] [default] [2023-12-28T16:17:31.797Z] request.response: [https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex/completions] took 435 ms
[INFO] [streamChoices] [2023-12-28T16:17:31.798Z] solution 0 returned. finish reason: [stop]
[INFO] [streamChoices] [2023-12-28T16:17:31.801Z] request done: headerRequestId: [eefdc20e-401e-43e3-9cda-1a498a1bf160] model deployment ID: [w9bda9c6b4b91]
[INFO] [code-referencing] [2023-12-28T16:23:03.458Z] Public code references are enabled.
2023-12-28 16:58:03.031 [info] [auth] Logged in as diablodale
2023-12-28 16:58:03.033 [info] [chat] copilot token chat_enabled: true
2023-12-28 16:58:03.033 [info] [auth] Got Copilot token for diablodale
2023-12-28 17:19:32.142 [info] [chat fetch] engine https://api.githubcopilot.com/chat
2023-12-28 17:19:32.142 [info] [chat fetch] modelMaxTokenWindow 4096
2023-12-28 17:19:32.142 [info] [chat fetch] chat model gpt-4
2023-12-28 17:19:34.466 [info] [chat fetch] request.response: [https://api.githubcopilot.com/chat/completions], took 2323 ms
2023-12-28 17:19:38.975 [info] [streamMessages] message 0 returned. finish reason: [stop]
2023-12-28 17:19:38.976 [info] [streamChoices] request done: requestId: [92a7b79c-7f2c-41c3-8348-3f8bfa851f1b] responseId: [b28bff72-668f-4dfe-b7ef-e56bf2b02958] model deployment ID: [x8d3c95500d67]
2023-12-28 17:19:38.982 [info] [chat fetch] engine https://api.githubcopilot.com/chat
2023-12-28 17:19:38.982 [info] [chat fetch] modelMaxTokenWindow 8192
2023-12-28 17:19:38.982 [info] [chat fetch] chat model gpt-3.5-turbo
2023-12-28 17:19:39.482 [info] [chat fetch] request.response: [https://api.githubcopilot.com/chat/completions], took 500 ms
2023-12-28 17:19:39.483 [info] [streamMessages] message 0 returned. finish reason: [stop]
2023-12-28 17:19:39.483 [info] [streamChoices] request done: requestId: [440fde83-8d13-49e9-85ec-51f12532396b] responseId: [97f35523-504f-41dc-87a8-789d411db8da] model deployment ID: [x338b9c029b38]
2023-12-28 17:19:54.196 [info] [chat fetch] engine https://api.githubcopilot.com/chat
2023-12-28 17:19:54.196 [info] [chat fetch] modelMaxTokenWindow 4096
2023-12-28 17:19:54.196 [info] [chat fetch] chat model gpt-4
2023-12-28 17:19:55.766 [info] [chat fetch] request.response: [https://api.githubcopilot.com/chat/completions], took 1569 ms
2023-12-28 17:19:55.768 [info] [streamMessages] message 0 returned. finish reason: [stop]
2023-12-28 17:19:55.769 [info] [streamChoices] request done: requestId: [41724518-7862-45c1-a210-b95ed6f3db7b] responseId: [a94cb517-af46-40cc-a8ae-d969c56e9425] model deployment ID: [x8d3c95500d67]
2023-12-28 17:20:00.014 [info] [chat fetch] engine https://api.githubcopilot.com/chat
2023-12-28 17:20:00.014 [info] [chat fetch] modelMaxTokenWindow 4096
2023-12-28 17:20:00.014 [info] [chat fetch] chat model gpt-4
2023-12-28 17:20:01.635 [info] [chat fetch] request.response: [https://api.githubcopilot.com/chat/completions], took 1621 ms
2023-12-28 17:20:03.266 [info] [streamMessages] message 0 returned. finish reason: [stop]
2023-12-28 17:20:03.267 [info] [streamChoices] request done: requestId: [b631dbda-df22-49d7-9dd6-e123e712c09e] responseId: [5e50acf9-494c-4c5f-bb4f-f9f5652f2456] model deployment ID: [x8d3c95500d67]
2023-12-28 17:20:03.278 [info] [chat fetch] engine https://api.githubcopilot.com/chat
2023-12-28 17:20:03.278 [info] [chat fetch] modelMaxTokenWindow 8192
2023-12-28 17:20:03.278 [info] [chat fetch] chat model gpt-3.5-turbo
2023-12-28 17:20:03.839 [info] [chat fetch] request.response: [https://api.githubcopilot.com/chat/completions], took 561 ms
2023-12-28 17:20:03.840 [info] [streamMessages] message 0 returned. finish reason: [stop]
2023-12-28 17:20:03.840 [info] [streamChoices] request done: requestId: [891d691a-8079-437a-a402-9c93d207c3d1] responseId: [85aafbbe-d0ac-42a3-96fa-e279eb9b4c49] model deployment ID: [x338b9c029b38]
roblourens commented 10 months ago

Getting the LLM to understand line numbers is hard

diablodale commented 10 months ago

Got it. 🤔Hmmm, my ~sandwich engineering~ input tends to be very commanding, specific, no articles, etc. -- a habit I developed from search engines and other tools that prefer specifics/params and toss noise terms.

More intention detail: I wanted to direct copilot to this specific issue at this specific code location while at the same time copilot to consider the broader code block. Like giving a visual centerpoint within a region that would indicate the most important thing to "work on". Not unlike visual tools which delete clicked objects in images and blur into surrounding areas. Using a line number was my instinct/habit as that line number appeared in the compiler errors in the cmake build output window.

This line 831 code was from a 3rd party library, who forked from Microsoft. It is using reinterpret_cast to switch a pointer type...which I'm 99% sure it or a c-cast is needed. Wanted to see if copilot might surprise me and suggest an innovative/broader rework of the code block, intead of a pragma suppress one line above.

roblourens commented 9 months ago

I don't disagree, you should be able to say something like that, but for now you may have better luck if you just say "this code" or something like that.