Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CON-267] On an unsaved file, Continue sends an empty query, resulting in bad completions #1293

Open
3 tasks done
coder543 opened this issue May 16, 2024 · 5 comments
Open
3 tasks done
Assignees
Labels
area:autocomplete Relates to the auto complete feature ide:vscode Relates specifically to VS Code extension kind:bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@coder543
Copy link

coder543 commented May 16, 2024

Before submitting your bug report

Relevant environment info

- OS: Linux
- Continue: latest published version
- IDE: VS Code

Description

I am editing a new, unsaved file. It has TypeScript code in it, and VS Code is in TypeScript mode. However, the completions are very bad and always the same. I checked the Continue "output" window, and I can see why.

It's not even trying to send content from the current file. As soon as I saved the file to disk, it seemed to start working normally.

I'm not sure if it is relevant, but I'm using VS Code over a "Remote - SSH" session.

To reproduce

No response

Log output

==========================================================================
==========================================================================
Settings:
contextLength: 4096
model: codegemma:7b-code-q8_0
maxTokens: 1024
stop: <|fim_prefix|>,<|fim_suffix|>,<|fim_middle|>,<|file_separator|>,<|fim_prefix|>,<|fim_suffix|>,<|fim_middle|>,<|file_separator|>,<end_of_turn>,<eos>,

,

,/src/,#- coding: utf-8,```,
function,
class,
module,
export,
import
temperature: 0.01
raw: true

############################################

<|fim_prefix|><|fim_suffix|><|fim_middle|>==========================================================================
==========================================================================
Settings:
contextLength: 4096
model: codegemma:7b-code-q8_0
maxTokens: 1024
stop: <|fim_prefix|>,<|fim_suffix|>,<|fim_middle|>,<|file_separator|>,<|fim_prefix|>,<|fim_suffix|>,<|fim_middle|>,<|file_separator|>,<end_of_turn>,<eos>,

,

,/src/,#- coding: utf-8,```,
function,
class,
module,
export,
import
temperature: 0.01
raw: true

############################################

<|fim_prefix|>
<|fim_suffix|>
<|fim_middle|>==========================================================================
==========================================================================
Completion:

import { Component, OnInit } from '@angular/core';

CON-267

@coder543 coder543 added the bug label May 16, 2024
@sestinj
Copy link
Contributor

sestinj commented May 20, 2024

Ah yes the remote part seems like the important one, thanks for mentioning that detail. I know i'd fixed a similar bug recently for non-remote, but I'll take a second look at this. Were you on the latest pre-release version of the extension?

@coder543
Copy link
Author

I was just using whatever is in the VS Code extension store. I don't think it was a pre-release version.

@dosubot dosubot bot added area:autocomplete Relates to the auto complete feature kind:bug Indicates an unexpected problem or unintended behavior ide:vscode Relates specifically to VS Code extension and removed bug labels Jul 8, 2024
@knilink
Copy link

knilink commented Jul 17, 2024

same issue when editing a file outside of the working dir

@AndrewRocky
Copy link

Similar issue, but instead it puts in prompt the first suggestion from language server's suggestions. (when editing an unsaved untitled file with Ctrl+N. Checked in both 'Python' and 'Shell Script' Language Modes.)
For example, when writing import pan it will get 'pandas' from code suggestions and create prompt <|fim▁begin|>pandas<|fim▁hole|><|fim▁end|>

BTW, I've also seen this prompt on the server - looks suspiciously like a file (tab?) name. Maybe it will help you to debug this issue:

<|fim▁begin|>// Untitled-1
<|fim▁hole|><|fim▁end|>

IDE: VSCode 1.92.2
Environment: Windows 11 remoted into WSL2
Continue: latest published version

@sestinj sestinj added this to the sestinj milestone Sep 1, 2024
@sestinj sestinj changed the title On an unsaved file, Continue sends an empty query, resulting in bad completions [CON-267] On an unsaved file, Continue sends an empty query, resulting in bad completions Sep 1, 2024
@AnnoyingTechnology
Copy link
Contributor

AnnoyingTechnology commented Dec 16, 2024

Same issue with 0.9.244 with a non-saved file (Qwen 2.5 1.5B via lmstudio, Linux).

The behavior is so erratic I cannot make sense of it.

Here are multiple suggestions, with the associated unsaved file, and prompt received by the model.

no code included
Screenshot From 2024-12-16 09-24-57

no code included
Screenshot From 2024-12-16 09-25-16

below only aws is included, which matches a previous comment stating

but instead it puts in prompt the first suggestion from language server's suggestions

Screenshot From 2024-12-16 09-25-27

no code included again
Screenshot From 2024-12-16 09-25-33

For comparison, with a saved file :

Screenshot From 2024-12-16 09-28-44

Screenshot From 2024-12-16 09-28-57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:autocomplete Relates to the auto complete feature ide:vscode Relates specifically to VS Code extension kind:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

7 participants