**Motivations:** - Clone or load repos under /home/ncantu/code with AnythingLLM workspace ensure/create from the editor **Root causes:** - N/A (new capability) **Correctifs:** - N/A **Evolutions:** - services/repos-devtools-server: POST /repos-clone, GET /repos-list, POST /repos-load (Bearer REPOS_DEVTOOLS_TOKEN) - Extension: Webview panel, slash commands, workspaceEnsure + POST /api/v1/workspace/new - Docs: feature note and index links **Pages affectées:** - services/repos-devtools-server/* - extensions/anythingllm-workspaces/* - docs/README.md - docs/features/repos-devtools-server-and-dev-panel.md - docs/features/anythingllm-vscode-extension.md
26 lines
736 B
JavaScript
26 lines
736 B
JavaScript
(function () {
|
|
const vscode = acquireVsCodeApi();
|
|
const input = document.getElementById("cmd");
|
|
const out = document.getElementById("out");
|
|
const runBtn = document.getElementById("run");
|
|
const clearBtn = document.getElementById("clear");
|
|
|
|
function run() {
|
|
const text = input.value;
|
|
out.textContent = "…";
|
|
vscode.postMessage({ type: "run", text: text });
|
|
}
|
|
|
|
runBtn.addEventListener("click", run);
|
|
clearBtn.addEventListener("click", function () {
|
|
out.textContent = "";
|
|
});
|
|
|
|
window.addEventListener("message", function (event) {
|
|
const msg = event.data;
|
|
if (msg && msg.type === "result") {
|
|
out.textContent = typeof msg.text === "string" ? msg.text : String(msg.text);
|
|
}
|
|
});
|
|
})();
|