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

Context provider 'folder', 'codebase' not working at all, it stuck even there's several files #4578

Open
1 of 3 tasks
hitzhangjie opened this issue Mar 10, 2025 · 7 comments
Assignees
Labels
area:context-providers Relates to context providers kind:bug Indicates an unexpected problem or unintended behavior "needs-triage"

Comments

@hitzhangjie
Copy link

hitzhangjie commented Mar 10, 2025

Before submitting your bug report

Relevant environment info

- OS: windows 11 (and WSL2)
- Continue version: 1.0.3
- IDE version: 1.98.0
- Model: llama3.1:8b, deepseek-r1:14b, phi4:14b, none works
- config:
  
{
  // Chat models
  "models": [
    {
      "title": "ollama - qwen2.5:14b",
      "provider": "ollama",
      "model": "qwen2.5:14b"
    },
    {
      "title": "ollama - deepseek-r1:14b",
      "provider": "ollama",
      "model": "deepseek-r1:14b"
    },
    {
      "title": "ollama - llama3.1:8b",
      "provider": "ollama",
      "model": "llama3.1:8b"
    },
    {
      "title": "ollama - gemma2",
      "provider": "ollama",
      "model": "gemma2:9b"
    },
    {
      "title": "ollama - phi4:14b",
      "provider": "ollama",
      "model": "phi4:14b"
    }
    //,
    // ollama instance running on remote server
    // {
    //   "title": "ollama - llama2:130b",
    //   "provider": "ollama",
    //   "model": "llama2:130b",
    //   "apiBase": "http://<my endpoint>:11434"
    // }
  ],
  // FIM models
  "tabAutocompleteModel": [{
    "title": "Qwen2.5-Coder 1.5B",
    "provider": "ollama",
    "model": "qwen2.5-coder:1.5b-base",
    "debounceDelay": 500,
    "maxPromptTokens": 1500,
    // "disableInFiles": ["*.md"]
  },
  {
      "title": "ollama - deepseek-coder:6.7b",
      "provider": "ollama",
      "model": "deepseek-coder:6.7b"
  }],
  // embeddings models
  "embeddingsProvider": {
    "provider": "ollama",
    "model": "nomic-embed-text"
  },
  // reranker models
  "reranker": {
      // can only access local LLM, so use llama3.1:8b instead of:
      // - Voyage AI (rerank-2)
      // - Cohere (rerank-english-v3.0)
      "name": "llm",
      "params": {
          "modelTitle": "ollama - llama3.1:8b"
      }
  },
  // Context providers (RAG)
  // 1. full list of context providers (see: https://docs.continue.dev/customize/context-providers)
  //   - file, currentFile, open, folder,
  //   - code, codebase, diff
  //   - terminal, 
  //   - docs, 
  //   - web, search
  // 2. Each provider is an plugin, you can enable them as needed.
  "contextProviders": [
    // 文件/文件夹/代码库相关
    {
      "name": "file"
    },
    {
      "name": "currentFile"
    },
    {
      "name": "open",
      "params": { "onlyPinned": true }
    },
    {
      "name": "folder",
      "params": {},
      "remark": "attach current folder content as context"
    },
    {
      "name": "tree",
      "remark": "attach folder tree content as context"
    },
    {
      "name": "codebase",
      "params": {},
      "remark": "attach remote codebase as context"
    },
    // 代码/代码检索/代码变更相关
    {
      "name": "code",
      "params": {},
      "remark": "attach defined functions as context"
    },
    {
      "name": "search"
    },
    {
      "name": "diff",
      "params": {},
      "remark": "attach current `git diff` as context"
    },
    {
      "name": "commit", 
      "params": {
        "Depth": 50,
        "LastXCommitsDepth": 10
      }
    },
    // 文档相关
    {
      "name": "docs",
      "params": {},
      "remark": "attach specific documentation as context"
    },
    // 终端输出相关
    {
      "name": "terminal",
      "params": {},
      "remark": "attach terminal manual and output as context"
    },
    {
      "name": "problems",
      "params": {},
      "remark": "attach problems of current file as context"
    },
    // web相关
    {
      "name": "google",
      "params": {
        "serperApiKey": "a9a8c5d4740613b2e82ef811a255461e203a4f9f"
      },
      "remark": "attach google search result as context"
    },
    {
      "name": "url",
      "remark": "attach webpage as context"
    }
  ],
  // actions (builtin+customed)
  "slashCommands": [
    {
      "name": "share",
      "description": "Export the current chat session to markdown",
      "params": { "outputDir": "~/.continue/session-transcripts" }
    },
    {
      "name": "cmd",
      "description": "Generate a shell command"
    },
    {
      "name": "commit",
      "description": "Generate a commit message for the current changes"
    },
    {
      "name": "issue",
      "description": "Generate a link to a drafted GitHub issue",
      "params": { "repositoryUrl": "https://github.com/continuedev/continue" }
    },
    {
      "name": "onboard",
      "description": "Familiarize yourself with the codebase"
    }
  ],
  "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"
    },
    {
      "name": "check",
      "description": "Check for mistakes in my code",
      "prompt": "{{{ input }}}\n\nPlease read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:\n- Syntax errors\n- Logic errors\n- Security vulnerabilities\n- Performance issues\n- Anything else that looks wrong\n\nOnce you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found."
    }
  ]
}

