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
297 stars 28 forks source link

@workspace agent fails with `Without the actual implementation...` yet it HAS the implementation #679

Open diablodale opened 7 months ago

diablodale commented 7 months ago

typed @workspace analyze function cropCenterResize2() for correctness, clarity, and simplify when possible copilot's response after collecting 9 files including the entire implementation for cropCenterResize2() in one of the 9 files is...

Used 9 references
...
Without the actual implementation of the cropCenterResize2() function, it's impossible for me to analyze it for correctness, clarity, or potential simplifications. The function signature you provided suggests that it's a method...

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

copilot v1.143.601
copilot chat v0.11.1

Repro

  1. type @workspace analyze function cropCenterResize2() for correctness, clarity, and simplify when possible into copilot chat window

Result

Used 9 references
...
Without the actual implementation of the cropCenterResize2() function, it's impossible for me to analyze it for correctness, clarity, or potential simplifications. The function signature you provided suggests that it's a method...

Expected

To provide the analysis of the function and not complain that it doesn't have the actual implementation.

The workspace agent listed in its reply both the header and the cpp of the declaration and definition of cropCenterResize2. Therefore, it has full view on all the code.

Notes

I found that if I change my inquiry so that it doesn't have the () after the function name, then the reply is more reasonable. Specifically, using @workspace analyze function cropCenterResize2 for correctness, clarity, and simplify when possible resulted in a workable reply.

I suspect that some part of the end-to-end on this is failing with me using () after the function name. It seems to be taking it very literally and not finding a function signature () which is true...the signature actually has 4 parameters. I think it would be better in cases like this that copilot realize that...like misspellings...that I didn't get the signature in my inquiry exactly right and that using () is a casual way to indicate a function and not necessarily the explicit exact signature (which technically is incomplete since even if I listed the 4 params I still wouldn't list the needed modifiers like const, noexcept, etc...)

joshistoast commented 7 months ago

Seeing this issue also, Kinda defeats the purpose of using @workspace lol

mjbvz commented 7 months ago

Please give this a try in the next insiders release of the vscode-chat extension. There was a bug that caused functions names of that form (name + digit + ()) not to get resolved correctly

Going forward you should be able to use: cropCenterResize2(), cropCenterResize2, cropCenterResize2(arg1, arg2, ...), or even just cropCenterResize

amunger commented 5 months ago

I'm not having any luck with a similar query, even if I highlight the entire function implementation. From the vscode-jupyter repo

image