Repository navigation
Is there a way to implement a built-in chat window in the IDE #149
Description
Activity
@diyshanliu There is already a built-in chat window in the IDE. It is shown with the shortcut ctrl+; or llama.vscode menu (ctrl+shift+m) -> Chat with AI. However, it requires the chat model to be run by llama.cpp. If the model is provided by OpenRouter or other source (local or not), the chat window will be blank.
@diyshanliu Interesting. Seems that you are useing llama-server and should work. I am not sure what is the problem. If you open http://127.0.0.1:8011 in a browser, do you see the web UI (UI for chat with the model) ? If you see it - continue with the steps below to collect some debug information.
Please, press ctrl+shift+p and open "Developer: Open Webview Developer Tools". On Console page clear the content. Open Network page. After that try to show the "Chat with AI" window. Save the console as a file (right click on console and select Save as...) and send it here. Also observe if there are some errors in Network page.
@diyshanliu Thank you for the logs. Seems that it is a security restriction. Could you try to install the extension from the following file https://github.com/ggml-org/llama.vscode/releases/download/v0.0.40/llama-vscode-0.0.40ChatWithAiFix.vsix ? (uninstall the llama-vscode extension, in the extensions view, upper, right, click button "...", click "Install from VSIX..." and select the downloaded file, restart VS Code).
If this doesn't work - try running VS Code with elevated privilages (as Administrator for Windows).
Please, tell me if it helps.
Sorry, I restarted vs code in admin mode, and it was local vsix, but it was still a white interface
Thank you for your enthusiastic response, and hopefully it won't delay you too much[vscode-app-2.log] (https://github.com/user-attachments/files/24470372/vscode-app-2.log)
Raising this issue again, I have never able to open chat window in VSCode. Attached the errors from VSCode Developer Tools related to llama-vscode. llama-server's webUI works fine.
[ggml-org.llama-vscode]Cannot read properties of undefined (reading 'subscriptions') TypeError: Cannot read properties of undefined (reading 'subscriptions') at ml.showChatWithAi (c:\Users\user\.vscode\extensions\ggml-org.llama-vscode-0.0.45\dist\extension.js:248:1778) at ll.handleActionsMenuItems (c:\Users\user\.vscode\extensions\ggml-org.llama-vscode-0.0.45\dist\extension.js:203:11652) at ll.handleMenuSelection (c:\Users\user\.vscode\extensions\ggml-org.llama-vscode-0.0.45\dist\extension.js:203:5876) at ll.showMenu (c:\Users\user\.vscode\extensions\ggml-org.llama-vscode-0.0.45\dist\extension.js:203:5476) at async c:\Users\user\.vscode\extensions\ggml-org.llama-vscode-0.0.45\dist\extension.js:169:2729 at async Zm._executeContributedCommand (/c:/Program%20Files/Microsoft%20VS%20Code/ce099c1ed2/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:494:48675)VSCode info
Version: 1.111.0 (system setup)
Commit: ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb
Date: 2026-03-06T23:06:10Z
Electron: 39.6.0
ElectronBuildId: 13330601
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.19045Reacted by Raul GonzalezSame problem here, blank page. In a browser, everything works perfectly well.
I’m using llama‑server together with llama‑vscode in VSCodium, the “Chat with AI” panel opens, but it displays no content. I can use llama‑server in a web browser without any issues. Similar to what @arcv described above, I can see the following error in /home/my_username/.config/VSCodium/logs/YYYYMMDDTHHMMSS/window1/exthost/exthost.log
[error] TypeError: Cannot read properties of undefined (reading 'subscriptions')
at ml.showChatWithAi (/home/my_username/.vscode-oss/extensions/ggml-org.llama-vscode-0.0.45-universal/dist/extension.js:248:1778)
at ll.handleActionsMenuItems (/home/my_username/.vscode-oss/extensions/ggml-org.llama-vscode-0.0.45-universal/dist/extension.js:203:11652)
at ll.handleMenuSelection (/home/my_username/.vscode-oss/extensions/ggml-org.llama-vscode-0.0.45-universal/dist/extension.js:203:5876)
at ll.showMenu (/home/my_username/.vscode-oss/extensions/ggml-org.llama-vscode-0.0.45-universal/dist/extension.js:203:5476)
at async /home/my_username/.vscode-oss/extensions/ggml-org.llama-vscode-0.0.45-universal/dist/extension.js:202:1339
at async ry._executeContributedCommand (file:///snap/codium/495/usr/share/codium/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:114:49208)My chat window in vscode is also empty and I'm getting the same error. Works in browser without issues. llama-server 9066 (f431b95), llama-vscode v0.0.47
[error] TypeError: Cannot read properties of undefined (reading 'subscriptions') at ul.showChatWithAi (/home/dna/.local/share/codium/extensions/ggml-org.llama-vscode-0.0.47/dist/extension.js:248:1778) at dl.handleActionsMenuItems (/home/dna/.local/share/codium/extensions/ggml-org.llama-vscode-0.0.47/dist/extension.js:203:11652) at dl.handleMenuSelection (/home/dna/.local/share/codium/extensions/ggml-org.llama-vscode-0.0.47/dist/extension.js:203:5876) at dl.showMenu (/home/dna/.local/share/codium/extensions/ggml-org.llama-vscode-0.0.47/dist/extension.js:203:5476) at /home/dna/.local/share/codium/extensions/ggml-org.llama-vscode-0.0.47/dist/extension.js:169:2729 at bS._executeContributedCommand (file:///usr/share/vscodium/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:116:49482)It seems the
subscriptionslookup is failing becausecontextis undefined here:llama.vscode/src/chat-with-ai.ts
Line 117 in 89f1212
if (aiPanel) context.subscriptions.push(aiPanel); I found if you pass the window context through from the menu item handler, the chat window will show up. That said, I'm new to TypeScript and VS Code extension development, so this might have side effects / be a bad idea for reasons I'm unfamiliar with.
The issue was fixed with a newer release for me. Thank you for your replay anyway.
@ptere Thanks for the observation. I will implement the suggested change in the next version.
Reacted by Peter O.
I've enabled my local tools model and chat model, but as other answers have mentioned, the chat window is blank.
Is there a way to implement a built-in chat window in the IDE to accress my localworkspace, like other plugins?