continue icon indicating copy to clipboard operation
continue copied to clipboard

[CON-263] Unable to use @codebase search with continue.dev in vscode

Open AdiRishi opened this issue 2 years ago • 18 comments

Before submitting your bug report

Relevant environment info

- OS: MacOS Sonoma Version 14.6.1 (23G93)
- Continue: `v0.8.47`
- IDE: VSCode `1.92.2`
- Model: Ollama `0.3.8`
- config.json:
  
{
  "models": [
    {
      "title": "Llama3.1-8b",
      "model": "llama3.1:8b",
      "provider": "ollama"
    },
    {
      "title": "Llama3.1-40b",
      "model": "llama3.1:40b",
      "provider": "ollama"
    }
  ],
  "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": "starcoder2:7b",
    "model": "starcoder2:7b",
    "provider": "ollama"
  },
  "embeddingsProvider": {
    "provider": "ollama",
    "model": "nomic-embed-text"
  },
  "contextProviders": [
    {
      "name": "code",
      "params": {}
    },
    {
      "name": "docs",
      "params": {}
    },
    {
      "name": "diff",
      "params": {}
    },
    {
      "name": "terminal",
      "params": {}
    },
    {
      "name": "problems",
      "params": {}
    },
    {
      "name": "folder",
      "params": {}
    },
    {
      "name": "codebase",
      "params": {}
    }
  ],
  "slashCommands": [
    {
      "name": "edit",
      "description": "Edit selected code"
    },
    {
      "name": "comment",
      "description": "Write comments for the selected code"
    },
    {
      "name": "share",
      "description": "Export the current chat session to markdown"
    },
    {
      "name": "cmd",
      "description": "Generate a shell command"
    },
    {
      "name": "commit",
      "description": "Generate a git commit message"
    }
  ]
}

Description

Whenever I run a query using the @codebase tag Continue is unable to retrieve any contextual information. It fails with the error - Error getting context items from codebase: TypeError: db.search is not a function

To reproduce

