Forum Discussion
You only need the class loading if you want to use the IDE to help. I've never used vscode with the classes loaded, so I'd say make that a secondary priority. More important would be the ability to actually test the code and grab the output back into vscode. It's not actually too hard. You just gotta post to /debug.
Query params: collectorId=x
json payload:
{"cmdline":"!groovy hostId=760 \n println(\"Hello world\")"}
So we'd need a way to store the creds in vscode (maybe a .env file in the workspace). We'd need a way to select a device. That might involve some back and forth searching by name since what we actually need is the system.deviceId (that could also be future enhancement). And we'd need a dropdown to pick groovy or powershell (!groovy or !posh).
The output contains "output", "sessionId", "cmdline", and "cmdContext". Would take some testing to see what the results would look like when the script has an exception.
hmm good point that is why I was leaning on devcontainer give a tmui or the likes see the bottom of this? say ./test_thing.py gives you a searchable tmui or something
As for the debug endpoint I use it daily II have not looked at the exception handling yet though
Can Claude do this all for us?
- Anonymous4 months ago
Claude?
I didn't really understand what the container is for. The code is going to run on the collector All you need to do is post the script to the collector and then grab the output. Coretools, an internal tool used biologic monitor and briefly published then quickly revoked, does this. You can simply run a Python script, point it at a file and give it a device name or ID, and it will run the code using the debug end point. The code runs on the collector, no container needed.
- Michael_Baker4 months agoNeophyte
The reason for devcotainers has nothing to do with LM it self you get repeatable dev environments on any platform without dealing with local dependencies its all self contained
eg: I use a M3 and alot of Ruby.. making that work is painful but with devcontainers it just works and share across team its purely for keeping laptop cklean and you are able to stand up an exact copy anywhere with 0 mess
Claude does much better than OpenAI at writing code :D
- Anonymous4 months ago
Yeah, i get having a dev container for stuff, I do it all the time. But unless you run it on the collector, you won't have access to any of the properties (like passwords and stuff) that make the script run successfully.
Yeah, i went down the rabbit hole with LLMs trying to build a VSCode extension, but didn't get very far.
Related Content
- 5 months ago
- 2 years ago
- 12 months ago
- 2 years ago