feat: add multi-session desktop workspace

This commit is contained in:
2026-08-13 21:34:04 +02:00
parent 12b9b83d51
commit 475f95ba70
56 changed files with 8998 additions and 3805 deletions
+8 -21
View File
@@ -7,29 +7,16 @@ export async function publishNoctaliaState(
state,
{ execute = async (command, args) => execFileAsync(command, args) } = {},
) {
if (!state || typeof state !== "object")
throw new TypeError("state is required");
const { state: bridgeState, projectLabel, attentionCount, detail } = state;
if (!state || typeof state !== "object") throw new TypeError("state is required");
const { state: bridgeState, projectLabel, attentionCount, detail, openCount = 0, workingCount = 0, recoveringCount = 0, errorCount = 0 } = state;
if (
typeof bridgeState !== "string" ||
typeof projectLabel !== "string" ||
!Number.isSafeInteger(attentionCount) ||
typeof bridgeState !== "string" || typeof projectLabel !== "string" ||
![attentionCount, openCount, workingCount, recoveringCount, errorCount].every(Number.isSafeInteger) ||
typeof detail !== "string"
) {
throw new TypeError(
"state must contain string state/projectLabel/detail and integer attentionCount",
);
}
) throw new TypeError("state must contain presentation strings and integer counts");
await execute("qs", [
"-c",
"noctalia-shell",
"ipc",
"call",
"plugin:pi-status-bridge",
"setBridgeState",
bridgeState,
projectLabel,
String(attentionCount),
detail,
"-c", "noctalia-shell", "ipc", "call", "plugin:pi-status-bridge", "setBridgeState",
bridgeState, projectLabel, String(attentionCount), detail, String(openCount),
String(workingCount), String(recoveringCount), String(errorCount),
]);
}