zidane-gui 8.0.4 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -29
- package/out/main/index.js +3371 -1024
- package/out/main/lsp-host.js +89 -4
- package/out/preload/index.mjs +48 -8
- package/out/renderer/assets/{ghostty-web-DPKNHpFa.js → ghostty-web-92tSV0lR.js} +1 -1
- package/out/renderer/assets/{index-rup1hjNH.js → index-DlEFfgBI.js} +158770 -142605
- package/out/renderer/assets/index-u9t9fsPc.css +5016 -0
- package/out/renderer/index.html +6 -3
- package/package.json +6 -4
- package/resources/app-icons/cobalt-blue.png +0 -0
- package/resources/app-icons/holographic-chrome.png +0 -0
- package/resources/app-icons/light.png +0 -0
- package/resources/app-icons/midnight-blue-grainy.png +0 -0
- package/resources/app-icons/modern.png +0 -0
- package/resources/app-icons/smooth-chrome-sticker.png +0 -0
- package/resources/app-icons/smooth-chrome.png +0 -0
- package/resources/app-icons/smooth-holographic-chrome-sticker.png +0 -0
- package/resources/app-icons/smooth-holographic-chrome.png +0 -0
- package/resources/icon-macos.png +0 -0
- package/resources/icon.png +0 -0
- package/scripts/app-installer.mjs +4 -3
- package/out/renderer/assets/index-miPiOG60.css +0 -4096
- /package/out/renderer/assets/{shiki-html.worker-gURcNJD7.js → highlight.worker-gURcNJD7.js} +0 -0
package/out/main/lsp-host.js
CHANGED
|
@@ -331,6 +331,9 @@ class ServerClient {
|
|
|
331
331
|
get openCount() {
|
|
332
332
|
return this.#docs.size;
|
|
333
333
|
}
|
|
334
|
+
isOpen(path) {
|
|
335
|
+
return this.#docs.has(path);
|
|
336
|
+
}
|
|
334
337
|
diagnosticsFor(path) {
|
|
335
338
|
return this.#diagnostics.get(path) ?? [];
|
|
336
339
|
}
|
|
@@ -538,14 +541,23 @@ function locationsIn(cwd, res) {
|
|
|
538
541
|
const uri = item.targetUri ?? item.uri;
|
|
539
542
|
const range = item.targetSelectionRange ?? item.targetRange ?? item.range;
|
|
540
543
|
if (!uri || !range || !uri.startsWith(root)) continue;
|
|
544
|
+
const origin = originOf(item.originSelectionRange);
|
|
541
545
|
out.push({
|
|
542
546
|
path: decodeURIComponent(uri.slice(root.length)),
|
|
543
547
|
line: range.start.line + 1,
|
|
544
|
-
column: range.start.character + 1
|
|
548
|
+
column: range.start.character + 1,
|
|
549
|
+
...origin ? { origin } : {}
|
|
545
550
|
});
|
|
546
551
|
}
|
|
547
552
|
return out;
|
|
548
553
|
}
|
|
554
|
+
function originOf(range) {
|
|
555
|
+
const r = range;
|
|
556
|
+
const at = [r?.start?.line, r?.start?.character, r?.end?.line, r?.end?.character];
|
|
557
|
+
if (!at.every((n) => typeof n === "number" && Number.isInteger(n) && n >= 0)) return void 0;
|
|
558
|
+
const [line, column, endLine, endColumn] = at;
|
|
559
|
+
return { line: line + 1, column: column + 1, endLine: endLine + 1, endColumn: endColumn + 1 };
|
|
560
|
+
}
|
|
549
561
|
function hoverText(contents) {
|
|
550
562
|
if (!contents) return null;
|
|
551
563
|
if (typeof contents === "string") return contents.trim() || null;
|
|
@@ -563,8 +575,50 @@ ${v}
|
|
|
563
575
|
}
|
|
564
576
|
return null;
|
|
565
577
|
}
|
|
578
|
+
class DocOwners {
|
|
579
|
+
#docs = /* @__PURE__ */ new Map();
|
|
580
|
+
/** `owner` sends `text` for `key`: what to tell the server. */
|
|
581
|
+
open(key, owner) {
|
|
582
|
+
const doc = this.#docs.get(key);
|
|
583
|
+
if (!doc) {
|
|
584
|
+
this.#docs.set(key, { owners: /* @__PURE__ */ new Set([owner]), writer: owner });
|
|
585
|
+
return { kind: "open" };
|
|
586
|
+
}
|
|
587
|
+
if (!doc.owners.has(owner)) {
|
|
588
|
+
doc.owners.add(owner);
|
|
589
|
+
return { kind: "attach" };
|
|
590
|
+
}
|
|
591
|
+
const full = doc.writer !== owner;
|
|
592
|
+
doc.writer = owner;
|
|
593
|
+
return { kind: "change", full };
|
|
594
|
+
}
|
|
595
|
+
/** `owner` closed `key`; true when nobody has it open any more. */
|
|
596
|
+
close(key, owner) {
|
|
597
|
+
const doc = this.#docs.get(key);
|
|
598
|
+
if (!doc || !doc.owners.delete(owner)) return false;
|
|
599
|
+
if (doc.owners.size > 0) return false;
|
|
600
|
+
this.#docs.delete(key);
|
|
601
|
+
return true;
|
|
602
|
+
}
|
|
603
|
+
/** `owner` went away (a window closed): the keys it was the last owner of. */
|
|
604
|
+
release(owner) {
|
|
605
|
+
const closed = [];
|
|
606
|
+
for (const key of [...this.#docs.keys()]) if (this.close(key, owner)) closed.push(key);
|
|
607
|
+
return closed;
|
|
608
|
+
}
|
|
609
|
+
has(key) {
|
|
610
|
+
return this.#docs.has(key);
|
|
611
|
+
}
|
|
612
|
+
owns(key, owner) {
|
|
613
|
+
return this.#docs.get(key)?.owners.has(owner) ?? false;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
const DEFAULT_OWNER = "main";
|
|
566
617
|
class LspManager {
|
|
567
618
|
#clients = /* @__PURE__ */ new Map();
|
|
619
|
+
/** Detections in flight, so concurrent opens share one server. */
|
|
620
|
+
#starting = /* @__PURE__ */ new Map();
|
|
621
|
+
#owners = new DocOwners();
|
|
568
622
|
#options = { idleMs: 5 * 6e4, overrides: {} };
|
|
569
623
|
#emit;
|
|
570
624
|
constructor(emit) {
|
|
@@ -579,6 +633,14 @@ class LspManager {
|
|
|
579
633
|
const key = `${cwd}\0${server.id}`;
|
|
580
634
|
const existing = this.#clients.get(key);
|
|
581
635
|
if (existing) return existing;
|
|
636
|
+
let starting = this.#starting.get(key);
|
|
637
|
+
if (!starting) {
|
|
638
|
+
starting = this.#startClient(cwd, server, key).finally(() => this.#starting.delete(key));
|
|
639
|
+
this.#starting.set(key, starting);
|
|
640
|
+
}
|
|
641
|
+
return starting;
|
|
642
|
+
}
|
|
643
|
+
async #startClient(cwd, server, key) {
|
|
582
644
|
const ctx = makeToolContext(cwd, 1e4);
|
|
583
645
|
const detected = await detectServer(ctx, server, this.#options.overrides[server.id]);
|
|
584
646
|
if (!detected || "missing" in detected) return null;
|
|
@@ -594,13 +656,36 @@ class LspManager {
|
|
|
594
656
|
this.#clients.set(key, client);
|
|
595
657
|
return client;
|
|
596
658
|
}
|
|
597
|
-
|
|
659
|
+
/**
|
|
660
|
+
* Open `path` for `owner`, or apply its new text (see {@link DocOwners}).
|
|
661
|
+
* An owner joining a document another one has open gets the current
|
|
662
|
+
* findings without its text being sent.
|
|
663
|
+
*/
|
|
664
|
+
async open(cwd, path, text, changes, owner = DEFAULT_OWNER) {
|
|
665
|
+
if (!serverFor(path)) return [];
|
|
666
|
+
const docKey = `${cwd}\0${path}`;
|
|
667
|
+
const step = this.#owners.open(docKey, owner);
|
|
598
668
|
const client = await this.#clientFor(cwd, path);
|
|
599
669
|
if (!client) return [];
|
|
600
|
-
|
|
670
|
+
if (!this.#owners.owns(docKey, owner)) return [];
|
|
671
|
+
if (step.kind === "attach" && client.isOpen(path)) return client.diagnosticsFor(path);
|
|
672
|
+
const incremental = step.kind === "change" && !step.full ? changes : void 0;
|
|
673
|
+
await client.open(path, text, incremental).catch(() => void 0);
|
|
601
674
|
return client.diagnosticsFor(path);
|
|
602
675
|
}
|
|
603
|
-
|
|
676
|
+
/** `owner` closed `path`; the server hears `didClose` when it was the last one. */
|
|
677
|
+
close(cwd, path, owner = DEFAULT_OWNER) {
|
|
678
|
+
if (!this.#owners.close(`${cwd}\0${path}`, owner)) return;
|
|
679
|
+
this.#closeDoc(cwd, path);
|
|
680
|
+
}
|
|
681
|
+
/** `owner` went away: close what only it had open. */
|
|
682
|
+
release(owner) {
|
|
683
|
+
for (const key of this.#owners.release(owner)) {
|
|
684
|
+
const at = key.indexOf("\0");
|
|
685
|
+
this.#closeDoc(key.slice(0, at), key.slice(at + 1));
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
#closeDoc(cwd, path) {
|
|
604
689
|
const server = serverFor(path);
|
|
605
690
|
if (!server) return;
|
|
606
691
|
this.#clients.get(`${cwd}\0${server.id}`)?.close(path);
|
package/out/preload/index.mjs
CHANGED
|
@@ -41,6 +41,7 @@ const subscribe = createChannelFanout({
|
|
|
41
41
|
const api = {
|
|
42
42
|
sessions: {
|
|
43
43
|
list: (filter, hostId) => ipcRenderer.invoke("sessions:list", filter, hostId),
|
|
44
|
+
ids: () => ipcRenderer.invoke("sessions:ids"),
|
|
44
45
|
search: (query, filter) => ipcRenderer.invoke("sessions:search", query, filter),
|
|
45
46
|
create: (input) => ipcRenderer.invoke("sessions:create", input),
|
|
46
47
|
setTitle: (id, title) => ipcRenderer.invoke("sessions:setTitle", id, title),
|
|
@@ -49,13 +50,19 @@ const api = {
|
|
|
49
50
|
detachFolder: (id) => ipcRenderer.invoke("sessions:detachFolder", id),
|
|
50
51
|
setEffort: (id, effort) => ipcRenderer.invoke("sessions:setEffort", id, effort),
|
|
51
52
|
setModelOptions: (id, options) => ipcRenderer.invoke("sessions:setModelOptions", id, options),
|
|
52
|
-
setModel: (id,
|
|
53
|
+
setModel: (id, pick, fallbacks) => ipcRenderer.invoke("sessions:setModel", id, pick, fallbacks),
|
|
53
54
|
listModels: (cwd, hostId) => ipcRenderer.invoke("sessions:listModels", cwd, hostId),
|
|
55
|
+
listDecisionModels: (cwd, hostId) => ipcRenderer.invoke("sessions:listDecisionModels", cwd, hostId),
|
|
56
|
+
testDecisionModel: (cwd, hostId, model) => ipcRenderer.invoke("sessions:testDecisionModel", cwd, hostId, model),
|
|
57
|
+
testModel: (cwd, hostId, model) => ipcRenderer.invoke("sessions:testModel", cwd, hostId, model),
|
|
58
|
+
titleStatus: (id) => ipcRenderer.invoke("sessions:titleStatus", id),
|
|
54
59
|
fork: (id, turnId, opts) => ipcRenderer.invoke("sessions:fork", id, turnId, opts),
|
|
55
60
|
deleteTurn: (id, turnId) => ipcRenderer.invoke("sessions:deleteTurn", id, turnId),
|
|
56
61
|
getTurn: (id, turnId) => ipcRenderer.invoke("sessions:getTurn", id, turnId),
|
|
57
62
|
editTurnText: (id, turnId, text) => ipcRenderer.invoke("sessions:editTurnText", id, turnId, text),
|
|
63
|
+
rewind: (id, turnId, opts) => ipcRenderer.invoke("sessions:rewind", id, turnId, opts),
|
|
58
64
|
delete: (id) => ipcRenderer.invoke("sessions:delete", id),
|
|
65
|
+
sideSession: (parent) => ipcRenderer.invoke("sessions:sideSession", parent),
|
|
59
66
|
retryEnvironment: (id) => ipcRenderer.invoke("sessions:retryEnvironment", id),
|
|
60
67
|
environmentActions: (id) => ipcRenderer.invoke("sessions:environmentActions", id),
|
|
61
68
|
runEnvironmentAction: (id, actionId) => ipcRenderer.invoke("sessions:runEnvironmentAction", id, actionId),
|
|
@@ -71,6 +78,8 @@ const api = {
|
|
|
71
78
|
contextSegments: (id) => ipcRenderer.invoke("sessions:contextSegments", id),
|
|
72
79
|
costStatus: (id) => ipcRenderer.invoke("sessions:costStatus", id),
|
|
73
80
|
setArchived: (id, archived) => ipcRenderer.invoke("sessions:setArchived", id, archived),
|
|
81
|
+
setFavorite: (id, favorite) => ipcRenderer.invoke("sessions:setFavorite", id, favorite),
|
|
82
|
+
setSpace: (id, spaceId) => ipcRenderer.invoke("sessions:setSpace", id, spaceId),
|
|
74
83
|
onChanged: (cb) => subscribe("sessions:changed", cb)
|
|
75
84
|
},
|
|
76
85
|
folder: {
|
|
@@ -114,6 +123,7 @@ const api = {
|
|
|
114
123
|
panelAction: (sessionKey, action) => ipcRenderer.invoke("windows:panelAction", sessionKey, action),
|
|
115
124
|
onChanged: (cb) => subscribe("windows:changed", cb),
|
|
116
125
|
onShow: (cb) => subscribe("windows:show", cb),
|
|
126
|
+
takePendingShow: () => ipcRenderer.invoke("windows:takePendingShow"),
|
|
117
127
|
onPanelAction: (cb) => subscribe("windows:panelAction", cb)
|
|
118
128
|
},
|
|
119
129
|
appearance: {
|
|
@@ -128,6 +138,11 @@ const api = {
|
|
|
128
138
|
setNativeTheme: (mode) => ipcRenderer.invoke("appearance:nativeTheme", mode),
|
|
129
139
|
setWindowBackground: (hex) => ipcRenderer.invoke("appearance:background", hex)
|
|
130
140
|
},
|
|
141
|
+
appIcon: {
|
|
142
|
+
state: () => ipcRenderer.invoke("appIcon:state"),
|
|
143
|
+
set: (id) => ipcRenderer.invoke("appIcon:set", id),
|
|
144
|
+
onChanged: (cb) => subscribe("appIcon:changed", cb)
|
|
145
|
+
},
|
|
131
146
|
update: {
|
|
132
147
|
state: () => ipcRenderer.invoke("update:state"),
|
|
133
148
|
check: () => ipcRenderer.invoke("update:check"),
|
|
@@ -145,7 +160,8 @@ const api = {
|
|
|
145
160
|
listWork: (sessionId) => ipcRenderer.invoke("chat:listWork", sessionId),
|
|
146
161
|
cancelWork: (sessionId, id, reason) => ipcRenderer.invoke("chat:cancelWork", sessionId, id, reason),
|
|
147
162
|
onStreamSignal: (cb) => subscribe("chat:stream", cb),
|
|
148
|
-
onSkillsChanged: (cb) => subscribe("skills:changed", cb)
|
|
163
|
+
onSkillsChanged: (cb) => subscribe("skills:changed", cb),
|
|
164
|
+
onSuggestionReady: (cb) => subscribe("suggestion:ready", cb)
|
|
149
165
|
},
|
|
150
166
|
drafts: {
|
|
151
167
|
get: (sessionId) => ipcRenderer.invoke("drafts:get", sessionId),
|
|
@@ -171,6 +187,10 @@ const api = {
|
|
|
171
187
|
list: () => ipcRenderer.invoke("presence:list"),
|
|
172
188
|
onChanged: (cb) => subscribe("presence:changed", cb)
|
|
173
189
|
},
|
|
190
|
+
hud: {
|
|
191
|
+
get: () => ipcRenderer.invoke("hud:get"),
|
|
192
|
+
onState: (cb) => subscribe("hud:state", cb)
|
|
193
|
+
},
|
|
174
194
|
daemon: {
|
|
175
195
|
onState: (cb) => subscribe("daemon:state", cb),
|
|
176
196
|
health: () => ipcRenderer.invoke("daemon:health"),
|
|
@@ -213,7 +233,8 @@ const api = {
|
|
|
213
233
|
},
|
|
214
234
|
providerUsage: {
|
|
215
235
|
fetchAll: (cwd, opts) => ipcRenderer.invoke("usage:fetchAll", cwd, opts),
|
|
216
|
-
fetch: (providerKey, cwd, opts) => ipcRenderer.invoke("usage:fetch", providerKey, cwd, opts)
|
|
236
|
+
fetch: (providerKey, cwd, opts) => ipcRenderer.invoke("usage:fetch", providerKey, cwd, opts),
|
|
237
|
+
fetchGithub: (opts) => ipcRenderer.invoke("usage:github", opts)
|
|
217
238
|
},
|
|
218
239
|
usage: {
|
|
219
240
|
summary: (range) => ipcRenderer.invoke("usage:summary", range)
|
|
@@ -231,6 +252,7 @@ const api = {
|
|
|
231
252
|
},
|
|
232
253
|
workspace: {
|
|
233
254
|
list: (cwd, options) => ipcRenderer.invoke("workspace:list", cwd, options),
|
|
255
|
+
projectRoot: (cwd) => ipcRenderer.invoke("workspace:projectRoot", cwd),
|
|
234
256
|
read: (cwd, path) => ipcRenderer.invoke("workspace:read", cwd, path),
|
|
235
257
|
resolvePaths: (cwd, texts) => ipcRenderer.invoke("workspace:resolvePaths", cwd, texts),
|
|
236
258
|
write: (cwd, path, contents, expectedMtimeMs) => ipcRenderer.invoke("workspace:write", cwd, path, contents, expectedMtimeMs),
|
|
@@ -247,14 +269,12 @@ const api = {
|
|
|
247
269
|
// Infinity does not survive structured clone; null stands for it.
|
|
248
270
|
gitDiff: (cwd, path, context) => ipcRenderer.invoke("workspace:gitDiff", cwd, path, context === Infinity ? null : context),
|
|
249
271
|
gitShowHead: (cwd, path) => ipcRenderer.invoke("workspace:gitShowHead", cwd, path),
|
|
272
|
+
gitCommit: (cwd, sha) => ipcRenderer.invoke("workspace:gitCommit", cwd, sha),
|
|
250
273
|
search: (cwd, query, opts) => ipcRenderer.invoke("workspace:search", cwd, query, opts),
|
|
251
274
|
gitInfo: (cwd) => ipcRenderer.invoke("workspace:gitInfo", cwd),
|
|
252
275
|
gitPr: (cwd, branch, fresh) => ipcRenderer.invoke("workspace:gitPr", cwd, branch, fresh),
|
|
253
276
|
gitBranches: (cwd) => ipcRenderer.invoke("workspace:gitBranches", cwd),
|
|
254
277
|
gitPrList: (cwd, query, fresh) => ipcRenderer.invoke("workspace:gitPrList", cwd, query, fresh),
|
|
255
|
-
gitWatch: (cwd) => ipcRenderer.invoke("workspace:gitWatch", cwd),
|
|
256
|
-
gitUnwatch: (cwd) => ipcRenderer.invoke("workspace:gitUnwatch", cwd),
|
|
257
|
-
onGitChanged: (cb) => subscribe("git:changed", cb),
|
|
258
278
|
gitSwitch: (cwd, target, sessionId) => ipcRenderer.invoke("workspace:gitSwitch", cwd, target, sessionId ?? null),
|
|
259
279
|
gitSync: (cwd, sessionId) => ipcRenderer.invoke("workspace:gitSync", cwd, sessionId ?? null)
|
|
260
280
|
},
|
|
@@ -271,11 +291,19 @@ const api = {
|
|
|
271
291
|
onDevTools: (cb) => subscribe("browser:devtools", cb),
|
|
272
292
|
onOpen: (cb) => subscribe("browser:open", cb),
|
|
273
293
|
onDriving: (cb) => subscribe("browser:driving", cb),
|
|
274
|
-
onPointer: (cb) => subscribe("browser:pointer", cb)
|
|
294
|
+
onPointer: (cb) => subscribe("browser:pointer", cb),
|
|
295
|
+
annotateStart: (sessionId, from) => ipcRenderer.invoke("browser:annotateStart", sessionId, from),
|
|
296
|
+
annotate: (sessionId, op, n) => ipcRenderer.invoke("browser:annotate", sessionId, op, n ?? null),
|
|
297
|
+
captureAnnotated: (sessionId) => ipcRenderer.invoke("browser:captureAnnotated", sessionId),
|
|
298
|
+
onAnnotation: (cb) => subscribe("browser:annotation", cb)
|
|
275
299
|
},
|
|
276
300
|
terminal: {
|
|
277
301
|
state: (sessionId) => ipcRenderer.invoke("terminal:state", sessionId),
|
|
278
302
|
open: (sessionId, target, cols, rows) => ipcRenderer.invoke("terminal:open", sessionId, target, cols, rows),
|
|
303
|
+
projectState: (cwd, draftId) => ipcRenderer.invoke("terminal:projectState", cwd, draftId),
|
|
304
|
+
openInProject: (cwd, draftId, cols, rows) => ipcRenderer.invoke("terminal:openInProject", cwd, draftId, cols, rows),
|
|
305
|
+
adopt: (draftId, sessionId) => ipcRenderer.invoke("terminal:adopt", draftId, sessionId),
|
|
306
|
+
releaseDraft: (draftId) => ipcRenderer.invoke("terminal:releaseDraft", draftId),
|
|
279
307
|
attach: (terminalId, clientId) => ipcRenderer.invoke("terminal:attach", terminalId, clientId),
|
|
280
308
|
detach: (terminalId, clientId) => ipcRenderer.invoke("terminal:detach", terminalId, clientId),
|
|
281
309
|
write: (terminalId, data, from) => ipcRenderer.invoke("terminal:write", terminalId, data, from),
|
|
@@ -285,6 +313,7 @@ const api = {
|
|
|
285
313
|
close: (terminalId) => ipcRenderer.invoke("terminal:close", terminalId),
|
|
286
314
|
setHidden: (terminalId, hidden) => ipcRenderer.invoke("terminal:setHidden", terminalId, hidden),
|
|
287
315
|
onChanged: (cb) => subscribe("terminal:changed", cb),
|
|
316
|
+
onProjectChanged: (cb) => subscribe("terminal:project-changed", cb),
|
|
288
317
|
onOutput: (cb) => subscribe("terminal:output", cb),
|
|
289
318
|
onReset: (cb) => subscribe("terminal:reset", cb)
|
|
290
319
|
},
|
|
@@ -336,7 +365,9 @@ const api = {
|
|
|
336
365
|
skills: {
|
|
337
366
|
list: (cwd) => ipcRenderer.invoke("skills:list", cwd),
|
|
338
367
|
install: (cwd, req) => ipcRenderer.invoke("skills:install", cwd, req),
|
|
339
|
-
remove: (cwd, skill) => ipcRenderer.invoke("skills:remove", cwd, skill)
|
|
368
|
+
remove: (cwd, skill) => ipcRenderer.invoke("skills:remove", cwd, skill),
|
|
369
|
+
read: (cwd, name) => ipcRenderer.invoke("skills:read", cwd, name),
|
|
370
|
+
write: (cwd, name, contents, expectedMtimeMs) => ipcRenderer.invoke("skills:write", cwd, name, contents, expectedMtimeMs)
|
|
340
371
|
},
|
|
341
372
|
commands: {
|
|
342
373
|
list: (cwd, hostId) => ipcRenderer.invoke("commands:list", cwd, hostId),
|
|
@@ -382,6 +413,7 @@ const api = {
|
|
|
382
413
|
},
|
|
383
414
|
logs: {
|
|
384
415
|
list: () => ipcRenderer.invoke("logs:list"),
|
|
416
|
+
report: (report) => ipcRenderer.send("logs:report", report),
|
|
385
417
|
onRecord: (cb) => {
|
|
386
418
|
const listener = (_e, record) => cb(record);
|
|
387
419
|
ipcRenderer.on("logs:record", listener);
|
|
@@ -450,6 +482,14 @@ const api = {
|
|
|
450
482
|
listDirs: (hostId, machineId, path) => ipcRenderer.invoke("machines:listDirs", hostId, machineId, path),
|
|
451
483
|
onLinks: (cb) => subscribe("machines:links", cb),
|
|
452
484
|
onStatus: (cb) => subscribe("machines:status", cb)
|
|
485
|
+
},
|
|
486
|
+
// Main sends one batch per tick (`main/invalidation.ts`); callers get one call per event.
|
|
487
|
+
invalidation: {
|
|
488
|
+
onInvalidate: (cb) => subscribe("invalidate", (events) => {
|
|
489
|
+
for (const event of events) cb(event);
|
|
490
|
+
}),
|
|
491
|
+
watch: (topic, cwd) => ipcRenderer.invoke("invalidate:watch", topic, cwd),
|
|
492
|
+
unwatch: (topic, cwd) => ipcRenderer.invoke("invalidate:unwatch", topic, cwd)
|
|
453
493
|
}
|
|
454
494
|
};
|
|
455
495
|
contextBridge.exposeInMainWorld("api", api);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __vitePreload } from "./index-
|
|
1
|
+
import { _ as __vitePreload } from "./index-DlEFfgBI.js";
|
|
2
2
|
var p = /* @__PURE__ */ ((B) => (B[B.CURSOR_KEY_APPLICATION = 0] = "CURSOR_KEY_APPLICATION", B[B.KEYPAD_KEY_APPLICATION = 1] = "KEYPAD_KEY_APPLICATION", B[B.IGNORE_KEYPAD_WITH_NUMLOCK = 2] = "IGNORE_KEYPAD_WITH_NUMLOCK", B[B.ALT_ESC_PREFIX = 3] = "ALT_ESC_PREFIX", B[B.MODIFY_OTHER_KEYS_STATE_2 = 4] = "MODIFY_OTHER_KEYS_STATE_2", B[B.KITTY_KEYBOARD_FLAGS = 5] = "KITTY_KEYBOARD_FLAGS", B))(p || {}), u = /* @__PURE__ */ ((B) => (B[B.RELEASE = 0] = "RELEASE", B[B.PRESS = 1] = "PRESS", B[B.REPEAT = 2] = "REPEAT", B))(u || {}), i = /* @__PURE__ */ ((B) => (B[B.UNIDENTIFIED = 0] = "UNIDENTIFIED", B[B.GRAVE = 1] = "GRAVE", B[B.BACKSLASH = 2] = "BACKSLASH", B[B.BRACKET_LEFT = 3] = "BRACKET_LEFT", B[B.BRACKET_RIGHT = 4] = "BRACKET_RIGHT", B[B.COMMA = 5] = "COMMA", B[B.ZERO = 6] = "ZERO", B[B.ONE = 7] = "ONE", B[B.TWO = 8] = "TWO", B[B.THREE = 9] = "THREE", B[B.FOUR = 10] = "FOUR", B[B.FIVE = 11] = "FIVE", B[B.SIX = 12] = "SIX", B[B.SEVEN = 13] = "SEVEN", B[B.EIGHT = 14] = "EIGHT", B[B.NINE = 15] = "NINE", B[B.EQUAL = 16] = "EQUAL", B[B.INTL_BACKSLASH = 17] = "INTL_BACKSLASH", B[B.INTL_RO = 18] = "INTL_RO", B[B.INTL_YEN = 19] = "INTL_YEN", B[B.A = 20] = "A", B[B.B = 21] = "B", B[B.C = 22] = "C", B[B.D = 23] = "D", B[B.E = 24] = "E", B[B.F = 25] = "F", B[B.G = 26] = "G", B[B.H = 27] = "H", B[B.I = 28] = "I", B[B.J = 29] = "J", B[B.K = 30] = "K", B[B.L = 31] = "L", B[B.M = 32] = "M", B[B.N = 33] = "N", B[B.O = 34] = "O", B[B.P = 35] = "P", B[B.Q = 36] = "Q", B[B.R = 37] = "R", B[B.S = 38] = "S", B[B.T = 39] = "T", B[B.U = 40] = "U", B[B.V = 41] = "V", B[B.W = 42] = "W", B[B.X = 43] = "X", B[B.Y = 44] = "Y", B[B.Z = 45] = "Z", B[B.MINUS = 46] = "MINUS", B[B.PERIOD = 47] = "PERIOD", B[B.QUOTE = 48] = "QUOTE", B[B.SEMICOLON = 49] = "SEMICOLON", B[B.SLASH = 50] = "SLASH", B[B.ALT_LEFT = 51] = "ALT_LEFT", B[B.ALT_RIGHT = 52] = "ALT_RIGHT", B[B.BACKSPACE = 53] = "BACKSPACE", B[B.CAPS_LOCK = 54] = "CAPS_LOCK", B[B.CONTEXT_MENU = 55] = "CONTEXT_MENU", B[B.CONTROL_LEFT = 56] = "CONTROL_LEFT", B[B.CONTROL_RIGHT = 57] = "CONTROL_RIGHT", B[B.ENTER = 58] = "ENTER", B[B.META_LEFT = 59] = "META_LEFT", B[B.META_RIGHT = 60] = "META_RIGHT", B[B.SHIFT_LEFT = 61] = "SHIFT_LEFT", B[B.SHIFT_RIGHT = 62] = "SHIFT_RIGHT", B[B.SPACE = 63] = "SPACE", B[B.TAB = 64] = "TAB", B[B.CONVERT = 65] = "CONVERT", B[B.KANA_MODE = 66] = "KANA_MODE", B[B.NON_CONVERT = 67] = "NON_CONVERT", B[B.DELETE = 68] = "DELETE", B[B.END = 69] = "END", B[B.HELP = 70] = "HELP", B[B.HOME = 71] = "HOME", B[B.INSERT = 72] = "INSERT", B[B.PAGE_DOWN = 73] = "PAGE_DOWN", B[B.PAGE_UP = 74] = "PAGE_UP", B[B.DOWN = 75] = "DOWN", B[B.LEFT = 76] = "LEFT", B[B.RIGHT = 77] = "RIGHT", B[B.UP = 78] = "UP", B[B.NUM_LOCK = 79] = "NUM_LOCK", B[B.KP_0 = 80] = "KP_0", B[B.KP_1 = 81] = "KP_1", B[B.KP_2 = 82] = "KP_2", B[B.KP_3 = 83] = "KP_3", B[B.KP_4 = 84] = "KP_4", B[B.KP_5 = 85] = "KP_5", B[B.KP_6 = 86] = "KP_6", B[B.KP_7 = 87] = "KP_7", B[B.KP_8 = 88] = "KP_8", B[B.KP_9 = 89] = "KP_9", B[B.KP_PLUS = 90] = "KP_PLUS", B[B.KP_BACKSPACE = 91] = "KP_BACKSPACE", B[B.KP_CLEAR = 92] = "KP_CLEAR", B[B.KP_CLEAR_ENTRY = 93] = "KP_CLEAR_ENTRY", B[B.KP_COMMA = 94] = "KP_COMMA", B[B.KP_PERIOD = 95] = "KP_PERIOD", B[B.KP_DIVIDE = 96] = "KP_DIVIDE", B[B.KP_ENTER = 97] = "KP_ENTER", B[B.KP_EQUAL = 98] = "KP_EQUAL", B[B.KP_MEMORY_ADD = 99] = "KP_MEMORY_ADD", B[B.KP_MEMORY_CLEAR = 100] = "KP_MEMORY_CLEAR", B[B.KP_MEMORY_RECALL = 101] = "KP_MEMORY_RECALL", B[B.KP_MEMORY_STORE = 102] = "KP_MEMORY_STORE", B[B.KP_MEMORY_SUBTRACT = 103] = "KP_MEMORY_SUBTRACT", B[B.KP_MULTIPLY = 104] = "KP_MULTIPLY", B[B.KP_PAREN_LEFT = 105] = "KP_PAREN_LEFT", B[B.KP_PAREN_RIGHT = 106] = "KP_PAREN_RIGHT", B[B.KP_MINUS = 107] = "KP_MINUS", B[B.KP_SEPARATOR = 108] = "KP_SEPARATOR", B[B.NUMPAD_UP = 109] = "NUMPAD_UP", B[B.NUMPAD_DOWN = 110] = "NUMPAD_DOWN", B[B.NUMPAD_RIGHT = 111] = "NUMPAD_RIGHT", B[B.NUMPAD_LEFT = 112] = "NUMPAD_LEFT", B[B.NUMPAD_BEGIN = 113] = "NUMPAD_BEGIN", B[B.NUMPAD_HOME = 114] = "NUMPAD_HOME", B[B.NUMPAD_END = 115] = "NUMPAD_END", B[B.NUMPAD_INSERT = 116] = "NUMPAD_INSERT", B[B.NUMPAD_DELETE = 117] = "NUMPAD_DELETE", B[B.NUMPAD_PAGE_UP = 118] = "NUMPAD_PAGE_UP", B[B.NUMPAD_PAGE_DOWN = 119] = "NUMPAD_PAGE_DOWN", B[B.ESCAPE = 120] = "ESCAPE", B[B.F1 = 121] = "F1", B[B.F2 = 122] = "F2", B[B.F3 = 123] = "F3", B[B.F4 = 124] = "F4", B[B.F5 = 125] = "F5", B[B.F6 = 126] = "F6", B[B.F7 = 127] = "F7", B[B.F8 = 128] = "F8", B[B.F9 = 129] = "F9", B[B.F10 = 130] = "F10", B[B.F11 = 131] = "F11", B[B.F12 = 132] = "F12", B[B.F13 = 133] = "F13", B[B.F14 = 134] = "F14", B[B.F15 = 135] = "F15", B[B.F16 = 136] = "F16", B[B.F17 = 137] = "F17", B[B.F18 = 138] = "F18", B[B.F19 = 139] = "F19", B[B.F20 = 140] = "F20", B[B.F21 = 141] = "F21", B[B.F22 = 142] = "F22", B[B.F23 = 143] = "F23", B[B.F24 = 144] = "F24", B[B.F25 = 145] = "F25", B[B.FN_LOCK = 146] = "FN_LOCK", B[B.PRINT_SCREEN = 147] = "PRINT_SCREEN", B[B.SCROLL_LOCK = 148] = "SCROLL_LOCK", B[B.PAUSE = 149] = "PAUSE", B[B.BROWSER_BACK = 150] = "BROWSER_BACK", B[B.BROWSER_FAVORITES = 151] = "BROWSER_FAVORITES", B[B.BROWSER_FORWARD = 152] = "BROWSER_FORWARD", B[B.BROWSER_HOME = 153] = "BROWSER_HOME", B[B.BROWSER_REFRESH = 154] = "BROWSER_REFRESH", B[B.BROWSER_SEARCH = 155] = "BROWSER_SEARCH", B[B.BROWSER_STOP = 156] = "BROWSER_STOP", B[B.EJECT = 157] = "EJECT", B[B.LAUNCH_APP_1 = 158] = "LAUNCH_APP_1", B[B.LAUNCH_APP_2 = 159] = "LAUNCH_APP_2", B[B.LAUNCH_MAIL = 160] = "LAUNCH_MAIL", B[B.MEDIA_PLAY_PAUSE = 161] = "MEDIA_PLAY_PAUSE", B[B.MEDIA_SELECT = 162] = "MEDIA_SELECT", B[B.MEDIA_STOP = 163] = "MEDIA_STOP", B[B.MEDIA_TRACK_NEXT = 164] = "MEDIA_TRACK_NEXT", B[B.MEDIA_TRACK_PREVIOUS = 165] = "MEDIA_TRACK_PREVIOUS", B[B.POWER = 166] = "POWER", B[B.SLEEP = 167] = "SLEEP", B[B.AUDIO_VOLUME_DOWN = 168] = "AUDIO_VOLUME_DOWN", B[B.AUDIO_VOLUME_MUTE = 169] = "AUDIO_VOLUME_MUTE", B[B.AUDIO_VOLUME_UP = 170] = "AUDIO_VOLUME_UP", B[B.WAKE_UP = 171] = "WAKE_UP", B[B.COPY = 172] = "COPY", B[B.CUT = 173] = "CUT", B[B.PASTE = 174] = "PASTE", B))(i || {}), r = /* @__PURE__ */ ((B) => (B[B.NONE = 0] = "NONE", B[B.SHIFT = 1] = "SHIFT", B[B.CTRL = 2] = "CTRL", B[B.ALT = 4] = "ALT", B[B.SUPER = 8] = "SUPER", B[B.CAPSLOCK = 16] = "CAPSLOCK", B[B.NUMLOCK = 32] = "NUMLOCK", B))(r || {}), S = /* @__PURE__ */ ((B) => (B[B.NONE = 0] = "NONE", B[B.PARTIAL = 1] = "PARTIAL", B[B.FULL = 2] = "FULL", B))(S || {});
|
|
3
3
|
const f = 80;
|
|
4
4
|
var G = /* @__PURE__ */ ((B) => (B[B.BOLD = 1] = "BOLD", B[B.ITALIC = 2] = "ITALIC", B[B.UNDERLINE = 4] = "UNDERLINE", B[B.STRIKETHROUGH = 8] = "STRIKETHROUGH", B[B.INVERSE = 16] = "INVERSE", B[B.INVISIBLE = 32] = "INVISIBLE", B[B.BLINK = 64] = "BLINK", B[B.FAINT = 128] = "FAINT", B))(G || {});
|