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

Autocomplete suggestion does not display the return result of the model #4218

Open
3 tasks done
759325100 opened this issue Feb 18, 2025 · 1 comment
Open
3 tasks done
Assignees
Labels
area:autocomplete Relates to the auto complete feature kind:bug Indicates an unexpected problem or unintended behavior "needs-triage"

Comments

@759325100
Copy link

Before submitting your bug report

Relevant environment info

- OS:macOs
- Continue version:v0.9.268
- IDE version:1.97.0
- Model: Qwen2.5-Coder-32B-Instruct-GPTQ-Int4
- config.json:
  
{
"models": [
    {
      "title": "Qwen2.5",
      "model": "Qwen2.5-Coder-32B-Instruct-GPTQ-Int4",
      "provider": "openai",
      "apiBase": "http://local-model:port/v1",
      "apiKey": "qcc_code_ai"
    }
  ],
  "tabAutocompleteModel": {
    "title": "vllm-completion",
    "provider": "openai",
    "model": "Qwen2.5-Coder-32B-Instruct-GPTQ-Int4",
    "apiBase": "http://local-model:port/v1",
    "apiKey": "qcc_code_ai"
  },
}

Description

Use the automatic completion function to write code. In special cases, the problem will occur that the model responds to the content but the cursor does not display new content.

I tried upgrading the plugin from 0.88.0 to 0.9.268 and the problem remains

I suspect the issue may be related to something specific to the model returns

The automatic completion function continues to work under the tab key. When the following code line is encountered, the subsequent return will not be displayed.
eg.:

Image

To reproduce

1.Create nginx-plugin.c file
2.Write comments "// 用C语言编写一个基本的nginx插件用于拦截请求,并在header中添加qcc=123456"
3.Use tabs all the way
4.After prompting N rows, stop displaying new content returned by the model
5.Press enter key again where it stopped, the model returns again, but the automatic completion still does not display

Image

Log output

##### Prompt #####
<|fim_prefix|>// Path: nginx-plugin.c
// 用C语言编写一个基本的nginx插件用于拦截请求,并在header中添加qcc=123456
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
static ngx_int_t ngx_http_add_header_handler(ngx_http_request_t *r)
{
  ngx_table_elt_t *h;
  h = ngx_list_push(&r->headers_out.headers);
  if (h == NULL)
  {
    return NGX_ERROR;
  }
  h->hash = 1;
  ngx_str_set(&h->key, "qcc");
  ngx_str_set(&h->value, "123456");
  return NGX_OK;
}
static ngx_int_t ngx_http_add_header_init(ngx_conf_t *cf)
{
  ngx_http_handler_pt *h;
  h = ngx_array_push(&cf->cycle->modules->handlers);
  if (h == NULL)
  {
    return NGX_ERROR;
  }
  *h = ngx_http_add_header_handler;
  return NGX_OK;
}
static ngx_command_t ngx_http_add_header_commands[] = {
    ngx_null_command};
static ngx_http_module_t ngx_http_add_header_module_ctx = {
    NULL,                     /* preconfiguration */
    ngx_http_add_header_init, /* postconfiguration */
    NULL,                     /* create main configuration */
    <|fim_suffix|>

<|fim_middle|>==========================================================================
==========================================================================
Completion:
NULL,                     /* init main configuration */
    NULL,                     /* create server configuration */
    NULL,                     /* merge server configuration */
    NULL,                     /* create location configuration */
    NULL                      /* merge location configuration */
};
ngx_module_t ngx_http_add_header_module = {
    NGX_MODULE_V1,
    &ngx_http_add_header_module_ctx, /* module context */
    ngx_http_add_header_commands,    /* module directives */
    NGX_HTTP_MODULE,                 /* module type */
    NULL,                            /* init master */
    NULL,                            /* init module */
    NULL,                            /* init process */
    NULL,                            /* init thread */
    NULL,                            /* exit thread */
    NULL,                            /* exit process */
    NULL,                            /* exit master */
    NGX_MODULE_V1_PADDING
};
@sestinj sestinj self-assigned this Feb 18, 2025
@dosubot dosubot bot added area:autocomplete Relates to the auto complete feature kind:bug Indicates an unexpected problem or unintended behavior labels Feb 18, 2025
@undownding
Copy link

same issue, no content display on cursor, but tab key works correctly.

WebStrom 2024.3.3 on Windows 11 23H2

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 kind:bug Indicates an unexpected problem or unintended behavior "needs-triage"
Projects
None yet
Development

No branches or pull requests

3 participants