Description

When I use context provider Folder o Codebase,continue stucks even there's only several files under the folder.
There's no any output.

To reproduce

  1. open a project
  2. open continue chat dialog
  3. type @folder, then select the folder,
  4. type the message and wait response
  5. expect to see the response but there's no output.

Log output

Please see following logging.

@dosubot dosubot bot added area:context-providers Relates to context providers kind:bug Indicates an unexpected problem or unintended behavior labels Mar 10, 2025
@hitzhangjie
Copy link
Author

hitzhangjie commented Mar 10, 2025

Now I switch to the pre-release continue version 1.17

I found some errors:

[Extension Host] Error loading color theme:  SyntaxError: Expected double-quoted property name in JSON at position 5867 (line 140 column 2)
	at JSON.parse (<anonymous>)
	at parseThemeString (c:\Users\Administrator\.vscode\extensions\continue.continue-1.1.7-win32-x64\out\extension.js:619082:15)
	at getTheme (c:\Users\Administrator\.vscode\extensions\continue.continue-1.1.7-win32-x64\out\extension.js:619132:22)
	at <instance_members_initializer> (c:\Users\Administrator\.vscode\extensions\continue.continue-1.1.7-win32-x64\out\extension.js:660381:15)
	at new _InlineTipManager (c:\Users\Administrator\.vscode\extensions\continue.continue-1.1.7-win32-x64\out\extension.js:660390:18)
	at _InlineTipManager.getInstance (c:\Users\Administrator\.vscode\extensions\continue.continue-1.1.7-win32-x64\out\extension.js:660386:40)
	at setupInlineTips (c:\Users\Administrator\.vscode\extensions\continue.continue-1.1.7-win32-x64\out\extension.js:660312:20)
	at activateExtension (c:\Users\Administrator\.vscode\extensions\continue.continue-1.1.7-win32-x64\out\extension.js:660638:3)
	at dynamicImportAndActivate (c:\Users\Administrator\.vscode\extensions\continue.continue-1.1.7-win32-x64\out\extension.js:660721:16)
	at async pw.n (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:112:13415)
	at async pw.m (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:112:13378)
	at async pw.l (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:112:12834)

...
WARN: Authentication provider continue was not declared in the Extension Manifest
[Extension Host] Unknown context provider codebase
...
Error details: {"stack":"Error: The URL must be of scheme file\n    at https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/Administrator/.vscode/extensions/continue.continue-1.1.7-win32-x64/gui/assets/index.js:1046:5293\n    at async Promise.allSettled (index 4)\n    at async https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/Administrator/.vscode/extensions/continue.continue-1.1.7-win32-x64/gui/assets/index.js:1046:4863","message":"The URL must be of scheme file"}
...
Error getting context items from folder: Error: Not implemented

@hitzhangjie
Copy link
Author

I never succeeded when using folder or codebase context provider.
I'm curious about are these functions implemented so far? I see it in continue documentation.

@hitzhangjie
Copy link
Author

hitzhangjie commented Mar 10, 2025

Sometimes it won't stuck and give answer, but apparently, it doesn't use the folder or codebase as context. The answer is not relevant to the context.

@master-fury
Copy link

It's stuck for me too. Previously it was working great.
Version: 1.0.3

If anyone finds any fix, please share.

@aadarshkt
Copy link
Contributor

Working for me with following configurations.

Version: 1.0.3.
IDE: VSCode 1.98
OS: macos 15.3

@hitzhangjie
Copy link
Author

Well, I uses Windows11 + WSL2.

@hitzhangjie
Copy link
Author

Yesterday, there's VSCode update and continue 1.18 released. I retried @folder, it works now. Maybe the bug is fixed?
But my folder contains many files, the context only lists 3 parts of the same part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:context-providers Relates to context providers kind:bug Indicates an unexpected problem or unintended behavior "needs-triage"
Projects
None yet
Development

No branches or pull requests

4 participants