hara.runtime.vscode.impl

+init+

invoke-ptr-vscode

added in 4.1

(invoke-ptr-vscode rt ptr args)

Invokes a pointer in the VS Code runtime.

js-eval-wrap

added in 4.1

(js-eval-wrap code)

Wraps JavaScript code so that the result is JSON-serializable.

next-msgid

added in 4.1

(next-msgid rt)

Returns the next request id and increments the counter.

raw-eval-vscode

added in 4.1

(raw-eval-vscode rt code)

Evaluates JavaScript code inside VS Code and returns the decoded result.

send-request

added in 4.1

(send-request rt code)

Sends a code evaluation request and waits for the matching response.

start-vscode

added in 4.1

(start-vscode {:keys [id exec port], :as rt})

Starts a VS Code instance with the Hara runtime extension and connects a client socket.

stop-vscode

added in 4.1

(stop-vscode {:keys [process socket output input user-data-dir], :as rt})

Stops the VS Code process and closes the client socket.

vscode

added in 4.1

(vscode)(vscode m)

Creates and starts a VS Code runtime.

vscode-exec

added in 4.1

(vscode-exec)

Resolves the VS Code executable.

In a headless environment (no DISPLAY) with xvfb-run available, wraps the launch with xvfb-run so the Electron UI can start.

vscode-shared:create

added in 4.1

(vscode-shared:create m)

Creates a shared VS Code runtime client.

vscode:create

added in 4.1

(vscode:create {:keys [id exec], :as m})

Creates a VS Code runtime.