(Please note I both uninstalled the extension and ran rm -rf ~/.continue before reproducing this.

  1. Open the Continue.dev panel
  2. Ensure indexing is up to date (you can click the force index button to ensure this)
  3. Run @codebase tell me about this repo (or anything else with the @codebase tag
  4. It will fail.

Log output

One warning log

console.ts:137 [Extension Host] Error retrieving from FTS: Error: SQLITE_ERROR: no such table: fts
--> in Database#all('SELECT fts_metadata.chunkId, fts_metadata.path, fts.content, rank\n' +
  '    FROM fts\n' +
  '    JOIN fts_metadata ON fts.rowid = fts_metadata.id\n' +
  '    JOIN chunk_tags ON fts_metadata.chunkId = chunk_tags.chunkId\n' +
  `    WHERE fts MATCH '"give" OR "me" OR "an" OR "overview" OR "of" OR "this" OR "repo"' AND chunk_tags.tag IN (?)\n` +
  '      \n' +
  '    ORDER BY rank\n' +
  '    LIMIT ?', [ '/Users/adishwar.rishi/work/iss-webapp-api::develop::chunks', 1 ], [Function (anonymous)])
    at new Promise (<anonymous>)
y @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
S @ rpcProtocol.ts:458
Q @ rpcProtocol.ts:443
M @ rpcProtocol.ts:373
L @ rpcProtocol.ts:299
(anonymous) @ rpcProtocol.ts:161
B @ event.ts:1230
fire @ event.ts:1261
fire @ ipc.net.ts:652
K.onmessage @ localProcessExtensionHost.ts:378

One error log

notificationsAlerts.ts:42 Error getting context items from codebase: TypeError: db.search is not a function
c @ notificationsAlerts.ts:42
(anonymous) @ notificationsAlerts.ts:28
B @ event.ts:1230
C @ event.ts:1241
fire @ event.ts:1265
addNotification @ notifications.ts:228
notify @ notificationService.ts:253
(anonymous) @ mainThreadMessageService.ts:86
f @ mainThreadMessageService.ts:51
$showMessage @ mainThreadMessageService.ts:45
S @ rpcProtocol.ts:458
Q @ rpcProtocol.ts:443
M @ rpcProtocol.ts:373
L @ rpcProtocol.ts:299
(anonymous) @ rpcProtocol.ts:161
B @ event.ts:1230
fire @ event.ts:1261
fire @ ipc.net.ts:652
K.onmessage @ localProcessExtensionHost.ts:378

CON-263

AdiRishi avatar Aug 29 '24 00:08 AdiRishi

Hi @AdiRishi , thanks for the heads up on this, it should be resolved in the next release/pre-release.

Patrick-Erichsen avatar Aug 29 '24 00:08 Patrick-Erichsen

Hi @Patrick-Erichsen 1:I also have this bug in vscode and idea, 2:When I use the codebase, the idea will be locked and cannot be used(window idea)

SuperKevinZhang avatar Aug 29 '24 03:08 SuperKevinZhang

Thanks for the update @SuperKevinZhang—I'm looking into this tomorrow, will let you know when I have updates

sestinj avatar Aug 29 '24 07:08 sestinj

Can confirm that I experience the same issue. Would be amazing to have this fixed ASAP in pre-release.

jbeoris avatar Aug 29 '24 20:08 jbeoris

I encountered the same issue in Rider, and the continue version number is: 0.0.64.

cr-zhichen avatar Aug 30 '24 00:08 cr-zhichen

Having the same issue

allenv0 avatar Aug 30 '24 06:08 allenv0

Same issue in Visual Studio Code.

takacsv avatar Aug 30 '24 14:08 takacsv

1725027874660 @sestinj I'm sure it's this part of the code that's causing the problem

anrgct avatar Aug 30 '24 14:08 anrgct

same issue here

swiftsword94 avatar Aug 30 '24 14:08 swiftsword94

The same issue here, but @codebase directive worked until yesterday, when i mistakenly pasted some images into the prompt. Can it be related?

P.S. Also tried the old trick to force reindexing (rm -rf ~/.continue/index/) but the problem remains after VScode relaunch. I'm on Windows OS. P.P.S. How to escape '@' character in text blocks I sometimes have to paste into the prompt?

dzivkovi avatar Aug 30 '24 17:08 dzivkovi

same here. at all affected: in vscode -> extensions -> right click on continue extension -> install specific version -> select previous version

mreitschuster avatar Aug 30 '24 20:08 mreitschuster

@dzivkovi fixed the P.P.S. problem here, thanks for bringing that up

@anrgct thank you for pointing this out! Incredible that this slipped past me. Fix: https://github.com/continuedev/continue/commit/96f07dadc2a4627025656718cb6ae23a4d0b5db8

Shipping a new release in just a bit, will solve this issue!

sestinj avatar Sep 01 '24 05:09 sestinj

just downloaded the extension and got the same error when i came here the fix was already cooked, nice :+1: edit: waiting for the release

SampaioLeal avatar Sep 01 '24 05:09 SampaioLeal

Arrived at continue.dev from copilot and cursor, look fwd to the fix released, thanks!

corticalstack avatar Sep 01 '24 17:09 corticalstack

Just confirmed this is fixed in v0.8.48 for vscode. Thank you to the Continue team for the quick fix 🎉

AdiRishi avatar Sep 02 '24 01:09 AdiRishi

Bless the continue.devs!

jbeoris avatar Sep 03 '24 13:09 jbeoris

Just FYI, the version 0.0.64 of Idea based IDEs is still affected by this bug.

LucaSoato avatar Sep 05 '24 12:09 LucaSoato

Just FYI, the version 0.0.64 of Idea based IDEs is still affected by this bug.

check out pre release version

https://docs.continue.dev/troubleshooting

Open JetBrains settings (cmd/ctrl+,) and go to "Plugins" Click the gear icon at the top Select "Manage Plugin Repositories..." Add "https://plugins.jetbrains.com/plugins/eap/list>" to the list

mykolat avatar Sep 05 '24 17:09 mykolat