nomoreide 0.1.32 → 0.1.33
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/dist/core/process-manager.d.ts +15 -0
- package/dist/core/process-manager.js +105 -6
- package/dist/core/process-manager.js.map +1 -1
- package/dist/core/service-registry.d.ts +50 -0
- package/dist/core/service-registry.js +98 -0
- package/dist/core/service-registry.js.map +1 -0
- package/dist/mcp/server.js +8 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/web/client/assets/{index-ChkTuULV.js → index-DHmbWLCJ.js} +1 -1
- package/dist/web/client/index.html +1 -1
- package/dist/web/server.js +10 -2
- package/dist/web/server.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ConfigStore } from "./config-store.js";
|
|
2
2
|
import type { LogStore } from "./log-store.js";
|
|
3
3
|
import { type PortHolder } from "./port-utils.js";
|
|
4
|
+
import { type ServiceRegistry } from "./service-registry.js";
|
|
4
5
|
import type { TimelineStore } from "./timeline-store.js";
|
|
5
6
|
import type { ServiceStatus } from "./types.js";
|
|
6
7
|
interface ProcessManagerOptions {
|
|
@@ -8,6 +9,13 @@ interface ProcessManagerOptions {
|
|
|
8
9
|
logStore: LogStore;
|
|
9
10
|
stopTimeoutMs?: number;
|
|
10
11
|
timelineStore?: TimelineStore;
|
|
12
|
+
/**
|
|
13
|
+
* Shared cross-session view of running services. When provided, the manager
|
|
14
|
+
* adopts services started by other sessions instead of spawning duplicates,
|
|
15
|
+
* and can stop services it did not spawn itself. Omit for an isolated manager
|
|
16
|
+
* (e.g. in tests) — behavior is then identical to a single-session manager.
|
|
17
|
+
*/
|
|
18
|
+
registry?: ServiceRegistry;
|
|
11
19
|
}
|
|
12
20
|
export interface NoMoreIdeStatus {
|
|
13
21
|
services: Record<string, ServiceStatus>;
|
|
@@ -28,6 +36,7 @@ export declare class ProcessManager {
|
|
|
28
36
|
private readonly logStore;
|
|
29
37
|
private readonly stopTimeoutMs;
|
|
30
38
|
private readonly timelineStore?;
|
|
39
|
+
private readonly registry?;
|
|
31
40
|
constructor(options: ProcessManagerOptions);
|
|
32
41
|
startService(name: string, options?: StartServiceOptions): Promise<ServiceStatus>;
|
|
33
42
|
stopService(name: string): Promise<ServiceStatus>;
|
|
@@ -45,6 +54,12 @@ export declare class ProcessManager {
|
|
|
45
54
|
installShutdownHandlers(): () => void;
|
|
46
55
|
status(): NoMoreIdeStatus;
|
|
47
56
|
statusWithResources(): Promise<NoMoreIdeStatus>;
|
|
57
|
+
/**
|
|
58
|
+
* Fold in services started by sibling sessions. A registry entry wins only
|
|
59
|
+
* when this session has no running view of that service, so a locally-owned
|
|
60
|
+
* "running" status is never overwritten by the shared snapshot.
|
|
61
|
+
*/
|
|
62
|
+
private mergeRegistry;
|
|
48
63
|
private startDockerComposeService;
|
|
49
64
|
private stopDockerComposeService;
|
|
50
65
|
readDockerServiceLogs(name: string, tail?: number): Promise<string>;
|
|
@@ -3,6 +3,7 @@ import { readDockerServiceLogs, readDockerServiceStatus, startDockerService, sto
|
|
|
3
3
|
import { startHttpInspector, } from "./http-inspector.js";
|
|
4
4
|
import { getPortHolder, isPortAvailable } from "./port-utils.js";
|
|
5
5
|
import { readProcessTree } from "./process-tree.js";
|
|
6
|
+
import { isPidAlive, } from "./service-registry.js";
|
|
6
7
|
import { createSshCommand } from "./ssh-service-runner.js";
|
|
7
8
|
export class PortConflictError extends Error {
|
|
8
9
|
code = "PORT_IN_USE";
|
|
@@ -24,11 +25,13 @@ export class ProcessManager {
|
|
|
24
25
|
logStore;
|
|
25
26
|
stopTimeoutMs;
|
|
26
27
|
timelineStore;
|
|
28
|
+
registry;
|
|
27
29
|
constructor(options) {
|
|
28
30
|
this.configStore = options.configStore;
|
|
29
31
|
this.logStore = options.logStore;
|
|
30
32
|
this.stopTimeoutMs = options.stopTimeoutMs ?? 3000;
|
|
31
33
|
this.timelineStore = options.timelineStore;
|
|
34
|
+
this.registry = options.registry;
|
|
32
35
|
}
|
|
33
36
|
async startService(name, options = {}) {
|
|
34
37
|
const service = await this.getService(name);
|
|
@@ -40,6 +43,13 @@ export class ProcessManager {
|
|
|
40
43
|
if (kind === "docker-compose") {
|
|
41
44
|
return this.startDockerComposeService(name, service);
|
|
42
45
|
}
|
|
46
|
+
// Another session may already be running this exact service. Adopt its
|
|
47
|
+
// status instead of spawning a duplicate — this also covers portless
|
|
48
|
+
// services, where the port check below cannot detect the conflict.
|
|
49
|
+
const tracked = this.registry?.get(name);
|
|
50
|
+
if (tracked) {
|
|
51
|
+
return registryEntryToStatus(tracked);
|
|
52
|
+
}
|
|
43
53
|
if (service.port && !(await isPortAvailable(service.port))) {
|
|
44
54
|
const holder = await getPortHolder(service.port);
|
|
45
55
|
if (options.killHolder && holder) {
|
|
@@ -66,6 +76,18 @@ export class ProcessManager {
|
|
|
66
76
|
},
|
|
67
77
|
};
|
|
68
78
|
this.runtimes.set(name, runtime);
|
|
79
|
+
if (child.pid) {
|
|
80
|
+
this.registry?.record({
|
|
81
|
+
name,
|
|
82
|
+
pid: child.pid,
|
|
83
|
+
pgid: child.pid, // detached spawn → child.pid is the process-group leader
|
|
84
|
+
port: service.port,
|
|
85
|
+
kind,
|
|
86
|
+
host: kind === "ssh" ? service.host : undefined,
|
|
87
|
+
startedAt: runtime.status.startedAt ?? new Date().toISOString(),
|
|
88
|
+
ownerPid: process.pid,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
69
91
|
void this.appendTimeline({
|
|
70
92
|
kind: "service.lifecycle",
|
|
71
93
|
service: name,
|
|
@@ -87,6 +109,7 @@ export class ProcessManager {
|
|
|
87
109
|
signal,
|
|
88
110
|
};
|
|
89
111
|
runtime.child = undefined;
|
|
112
|
+
this.registry?.remove(name);
|
|
90
113
|
void this.stopInspector(runtime);
|
|
91
114
|
void this.appendTimeline({
|
|
92
115
|
kind: "service.lifecycle",
|
|
@@ -107,6 +130,7 @@ export class ProcessManager {
|
|
|
107
130
|
exitCode: 1,
|
|
108
131
|
signal: null,
|
|
109
132
|
};
|
|
133
|
+
this.registry?.remove(name);
|
|
110
134
|
void this.logStore.append(name, "stderr", error.message);
|
|
111
135
|
void this.appendTimeline({
|
|
112
136
|
kind: "service.lifecycle",
|
|
@@ -124,6 +148,13 @@ export class ProcessManager {
|
|
|
124
148
|
return this.stopDockerComposeService(name, runtime);
|
|
125
149
|
}
|
|
126
150
|
if (!runtime?.child || runtime.status.state !== "running") {
|
|
151
|
+
// No live child in this session — a sibling session may own it. If the
|
|
152
|
+
// registry has a live entry, signal its process group to stop it.
|
|
153
|
+
const tracked = this.registry?.get(name);
|
|
154
|
+
if (tracked) {
|
|
155
|
+
await stopByPid(tracked.pid, tracked.pgid, this.stopTimeoutMs);
|
|
156
|
+
this.registry?.remove(name);
|
|
157
|
+
}
|
|
127
158
|
const stopped = { name, state: "stopped" };
|
|
128
159
|
this.runtimes.set(name, { status: stopped, stopping: false });
|
|
129
160
|
void this.appendTimeline({
|
|
@@ -262,6 +293,9 @@ export class ProcessManager {
|
|
|
262
293
|
continue;
|
|
263
294
|
signalProcessTree(runtime.child, signal);
|
|
264
295
|
}
|
|
296
|
+
// Drop this session's entries synchronously; the async exit handlers above
|
|
297
|
+
// may not run before the host process exits.
|
|
298
|
+
this.registry?.removeOwnedBy(process.pid);
|
|
265
299
|
}
|
|
266
300
|
installShutdownHandlers() {
|
|
267
301
|
let firing = false;
|
|
@@ -289,12 +323,12 @@ export class ProcessManager {
|
|
|
289
323
|
};
|
|
290
324
|
}
|
|
291
325
|
status() {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
};
|
|
326
|
+
const services = {};
|
|
327
|
+
for (const [name, runtime] of this.runtimes.entries()) {
|
|
328
|
+
services[name] = { ...runtime.status };
|
|
329
|
+
}
|
|
330
|
+
this.mergeRegistry(services);
|
|
331
|
+
return { services };
|
|
298
332
|
}
|
|
299
333
|
async statusWithResources() {
|
|
300
334
|
const services = {};
|
|
@@ -306,8 +340,29 @@ export class ProcessManager {
|
|
|
306
340
|
status.inspector = this.inspectorStatus(runtime);
|
|
307
341
|
services[name] = status;
|
|
308
342
|
}
|
|
343
|
+
this.mergeRegistry(services);
|
|
344
|
+
for (const status of Object.values(services)) {
|
|
345
|
+
if (status.pid && status.state === "running" && !status.processTree) {
|
|
346
|
+
status.processTree = await readProcessTree(status.pid);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
309
349
|
return { services };
|
|
310
350
|
}
|
|
351
|
+
/**
|
|
352
|
+
* Fold in services started by sibling sessions. A registry entry wins only
|
|
353
|
+
* when this session has no running view of that service, so a locally-owned
|
|
354
|
+
* "running" status is never overwritten by the shared snapshot.
|
|
355
|
+
*/
|
|
356
|
+
mergeRegistry(services) {
|
|
357
|
+
if (!this.registry)
|
|
358
|
+
return;
|
|
359
|
+
for (const entry of this.registry.list()) {
|
|
360
|
+
const local = services[entry.name];
|
|
361
|
+
if (!local || local.state !== "running") {
|
|
362
|
+
services[entry.name] = registryEntryToStatus(entry);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
311
366
|
async startDockerComposeService(name, service) {
|
|
312
367
|
const target = toDockerTarget(name, service);
|
|
313
368
|
const info = await startDockerService(target);
|
|
@@ -392,6 +447,7 @@ export class ProcessManager {
|
|
|
392
447
|
const runtime = this.runtimes.get(service);
|
|
393
448
|
if (runtime) {
|
|
394
449
|
runtime.status = { ...runtime.status, url };
|
|
450
|
+
this.registry?.update(service, { url });
|
|
395
451
|
void this.maybeStartInspector(service);
|
|
396
452
|
}
|
|
397
453
|
void this.appendTimeline({
|
|
@@ -422,6 +478,49 @@ export class ProcessManager {
|
|
|
422
478
|
function resolveKind(service) {
|
|
423
479
|
return service.kind ?? "local";
|
|
424
480
|
}
|
|
481
|
+
function registryEntryToStatus(entry) {
|
|
482
|
+
return {
|
|
483
|
+
name: entry.name,
|
|
484
|
+
state: "running",
|
|
485
|
+
kind: entry.kind,
|
|
486
|
+
pid: entry.pid,
|
|
487
|
+
url: entry.url,
|
|
488
|
+
host: entry.host,
|
|
489
|
+
startedAt: entry.startedAt,
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Stop a process by pid when we hold no ChildProcess handle for it (it was
|
|
494
|
+
* spawned by another session). Signals the whole process group, then escalates
|
|
495
|
+
* to SIGKILL if it has not exited within the timeout.
|
|
496
|
+
*/
|
|
497
|
+
async function stopByPid(pid, pgid, timeoutMs) {
|
|
498
|
+
signalPid(pid, pgid, "SIGTERM");
|
|
499
|
+
const deadline = Date.now() + timeoutMs;
|
|
500
|
+
while (Date.now() < deadline) {
|
|
501
|
+
if (!isPidAlive(pid))
|
|
502
|
+
return;
|
|
503
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
504
|
+
}
|
|
505
|
+
signalPid(pid, pgid, "SIGKILL");
|
|
506
|
+
}
|
|
507
|
+
function signalPid(pid, pgid, signal) {
|
|
508
|
+
const group = pgid ?? pid;
|
|
509
|
+
try {
|
|
510
|
+
// Negative pid signals the whole process group (detached spawn → pgid===pid).
|
|
511
|
+
process.kill(-group, signal);
|
|
512
|
+
}
|
|
513
|
+
catch (error) {
|
|
514
|
+
if (error.code === "ESRCH")
|
|
515
|
+
return;
|
|
516
|
+
try {
|
|
517
|
+
process.kill(pid, signal);
|
|
518
|
+
}
|
|
519
|
+
catch {
|
|
520
|
+
// ignore
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
425
524
|
function toDockerTarget(name, service) {
|
|
426
525
|
if (!service.cwd || !service.composeService) {
|
|
427
526
|
throw new Error(`Service "${name}" is missing docker-compose cwd or composeService.`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-manager.js","sourceRoot":"","sources":["../../src/core/process-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EAC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UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;IAC3D,CAAC;IACD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAmB,EAAE,MAAsB;IACpE,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;IACtB,IAAI,CAAC,GAAG;QAAE,OAAO;IACjB,IAAI,CAAC;QACH,uEAAuE;QACvE,qEAAqE;QACrE,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC7B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,GAAI,KAA+B,CAAC,IAAI,CAAC;QACnD,IAAI,IAAI,KAAK,OAAO;YAAE,OAAO;QAC7B,gEAAgE;QAChE,IAAI,CAAC;YACH,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrB,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ServiceKind } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* One running service spawned by some session's ProcessManager. Persisted so
|
|
4
|
+
* every session (and the shared web UI process) sees the same set and can
|
|
5
|
+
* adopt/stop a service it did not spawn itself.
|
|
6
|
+
*
|
|
7
|
+
* Only `local`/`ssh` services are tracked here — they are the ones spawned with
|
|
8
|
+
* a real OS pid via `spawn(... detached)`, so liveness can be probed with
|
|
9
|
+
* `process.kill(pid, 0)`. docker-compose services dedupe through compose itself.
|
|
10
|
+
*/
|
|
11
|
+
export interface ServiceRegistryEntry {
|
|
12
|
+
name: string;
|
|
13
|
+
/** pid of the spawned process (also the process-group leader: detached spawn). */
|
|
14
|
+
pid: number;
|
|
15
|
+
/** process-group id, equal to `pid` for detached spawns; used for group signals. */
|
|
16
|
+
pgid?: number;
|
|
17
|
+
port?: number;
|
|
18
|
+
url?: string;
|
|
19
|
+
kind: ServiceKind;
|
|
20
|
+
host?: string;
|
|
21
|
+
startedAt: string;
|
|
22
|
+
/** pid of the manager process that spawned it (for owner-scoped cleanup). */
|
|
23
|
+
ownerPid: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Shared, project-local view of running services, persisted at
|
|
27
|
+
* `.nomoreide/runtime.json`. Reads never mutate the file; mutations rewrite it
|
|
28
|
+
* atomically (temp + rename) and drop any entries whose pid has died, so stale
|
|
29
|
+
* entries from a crashed session self-heal on the next write.
|
|
30
|
+
*/
|
|
31
|
+
export declare class ServiceRegistry {
|
|
32
|
+
private readonly path;
|
|
33
|
+
constructor(path: string);
|
|
34
|
+
list(): ServiceRegistryEntry[];
|
|
35
|
+
get(name: string): ServiceRegistryEntry | null;
|
|
36
|
+
record(entry: ServiceRegistryEntry): void;
|
|
37
|
+
update(name: string, patch: Partial<ServiceRegistryEntry>): void;
|
|
38
|
+
remove(name: string): void;
|
|
39
|
+
removeOwnedBy(ownerPid: number): void;
|
|
40
|
+
private pruned;
|
|
41
|
+
private read;
|
|
42
|
+
private write;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The shared registry lives next to the project logs: `.nomoreide/runtime.json`.
|
|
46
|
+
* `logDir` is `.nomoreide/logs`, so its parent is the `.nomoreide` root.
|
|
47
|
+
*/
|
|
48
|
+
export declare function defaultRuntimeRegistryPath(logDir: string): string;
|
|
49
|
+
/** `true` while the pid exists (including when owned by another user — EPERM). */
|
|
50
|
+
export declare function isPidAlive(pid: number): boolean;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { dirname, resolve } from "node:path";
|
|
3
|
+
/**
|
|
4
|
+
* Shared, project-local view of running services, persisted at
|
|
5
|
+
* `.nomoreide/runtime.json`. Reads never mutate the file; mutations rewrite it
|
|
6
|
+
* atomically (temp + rename) and drop any entries whose pid has died, so stale
|
|
7
|
+
* entries from a crashed session self-heal on the next write.
|
|
8
|
+
*/
|
|
9
|
+
export class ServiceRegistry {
|
|
10
|
+
path;
|
|
11
|
+
constructor(path) {
|
|
12
|
+
this.path = path;
|
|
13
|
+
}
|
|
14
|
+
list() {
|
|
15
|
+
return Object.values(this.read()).filter((entry) => isPidAlive(entry.pid));
|
|
16
|
+
}
|
|
17
|
+
get(name) {
|
|
18
|
+
const entry = this.read()[name];
|
|
19
|
+
return entry && isPidAlive(entry.pid) ? entry : null;
|
|
20
|
+
}
|
|
21
|
+
record(entry) {
|
|
22
|
+
const all = this.pruned();
|
|
23
|
+
all[entry.name] = entry;
|
|
24
|
+
this.write(all);
|
|
25
|
+
}
|
|
26
|
+
update(name, patch) {
|
|
27
|
+
const all = this.pruned();
|
|
28
|
+
const existing = all[name];
|
|
29
|
+
if (!existing)
|
|
30
|
+
return;
|
|
31
|
+
all[name] = { ...existing, ...patch };
|
|
32
|
+
this.write(all);
|
|
33
|
+
}
|
|
34
|
+
remove(name) {
|
|
35
|
+
const all = this.pruned();
|
|
36
|
+
if (name in all) {
|
|
37
|
+
delete all[name];
|
|
38
|
+
}
|
|
39
|
+
this.write(all);
|
|
40
|
+
}
|
|
41
|
+
removeOwnedBy(ownerPid) {
|
|
42
|
+
const all = this.read();
|
|
43
|
+
let changed = false;
|
|
44
|
+
for (const [name, entry] of Object.entries(all)) {
|
|
45
|
+
if (entry.ownerPid === ownerPid || !isPidAlive(entry.pid)) {
|
|
46
|
+
delete all[name];
|
|
47
|
+
changed = true;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (changed)
|
|
51
|
+
this.write(all);
|
|
52
|
+
}
|
|
53
|
+
pruned() {
|
|
54
|
+
const all = this.read();
|
|
55
|
+
for (const [name, entry] of Object.entries(all)) {
|
|
56
|
+
if (!isPidAlive(entry.pid))
|
|
57
|
+
delete all[name];
|
|
58
|
+
}
|
|
59
|
+
return all;
|
|
60
|
+
}
|
|
61
|
+
read() {
|
|
62
|
+
try {
|
|
63
|
+
const parsed = JSON.parse(readFileSync(this.path, "utf8"));
|
|
64
|
+
if (!parsed || typeof parsed !== "object")
|
|
65
|
+
return {};
|
|
66
|
+
return parsed;
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
return {};
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
write(all) {
|
|
73
|
+
mkdirSync(dirname(this.path), { recursive: true });
|
|
74
|
+
const tmp = `${this.path}.${process.pid}.tmp`;
|
|
75
|
+
writeFileSync(tmp, `${JSON.stringify(all, null, 2)}\n`);
|
|
76
|
+
renameSync(tmp, this.path);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The shared registry lives next to the project logs: `.nomoreide/runtime.json`.
|
|
81
|
+
* `logDir` is `.nomoreide/logs`, so its parent is the `.nomoreide` root.
|
|
82
|
+
*/
|
|
83
|
+
export function defaultRuntimeRegistryPath(logDir) {
|
|
84
|
+
return resolve(dirname(resolve(logDir)), "runtime.json");
|
|
85
|
+
}
|
|
86
|
+
/** `true` while the pid exists (including when owned by another user — EPERM). */
|
|
87
|
+
export function isPidAlive(pid) {
|
|
88
|
+
if (!pid || pid <= 0)
|
|
89
|
+
return false;
|
|
90
|
+
try {
|
|
91
|
+
process.kill(pid, 0);
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
return error.code === "EPERM";
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=service-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-registry.js","sourceRoot":"","sources":["../../src/core/service-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6B7C;;;;;GAKG;AACH,MAAM,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CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACnD,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,MAAM,CAAC;QAC9C,aAAa,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QACxD,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CAAC,MAAc;IACvD,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;AAC3D,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,IAAI,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IACnC,IAAI,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAQ,KAA+B,CAAC,IAAI,KAAK,OAAO,CAAC;IAC3D,CAAC;AACH,CAAC"}
|
package/dist/mcp/server.js
CHANGED
|
@@ -5,6 +5,7 @@ import { DbPeek } from "../core/db-peek.js";
|
|
|
5
5
|
import { ErrorInbox } from "../core/error-inbox.js";
|
|
6
6
|
import { LogStore } from "../core/log-store.js";
|
|
7
7
|
import { ProcessManager } from "../core/process-manager.js";
|
|
8
|
+
import { defaultRuntimeRegistryPath, ServiceRegistry, } from "../core/service-registry.js";
|
|
8
9
|
import { TimelineStore } from "../core/timeline-store.js";
|
|
9
10
|
import { ToolCallStore } from "../core/tool-call-store.js";
|
|
10
11
|
import { createUiLifecycleManager, } from "../web/ui-lifecycle.js";
|
|
@@ -21,7 +22,13 @@ export function createNoMoreIdeMcpServer(options = {}) {
|
|
|
21
22
|
baseDir: logDir,
|
|
22
23
|
timelineStore,
|
|
23
24
|
});
|
|
24
|
-
const
|
|
25
|
+
const registry = new ServiceRegistry(defaultRuntimeRegistryPath(logDir));
|
|
26
|
+
const manager = new ProcessManager({
|
|
27
|
+
configStore,
|
|
28
|
+
logStore,
|
|
29
|
+
timelineStore,
|
|
30
|
+
registry,
|
|
31
|
+
});
|
|
25
32
|
const errorInbox = new ErrorInbox({ logStore, configStore });
|
|
26
33
|
const dbPeek = new DbPeek({ configStore });
|
|
27
34
|
const toolCallStore = new ToolCallStore();
|
package/dist/mcp/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EACL,wBAAwB,GAEzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAyBxD,MAAM,UAAU,wBAAwB,CACtC,UAA2C,EAAE;IAE7C,M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B,MAAM;QACN,WAAW;QACX,MAAM;QACN,UAAU;QACV,QAAQ;QACR,OAAO;QACP,aAAa;QACb,WAAW;QACX,aAAa;KACd,CAAC,CAAC;IAEH,OAAO;QACL,MAAM;QACN,WAAW;QACX,UAAU;QACV,QAAQ;QACR,OAAO;QACP,WAAW;QACX,aAAa;QACb,SAAS,EAAE,oBAAoB;KAChC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,UAA0C,EAAE;IAE5C,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IACvC,MAAM,OAAO,GAAG,OAAO,CAAC,YAAY,EAAE,EAAE,IAAI,wBAAwB,EAAE,CAAC;IACvE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IACxC,IAAI,SAAS,IAAI,OAAO,EAAE,CAAC;QACxB,OAA8B,CAAC,OAAO,CAAC,uBAAuB,EAAE,CAAC;IACpE,CAAC;IACD,IAAI,GAAG,CAAC,iBAAiB,KAAK,GAAG,EAAE,CAAC;QAClC,IAAI,CAAC;YACH,MAAM,WAAW,CAAC,aAAa,EAAE,CAAC;QACpC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,oCACE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,IAAI,CACL,CAAC;QACJ,CAAC;IACH,CAAC;IACD,MAAM,MAAM,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -42,4 +42,4 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Ft=ue,lt=Ae),Ge===void
|
|
|
42
42
|
`).map(ES):s.split(`
|
|
43
43
|
`).map(r=>{if(!r)return"";try{return wS.highlight(r,{language:t,ignoreIllegals:!0}).value}catch{return ES(r)}})}function ES(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Uj({content:e,path:t}){const s=E.useMemo(()=>Pj(t),[t]),r=E.useMemo(()=>Ij(e,s),[e,s]),o=`${Math.max(2,String(r.length).length)}ch`;return u.jsx("div",{className:"min-w-max font-mono text-[12px] leading-[1.5]",children:r.map((l,d)=>u.jsxs("div",{className:"flex",children:[u.jsx("span",{className:"shrink-0 select-none border-r border-zinc-200 bg-zinc-100 px-2 text-right text-zinc-400",style:{minWidth:`calc(${o} + 1rem)`},children:d+1}),u.jsx("span",{className:"hljs whitespace-pre px-3 text-zinc-800",dangerouslySetInnerHTML:{__html:l||" "}})]},d))})}function Hj({path:e,isModified:t,onViewDiff:s}){const[r,o]=E.useState(null),[l,d]=E.useState(null),[f,m]=E.useState(!1);return E.useEffect(()=>{if(!e){o(null);return}let h=!0;return m(!0),d(null),eT(e).then(_=>{h&&(o(_),m(!1))}).catch(_=>{h&&(d(_ instanceof Error?_.message:String(_)),m(!1))}),()=>{h=!1}},[e]),e?u.jsxs("section",{className:"flex min-h-0 min-w-0 flex-col border-l border-border bg-white",children:[u.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-3 border-b border-border px-3 py-1.5",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("h2",{className:"truncate text-[13px] font-semibold tracking-tight",children:e}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[10px] text-muted-foreground",children:[u.jsx("span",{children:"Read-only view of tracked file."}),r?.truncated?u.jsx("span",{className:"text-amber-700",children:"Truncated — file exceeds 1MB."}):null,r?.binary?u.jsx("span",{className:"text-amber-700",children:"Binary file."}):null]})]}),t?u.jsx(fe,{onClick:s,size:"sm",type:"button",variant:"outline",children:"View diff"}):null]}),u.jsx("div",{className:"min-h-0 flex-1 overflow-auto bg-zinc-50",children:l?u.jsx("div",{className:"p-4",children:u.jsx(ht,{variant:"destructive",children:l})}):f?u.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:"Loading…"}):r?.binary?u.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:"Cannot display binary content."}):r?u.jsx(Uj,{content:r.content,path:e}):null})]}):u.jsx("div",{className:"p-4",children:u.jsx(ht,{variant:"muted",className:"border-dashed p-12 text-center",children:"Select a file to view its contents."})})}function Fj({activeHunkIndex:e,filePaths:t,hunkCount:s,pendingNextFilePath:r,selectedFile:o}){if(s>0&&e<s-1)return{kind:"hunk",activeHunkIndex:e+1};const l=t.indexOf(o),d=t[l+1];return d?r===d?{kind:"file",filePath:d}:{kind:"confirm-next-file",filePath:d}:{kind:"none"}}function CS(e){const t={name:"",fullPath:"",children:new Map};for(const s of e){const r=s.name.split("/");let o=t;r.forEach((l,d)=>{let f=o.children.get(l);f||(f={name:l,fullPath:r.slice(0,d+1).join("/"),children:new Map},o.children.set(l,f)),o=f}),o.branch=s}return t}function NS({label:e,tree:t,onSelect:s,defaultOpen:r,forceOpen:o}){const[l,d]=E.useState(r??!1),f=o||l,m=t.children.size===0;return u.jsxs("div",{className:"mb-1",children:[u.jsxs("button",{type:"button",onClick:()=>d(h=>!h),className:"flex w-full items-center gap-1 px-2 py-0.5 text-left text-[11px] font-semibold uppercase tracking-wide text-muted-foreground hover:text-foreground",children:[f?u.jsx(Pn,{size:12}):u.jsx(ga,{size:12}),e,m?null:u.jsxs("span",{className:"ml-1 text-[10px] font-normal",children:["(",t.children.size,")"]})]}),f&&!m?u.jsx("ul",{children:Array.from(t.children.values()).map(h=>u.jsx(aC,{node:h,depth:1,onSelect:s,forceOpen:o},h.fullPath))}):null]})}function aC({node:e,depth:t,onSelect:s,forceOpen:r}){const[o,l]=E.useState(!0),d=r||o,f=e.children.size>0,m=e.branch,h={paddingLeft:`${t*10}px`};return!f&&m?u.jsx("li",{children:u.jsxs("button",{type:"button",onClick:()=>s(m),style:h,title:m.name,className:`flex w-full items-center gap-1.5 py-0.5 pr-2 text-left text-[12px] hover:bg-muted/60 ${m.current?"font-semibold text-emerald-700":""}`,children:[u.jsx(Yl,{size:11,className:"shrink-0 opacity-70"}),u.jsx("span",{className:"truncate",children:e.name}),m.current?u.jsx("span",{className:"text-[10px]",children:"●"}):null]})}):u.jsxs("li",{children:[u.jsxs("button",{type:"button",onClick:()=>{m?s(m):l(_=>!_)},style:h,className:"flex w-full items-center gap-1 py-0.5 pr-2 text-left text-[12px] hover:bg-muted/60",children:[f?d?u.jsx(Pn,{size:11}):u.jsx(ga,{size:11}):u.jsx("span",{className:"inline-block w-[11px]"}),u.jsx("span",{className:"truncate",children:e.name})]}),d&&f?u.jsx("ul",{children:Array.from(e.children.values()).map(_=>u.jsx(aC,{node:_,depth:t+1,onSelect:s,forceOpen:r},_.fullPath))}):null]})}function Vj({selectedCommit:e,selectedFile:t,diff:s,diffLoading:r,diffError:o}){return u.jsxs("section",{className:"flex min-h-0 min-w-0 flex-col bg-white border-b border-border",children:[u.jsx("div",{className:"flex shrink-0 items-center justify-between gap-3 border-b border-border px-3 py-1.5",children:u.jsxs("div",{className:"min-w-0",children:[u.jsx("h2",{className:"truncate text-[13px] font-semibold tracking-tight",children:t??(e?e.subject:"Commit")}),e?u.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[10px] text-muted-foreground",children:[u.jsx("span",{className:"font-mono",children:e.hash.slice(0,12)}),u.jsxs("span",{children:[e.author," <",e.email,">"]}),u.jsx("span",{children:new Date(e.timestamp*1e3).toLocaleString()})]}):null]})}),u.jsx("div",{className:"relative min-h-0 min-w-0 flex-1",children:o?u.jsx("div",{className:"p-4",children:u.jsx(ht,{variant:"destructive",children:o})}):e?r?u.jsx("div",{className:"p-4 text-[12px] text-muted-foreground",children:"Loading diff…"}):s?u.jsx(nC,{activeHunkIndex:0,diff:s}):u.jsx("div",{className:"p-4",children:u.jsx(ht,{variant:"muted",className:"border-dashed p-6 text-center",children:e.parents.length>1?"Merge commit with no conflict resolution — no diff against the first parent.":"No textual changes in this commit."})}):u.jsx("div",{className:"p-4",children:u.jsx(ht,{variant:"muted",className:"border-dashed p-12 text-center",children:"Select a commit to inspect its diff."})})})]})}function $j({files:e,filesError:t,selectedHash:s,selectedFile:r,onSelect:o}){return u.jsxs("aside",{className:"flex min-h-0 flex-col overflow-hidden border-r border-border",children:[u.jsx("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border px-3 py-1.5",children:u.jsxs("h2",{className:"text-[13px] font-semibold tracking-tight",children:["Files",e.length?u.jsx("span",{className:"ml-2 text-[11px] font-normal text-muted-foreground",children:e.length}):null]})}),u.jsx("div",{className:"min-h-0 flex-1 overflow-auto",children:t?u.jsx("div",{className:"p-3",children:u.jsx(ht,{variant:"destructive",children:t})}):s?e.length===0?u.jsx("div",{className:"p-3 text-[12px] text-muted-foreground",children:"No file changes."}):u.jsx("ul",{className:"divide-y divide-border",children:e.map(l=>u.jsx("li",{children:u.jsxs("button",{onClick:()=>o(l.path),type:"button",title:l.path,className:`flex w-full items-center gap-2 px-2 py-1 text-left text-[12px] transition-colors hover:bg-muted/60 ${r===l.path?"bg-muted":""}`,children:[u.jsx("span",{className:qj(l.index),children:l.index.trim()||"·"}),u.jsx("span",{className:"truncate font-mono",children:l.path})]})},l.path))}):u.jsx("div",{className:"p-3 text-[12px] text-muted-foreground",children:"Select a commit to see its files."})})]})}function qj(e){const t="inline-flex h-4 w-4 shrink-0 items-center justify-center rounded text-[10px] font-bold";switch(e.trim().toUpperCase()){case"A":return`${t} bg-emerald-100 text-emerald-800`;case"D":return`${t} bg-red-100 text-red-800`;case"M":return`${t} bg-amber-100 text-amber-800`;case"R":return`${t} bg-blue-100 text-blue-800`;case"C":return`${t} bg-indigo-100 text-indigo-800`;default:return`${t} bg-slate-100 text-slate-700`}}const kS=["#3b82f6","#10b981","#f59e0b","#ec4899","#8b5cf6","#14b8a6","#ef4444","#84cc16"];function Ll(e){return kS[e%kS.length]}function Kj({lane:e,laneCount:t,edges:s,throughLanes:r,isMerge:o,height:l=28,laneWidth:d=14}){const m=Math.max(e+1,t,1)*d,h=l/2,_=jl(e,d),v=o?4:3.5;return u.jsxs("svg",{width:m,height:l,viewBox:`0 0 ${m} ${l}`,style:{flex:"0 0 auto",display:"block"},children:[r.map(b=>u.jsx("line",{x1:jl(b,d),y1:0,x2:jl(b,d),y2:l,stroke:Ll(b),strokeWidth:1.5},`t-${b}`)),u.jsx("line",{x1:_,y1:0,x2:_,y2:h,stroke:Ll(e),strokeWidth:1.5}),s.map((b,y)=>{const x=jl(b.fromLane,d),w=jl(b.toLane,d);if(x===w)return u.jsx("line",{x1:x,y1:h,x2:w,y2:l,stroke:Ll(b.toLane),strokeWidth:1.5},`e-${y}`);const N=h+(l-h)/2;return u.jsx("path",{d:`M ${x} ${h} C ${x} ${N}, ${w} ${N}, ${w} ${l}`,fill:"none",stroke:Ll(b.toLane),strokeWidth:1.5},`e-${y}`)}),u.jsx("circle",{cx:_,cy:h,r:v,fill:Ll(e),stroke:"var(--background, #fff)",strokeWidth:1.5})]})}function jl(e,t){return e*t+t/2}const TS=28;function Gj({commits:e,loading:t,error:s,selectedHash:r,maxLanes:o,rowRefs:l,onSelect:d,onLoadMore:f}){return u.jsxs("aside",{className:"flex min-h-0 flex-col overflow-hidden border-r border-border",children:[u.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border px-3 py-1.5",children:[u.jsxs("h2",{className:"text-[13px] font-semibold tracking-tight",children:["Commit tree",e.length?u.jsxs("span",{className:"ml-2 text-[11px] font-normal text-muted-foreground",children:[e.length," commits"]}):null]}),u.jsx(fe,{disabled:t,onClick:f,size:"sm",type:"button",variant:"outline",children:"Load more"})]}),u.jsx("div",{className:"min-h-0 flex-1 overflow-auto",children:s?u.jsx("div",{className:"p-3",children:u.jsx(ht,{variant:"destructive",children:s})}):t&&e.length===0?u.jsx("div",{className:"p-3 text-[12px] text-muted-foreground",children:"Loading commits…"}):e.length===0?u.jsx("div",{className:"p-3 text-[12px] text-muted-foreground",children:"No commits."}):u.jsx("ul",{className:"divide-y divide-border",children:e.map(m=>u.jsx("li",{ref:h=>{h?l.current.set(m.hash,h):l.current.delete(m.hash)},children:u.jsxs("button",{onClick:()=>d(m.hash),type:"button",className:`flex w-full items-center gap-2 px-2 py-0.5 text-left transition-colors hover:bg-muted/60 ${r===m.hash?"bg-muted":""}`,style:{minHeight:TS},title:`${m.hash}
|
|
44
44
|
${m.author} <${m.email}>
|
|
45
|
-
${m.subject}`,children:[u.jsx(Kj,{lane:m.lane,laneCount:Math.max(m.laneCount,o),edges:m.edges,throughLanes:m.throughLanes,isMerge:m.parents.length>1,height:TS}),u.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:m.hash.slice(0,7)}),u.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[m.refs.map(h=>u.jsx("span",{className:Yj(h.kind),children:h.name},`${h.kind}-${h.name}`)),u.jsx("span",{className:"truncate text-[12px]",children:m.subject})]}),u.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:m.author}),u.jsx("span",{className:"shrink-0 font-mono text-[10px] tabular-nums text-muted-foreground/70",title:new Date(m.timestamp*1e3).toLocaleString(),children:Wj(m.timestamp)})]})},m.hash))})})]})}function Wj(e){if(!e)return"";const t=Math.max(0,Math.floor(Date.now()/1e3-e));if(t<60)return`${t}s`;const s=Math.floor(t/60);if(s<60)return`${s}m`;const r=Math.floor(s/60);if(r<24)return`${r}h`;const o=Math.floor(r/24);if(o<30)return`${o}d`;const l=Math.floor(o/30);return l<12?`${l}mo`:`${Math.floor(l/12)}y`}function Yj(e){const t="rounded px-1.5 py-px text-[10px] font-medium";switch(e){case"head":return`${t} bg-emerald-100 text-emerald-800`;case"branch":return`${t} bg-blue-100 text-blue-800`;case"remote":return`${t} bg-slate-100 text-slate-700`;case"tag":return`${t} bg-amber-100 text-amber-800`}}const MS=200;function Xj(){const[e,t]=E.useState([]),[s,r]=E.useState(MS),[o,l]=E.useState(!0),[d,f]=E.useState(null),[m,h]=E.useState(null),[_,v]=E.useState([]),[b,y]=E.useState(null),[x,w]=E.useState(null),[N,A]=E.useState(""),[R,T]=E.useState(!1),[M,z]=E.useState(null);E.useEffect(()=>{let O=!0;return l(!0),f(null),X5(s).then(K=>{O&&(t(K),K.length>0&&!K.some(H=>H.hash===m)&&h(K[0].hash))}).catch(K=>{O&&f(K instanceof Error?K.message:String(K))}).finally(()=>{O&&l(!1)}),()=>{O=!1}},[s]),E.useEffect(()=>{if(!m){v([]),w(null);return}let O=!0;return y(null),Q5(m).then(K=>{O&&(v(K),w(K[0]?.path??null))}).catch(K=>{O&&y(K instanceof Error?K.message:String(K))}),()=>{O=!1}},[m]),E.useEffect(()=>{if(!m){A("");return}let O=!0;return z(null),T(!0),Z5(m,x??void 0).then(K=>{O&&A(K)}).catch(K=>{O&&z(K instanceof Error?K.message:String(K))}).finally(()=>{O&&T(!1)}),()=>{O=!1}},[m,x]);const U=E.useMemo(()=>e.reduce((O,K)=>Math.max(O,K.laneCount),1),[e]),j=e.find(O=>O.hash===m)??null;return{commits:e,loading:o,error:d,selectedHash:m,setSelectedHash:h,files:_,filesError:b,selectedFile:x,setSelectedFile:w,diff:N,diffLoading:R,diffError:M,maxLanes:U,selectedCommit:j,loadMore:()=>r(O=>O+MS)}}function Zj({branches:e=[]}){const{commits:t,loading:s,error:r,selectedHash:o,setSelectedHash:l,files:d,filesError:f,selectedFile:m,setSelectedFile:h,diff:_,diffLoading:v,diffError:b,maxLanes:y,selectedCommit:x,loadMore:w}=Xj(),[N,A]=E.useState(""),R=E.useMemo(()=>{const O=N.trim().toLowerCase();return O?e.filter(K=>K.name.toLowerCase().includes(O)):e},[e,N]),T=E.useMemo(()=>CS(R.filter(O=>!O.remote)),[R]),M=E.useMemo(()=>CS(R.filter(O=>O.remote)),[R]),z=N.trim().length>0,U=E.useRef(new Map);function j(O){const K=O.remote?"remote":"branch",H=t.find(J=>J.refs.some(I=>I.kind===K&&I.name===O.name));if(!H)return;l(H.hash);const G=U.current.get(H.hash);G&&G.scrollIntoView({block:"center",behavior:"smooth"})}return u.jsxs("div",{className:"grid h-full min-h-0 overflow-hidden border-0 bg-card/85 grid-cols-[220px_minmax(0,1fr)]",children:[u.jsxs("aside",{className:"flex min-h-0 flex-col overflow-hidden border-r border-border",children:[u.jsxs("div",{className:"flex shrink-0 flex-col gap-1 border-b border-border px-3 py-1.5",children:[u.jsx("h2",{className:"text-[13px] font-semibold tracking-tight",children:"Branches"}),u.jsx("input",{type:"search",value:N,onChange:O=>A(O.target.value),placeholder:"Search branches…",className:"w-full rounded border border-border bg-background px-2 py-1 text-[11px] outline-none focus:border-foreground"})]}),u.jsxs("div",{className:"min-h-0 flex-1 overflow-auto py-1",children:[u.jsx(NS,{label:"Local",tree:T,onSelect:j,defaultOpen:!0,forceOpen:z}),u.jsx(NS,{label:"Remote",tree:M,onSelect:j,forceOpen:z})]})]}),u.jsxs("div",{className:"grid min-h-0 min-w-0 grid-rows-[minmax(0,3fr)_minmax(0,2fr)]",children:[u.jsx(Vj,{selectedCommit:x,selectedFile:m,diff:_,diffLoading:v,diffError:b}),u.jsxs("div",{className:"grid min-h-0 min-w-0 grid-cols-[minmax(0,1fr)_280px]",children:[u.jsx(Gj,{commits:t,loading:s,error:r,selectedHash:o,maxLanes:y,rowRefs:U,onSelect:l,onLoadMore:w}),u.jsx($j,{files:d,filesError:f,selectedHash:o,selectedFile:m,onSelect:h})]})]})]})}function Qj({data:e}){const[t,s]=E.useState("changes"),[r,o]=E.useState("changes"),[l,d]=E.useState(e.git.status?.files[0]?.path??""),[f,m]=E.useState(""),[h,_]=E.useState([]),[v,b]=E.useState(null),[y,x]=E.useState(""),[w,N]=E.useState(null),[A,R]=E.useState(0),[T,M]=E.useState(null),z=e.git.status?.files??[],U=E.useMemo(()=>z.map(Z=>Z.path),[z]),j=E.useMemo(()=>H9(y),[y]);E.useEffect(()=>{const Z=e.git.status?.files[0]?.path??"";d(W=>W&&e.git.status?.files.some(D=>D.path===W)?W:Z)},[e.git.status?.files]),E.useEffect(()=>{if(r!=="all"||h.length>0)return;let Z=!0;return b(null),J5().then(W=>{Z&&_(W)}).catch(W=>{Z&&b(W instanceof Error?W.message:String(W))}),()=>{Z=!1}},[r,h.length]),E.useEffect(()=>{if(!l){x("");return}let Z=!0;return N(null),tT(l).then(W=>{Z&&(x(W),R(0),M(null))}).catch(W=>{Z&&N(W instanceof Error?W.message:String(W))}),()=>{Z=!1}},[l]);function O(Z){R(0),M(null),d(Z)}function K(){const Z=Fj({activeHunkIndex:A,filePaths:U,hunkCount:j.hunks,pendingNextFilePath:T,selectedFile:l});Z.kind==="hunk"?(M(null),R(Z.activeHunkIndex)):Z.kind==="confirm-next-file"?M(Z.filePath):Z.kind==="file"?O(Z.filePath):M(null)}function H(){if(M(null),A>0){R(D=>D-1);return}const Z=z.findIndex(D=>D.path===l),W=z[Z-1];W&&O(W.path)}const G=z.findIndex(Z=>Z.path===l),J=!!(j.hunks&&A<j.hunks-1||z[G+1]),I=!!(A>0||z[G-1]),ee=T?`End of file. Click Next again to open ${T}.`:null,q=Z=>`rounded px-2 py-0.5 text-[11px] font-medium transition-colors ${Z?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"}`,k=Z=>`flex-1 px-2 py-0.5 text-[11px] font-medium transition-colors ${Z?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"}`,F=E.useMemo(()=>new Set(z.map(Z=>Z.path)),[z]);function V(){f&&(o("changes"),O(f))}return u.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-card/85",children:[u.jsxs("div",{className:"flex shrink-0 items-center gap-1 border-b border-border bg-card/95 px-3 py-1",children:[u.jsx("button",{type:"button",className:q(t==="changes"),onClick:()=>s("changes"),children:"Changes"}),u.jsx("button",{type:"button",className:q(t==="graph"),onClick:()=>s("graph"),children:"Tree"})]}),u.jsx("div",{className:"min-h-0 flex-1",children:t==="graph"?u.jsx(Zj,{branches:e.git.branches??[]}):u.jsxs("div",{className:"grid h-full min-h-0 overflow-hidden border-0 bg-card/85 xl:grid-cols-[320px_minmax(0,1fr)]",children:[u.jsxs("aside",{className:"flex min-h-0 flex-col overflow-hidden",children:[u.jsxs("div",{className:"flex shrink-0 gap-0.5 border-b border-border bg-card/95 p-1",children:[u.jsx("button",{className:k(r==="changes"),onClick:()=>o("changes"),type:"button",children:"Changes"}),u.jsx("button",{className:k(r==="all"),onClick:()=>o("all"),type:"button",children:"All files"})]}),r==="changes"?u.jsx(q9,{branch:e.git.status?.branch||void 0,error:e.git.error,files:e.git.status?.files??[],selectedFile:l,onSelectFile:O,root:e.git.cwd}):v?u.jsx(ht,{variant:"destructive",className:"m-3",children:v}):u.jsx(Z9,{branch:e.git.status?.branch||void 0,onSelectFile:m,paths:h,root:e.git.cwd,selectedFile:f,status:e.git.status?.files??[]})]}),r==="all"?u.jsx(Hj,{isModified:F.has(f),onViewDiff:V,path:f}):u.jsxs("section",{className:"flex min-h-0 min-w-0 flex-col border-l border-border bg-white",children:[u.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-3 border-b border-border px-3 py-1.5",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("h2",{className:"truncate text-[13px] font-semibold tracking-tight",children:l||"Diff"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[10px] text-muted-foreground",children:[u.jsx("span",{children:"Long rows wrap inside the editor pane."}),j.additions||j.deletions?u.jsxs("span",{className:"flex items-center gap-1 font-mono",children:[u.jsxs("span",{className:"text-emerald-700",children:["+",j.additions]}),u.jsxs("span",{className:"text-red-700",children:["-",j.deletions]})]}):null]})]}),u.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[ee?u.jsx("span",{className:"max-w-72 truncate rounded border border-amber-200 bg-amber-50 px-2 py-1 text-[11px] text-amber-900",children:ee}):null,u.jsxs(fe,{disabled:!l||!I,onClick:H,size:"sm",type:"button",variant:"outline",children:[u.jsx(TN,{}),"Previous"]}),u.jsxs(fe,{disabled:!l||!J,onClick:K,size:"sm",type:"button",variant:"outline",children:[u.jsx(NN,{}),"Next"]})]})]}),u.jsx("div",{className:"relative min-h-0 min-w-0 flex-1",children:w?u.jsx("div",{className:"p-4",children:u.jsx(ht,{variant:"destructive",children:w})}):l?u.jsx(nC,{activeHunkIndex:A,diff:y||"No unstaged diff for this file."}):u.jsx("div",{className:"p-4",children:u.jsx(ht,{variant:"muted",className:"border-dashed p-12 text-center",children:"Select a changed file to inspect its diff."})})})]})]})})]})}function Jj({initialPath:e,onSelect:t,selectedPath:s}){const[r,o]=E.useState(e),[l,d]=E.useState(null),[f,m]=E.useState(null),[h,_]=E.useState(!1),v=eB(l);return E.useEffect(()=>{o(e)},[e]),E.useEffect(()=>{let b=!0;return _(!0),m(null),ZS(r).then(y=>{b&&(d(y),t(y.path))}).catch(y=>{b&&m(y instanceof Error?y.message:String(y))}).finally(()=>{b&&_(!1)}),()=>{b=!1}},[r,t]),u.jsxs("div",{className:"rounded-md border border-border bg-background",children:[u.jsxs("div",{className:"flex items-center gap-2 border-b border-border p-2",children:[v?u.jsx(fe,{"aria-label":"Open parent folder",onClick:()=>l&&o(l.parent),size:"icon",type:"button",variant:"ghost",children:u.jsx(Pn,{className:"rotate-90"})}):null,u.jsx("div",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:l?.path??r}),h?u.jsx(Zs,{className:"size-4 animate-spin text-muted-foreground"}):null]}),u.jsxs("div",{className:"max-h-56 overflow-auto p-1",children:[f?u.jsx(ht,{variant:"destructive",className:"m-1",children:f}):null,!f&&l?.entries.length===0?u.jsx(ht,{variant:"muted",className:"m-1 text-center",children:"No folders here."}):null,l?.entries.map(b=>u.jsxs(fe,{className:pe("h-8 w-full justify-start rounded-sm px-2 text-left",s===b.path&&"bg-muted"),onClick:()=>o(b.path),title:b.path,type:"button",variant:"ghost",children:[u.jsx(_a,{className:"text-accent"}),u.jsx("span",{className:"truncate",children:b.name})]},b.path))]})]})}function eB(e){return!!(e&&e.parent!==e.path)}function AS(e){return e.split(/[\\/]/).filter(Boolean).pop()??"project"}function tB({data:e,onRefresh:t}){const[s,r]=E.useState(!1),[o,l]=E.useState(e.git.cwd),[d,f]=E.useState(null),[m,h]=E.useState(!1),[_,v]=E.useState(e.git.cwd),b=E.useRef(null),y=e.git.selectedRepository,x=y?.name??AS(e.git.cwd),{error:w,success:N}=ls(),A=sB({gitCwd:e.git.cwd});E.useEffect(()=>{l(e.git.cwd),v(e.git.cwd)},[e.git.cwd]),E.useEffect(()=>{if(!s)return;function j(O){b.current&&O.target instanceof Node&&!b.current.contains(O.target)&&r(!1)}return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[s]);async function R(j){try{await Gi("/api/git/select",{name:j}),r(!1),await t(),N(`Switched to ${j}.`)}catch(O){w(O instanceof Error?O.message:String(O))}}async function T(j){const O=j.trim();if(!iB(O)){const K="Please add an absolute path. Paths beginning with ~ are not expanded here.";return f(K),w(K),!1}try{const K=AS(O);return await Gi("/api/git/repositories",{name:K,path:O}),f(null),await t(),N(`Added Git project ${K}.`),!0}catch(K){const H=K instanceof Error?K.message:String(K);return f(H),w(H),!1}}async function M(j){try{await iT(j),await t(),N(`Removed Git project ${j}.`)}catch(O){w(O instanceof Error?O.message:String(O))}}async function z(j){j.preventDefault(),await T(o)&&r(!1)}function U(){f(null),v(A.selectedPath),h(!0)}return u.jsxs("div",{className:"relative z-50 flex items-center gap-2",ref:b,children:[u.jsxs(fe,{className:"max-w-[220px] justify-start gap-2 rounded-md border-border bg-card",onClick:()=>r(j=>!j),size:"sm",type:"button",variant:"outline",children:[u.jsx(_a,{className:"text-muted-foreground"}),u.jsx("span",{className:"truncate",children:x}),u.jsx(Pn,{className:pe("ml-auto transition-transform",s&&"rotate-180")})]}),u.jsx(fe,{"aria-label":"Add Git project",onClick:U,size:"sm",type:"button",variant:"outline",children:u.jsx(Es,{})}),s?u.jsxs("div",{className:"absolute right-0 top-10 z-50 w-[min(380px,calc(100vw-2rem))] overflow-hidden rounded-lg border border-border bg-card shadow-lg",children:[u.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3 py-2",children:[u.jsx(ZN,{className:"size-3.5 text-muted-foreground"}),u.jsx("div",{className:"text-xs font-semibold",children:"Git Projects"}),u.jsx(Ve,{className:"ml-auto h-5 px-1.5 text-[10px]",variant:"outline",children:e.config.gitRepositories.length})]}),u.jsx("div",{className:"max-h-72 overflow-auto",children:e.config.gitRepositories.length?u.jsx("div",{className:"divide-y divide-border",children:e.config.gitRepositories.map(j=>{const O=j.name===y?.name;return u.jsxs("div",{className:pe("group grid w-full grid-cols-[1fr_auto_auto] items-center gap-2 px-3 py-1.5 text-left transition-colors hover:bg-muted",O&&"bg-muted/70"),children:[u.jsxs("button",{className:"min-w-0 text-left",onClick:()=>{R(j.name)},type:"button",children:[u.jsx("span",{className:"block truncate text-sm font-medium leading-tight",children:j.name}),u.jsx("span",{className:"block truncate font-mono text-[10px] leading-tight text-muted-foreground",children:j.path})]}),O?u.jsx(ac,{className:"size-3.5"}):u.jsx("span",{className:"size-3.5"}),u.jsx(fe,{"aria-label":`Remove ${j.name}`,className:"size-6 opacity-0 transition-opacity group-hover:opacity-100",onClick:()=>{M(j.name)},size:"icon",title:`Remove ${j.name}`,type:"button",variant:"ghost",children:u.jsx(lc,{className:"size-3.5 text-destructive"})})]},j.name)})}):u.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:"No saved Git projects yet."})}),u.jsxs("div",{className:"border-t border-border bg-muted/20 p-2",children:[u.jsxs("form",{className:"flex gap-1.5",onSubmit:z,children:[u.jsx(bt,{"aria-label":"Paste absolute path",className:"h-7 flex-1 px-2 font-mono text-[11px]",onChange:j=>{l(j.target.value),f(null)},placeholder:"/absolute/path",value:o}),u.jsxs(fe,{className:"h-7 px-2 text-[11px]",size:"sm",type:"submit",children:[u.jsx(Es,{className:"size-3"}),"Add"]}),u.jsx(fe,{"aria-label":"Browse and add Git project",className:"h-7 px-2",onClick:U,size:"sm",type:"button",variant:"outline",children:u.jsx(hk,{className:"size-3"})})]}),d?u.jsx("div",{className:"mt-1.5 truncate text-[10px] text-destructive",children:d}):null]})]}):null,m?u.jsx(nB,{confirmLabel:A.confirmLabel,errorMessage:d,initialPath:A.initialPath,selectedPath:_,title:"Add Git Project",onCancel:()=>h(!1),onSelect:v,onUse:async()=>{await T(_)&&(h(!1),r(!1))}}):null]})}function iB(e){return e.startsWith("/")}function sB({gitCwd:e}){return{confirmLabel:"Add Git project",initialPath:e,selectedPath:e}}function nB({confirmLabel:e="Use this folder",errorMessage:t,initialPath:s,onCancel:r,onSelect:o,onUse:l,selectedPath:d,title:f="Choose Git Project Folder"}){return s0.createPortal(u.jsx("div",{className:"fixed inset-0 z-[1000] grid place-items-center bg-black/35 px-4",children:u.jsxs("div",{className:"w-full max-w-2xl rounded-xl border border-border bg-card p-4 shadow-xl",children:[u.jsxs("div",{className:"mb-3 flex items-center gap-3",children:[u.jsx("div",{className:"flex size-8 items-center justify-center rounded-lg border border-border bg-background",children:u.jsx(_a,{className:"size-4"})}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("div",{className:"text-sm font-semibold",children:f}),u.jsx("div",{className:"truncate font-mono text-xs text-muted-foreground",children:d})]}),u.jsx(fe,{"aria-label":"Close folder picker",onClick:r,size:"icon",variant:"ghost",children:u.jsx(rn,{})})]}),u.jsx(Jj,{initialPath:s,onSelect:o,selectedPath:d}),t?u.jsx("div",{className:"mt-3 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:t}):null,u.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[u.jsx(fe,{onClick:r,type:"button",variant:"outline",children:"Cancel"}),u.jsx(fe,{onClick:()=>{l()},type:"button",children:e})]})]})}),document.body)}function rB({branches:e,currentBranch:t,disabled:s,onRefresh:r}){const[o,l]=E.useState(!1),[d,f]=E.useState(""),[m,h]=E.useState(null),[_,v]=E.useState(null),[b,y]=E.useState(null),x=e.filter(M=>!M.remote),w=e.filter(M=>M.remote);async function N(M,z){h(M),y(null),v(null);try{await z(),await r()}catch(U){y(U instanceof Error?U.message:String(U))}finally{h(null)}}async function A(M){await N(`switch:${M}`,async()=>{await Gi("/api/git/branches/switch",{name:M}),l(!1)})}async function R(){await N("fetch",async()=>{await Gi("/api/git/fetch",{}),v("Fetched latest branch refs.")})}async function T(M){M.preventDefault();const z=d.trim();if(!z){y("Branch name is required.");return}await N("create",async()=>{await Gi("/api/git/branches",{name:z}),f(""),l(!1)})}return u.jsxs("div",{className:"fixed bottom-12 right-4 z-50 flex items-end",children:[o?u.jsxs("div",{"aria-label":"Switch Git branch",className:"mb-11 w-[min(460px,calc(100vw-2rem))] rounded-lg border border-border bg-card shadow-xl",role:"dialog",children:[u.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-border p-3",children:[u.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[u.jsx(Yl,{className:"size-4 text-muted-foreground"}),u.jsx("span",{className:"truncate text-sm font-semibold",children:t||"Branches"})]}),u.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[u.jsx(fe,{"aria-label":"Fetch branches",disabled:s||m!==null,onClick:()=>{R()},size:"icon",title:"Fetch branches",type:"button",variant:"ghost",children:u.jsx(VS,{className:pe(m==="fetch"&&"animate-spin")})}),u.jsx(fe,{"aria-label":"Close branch dialog",onClick:()=>l(!1),size:"icon",type:"button",variant:"ghost",children:u.jsx(rn,{})})]})]}),u.jsx("div",{className:"max-h-72 overflow-auto",children:e.length?u.jsxs(u.Fragment,{children:[u.jsx(RS,{branches:x,busy:m!==null,disabled:s,label:"Local",onSwitch:A}),u.jsx(RS,{branches:w,busy:m!==null,disabled:s,label:"Remote",onSwitch:A})]}):u.jsx("div",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"No branches found."})}),u.jsxs("div",{className:"border-t border-border p-3",children:[u.jsxs("form",{className:"grid gap-2 sm:grid-cols-[1fr_auto]",onSubmit:T,children:[u.jsx(bt,{"aria-label":"New branch name",disabled:s||m!==null,onChange:M=>{f(M.target.value),y(null),v(null)},placeholder:"feature/new-work",value:d}),u.jsxs(fe,{disabled:s||m!==null,type:"submit",children:[u.jsx(bk,{}),"Create"]})]}),b||_?u.jsx(ht,{className:"mt-3 px-3 py-2 text-xs",variant:b?"destructive":"muted",children:b??_}):null]})]}):null,u.jsxs(fe,{className:"h-8 max-w-[260px] gap-2 rounded-md shadow-lg",disabled:s,onClick:()=>l(M=>!M),size:"sm",title:"Switch Git branch",type:"button",variant:"default",children:[u.jsx(Yl,{className:"size-4"}),u.jsx("span",{className:"truncate font-mono text-xs",children:t||"No branch"}),u.jsx(Pn,{className:pe("size-4 transition-transform",o&&"rotate-180")})]})]})}function RS({branches:e,busy:t,disabled:s,label:r,onSwitch:o}){return u.jsxs("section",{children:[u.jsx("div",{className:"border-b border-border bg-muted/60 px-3 py-1.5 text-[11px] font-semibold uppercase text-muted-foreground",children:r}),e.length?e.map(l=>u.jsxs("button",{className:pe("grid w-full grid-cols-[1fr_auto] items-center gap-2 border-b border-border px-3 py-2 text-left text-sm last:border-b-0 hover:bg-muted",l.current&&"bg-muted/70"),disabled:s||t||l.current,onClick:()=>{o(l.name)},type:"button",children:[u.jsxs("span",{className:"min-w-0",children:[u.jsx("span",{className:"block truncate font-medium",children:l.name}),l.upstream?u.jsxs("span",{className:"block truncate font-mono text-[11px] text-muted-foreground",children:["tracks ",l.upstream]}):null]}),u.jsx(Ve,{variant:l.current?"success":l.remote?"outline":"secondary",children:l.current?"current":l.remote?"remote":"local"})]},`${l.remote?"remote":"local"}:${l.name}`)):u.jsxs("div",{className:"border-b border-border px-3 py-3 text-sm text-muted-foreground",children:["No ",r.toLowerCase()," branches."]})]})}function aB(e=!1){return pe("group/sidebar hidden h-full shrink-0 overflow-x-hidden overflow-y-auto border-r border-border bg-card/85 py-5 backdrop-blur transition-[width,padding] duration-200 md:flex md:flex-col",e?"w-64 px-4":"w-16 px-2 hover:w-64 hover:px-4")}function oB(e,t=!1){return pe("relative grid h-12 grid-cols-[48px_minmax(0,1fr)] items-center justify-start gap-0 overflow-hidden rounded-md px-0 text-[15px] font-medium transition-[background-color,color,width] duration-150",t?"w-full":"w-12 group-hover/sidebar:w-full",e?"bg-primary text-primary-foreground hover:bg-primary/90":"hover:bg-muted")}function lB(e=!1,t=!1){return pe("min-w-0 overflow-hidden text-left text-current transition duration-150 whitespace-pre",e?"translate-x-1 opacity-100":"opacity-0 group-hover/sidebar:translate-x-1 group-hover/sidebar:opacity-100",t?"pr-10":"pr-3")}function cB(e=!1){return pe("flex size-12 items-center justify-center text-current transition-transform duration-150 [&_svg]:size-5",e?"translate-x-0":"-translate-x-px group-hover/sidebar:translate-x-0")}function uB({docked:e,onToggleDock:t}){return u.jsxs("div",{className:pe("mt-auto flex h-10 min-w-0 items-center overflow-hidden border-t border-border/60 text-[11px] text-muted-foreground transition-[height,opacity,width] duration-150",e?"w-full justify-start opacity-100":"w-12 justify-center group-hover/sidebar:w-full group-hover/sidebar:justify-start group-hover/sidebar:opacity-100"),children:[u.jsxs("span",{className:pe("flex min-w-0 items-center gap-1.5 overflow-hidden whitespace-pre transition-[opacity,width] duration-150",e?"flex-1 opacity-100":"w-0 flex-none opacity-0 group-hover/sidebar:w-auto group-hover/sidebar:flex-1 group-hover/sidebar:opacity-100"),children:[u.jsx("span",{children:"Made with"}),u.jsx(xk,{"aria-label":"love",className:"size-3 shrink-0 fill-red-500 text-red-500"}),u.jsx("span",{children:"by Robert Wang"}),u.jsx("a",{"aria-label":"Robert Wang on LinkedIn",className:"shrink-0 rounded p-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-[#0A66C2]",href:"https://www.linkedin.com/in/robert-wang-cs/",rel:"noopener noreferrer",target:"_blank",title:"LinkedIn",children:u.jsx("svg",{"aria-hidden":!0,className:"size-3 fill-current",role:"img",viewBox:"0 0 24 24",children:u.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.063 2.063 0 1 1 0-4.126 2.063 2.063 0 0 1 0 4.126zM7.119 20.452H3.554V9h3.565v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.225 0z"})})})]}),u.jsx("button",{"aria-label":e?"Undock sidebar":"Dock sidebar","aria-pressed":e,className:pe("flex size-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground [&_svg]:size-4",e?"ml-auto bg-muted text-foreground":"group-hover/sidebar:ml-auto"),onClick:t,title:e?"Undock sidebar":"Dock sidebar",type:"button",children:e?u.jsx(Vk,{}):u.jsx(qk,{})})]})}function dB({className:e}){return u.jsxs("div",{className:pe("min-w-0",e),children:[u.jsxs("div",{className:"flex items-baseline gap-1.5",children:[u.jsx("div",{className:"text-sm font-semibold",children:"NoMoreIDE"}),u.jsxs("div",{className:"font-mono text-[10px] text-muted-foreground",children:["v","0.1.32"]})]}),u.jsx("div",{className:"font-mono text-[11px] text-muted-foreground",children:"127.0.0.1 console"})]})}function hB(){const[e,t]=E.useState(()=>window.location.pathname.startsWith("/agent")?"agent":window.location.pathname.startsWith("/errors")?"errors":window.location.pathname.startsWith("/database")?"database":window.location.pathname.startsWith("/terminal")?"terminal":window.location.pathname.startsWith("/git")?"git":"services"),[s,r]=E.useState(null),[o,l]=E.useState(null),[d,f]=E.useState(!0),{error:m,success:h}=ls(),[_,v]=E.useState(()=>window.localStorage.getItem("nomoreide:sidebar-docked")==="true"),b=E.useCallback(async(x={})=>{x.silent||f(!0),l(null);try{r(await rT()),x.notify&&h("Dashboard refreshed.")}catch(w){const N=w instanceof Error?w.message:String(w);l(N),m(N)}finally{f(!1)}},[m,h]);E.useEffect(()=>{b()},[b]),E.useEffect(()=>{function x(){document.visibilityState==="visible"&&b({silent:!0})}const w=window.setInterval(x,5e3);return window.addEventListener("focus",x),document.addEventListener("visibilitychange",x),()=>{window.clearInterval(w),window.removeEventListener("focus",x),document.removeEventListener("visibilitychange",x)}},[e,b]),E.useEffect(()=>{const x=e==="git"?"/git":e==="agent"?"/agent":e==="errors"?"/errors":e==="database"?"/database":e==="terminal"?"/terminal":"/";window.location.pathname!==x&&window.history.pushState(null,"",x)},[e]),E.useEffect(()=>{window.localStorage.setItem("nomoreide:sidebar-docked",String(_))},[_]);const y=E.useMemo(()=>s?Object.values(s.runtime.services).filter(x=>x.state==="running").length:0,[s]);return u.jsxs("div",{className:"h-screen overflow-hidden pb-9",children:[u.jsxs("div",{className:"mx-auto flex h-full max-w-[1500px]",children:[u.jsxs("aside",{className:aB(_),children:[u.jsxs("div",{className:pe("grid h-12 grid-cols-[48px_minmax(0,1fr)] items-center overflow-hidden transition-[width] duration-150",_?"w-full":"w-12 group-hover/sidebar:w-full"),children:[u.jsx("div",{className:"flex size-12 items-center justify-center",children:u.jsx("div",{className:"flex size-9 items-center justify-center overflow-hidden rounded-md bg-primary",children:u.jsx("img",{alt:"NoMoreIDE",className:"size-full object-cover",src:O5})})}),u.jsx(dB,{className:pe("min-w-0 translate-x-1 overflow-hidden transition-opacity duration-200",_?"opacity-100":"opacity-0 group-hover/sidebar:opacity-100")})]}),u.jsxs("nav",{className:"mt-5 grid flex-1 content-start gap-1",children:[u.jsx(co,{active:e==="services",badge:y,docked:_,icon:u.jsx(d5,{}),label:"Services",onClick:()=>t("services")}),u.jsx(co,{active:e==="git",docked:_,icon:u.jsx(Yl,{}),label:"Git Review",onClick:()=>t("git")}),u.jsx(co,{active:e==="errors",docked:_,icon:u.jsx(fp,{}),label:"Error Inbox",onClick:()=>t("errors")}),u.jsx(co,{active:e==="database",docked:_,icon:u.jsx(oc,{}),label:"Database",onClick:()=>t("database")}),u.jsx(co,{active:e==="terminal",docked:_,icon:u.jsx(v5,{}),label:"Terminal",onClick:()=>t("terminal")}),u.jsx(co,{active:e==="agent",docked:_,icon:u.jsx(Wl,{}),label:"Agent",onClick:()=>t("agent")})]}),u.jsx(uB,{docked:_,onToggleDock:()=>v(x=>!x)})]}),u.jsxs("main",{className:"flex h-full min-w-0 flex-1 flex-col px-0 py-0",children:[u.jsxs("header",{className:pe("relative z-40 flex shrink-0 flex-wrap items-center justify-between gap-3 border border-border bg-card/90 px-4 py-3 backdrop-blur","border-x-0 border-t-0 border-b"),children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Gk,{className:"size-4 text-muted-foreground md:hidden"}),u.jsxs("div",{children:[u.jsx("h1",{className:"text-lg font-semibold tracking-tight",children:e==="git"?"Git Review":e==="agent"?"Agent":e==="errors"?"Error Inbox":e==="database"?"Database":e==="terminal"?"Terminal":"Services"}),u.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:s?.git.selectedRepository?.name??s?.git.cwd??"Local workspace"})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[o?u.jsx(Ve,{variant:"danger",children:o}):null,s&&e==="git"?u.jsx(tB,{data:s,onRefresh:b}):null,u.jsxs(fe,{onClick:()=>{b({notify:!0})},size:"sm",title:"Refresh dashboard",variant:"outline",children:[u.jsx(VS,{className:pe(d&&"animate-spin")}),"Refresh"]})]})]}),d&&!s?u.jsx(ht,{variant:"muted",children:"Loading NoMoreIDE state..."}):null,u.jsxs("div",{className:"min-h-0 flex-1 overflow-hidden",children:[s&&e==="services"?u.jsx(x7,{data:s,onRefresh:b}):null,s&&e==="git"?u.jsx(Qj,{data:s}):null,e==="agent"?u.jsx(b8,{}):null,e==="errors"?u.jsx(oD,{}):null,e==="database"?u.jsx(iD,{}):null,e==="terminal"?u.jsx(I9,{}):null]})]})]}),s&&e==="git"?u.jsx(rB,{branches:s.git.branches,currentBranch:s.git.status?.branch||void 0,disabled:!s.git.status,onRefresh:b}):null,u.jsx(B8,{onOpenAgentPage:e==="agent"?void 0:()=>t("agent")})]})}function co({active:e,badge:t,docked:s,icon:r,label:o,onClick:l}){return u.jsxs(fe,{"aria-label":o,title:o,className:oB(e,s),variant:"ghost",onClick:l,type:"button",children:[u.jsx("span",{className:cB(s),children:r}),u.jsx("span",{className:lB(s,t!==void 0),children:o}),t!==void 0?u.jsx(Ve,{appearance:t>0?"solid":"outline",className:pe("min-w-6 justify-center px-1.5 font-mono shadow-none",e?"border-primary-foreground/40 bg-primary-foreground/15 text-primary-foreground":t>0?"":"border-border bg-background text-muted-foreground","absolute right-1.5 top-1.5 h-4 min-w-4 rounded-full px-1 text-[10px] leading-none shadow-none group-hover/sidebar:right-2 group-hover/sidebar:top-1/2 group-hover/sidebar:-translate-y-1/2 group-hover/sidebar:text-xs",s&&"right-2 top-1/2 -translate-y-1/2 text-xs"),size:"small",variant:t>0?"success":"outline",children:t}):null]})}OS.createRoot(document.getElementById("root")).render(u.jsx(E.StrictMode,{children:u.jsx(hB,{})}));
|
|
45
|
+
${m.subject}`,children:[u.jsx(Kj,{lane:m.lane,laneCount:Math.max(m.laneCount,o),edges:m.edges,throughLanes:m.throughLanes,isMerge:m.parents.length>1,height:TS}),u.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:m.hash.slice(0,7)}),u.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[m.refs.map(h=>u.jsx("span",{className:Yj(h.kind),children:h.name},`${h.kind}-${h.name}`)),u.jsx("span",{className:"truncate text-[12px]",children:m.subject})]}),u.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:m.author}),u.jsx("span",{className:"shrink-0 font-mono text-[10px] tabular-nums text-muted-foreground/70",title:new Date(m.timestamp*1e3).toLocaleString(),children:Wj(m.timestamp)})]})},m.hash))})})]})}function Wj(e){if(!e)return"";const t=Math.max(0,Math.floor(Date.now()/1e3-e));if(t<60)return`${t}s`;const s=Math.floor(t/60);if(s<60)return`${s}m`;const r=Math.floor(s/60);if(r<24)return`${r}h`;const o=Math.floor(r/24);if(o<30)return`${o}d`;const l=Math.floor(o/30);return l<12?`${l}mo`:`${Math.floor(l/12)}y`}function Yj(e){const t="rounded px-1.5 py-px text-[10px] font-medium";switch(e){case"head":return`${t} bg-emerald-100 text-emerald-800`;case"branch":return`${t} bg-blue-100 text-blue-800`;case"remote":return`${t} bg-slate-100 text-slate-700`;case"tag":return`${t} bg-amber-100 text-amber-800`}}const MS=200;function Xj(){const[e,t]=E.useState([]),[s,r]=E.useState(MS),[o,l]=E.useState(!0),[d,f]=E.useState(null),[m,h]=E.useState(null),[_,v]=E.useState([]),[b,y]=E.useState(null),[x,w]=E.useState(null),[N,A]=E.useState(""),[R,T]=E.useState(!1),[M,z]=E.useState(null);E.useEffect(()=>{let O=!0;return l(!0),f(null),X5(s).then(K=>{O&&(t(K),K.length>0&&!K.some(H=>H.hash===m)&&h(K[0].hash))}).catch(K=>{O&&f(K instanceof Error?K.message:String(K))}).finally(()=>{O&&l(!1)}),()=>{O=!1}},[s]),E.useEffect(()=>{if(!m){v([]),w(null);return}let O=!0;return y(null),Q5(m).then(K=>{O&&(v(K),w(K[0]?.path??null))}).catch(K=>{O&&y(K instanceof Error?K.message:String(K))}),()=>{O=!1}},[m]),E.useEffect(()=>{if(!m){A("");return}let O=!0;return z(null),T(!0),Z5(m,x??void 0).then(K=>{O&&A(K)}).catch(K=>{O&&z(K instanceof Error?K.message:String(K))}).finally(()=>{O&&T(!1)}),()=>{O=!1}},[m,x]);const U=E.useMemo(()=>e.reduce((O,K)=>Math.max(O,K.laneCount),1),[e]),j=e.find(O=>O.hash===m)??null;return{commits:e,loading:o,error:d,selectedHash:m,setSelectedHash:h,files:_,filesError:b,selectedFile:x,setSelectedFile:w,diff:N,diffLoading:R,diffError:M,maxLanes:U,selectedCommit:j,loadMore:()=>r(O=>O+MS)}}function Zj({branches:e=[]}){const{commits:t,loading:s,error:r,selectedHash:o,setSelectedHash:l,files:d,filesError:f,selectedFile:m,setSelectedFile:h,diff:_,diffLoading:v,diffError:b,maxLanes:y,selectedCommit:x,loadMore:w}=Xj(),[N,A]=E.useState(""),R=E.useMemo(()=>{const O=N.trim().toLowerCase();return O?e.filter(K=>K.name.toLowerCase().includes(O)):e},[e,N]),T=E.useMemo(()=>CS(R.filter(O=>!O.remote)),[R]),M=E.useMemo(()=>CS(R.filter(O=>O.remote)),[R]),z=N.trim().length>0,U=E.useRef(new Map);function j(O){const K=O.remote?"remote":"branch",H=t.find(J=>J.refs.some(I=>I.kind===K&&I.name===O.name));if(!H)return;l(H.hash);const G=U.current.get(H.hash);G&&G.scrollIntoView({block:"center",behavior:"smooth"})}return u.jsxs("div",{className:"grid h-full min-h-0 overflow-hidden border-0 bg-card/85 grid-cols-[220px_minmax(0,1fr)]",children:[u.jsxs("aside",{className:"flex min-h-0 flex-col overflow-hidden border-r border-border",children:[u.jsxs("div",{className:"flex shrink-0 flex-col gap-1 border-b border-border px-3 py-1.5",children:[u.jsx("h2",{className:"text-[13px] font-semibold tracking-tight",children:"Branches"}),u.jsx("input",{type:"search",value:N,onChange:O=>A(O.target.value),placeholder:"Search branches…",className:"w-full rounded border border-border bg-background px-2 py-1 text-[11px] outline-none focus:border-foreground"})]}),u.jsxs("div",{className:"min-h-0 flex-1 overflow-auto py-1",children:[u.jsx(NS,{label:"Local",tree:T,onSelect:j,defaultOpen:!0,forceOpen:z}),u.jsx(NS,{label:"Remote",tree:M,onSelect:j,forceOpen:z})]})]}),u.jsxs("div",{className:"grid min-h-0 min-w-0 grid-rows-[minmax(0,3fr)_minmax(0,2fr)]",children:[u.jsx(Vj,{selectedCommit:x,selectedFile:m,diff:_,diffLoading:v,diffError:b}),u.jsxs("div",{className:"grid min-h-0 min-w-0 grid-cols-[minmax(0,1fr)_280px]",children:[u.jsx(Gj,{commits:t,loading:s,error:r,selectedHash:o,maxLanes:y,rowRefs:U,onSelect:l,onLoadMore:w}),u.jsx($j,{files:d,filesError:f,selectedHash:o,selectedFile:m,onSelect:h})]})]})]})}function Qj({data:e}){const[t,s]=E.useState("changes"),[r,o]=E.useState("changes"),[l,d]=E.useState(e.git.status?.files[0]?.path??""),[f,m]=E.useState(""),[h,_]=E.useState([]),[v,b]=E.useState(null),[y,x]=E.useState(""),[w,N]=E.useState(null),[A,R]=E.useState(0),[T,M]=E.useState(null),z=e.git.status?.files??[],U=E.useMemo(()=>z.map(Z=>Z.path),[z]),j=E.useMemo(()=>H9(y),[y]);E.useEffect(()=>{const Z=e.git.status?.files[0]?.path??"";d(W=>W&&e.git.status?.files.some(D=>D.path===W)?W:Z)},[e.git.status?.files]),E.useEffect(()=>{if(r!=="all"||h.length>0)return;let Z=!0;return b(null),J5().then(W=>{Z&&_(W)}).catch(W=>{Z&&b(W instanceof Error?W.message:String(W))}),()=>{Z=!1}},[r,h.length]),E.useEffect(()=>{if(!l){x("");return}let Z=!0;return N(null),tT(l).then(W=>{Z&&(x(W),R(0),M(null))}).catch(W=>{Z&&N(W instanceof Error?W.message:String(W))}),()=>{Z=!1}},[l]);function O(Z){R(0),M(null),d(Z)}function K(){const Z=Fj({activeHunkIndex:A,filePaths:U,hunkCount:j.hunks,pendingNextFilePath:T,selectedFile:l});Z.kind==="hunk"?(M(null),R(Z.activeHunkIndex)):Z.kind==="confirm-next-file"?M(Z.filePath):Z.kind==="file"?O(Z.filePath):M(null)}function H(){if(M(null),A>0){R(D=>D-1);return}const Z=z.findIndex(D=>D.path===l),W=z[Z-1];W&&O(W.path)}const G=z.findIndex(Z=>Z.path===l),J=!!(j.hunks&&A<j.hunks-1||z[G+1]),I=!!(A>0||z[G-1]),ee=T?`End of file. Click Next again to open ${T}.`:null,q=Z=>`rounded px-2 py-0.5 text-[11px] font-medium transition-colors ${Z?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"}`,k=Z=>`flex-1 px-2 py-0.5 text-[11px] font-medium transition-colors ${Z?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"}`,F=E.useMemo(()=>new Set(z.map(Z=>Z.path)),[z]);function V(){f&&(o("changes"),O(f))}return u.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-card/85",children:[u.jsxs("div",{className:"flex shrink-0 items-center gap-1 border-b border-border bg-card/95 px-3 py-1",children:[u.jsx("button",{type:"button",className:q(t==="changes"),onClick:()=>s("changes"),children:"Changes"}),u.jsx("button",{type:"button",className:q(t==="graph"),onClick:()=>s("graph"),children:"Tree"})]}),u.jsx("div",{className:"min-h-0 flex-1",children:t==="graph"?u.jsx(Zj,{branches:e.git.branches??[]}):u.jsxs("div",{className:"grid h-full min-h-0 overflow-hidden border-0 bg-card/85 xl:grid-cols-[320px_minmax(0,1fr)]",children:[u.jsxs("aside",{className:"flex min-h-0 flex-col overflow-hidden",children:[u.jsxs("div",{className:"flex shrink-0 gap-0.5 border-b border-border bg-card/95 p-1",children:[u.jsx("button",{className:k(r==="changes"),onClick:()=>o("changes"),type:"button",children:"Changes"}),u.jsx("button",{className:k(r==="all"),onClick:()=>o("all"),type:"button",children:"All files"})]}),r==="changes"?u.jsx(q9,{branch:e.git.status?.branch||void 0,error:e.git.error,files:e.git.status?.files??[],selectedFile:l,onSelectFile:O,root:e.git.cwd}):v?u.jsx(ht,{variant:"destructive",className:"m-3",children:v}):u.jsx(Z9,{branch:e.git.status?.branch||void 0,onSelectFile:m,paths:h,root:e.git.cwd,selectedFile:f,status:e.git.status?.files??[]})]}),r==="all"?u.jsx(Hj,{isModified:F.has(f),onViewDiff:V,path:f}):u.jsxs("section",{className:"flex min-h-0 min-w-0 flex-col border-l border-border bg-white",children:[u.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-3 border-b border-border px-3 py-1.5",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("h2",{className:"truncate text-[13px] font-semibold tracking-tight",children:l||"Diff"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[10px] text-muted-foreground",children:[u.jsx("span",{children:"Long rows wrap inside the editor pane."}),j.additions||j.deletions?u.jsxs("span",{className:"flex items-center gap-1 font-mono",children:[u.jsxs("span",{className:"text-emerald-700",children:["+",j.additions]}),u.jsxs("span",{className:"text-red-700",children:["-",j.deletions]})]}):null]})]}),u.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[ee?u.jsx("span",{className:"max-w-72 truncate rounded border border-amber-200 bg-amber-50 px-2 py-1 text-[11px] text-amber-900",children:ee}):null,u.jsxs(fe,{disabled:!l||!I,onClick:H,size:"sm",type:"button",variant:"outline",children:[u.jsx(TN,{}),"Previous"]}),u.jsxs(fe,{disabled:!l||!J,onClick:K,size:"sm",type:"button",variant:"outline",children:[u.jsx(NN,{}),"Next"]})]})]}),u.jsx("div",{className:"relative min-h-0 min-w-0 flex-1",children:w?u.jsx("div",{className:"p-4",children:u.jsx(ht,{variant:"destructive",children:w})}):l?u.jsx(nC,{activeHunkIndex:A,diff:y||"No unstaged diff for this file."}):u.jsx("div",{className:"p-4",children:u.jsx(ht,{variant:"muted",className:"border-dashed p-12 text-center",children:"Select a changed file to inspect its diff."})})})]})]})})]})}function Jj({initialPath:e,onSelect:t,selectedPath:s}){const[r,o]=E.useState(e),[l,d]=E.useState(null),[f,m]=E.useState(null),[h,_]=E.useState(!1),v=eB(l);return E.useEffect(()=>{o(e)},[e]),E.useEffect(()=>{let b=!0;return _(!0),m(null),ZS(r).then(y=>{b&&(d(y),t(y.path))}).catch(y=>{b&&m(y instanceof Error?y.message:String(y))}).finally(()=>{b&&_(!1)}),()=>{b=!1}},[r,t]),u.jsxs("div",{className:"rounded-md border border-border bg-background",children:[u.jsxs("div",{className:"flex items-center gap-2 border-b border-border p-2",children:[v?u.jsx(fe,{"aria-label":"Open parent folder",onClick:()=>l&&o(l.parent),size:"icon",type:"button",variant:"ghost",children:u.jsx(Pn,{className:"rotate-90"})}):null,u.jsx("div",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:l?.path??r}),h?u.jsx(Zs,{className:"size-4 animate-spin text-muted-foreground"}):null]}),u.jsxs("div",{className:"max-h-56 overflow-auto p-1",children:[f?u.jsx(ht,{variant:"destructive",className:"m-1",children:f}):null,!f&&l?.entries.length===0?u.jsx(ht,{variant:"muted",className:"m-1 text-center",children:"No folders here."}):null,l?.entries.map(b=>u.jsxs(fe,{className:pe("h-8 w-full justify-start rounded-sm px-2 text-left",s===b.path&&"bg-muted"),onClick:()=>o(b.path),title:b.path,type:"button",variant:"ghost",children:[u.jsx(_a,{className:"text-accent"}),u.jsx("span",{className:"truncate",children:b.name})]},b.path))]})]})}function eB(e){return!!(e&&e.parent!==e.path)}function AS(e){return e.split(/[\\/]/).filter(Boolean).pop()??"project"}function tB({data:e,onRefresh:t}){const[s,r]=E.useState(!1),[o,l]=E.useState(e.git.cwd),[d,f]=E.useState(null),[m,h]=E.useState(!1),[_,v]=E.useState(e.git.cwd),b=E.useRef(null),y=e.git.selectedRepository,x=y?.name??AS(e.git.cwd),{error:w,success:N}=ls(),A=sB({gitCwd:e.git.cwd});E.useEffect(()=>{l(e.git.cwd),v(e.git.cwd)},[e.git.cwd]),E.useEffect(()=>{if(!s)return;function j(O){b.current&&O.target instanceof Node&&!b.current.contains(O.target)&&r(!1)}return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[s]);async function R(j){try{await Gi("/api/git/select",{name:j}),r(!1),await t(),N(`Switched to ${j}.`)}catch(O){w(O instanceof Error?O.message:String(O))}}async function T(j){const O=j.trim();if(!iB(O)){const K="Please add an absolute path. Paths beginning with ~ are not expanded here.";return f(K),w(K),!1}try{const K=AS(O);return await Gi("/api/git/repositories",{name:K,path:O}),f(null),await t(),N(`Added Git project ${K}.`),!0}catch(K){const H=K instanceof Error?K.message:String(K);return f(H),w(H),!1}}async function M(j){try{await iT(j),await t(),N(`Removed Git project ${j}.`)}catch(O){w(O instanceof Error?O.message:String(O))}}async function z(j){j.preventDefault(),await T(o)&&r(!1)}function U(){f(null),v(A.selectedPath),h(!0)}return u.jsxs("div",{className:"relative z-50 flex items-center gap-2",ref:b,children:[u.jsxs(fe,{className:"max-w-[220px] justify-start gap-2 rounded-md border-border bg-card",onClick:()=>r(j=>!j),size:"sm",type:"button",variant:"outline",children:[u.jsx(_a,{className:"text-muted-foreground"}),u.jsx("span",{className:"truncate",children:x}),u.jsx(Pn,{className:pe("ml-auto transition-transform",s&&"rotate-180")})]}),u.jsx(fe,{"aria-label":"Add Git project",onClick:U,size:"sm",type:"button",variant:"outline",children:u.jsx(Es,{})}),s?u.jsxs("div",{className:"absolute right-0 top-10 z-50 w-[min(380px,calc(100vw-2rem))] overflow-hidden rounded-lg border border-border bg-card shadow-lg",children:[u.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3 py-2",children:[u.jsx(ZN,{className:"size-3.5 text-muted-foreground"}),u.jsx("div",{className:"text-xs font-semibold",children:"Git Projects"}),u.jsx(Ve,{className:"ml-auto h-5 px-1.5 text-[10px]",variant:"outline",children:e.config.gitRepositories.length})]}),u.jsx("div",{className:"max-h-72 overflow-auto",children:e.config.gitRepositories.length?u.jsx("div",{className:"divide-y divide-border",children:e.config.gitRepositories.map(j=>{const O=j.name===y?.name;return u.jsxs("div",{className:pe("group grid w-full grid-cols-[1fr_auto_auto] items-center gap-2 px-3 py-1.5 text-left transition-colors hover:bg-muted",O&&"bg-muted/70"),children:[u.jsxs("button",{className:"min-w-0 text-left",onClick:()=>{R(j.name)},type:"button",children:[u.jsx("span",{className:"block truncate text-sm font-medium leading-tight",children:j.name}),u.jsx("span",{className:"block truncate font-mono text-[10px] leading-tight text-muted-foreground",children:j.path})]}),O?u.jsx(ac,{className:"size-3.5"}):u.jsx("span",{className:"size-3.5"}),u.jsx(fe,{"aria-label":`Remove ${j.name}`,className:"size-6 opacity-0 transition-opacity group-hover:opacity-100",onClick:()=>{M(j.name)},size:"icon",title:`Remove ${j.name}`,type:"button",variant:"ghost",children:u.jsx(lc,{className:"size-3.5 text-destructive"})})]},j.name)})}):u.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:"No saved Git projects yet."})}),u.jsxs("div",{className:"border-t border-border bg-muted/20 p-2",children:[u.jsxs("form",{className:"flex gap-1.5",onSubmit:z,children:[u.jsx(bt,{"aria-label":"Paste absolute path",className:"h-7 flex-1 px-2 font-mono text-[11px]",onChange:j=>{l(j.target.value),f(null)},placeholder:"/absolute/path",value:o}),u.jsxs(fe,{className:"h-7 px-2 text-[11px]",size:"sm",type:"submit",children:[u.jsx(Es,{className:"size-3"}),"Add"]}),u.jsx(fe,{"aria-label":"Browse and add Git project",className:"h-7 px-2",onClick:U,size:"sm",type:"button",variant:"outline",children:u.jsx(hk,{className:"size-3"})})]}),d?u.jsx("div",{className:"mt-1.5 truncate text-[10px] text-destructive",children:d}):null]})]}):null,m?u.jsx(nB,{confirmLabel:A.confirmLabel,errorMessage:d,initialPath:A.initialPath,selectedPath:_,title:"Add Git Project",onCancel:()=>h(!1),onSelect:v,onUse:async()=>{await T(_)&&(h(!1),r(!1))}}):null]})}function iB(e){return e.startsWith("/")}function sB({gitCwd:e}){return{confirmLabel:"Add Git project",initialPath:e,selectedPath:e}}function nB({confirmLabel:e="Use this folder",errorMessage:t,initialPath:s,onCancel:r,onSelect:o,onUse:l,selectedPath:d,title:f="Choose Git Project Folder"}){return s0.createPortal(u.jsx("div",{className:"fixed inset-0 z-[1000] grid place-items-center bg-black/35 px-4",children:u.jsxs("div",{className:"w-full max-w-2xl rounded-xl border border-border bg-card p-4 shadow-xl",children:[u.jsxs("div",{className:"mb-3 flex items-center gap-3",children:[u.jsx("div",{className:"flex size-8 items-center justify-center rounded-lg border border-border bg-background",children:u.jsx(_a,{className:"size-4"})}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("div",{className:"text-sm font-semibold",children:f}),u.jsx("div",{className:"truncate font-mono text-xs text-muted-foreground",children:d})]}),u.jsx(fe,{"aria-label":"Close folder picker",onClick:r,size:"icon",variant:"ghost",children:u.jsx(rn,{})})]}),u.jsx(Jj,{initialPath:s,onSelect:o,selectedPath:d}),t?u.jsx("div",{className:"mt-3 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:t}):null,u.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[u.jsx(fe,{onClick:r,type:"button",variant:"outline",children:"Cancel"}),u.jsx(fe,{onClick:()=>{l()},type:"button",children:e})]})]})}),document.body)}function rB({branches:e,currentBranch:t,disabled:s,onRefresh:r}){const[o,l]=E.useState(!1),[d,f]=E.useState(""),[m,h]=E.useState(null),[_,v]=E.useState(null),[b,y]=E.useState(null),x=e.filter(M=>!M.remote),w=e.filter(M=>M.remote);async function N(M,z){h(M),y(null),v(null);try{await z(),await r()}catch(U){y(U instanceof Error?U.message:String(U))}finally{h(null)}}async function A(M){await N(`switch:${M}`,async()=>{await Gi("/api/git/branches/switch",{name:M}),l(!1)})}async function R(){await N("fetch",async()=>{await Gi("/api/git/fetch",{}),v("Fetched latest branch refs.")})}async function T(M){M.preventDefault();const z=d.trim();if(!z){y("Branch name is required.");return}await N("create",async()=>{await Gi("/api/git/branches",{name:z}),f(""),l(!1)})}return u.jsxs("div",{className:"fixed bottom-12 right-4 z-50 flex items-end",children:[o?u.jsxs("div",{"aria-label":"Switch Git branch",className:"mb-11 w-[min(460px,calc(100vw-2rem))] rounded-lg border border-border bg-card shadow-xl",role:"dialog",children:[u.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-border p-3",children:[u.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[u.jsx(Yl,{className:"size-4 text-muted-foreground"}),u.jsx("span",{className:"truncate text-sm font-semibold",children:t||"Branches"})]}),u.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[u.jsx(fe,{"aria-label":"Fetch branches",disabled:s||m!==null,onClick:()=>{R()},size:"icon",title:"Fetch branches",type:"button",variant:"ghost",children:u.jsx(VS,{className:pe(m==="fetch"&&"animate-spin")})}),u.jsx(fe,{"aria-label":"Close branch dialog",onClick:()=>l(!1),size:"icon",type:"button",variant:"ghost",children:u.jsx(rn,{})})]})]}),u.jsx("div",{className:"max-h-72 overflow-auto",children:e.length?u.jsxs(u.Fragment,{children:[u.jsx(RS,{branches:x,busy:m!==null,disabled:s,label:"Local",onSwitch:A}),u.jsx(RS,{branches:w,busy:m!==null,disabled:s,label:"Remote",onSwitch:A})]}):u.jsx("div",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"No branches found."})}),u.jsxs("div",{className:"border-t border-border p-3",children:[u.jsxs("form",{className:"grid gap-2 sm:grid-cols-[1fr_auto]",onSubmit:T,children:[u.jsx(bt,{"aria-label":"New branch name",disabled:s||m!==null,onChange:M=>{f(M.target.value),y(null),v(null)},placeholder:"feature/new-work",value:d}),u.jsxs(fe,{disabled:s||m!==null,type:"submit",children:[u.jsx(bk,{}),"Create"]})]}),b||_?u.jsx(ht,{className:"mt-3 px-3 py-2 text-xs",variant:b?"destructive":"muted",children:b??_}):null]})]}):null,u.jsxs(fe,{className:"h-8 max-w-[260px] gap-2 rounded-md shadow-lg",disabled:s,onClick:()=>l(M=>!M),size:"sm",title:"Switch Git branch",type:"button",variant:"default",children:[u.jsx(Yl,{className:"size-4"}),u.jsx("span",{className:"truncate font-mono text-xs",children:t||"No branch"}),u.jsx(Pn,{className:pe("size-4 transition-transform",o&&"rotate-180")})]})]})}function RS({branches:e,busy:t,disabled:s,label:r,onSwitch:o}){return u.jsxs("section",{children:[u.jsx("div",{className:"border-b border-border bg-muted/60 px-3 py-1.5 text-[11px] font-semibold uppercase text-muted-foreground",children:r}),e.length?e.map(l=>u.jsxs("button",{className:pe("grid w-full grid-cols-[1fr_auto] items-center gap-2 border-b border-border px-3 py-2 text-left text-sm last:border-b-0 hover:bg-muted",l.current&&"bg-muted/70"),disabled:s||t||l.current,onClick:()=>{o(l.name)},type:"button",children:[u.jsxs("span",{className:"min-w-0",children:[u.jsx("span",{className:"block truncate font-medium",children:l.name}),l.upstream?u.jsxs("span",{className:"block truncate font-mono text-[11px] text-muted-foreground",children:["tracks ",l.upstream]}):null]}),u.jsx(Ve,{variant:l.current?"success":l.remote?"outline":"secondary",children:l.current?"current":l.remote?"remote":"local"})]},`${l.remote?"remote":"local"}:${l.name}`)):u.jsxs("div",{className:"border-b border-border px-3 py-3 text-sm text-muted-foreground",children:["No ",r.toLowerCase()," branches."]})]})}function aB(e=!1){return pe("group/sidebar hidden h-full shrink-0 overflow-x-hidden overflow-y-auto border-r border-border bg-card/85 py-5 backdrop-blur transition-[width,padding] duration-200 md:flex md:flex-col",e?"w-64 px-4":"w-16 px-2 hover:w-64 hover:px-4")}function oB(e,t=!1){return pe("relative grid h-12 grid-cols-[48px_minmax(0,1fr)] items-center justify-start gap-0 overflow-hidden rounded-md px-0 text-[15px] font-medium transition-[background-color,color,width] duration-150",t?"w-full":"w-12 group-hover/sidebar:w-full",e?"bg-primary text-primary-foreground hover:bg-primary/90":"hover:bg-muted")}function lB(e=!1,t=!1){return pe("min-w-0 overflow-hidden text-left text-current transition duration-150 whitespace-pre",e?"translate-x-1 opacity-100":"opacity-0 group-hover/sidebar:translate-x-1 group-hover/sidebar:opacity-100",t?"pr-10":"pr-3")}function cB(e=!1){return pe("flex size-12 items-center justify-center text-current transition-transform duration-150 [&_svg]:size-5",e?"translate-x-0":"-translate-x-px group-hover/sidebar:translate-x-0")}function uB({docked:e,onToggleDock:t}){return u.jsxs("div",{className:pe("mt-auto flex h-10 min-w-0 items-center overflow-hidden border-t border-border/60 text-[11px] text-muted-foreground transition-[height,opacity,width] duration-150",e?"w-full justify-start opacity-100":"w-12 justify-center group-hover/sidebar:w-full group-hover/sidebar:justify-start group-hover/sidebar:opacity-100"),children:[u.jsxs("span",{className:pe("flex min-w-0 items-center gap-1.5 overflow-hidden whitespace-pre transition-[opacity,width] duration-150",e?"flex-1 opacity-100":"w-0 flex-none opacity-0 group-hover/sidebar:w-auto group-hover/sidebar:flex-1 group-hover/sidebar:opacity-100"),children:[u.jsx("span",{children:"Made with"}),u.jsx(xk,{"aria-label":"love",className:"size-3 shrink-0 fill-red-500 text-red-500"}),u.jsx("span",{children:"by Robert Wang"}),u.jsx("a",{"aria-label":"Robert Wang on LinkedIn",className:"shrink-0 rounded p-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-[#0A66C2]",href:"https://www.linkedin.com/in/robert-wang-cs/",rel:"noopener noreferrer",target:"_blank",title:"LinkedIn",children:u.jsx("svg",{"aria-hidden":!0,className:"size-3 fill-current",role:"img",viewBox:"0 0 24 24",children:u.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.063 2.063 0 1 1 0-4.126 2.063 2.063 0 0 1 0 4.126zM7.119 20.452H3.554V9h3.565v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.225 0z"})})})]}),u.jsx("button",{"aria-label":e?"Undock sidebar":"Dock sidebar","aria-pressed":e,className:pe("flex size-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground [&_svg]:size-4",e?"ml-auto bg-muted text-foreground":"group-hover/sidebar:ml-auto"),onClick:t,title:e?"Undock sidebar":"Dock sidebar",type:"button",children:e?u.jsx(Vk,{}):u.jsx(qk,{})})]})}function dB({className:e}){return u.jsxs("div",{className:pe("min-w-0",e),children:[u.jsxs("div",{className:"flex items-baseline gap-1.5",children:[u.jsx("div",{className:"text-sm font-semibold",children:"NoMoreIDE"}),u.jsxs("div",{className:"font-mono text-[10px] text-muted-foreground",children:["v","0.1.33"]})]}),u.jsx("div",{className:"font-mono text-[11px] text-muted-foreground",children:"127.0.0.1 console"})]})}function hB(){const[e,t]=E.useState(()=>window.location.pathname.startsWith("/agent")?"agent":window.location.pathname.startsWith("/errors")?"errors":window.location.pathname.startsWith("/database")?"database":window.location.pathname.startsWith("/terminal")?"terminal":window.location.pathname.startsWith("/git")?"git":"services"),[s,r]=E.useState(null),[o,l]=E.useState(null),[d,f]=E.useState(!0),{error:m,success:h}=ls(),[_,v]=E.useState(()=>window.localStorage.getItem("nomoreide:sidebar-docked")==="true"),b=E.useCallback(async(x={})=>{x.silent||f(!0),l(null);try{r(await rT()),x.notify&&h("Dashboard refreshed.")}catch(w){const N=w instanceof Error?w.message:String(w);l(N),m(N)}finally{f(!1)}},[m,h]);E.useEffect(()=>{b()},[b]),E.useEffect(()=>{function x(){document.visibilityState==="visible"&&b({silent:!0})}const w=window.setInterval(x,5e3);return window.addEventListener("focus",x),document.addEventListener("visibilitychange",x),()=>{window.clearInterval(w),window.removeEventListener("focus",x),document.removeEventListener("visibilitychange",x)}},[e,b]),E.useEffect(()=>{const x=e==="git"?"/git":e==="agent"?"/agent":e==="errors"?"/errors":e==="database"?"/database":e==="terminal"?"/terminal":"/";window.location.pathname!==x&&window.history.pushState(null,"",x)},[e]),E.useEffect(()=>{window.localStorage.setItem("nomoreide:sidebar-docked",String(_))},[_]);const y=E.useMemo(()=>s?Object.values(s.runtime.services).filter(x=>x.state==="running").length:0,[s]);return u.jsxs("div",{className:"h-screen overflow-hidden pb-9",children:[u.jsxs("div",{className:"mx-auto flex h-full max-w-[1500px]",children:[u.jsxs("aside",{className:aB(_),children:[u.jsxs("div",{className:pe("grid h-12 grid-cols-[48px_minmax(0,1fr)] items-center overflow-hidden transition-[width] duration-150",_?"w-full":"w-12 group-hover/sidebar:w-full"),children:[u.jsx("div",{className:"flex size-12 items-center justify-center",children:u.jsx("div",{className:"flex size-9 items-center justify-center overflow-hidden rounded-md bg-primary",children:u.jsx("img",{alt:"NoMoreIDE",className:"size-full object-cover",src:O5})})}),u.jsx(dB,{className:pe("min-w-0 translate-x-1 overflow-hidden transition-opacity duration-200",_?"opacity-100":"opacity-0 group-hover/sidebar:opacity-100")})]}),u.jsxs("nav",{className:"mt-5 grid flex-1 content-start gap-1",children:[u.jsx(co,{active:e==="services",badge:y,docked:_,icon:u.jsx(d5,{}),label:"Services",onClick:()=>t("services")}),u.jsx(co,{active:e==="git",docked:_,icon:u.jsx(Yl,{}),label:"Git Review",onClick:()=>t("git")}),u.jsx(co,{active:e==="errors",docked:_,icon:u.jsx(fp,{}),label:"Error Inbox",onClick:()=>t("errors")}),u.jsx(co,{active:e==="database",docked:_,icon:u.jsx(oc,{}),label:"Database",onClick:()=>t("database")}),u.jsx(co,{active:e==="terminal",docked:_,icon:u.jsx(v5,{}),label:"Terminal",onClick:()=>t("terminal")}),u.jsx(co,{active:e==="agent",docked:_,icon:u.jsx(Wl,{}),label:"Agent",onClick:()=>t("agent")})]}),u.jsx(uB,{docked:_,onToggleDock:()=>v(x=>!x)})]}),u.jsxs("main",{className:"flex h-full min-w-0 flex-1 flex-col px-0 py-0",children:[u.jsxs("header",{className:pe("relative z-40 flex shrink-0 flex-wrap items-center justify-between gap-3 border border-border bg-card/90 px-4 py-3 backdrop-blur","border-x-0 border-t-0 border-b"),children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Gk,{className:"size-4 text-muted-foreground md:hidden"}),u.jsxs("div",{children:[u.jsx("h1",{className:"text-lg font-semibold tracking-tight",children:e==="git"?"Git Review":e==="agent"?"Agent":e==="errors"?"Error Inbox":e==="database"?"Database":e==="terminal"?"Terminal":"Services"}),u.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:s?.git.selectedRepository?.name??s?.git.cwd??"Local workspace"})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[o?u.jsx(Ve,{variant:"danger",children:o}):null,s&&e==="git"?u.jsx(tB,{data:s,onRefresh:b}):null,u.jsxs(fe,{onClick:()=>{b({notify:!0})},size:"sm",title:"Refresh dashboard",variant:"outline",children:[u.jsx(VS,{className:pe(d&&"animate-spin")}),"Refresh"]})]})]}),d&&!s?u.jsx(ht,{variant:"muted",children:"Loading NoMoreIDE state..."}):null,u.jsxs("div",{className:"min-h-0 flex-1 overflow-hidden",children:[s&&e==="services"?u.jsx(x7,{data:s,onRefresh:b}):null,s&&e==="git"?u.jsx(Qj,{data:s}):null,e==="agent"?u.jsx(b8,{}):null,e==="errors"?u.jsx(oD,{}):null,e==="database"?u.jsx(iD,{}):null,e==="terminal"?u.jsx(I9,{}):null]})]})]}),s&&e==="git"?u.jsx(rB,{branches:s.git.branches,currentBranch:s.git.status?.branch||void 0,disabled:!s.git.status,onRefresh:b}):null,u.jsx(B8,{onOpenAgentPage:e==="agent"?void 0:()=>t("agent")})]})}function co({active:e,badge:t,docked:s,icon:r,label:o,onClick:l}){return u.jsxs(fe,{"aria-label":o,title:o,className:oB(e,s),variant:"ghost",onClick:l,type:"button",children:[u.jsx("span",{className:cB(s),children:r}),u.jsx("span",{className:lB(s,t!==void 0),children:o}),t!==void 0?u.jsx(Ve,{appearance:t>0?"solid":"outline",className:pe("min-w-6 justify-center px-1.5 font-mono shadow-none",e?"border-primary-foreground/40 bg-primary-foreground/15 text-primary-foreground":t>0?"":"border-border bg-background text-muted-foreground","absolute right-1.5 top-1.5 h-4 min-w-4 rounded-full px-1 text-[10px] leading-none shadow-none group-hover/sidebar:right-2 group-hover/sidebar:top-1/2 group-hover/sidebar:-translate-y-1/2 group-hover/sidebar:text-xs",s&&"right-2 top-1/2 -translate-y-1/2 text-xs"),size:"small",variant:t>0?"success":"outline",children:t}):null]})}OS.createRoot(document.getElementById("root")).render(u.jsx(E.StrictMode,{children:u.jsx(hB,{})}));
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/assets/nomoreide-favicon-Ds7Tgj9p.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>NoMoreIDE</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-DHmbWLCJ.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-Duh8SZvs.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/dist/web/server.js
CHANGED
|
@@ -6,6 +6,7 @@ import { DbPeek } from "../core/db-peek.js";
|
|
|
6
6
|
import { ErrorInbox } from "../core/error-inbox.js";
|
|
7
7
|
import { LogStore } from "../core/log-store.js";
|
|
8
8
|
import { ProcessManager } from "../core/process-manager.js";
|
|
9
|
+
import { defaultRuntimeRegistryPath, ServiceRegistry, } from "../core/service-registry.js";
|
|
9
10
|
import { ApprovalBroker } from "../core/approval-broker.js";
|
|
10
11
|
import { ReproBundleBuilder } from "../core/repro-bundle.js";
|
|
11
12
|
import { TerminalSessionManager, } from "../core/terminal-manager.js";
|
|
@@ -20,11 +21,18 @@ export function createWebServer(options = {}) {
|
|
|
20
21
|
const timelineStore = new TimelineStore({
|
|
21
22
|
baseDir: timelineBaseDir(options.logDir),
|
|
22
23
|
});
|
|
24
|
+
const logDir = options.logDir ?? resolve(process.cwd(), ".nomoreide/logs");
|
|
23
25
|
const logStore = new LogStore({
|
|
24
|
-
baseDir:
|
|
26
|
+
baseDir: logDir,
|
|
25
27
|
timelineStore,
|
|
26
28
|
});
|
|
27
|
-
const
|
|
29
|
+
const registry = new ServiceRegistry(defaultRuntimeRegistryPath(logDir));
|
|
30
|
+
const manager = new ProcessManager({
|
|
31
|
+
configStore,
|
|
32
|
+
logStore,
|
|
33
|
+
timelineStore,
|
|
34
|
+
registry,
|
|
35
|
+
});
|
|
28
36
|
manager.installShutdownHandlers();
|
|
29
37
|
const cwd = options.cwd ?? process.cwd();
|
|
30
38
|
const toolCallStore = options.toolCallStore ?? new ToolCallStore();
|
package/dist/web/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/web/server.ts"],"names":[],"mappings":"AAAA,OAAO,IAAmD,MAAM,WAAW,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,SAAS,EAAE,EAAE,eAAe,EAAgB,MAAM,IAAI,CAAC;AAC9D,OAAO,EACL,WAAW,EACX,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,oB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