@adhdev/daemon-core 0.9.23 → 0.9.25
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/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/dist/shared-types.d.ts +1 -0
- package/node_modules/@adhdev/session-host-core/package.json +1 -1
- package/package.json +1 -1
- package/src/cli-adapters/provider-cli-adapter.ts +5 -1
- package/src/cli-adapters/session-host-transport.ts +2 -2
- package/src/commands/handler.ts +1 -0
- package/src/commands/router.ts +6 -0
- package/src/shared-types.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -3969,8 +3969,10 @@ var init_provider_cli_adapter = __esm({
|
|
|
3969
3969
|
if (buttonIndex in this.approvalKeys) {
|
|
3970
3970
|
this.ptyProcess.write(this.approvalKeys[buttonIndex]);
|
|
3971
3971
|
} else {
|
|
3972
|
+
const buttonCount = Array.isArray(modal?.buttons) ? modal.buttons.length : 0;
|
|
3973
|
+
const clampedIndex = buttonCount > 0 ? Math.min(Math.max(0, buttonIndex), buttonCount - 1) : Math.max(0, buttonIndex);
|
|
3972
3974
|
const DOWN = "\x1B[B";
|
|
3973
|
-
const keys = DOWN.repeat(
|
|
3975
|
+
const keys = DOWN.repeat(clampedIndex) + "\r";
|
|
3974
3976
|
this.ptyProcess.write(keys);
|
|
3975
3977
|
}
|
|
3976
3978
|
}
|
|
@@ -12235,6 +12237,7 @@ function handleWorkspaceSetDefault(args) {
|
|
|
12235
12237
|
|
|
12236
12238
|
// src/commands/handler.ts
|
|
12237
12239
|
var COMMAND_DEBUG_LEVELS = /* @__PURE__ */ new Set([
|
|
12240
|
+
"read_chat",
|
|
12238
12241
|
"pty_input",
|
|
12239
12242
|
"pty_resize",
|
|
12240
12243
|
"cdp_eval",
|
|
@@ -18407,6 +18410,9 @@ var DaemonCommandRouter = class {
|
|
|
18407
18410
|
if (logs.length > 0) {
|
|
18408
18411
|
return { success: true, logs, totalBuffered: logs.length };
|
|
18409
18412
|
}
|
|
18413
|
+
if (sinceTs > 0) {
|
|
18414
|
+
return { success: true, logs: [], totalBuffered: 0 };
|
|
18415
|
+
}
|
|
18410
18416
|
if (fs9.existsSync(LOG_PATH)) {
|
|
18411
18417
|
const content = fs9.readFileSync(LOG_PATH, "utf-8");
|
|
18412
18418
|
const allLines = content.split("\n");
|
|
@@ -26179,8 +26185,8 @@ var SessionHostRuntimeTransport = class {
|
|
|
26179
26185
|
}
|
|
26180
26186
|
try {
|
|
26181
26187
|
await this.client.close();
|
|
26182
|
-
} catch {
|
|
26183
|
-
if (destroy) throw new Error(`Failed to close session host client: ${this.options.runtimeId}`);
|
|
26188
|
+
} catch (err) {
|
|
26189
|
+
if (destroy) throw err instanceof Error ? err : new Error(`Failed to close session host client: ${this.options.runtimeId}`);
|
|
26184
26190
|
}
|
|
26185
26191
|
}
|
|
26186
26192
|
};
|