I don’t use Git, but multi-file searches work just fine. For example, I did one search and it pulled up hits in automations.yaml, configuration.yaml, and a custom javascript file too.
The git does not work, e.g. on git commit it says:
Command ‘Git: Commit’ resulted in an error
command ‘git.commit’ not found
Is it version 5.15.0?
Can you check your settinngs:
which git
Does your settings.json has something like "git.path": "/usr/bin/git"
?
Looks like the same. Re-install of VScode add on and restart does not help.
For git commit can dont have any errors too?
I’m on Home Assistant OS 11.3, and you?
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
Add-on: Studio Code Server
Fully featured Visual Studio Code (VSCode) experience integrated in the Home Assistant frontend.
-----------------------------------------------------------
Add-on version: 5.15.0
You are running the latest version of this add-on.
System: Home Assistant OS 11.3 (amd64 / qemux86-64)
Home Assistant Core: 2024.1.2
Home Assistant Supervisor: 2023.12.0
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[11:41:06] INFO: Configuring timezone (Europe/Riga)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-user: starting
s6-rc: info: service init-mysql: starting
s6-rc: info: service init-mosquitto: starting
s6-rc: info: service init-code-server: starting
s6-rc: info: service init-code-server successfully started
s6-rc: info: service init-mosquitto successfully started
s6-rc: info: service init-mysql successfully started
s6-rc: info: service init-user successfully started
s6-rc: info: service code-server: starting
s6-rc: info: service code-server successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[11:41:09] INFO: Starting code-server...
[2024-01-08T09:41:10.571Z] info Wrote default config file to /root/.config/code-server/config.yaml
[2024-01-08T09:41:11.742Z] info code-server 4.20.0 d0215eca8804d0be5d3551c39404e336032c3141
[2024-01-08T09:41:11.755Z] info Using user-data-dir /data/vscode
[2024-01-08T09:41:11.816Z] info Using config file /root/.config/code-server/config.yaml
[2024-01-08T09:41:11.817Z] info HTTP server listening on http://0.0.0.0:1337/
[2024-01-08T09:41:11.818Z] info - Authentication is disabled
[2024-01-08T09:41:11.819Z] info - Not serving HTTPS
[2024-01-08T09:41:11.820Z] info Session server listening on /data/vscode/code-server-ipc.sock
[11:42:02]
[11:42:02] Extension host agent started.
[11:42:02] Started initializing default profile extensions in extensions installation folder. file:///data/vscode/extensions
[11:42:02] Completed initializing default profile extensions in extensions installation folder. file:///data/vscode/extensions
File not found: /usr/local/lib/code-server/lib/vscode/out/vsda_bg.wasm
File not found: /usr/local/lib/code-server/lib/vscode/out/vsda.js
[11:42:06] [172.30.32.2][e96e0d6b][ManagementConnection] New connection established.
[11:42:08] [172.30.32.2][f375021a][ExtensionHostConnection] New connection established.
[11:42:14] [172.30.32.2][f375021a][ExtensionHostConnection] <534> Launched Extension Host Process.
[11:47:02] [172.30.32.2][e96e0d6b][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
Same versions all across the board: os, core and supervisor too.
Not sure what’s up then.
Browser? I see you are on Mac. I use latest Chrome.
I’m pretty pretty sure it has nothing to do with browser.
It works even on my phone.
Well… actually Git in VSCode works on my Mobile app! But if I open same page from the PC browser then I see this strange message “Scanning folders for git repositories” and nothing happens.
Weird. Try this, on the browser that doesn’t work, clear the site settings for your entire HA instance.
Also, from the context menu in vscode, open folder => /homeassistant
Then no idea, looks like you gotta wait for someone who knows.
Sorry mate.
Sure. Could you please let me know which plugins appear when you search for @workspaceUnsupported
in your setup? I’m guessing this list might be empty for you.
Also, could you share the list of your trusted folders? You can find this by right-clicking on the status bar, selecting ‘Trusted’, and then clicking on it. In my case, I have just one trusted folder, ‘/’, and it appears that the /homeassistant folder is included under this trust rule.
Update 12 Jan 2024:
I discovered that the issue with VS Code displaying “Scanning folders for Git repositories…” occurs exclusively on my PC across all browsers. On other PCs or mobile phones, the git diff functions correctly.
I’ve deactivated all firewalls, cleared browser cookies, reset the browser cache, and even switched to a guest account in the browser, but the issue comes back like Batman to Gotham City.
Now, I suspect the problem might be related to something in the VSCode cache. Does anyone know how to clear the AppData for VSCode integrated into Home Assistant?
Hi all,
I’ve been using the Studio Code Server addon for a while, and I’m pretty happy with it. However, I want to edit files outside the config
directory. So I changed the config_path
setting to /root
in the configuration tab of the addon. I then restarted the addon. But it still shows config
as the root. Am I missing something?
Best,
Bart
Simply click the hamburger menu (3 lines) at the top left and select File > Open File or Open Folder.
Example:
Ah, thanks so much! I figured i should have missed something simple…
I’ve been using the Studio Code Server HA addon for almost two years, and it used to work flawlessly. However, since some time around Nov 2023 auto-completion has been pretty much broken. Entity ID names complete OK but keywords (alias, description, trigger, platform, etc) just throw up jibberish. The screenshot shows what I receive when I type ‘mode:’ and then enter a space. I’ve completely removed and re-installed the add-on several times but there’s no change in behaviour. The logs are almost empty but there are three ‘File not found:’ errors:
/usr/local/lib/code-server/lib/vscode/extensions/keesschollaart.vscode-home-assistant-1.39.0/jinja-language-configuration.json
/usr/local/lib/code-server/lib/vscode/out/vsda_bg.wasm
/usr/local/lib/code-server/lib/vscode/out/vsda.js
If anyone has suggestions about how I might restore the functionality then I’m all ears.
Same issue for me with exactly the same messages about that missing files.
I find it odd as I thought the Docker/container approach meant that each add-on had its own environment, settings, etc. I guess there are some settings outside the installation that don’t get cleared/reset correctly during a re-installation. I’ve scoured the root filesystem several times but have yet to find any such settings.