continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
17.48k stars 1.35k forks source link

Code completion can't be displayed on vscode for macos #1588

Open xuanhua opened 3 months ago

xuanhua commented 3 months ago

Before submitting your bug report

Relevant environment info

- OS: Macos 14.3
- Continue: v0.8.40
- IDE: vscode Version: 1.90.2 (Universal)
- Model: deepseek-coder:6.7b

Description

Right side bar could work (llm could give answers for questions). But code autocompletion does not work

Here is my config.json:

{
  "models": [
    {
      "title": "deepseek coder 6.7b instruct",
      "provider": "ollama",
      "model": "deepseek-coder:6.7b-instruct"
    }
  ],
  "customCommands": [
    {
      "name": "test",
      "prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
      "description": "Write unit tests for highlighted code"
    }
  ],
  "tabAutocompleteModel": {
    "title": "deepseek coder 6.7b instruct",
    "provider": "ollama",
    "model": "deepseek-coder:6.7b-instruct"
  },
  "allowAnonymousTelemetry": true,
  "embeddingsProvider": {
    "provider": "transformers.js"
  }
}

And the local installed Continue plugin could work on when connecting to remote ubuntu server. So I wonder if there is any access permission issue on Macos? And I cannot see any obvious related issue in devopler console

And by using following steps:

Open the "Output" panel (right next to the terminal)
In the dropdown, select "Continue - LLM Prompts/Completions
View the exact prompts that were sent to the LLM and the completions recieved

During typing in *.py file, I can see the llm's code completion. But I there still no code completion displayed during the typing.

To reproduce

steps are listed above

Log output

INFO Started local extension host with pid 16558.
log.ts:429  WARN [twxs.cmake]: Cannot register 'cmake.cmakePath'. This property is already registered.
webviewElement.ts:482 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.
mountTo @ webviewElement.ts:482
index.html?id=83f1ad60-9d16-4cf4-8902-254042084297&origin=d4cb1217-bf3c-47f1-939a-b7bab8d4af62&swVersion=4&extensionId=Continue.continue&platform=electron&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app&purpose=webviewView:276 Found unexpected service worker controller. Found: vscode-webview://1glbdbgou8qi10higknmemvqbj3f0vf7n6tulfjkfa4ppj075naa/service-worker.js?v=4&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&remoteAuthority=ssh-remote+192.168.24.14. Expected: service-worker.js?v=4&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&remoteAuthority=. Waiting for controllerchange.
log.ts:419  INFO [perf] Render performance baseline is 15ms
xuanhua commented 3 months ago

I'm not an expert on typescript. I see more messages on deveoper console like this:

 WARN [twxs.cmake]: Cannot register 'cmake.cmakePath'. This property is already registered.
webviewElement.ts:482 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.
mountTo @ webviewElement.ts:482
log.ts:419  INFO Started local extension host with pid 22292.
log.ts:419  INFO [perf] Render performance baseline is 16ms
webviewElement.ts:482 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.
mountTo @ webviewElement.ts:482
P @ overlayWebview.ts:249
claim @ overlayWebview.ts:135
Eb @ extensionEditor.ts:721
await in Eb (async)
Hb @ extensionEditor.ts:864
await in Hb (async)
Db @ extensionEditor.ts:692
Cb @ extensionEditor.ts:677
Bb @ extensionEditor.ts:638
Ab @ extensionEditor.ts:590
await in Ab (async)
setInput @ extensionEditor.ts:458
await in setInput (async)
S @ editorPanes.ts:434
L @ editorPanes.ts:254
openEditor @ editorPanes.ts:131
(anonymous) @ editorGroupView.ts:1269
Kb @ editorGroupView.ts:1293
Jb @ editorGroupView.ts:1251
openEditor @ editorGroupView.ts:1155
openEditor @ editorService.ts:573
open @ extensionsWorkbenchService.ts:1252
cd @ extensionsViews.ts:1100
(anonymous) @ extensionsViews.ts:228
y @ event.ts:1196
fire @ event.ts:1227
(anonymous) @ event.ts:268
y @ event.ts:1196
fire @ event.ts:1227
(anonymous) @ event.ts:161
y @ event.ts:1196
fire @ event.ts:1227
j @ listService.ts:778
g @ listService.ts:749
(anonymous) @ listService.ts:705
y @ event.ts:1196
fire @ event.ts:1227
(anonymous) @ event.ts:127
y @ event.ts:1196
fire @ event.ts:1227
u @ listWidget.ts:784
(anonymous) @ event.ts:178
y @ event.ts:1196
fire @ event.ts:1227
(anonymous) @ event.ts:127
y @ event.ts:1196
fire @ event.ts:1227
E @ event.ts:40
log.ts:419  INFO Started local extension host with pid 23579.
vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html?&vscodeWebWorkerExtHostId=c22f0e7f-c32d-4632-9b5d-e1d1fc79d39d:1 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.
webviewElement.ts:482 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.

Hope this would help

sestinj commented 3 months ago

@xuanhua thanks for sharing all of the logs. I don't think there's anything there strictly related to the Continue extension, but I'm wondering whether anything in this list might be able to explain the problem

sestinj commented 3 months ago

particularly the 6th point could explain the fact that you still see the completion in the Output tab

xuanhua commented 3 months ago

@xuanhua thanks for sharing all of the logs. I don't think there's anything there strictly related to the Continue extension, but I'm wondering whether anything in this list might be able to explain the problem

@sestinj thanks for your reply, I just check the list you provided especially the 6th, And I can see the option of "editor.inlineSuggest.enabled" is checked. So from my understanding, this should not be cause.

The weird thing is that when I connected to a remote ubuntu machine, the code-completion suggestion could work and it also use my local (on macos) model. I also tried to disable or even uninstall Continue plugin from that ubuntu machine. And I see there are actually only one instance of Continue plugin. And once I change the its configuration on ubuntu machine, the configuration also is changed on my macos. And I remembered that I also tried to using Continue on Jetbrain IDE for python programming. There is no lucky for me there so I did uninstalled Continue on Jetbrain IDE. And as far as I know, there is only one vscode instance running during my development: local deveopment on my macos or remote development on that ubuntu machine.