@adhdev/daemon-core 0.9.9 → 0.9.11
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/commands/chat-commands.d.ts +1 -0
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -7
- package/dist/index.mjs.map +1 -1
- package/node_modules/@adhdev/session-host-core/package.json +1 -1
- package/package.json +1 -1
- package/src/cli-adapters/provider-cli-adapter.ts +1 -1
- package/src/commands/chat-commands.ts +5 -4
- package/src/providers/cli-provider-instance.ts +4 -4
package/dist/index.mjs
CHANGED
|
@@ -2206,7 +2206,7 @@ var init_provider_cli_adapter = __esm({
|
|
|
2206
2206
|
sendDelayMs;
|
|
2207
2207
|
sendKey;
|
|
2208
2208
|
submitStrategy;
|
|
2209
|
-
static SCRIPT_STATUS_DEBOUNCE_MS =
|
|
2209
|
+
static SCRIPT_STATUS_DEBOUNCE_MS = 3e3;
|
|
2210
2210
|
/** Inject CLI scripts after construction (e.g. when resolved by ProviderLoader) */
|
|
2211
2211
|
setCliScripts(scripts) {
|
|
2212
2212
|
this.cliScripts = scripts;
|
|
@@ -9919,6 +9919,7 @@ function buildSessionModalDeliverySignature(payload) {
|
|
|
9919
9919
|
// src/commands/chat-commands.ts
|
|
9920
9920
|
init_chat_message_normalization();
|
|
9921
9921
|
var RECENT_SEND_WINDOW_MS = 1200;
|
|
9922
|
+
var READ_CHAT_PROVIDER_EVAL_TIMEOUT_MS = 25e3;
|
|
9922
9923
|
var recentSendByTarget = /* @__PURE__ */ new Map();
|
|
9923
9924
|
function getCurrentProviderType(h, fallback = "") {
|
|
9924
9925
|
return h.currentSession?.providerType || h.currentProviderType || fallback;
|
|
@@ -10212,7 +10213,7 @@ function didProviderConfirmSend(result) {
|
|
|
10212
10213
|
}
|
|
10213
10214
|
async function readExtensionChatState(h) {
|
|
10214
10215
|
try {
|
|
10215
|
-
const evalResult = await h.evaluateProviderScript("readChat", void 0,
|
|
10216
|
+
const evalResult = await h.evaluateProviderScript("readChat", void 0, READ_CHAT_PROVIDER_EVAL_TIMEOUT_MS);
|
|
10216
10217
|
if (!evalResult?.result) return null;
|
|
10217
10218
|
const parsed = parseMaybeJson(evalResult.result);
|
|
10218
10219
|
return parsed && typeof parsed === "object" ? parsed : null;
|
|
@@ -10300,7 +10301,7 @@ async function handleReadChat(h, args) {
|
|
|
10300
10301
|
const title = typeof parsedRecord?.title === "string" ? parsedRecord.title : void 0;
|
|
10301
10302
|
const providerSessionId = typeof parsedRecord?.providerSessionId === "string" ? parsedRecord.providerSessionId : void 0;
|
|
10302
10303
|
if (status) {
|
|
10303
|
-
LOG.
|
|
10304
|
+
LOG.debug("Command", `[read_chat] cli-like resolved provider=${adapter.cliType} target=${String(args?.targetSessionId || "")} adapterStatus=${String(adapterStatus.status || "")} parsedStatus=${String(parsedRecord?.status || "")} shouldPreferAdapterMessages=${String(shouldPreferAdapterMessages)} adapterMsgCount=${Array.isArray(adapterStatus.messages) ? adapterStatus.messages.length : 0} parsedMsgCount=${Array.isArray(parsedRecord?.messages) ? parsedRecord.messages.length : 0} returnedMsgCount=${Array.isArray(status.messages) ? status.messages.length : 0}`);
|
|
10304
10305
|
return buildReadChatCommandResult({
|
|
10305
10306
|
messages: status.messages || [],
|
|
10306
10307
|
status: status.status,
|
|
@@ -10325,7 +10326,7 @@ async function handleReadChat(h, args) {
|
|
|
10325
10326
|
}
|
|
10326
10327
|
if (isExtensionTransport(transport)) {
|
|
10327
10328
|
try {
|
|
10328
|
-
const evalResult = await h.evaluateProviderScript("readChat", void 0,
|
|
10329
|
+
const evalResult = await h.evaluateProviderScript("readChat", void 0, READ_CHAT_PROVIDER_EVAL_TIMEOUT_MS);
|
|
10329
10330
|
if (evalResult?.result) {
|
|
10330
10331
|
let parsed = evalResult.result;
|
|
10331
10332
|
if (typeof parsed === "string") {
|
|
@@ -10429,7 +10430,7 @@ async function handleReadChat(h, args) {
|
|
|
10429
10430
|
const script = h.getProviderScript("readChat") || h.getProviderScript("read_chat");
|
|
10430
10431
|
if (script) {
|
|
10431
10432
|
try {
|
|
10432
|
-
const evalResult = await h.evaluateProviderScript("readChat", void 0,
|
|
10433
|
+
const evalResult = await h.evaluateProviderScript("readChat", void 0, READ_CHAT_PROVIDER_EVAL_TIMEOUT_MS);
|
|
10433
10434
|
if (evalResult?.result) {
|
|
10434
10435
|
let parsed = evalResult.result;
|
|
10435
10436
|
if (typeof parsed === "string") {
|
|
@@ -13011,7 +13012,7 @@ var CliProviderInstance = class {
|
|
|
13011
13012
|
this.generatingDebouncePending = null;
|
|
13012
13013
|
}
|
|
13013
13014
|
this.generatingDebounceTimer = null;
|
|
13014
|
-
},
|
|
13015
|
+
}, 3e3);
|
|
13015
13016
|
} else if (newStatus === "waiting_approval") {
|
|
13016
13017
|
this.suppressIdleHistoryReplay = false;
|
|
13017
13018
|
if (this.generatingDebouncePending) {
|
|
@@ -13067,7 +13068,7 @@ var CliProviderInstance = class {
|
|
|
13067
13068
|
this.generatingStartedAt = 0;
|
|
13068
13069
|
}
|
|
13069
13070
|
this.completedDebounceTimer = null;
|
|
13070
|
-
},
|
|
13071
|
+
}, 3e3);
|
|
13071
13072
|
}
|
|
13072
13073
|
} else if (newStatus === "stopped") {
|
|
13073
13074
|
if (this.generatingDebounceTimer) {
|