Invalid Gap
- VS Code Version: 1.88.0-insider (Universal)
- OS Version: Soma 14.4 (23E214)
- Logs:
Steps to Reproduce:
- highlight a block of text
- use the inline chat feature
results invalid Gap
Expected results: Code suggestions
I just started using this feature last Friday and it stopped working Monday.
@salientknight Can you consistently reproduce this error? What programming language have you used? This is caused by some AST processing we are doing, so it might be reproducible only with certain code structure.
for me its on every instance of inline chat
language used is dart
on vscode
Same issue here since today, using PowerShell in VS Code. 'Invalid gap' error appears both when selecting a segment of code and while not having anything selected.
same here, "invalid gap" in inline chat in solidity, 100% reproducible.
I have the same error "invalid gap" trying to get any response in php when asking to generate code. It does /explain just fine.
I opened a separate project written in C++, asked Co-Pilot to generate code, it did fine. Went back into the php project, it was able to generate code for me again.
🤷♂️
Same problem. PHP. For example I mark some code, pressed ctrl+i to ask copilot something... returns invalid gap error only.
Just like the screenshot above from skwie,
is this solved for anyone
is this solved for anyone
Updated plugins and removed some, restarted everything, so for all good.
is this solved for anyone
Updated plugins and removed some, restarted everything, so for all good.
which OS are you using
我的问题也是一样的,请问各位解决了吗?
@alexdima yes I get this error 100% of the time when trying to use the inline based chat feature
Got this error today
As a workaround, I switched to Preview Mode in the config, and it's generating results again.
It must be an issue with inlining live results (or three million other possibilities)
@alexdima yes I get this error 100% of the time when trying to use the inline based chat feature
Same here
Same here, microsoft's team should fix this ASAP.
With Googles Copilot here now and that Cursor IO, wow tired of paying for stuff like this
same here, qml and python
As a workaround, I switched to Preview Mode in the config, and it's generating results again.
It must be an issue with inlining live results (or three million other possibilities)
![]()
Thanks but that did not help me, I get exactly the same problem even after rebooting. Cursor switched!
I have found a temporary fix, nothing else anyone has suggested has worked, however it seems typing whatever it is you want to query and then doing /fix retains the message from before... Odd but it works
/fix method mentioned above solved the problem for me.
Also having this problem anytime I ask Copilot for inline fixes with PHP
Same issue as other people and I am using nuxt 3 / vue 3
/fixmethod mentioned above solved the problem for me.
Not sure how you are using this /fix
/fixmethod mentioned above solved the problem for me.Not sure how you are using this /fix
Simply writing your request, and then after getting Invalid Gap running /fix.
Also having this problem anytime I ask Copilot for inline fixes with PHP
Started getting the same today. Also with PHP (it was working fine and then just decided to start giving me "Invalid gap" with each response (not sure it's related to a change in my code or something on the CoPilot end - it seems like it should work based on how I have been using it...)
Started getting this yesterday when doing HTML.
Diagnostics: `## Copilot
- Version: 1.192.0
- Build: prod
- Editor: vscode/1.89.0
Environment
- http_proxy: n/a
- https_proxy: n/a
- no_proxy: n/a
- SSL_CERT_FILE: n/a
- SSL_CERT_DIR: n/a
- OPENSSL_CONF: n/a
Feature Flags
- Send Restricted Telemetry: disabled
- Chat: enabled
Node setup
- Number of root certificates: 141
- Operating system: Darwin
- Operating system version: 23.3.0
- Operating system architecture: arm64
- NODE_OPTIONS: n/a
- NODE_EXTRA_CA_CERTS: n/a
- NODE_TLS_REJECT_UNAUTHORIZED: n/a
- tls default min version: TLSv1.2
- tls default max version: TLSv1.3
Network Configuration
- Proxy host: n/a
- Proxy port: n/a
- Kerberos SPN: n/a
- Reject unauthorized: disabled
- Fetcher: HelixFetcher
Reachability
- github.com: HTTP 200
- copilot-proxy.githubusercontent.com: HTTP 200
- api.githubcopilot.com: HTTP 200
- default.exp-tas.com: HTTP 200
VS Code Configuration
- HTTP proxy:
- HTTP proxy authentication: n/a
- Proxy Strict SSL: true
- Extension HTTP proxy support: override
Extensions
- Is
win-cainstalled?: false - Is
mac-cainstalled?: false
Authentication
- GitHub username: Klievan`
Logs when receiving "Invalid gap"
2024-05-16 14:16:21.782 [info] [streamChoices] request done: requestId: [bc41d69e-ea02-4e92-93b9-f5b8113e9db3] model deployment ID: [z4dff5e5d11fc] 2024-05-16 14:18:21.042 [info] [chat fetch] url https://api.githubcopilot.com/chat/completions 2024-05-16 14:18:21.042 [info] [chat fetch] modelMaxPromptTokens 7168 2024-05-16 14:18:21.042 [info] [chat fetch] modelMaxResponseTokens 4096 2024-05-16 14:18:21.042 [info] [chat fetch] chat model gpt-3.5-turbo 2024-05-16 14:18:22.013 [info] [chat fetch] request.response: [https://api.githubcopilot.com/chat/completions], took 969 ms 2024-05-16 14:18:22.016 [info] [streamMessages] message 0 returned. finish reason: [stop] 2024-05-16 14:18:22.018 [info] [streamChoices] request done: requestId: [f857958d-a757-4d62-bcf2-9d23d152ae48] model deployment ID: [z4dff5e5d11fc] 2024-05-16 14:22:04.839 [info] [chat fetch] url https://api.githubcopilot.com/chat/completions 2024-05-16 14:22:04.839 [info] [chat fetch] modelMaxPromptTokens 7168 2024-05-16 14:22:04.839 [info] [chat fetch] modelMaxResponseTokens 4096 2024-05-16 14:22:04.839 [info] [chat fetch] chat model gpt-3.5-turbo 2024-05-16 14:22:06.071 [info] [chat fetch] request.response: [https://api.githubcopilot.com/chat/completions], took 1230 ms 2024-05-16 14:22:06.072 [info] [streamMessages] message 0 returned. finish reason: [stop] 2024-05-16 14:22:06.073 [info] [streamChoices] request done: requestId: [aea7ade9-2636-44e7-befa-502c00ad0d9c] model deployment ID: [z4dff5e5d11fc]
Logs when doing /fix (which does work)
2024-05-16 14:22:06.073 [info] [streamChoices] request done: requestId: [aea7ade9-2636-44e7-befa-502c00ad0d9c] model deployment ID: [z4dff5e5d11fc] 2024-05-16 14:23:36.471 [info] [chat fetch] url https://api.githubcopilot.com/chat/completions 2024-05-16 14:23:36.472 [info] [chat fetch] modelMaxPromptTokens 7168 2024-05-16 14:23:36.472 [info] [chat fetch] modelMaxResponseTokens 4096 2024-05-16 14:23:36.472 [info] [chat fetch] chat model gpt-3.5-turbo 2024-05-16 14:23:37.104 [info] [chat fetch] request.response: [https://api.githubcopilot.com/chat/completions], took 631 ms 2024-05-16 14:23:40.861 [info] [streamMessages] message 0 returned. finish reason: [client-trimmed] 2024-05-16 14:23:40.862 [info] [streamChoices] request done: requestId: [160dfc89-55f5-41bd-ad7c-a1c51fc8d015] model deployment ID: [z4dff5e5d11fc] 2024-05-16 14:23:40.868 [info] [editGeneration] Diff metrics: { "diffToEntireScore": { "equalCharCount": 1046, "originalCharCount": 2574, "modifiedCharCount": 1464, "originalCharRatio": 0.4063714063714064, "modifiedCharRatio": 0.7144808743169399 }, "diffToRangeScore": { "equalCharCount": 0, "originalCharCount": 0, "modifiedCharCount": 1464, "originalCharRatio": 0, "modifiedCharRatio": 0 } } 2024-05-16 14:23:40.868 [info] [editGeneration] (case 3) Replacing entire code
This reproduces in a .txt file with the content:
if(something) {
console.log(`something`)
} else {
console.log(`!something`);
}
console.log(`a line`);
I got the same error when I input "/@workspace /tests" for my C code. I want to generate test case for specified functions. "@workspace generate test case " and "/tests generate test case" is OK to me.
A fix is now available in the Pre-Release version of the Copilot Chat Extension (v0.16.2024051701 (pre-release)). This is compatible with VS Code Insiders. We plan to make a fix available to the Release version on Monday.