@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
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* setMode, changeModel, setThoughtLevel, resolveAction, chatHistory
|
|
4
4
|
*/
|
|
5
5
|
import type { CommandResult, CommandHelpers } from './handler.js';
|
|
6
|
+
export declare const READ_CHAT_PROVIDER_EVAL_TIMEOUT_MS = 25000;
|
|
6
7
|
export declare function handleChatHistory(h: CommandHelpers, args: any): Promise<CommandResult>;
|
|
7
8
|
export declare function handleReadChat(h: CommandHelpers, args: any): Promise<CommandResult>;
|
|
8
9
|
export declare function handleSendChat(h: CommandHelpers, args: any): Promise<CommandResult>;
|
package/dist/index.js
CHANGED
|
@@ -2209,7 +2209,7 @@ var init_provider_cli_adapter = __esm({
|
|
|
2209
2209
|
sendDelayMs;
|
|
2210
2210
|
sendKey;
|
|
2211
2211
|
submitStrategy;
|
|
2212
|
-
static SCRIPT_STATUS_DEBOUNCE_MS =
|
|
2212
|
+
static SCRIPT_STATUS_DEBOUNCE_MS = 3e3;
|
|
2213
2213
|
/** Inject CLI scripts after construction (e.g. when resolved by ProviderLoader) */
|
|
2214
2214
|
setCliScripts(scripts) {
|
|
2215
2215
|
this.cliScripts = scripts;
|
|
@@ -10072,6 +10072,7 @@ function buildSessionModalDeliverySignature(payload) {
|
|
|
10072
10072
|
// src/commands/chat-commands.ts
|
|
10073
10073
|
init_chat_message_normalization();
|
|
10074
10074
|
var RECENT_SEND_WINDOW_MS = 1200;
|
|
10075
|
+
var READ_CHAT_PROVIDER_EVAL_TIMEOUT_MS = 25e3;
|
|
10075
10076
|
var recentSendByTarget = /* @__PURE__ */ new Map();
|
|
10076
10077
|
function getCurrentProviderType(h, fallback = "") {
|
|
10077
10078
|
return h.currentSession?.providerType || h.currentProviderType || fallback;
|
|
@@ -10365,7 +10366,7 @@ function didProviderConfirmSend(result) {
|
|
|
10365
10366
|
}
|
|
10366
10367
|
async function readExtensionChatState(h) {
|
|
10367
10368
|
try {
|
|
10368
|
-
const evalResult = await h.evaluateProviderScript("readChat", void 0,
|
|
10369
|
+
const evalResult = await h.evaluateProviderScript("readChat", void 0, READ_CHAT_PROVIDER_EVAL_TIMEOUT_MS);
|
|
10369
10370
|
if (!evalResult?.result) return null;
|
|
10370
10371
|
const parsed = parseMaybeJson(evalResult.result);
|
|
10371
10372
|
return parsed && typeof parsed === "object" ? parsed : null;
|
|
@@ -10453,7 +10454,7 @@ async function handleReadChat(h, args) {
|
|
|
10453
10454
|
const title = typeof parsedRecord?.title === "string" ? parsedRecord.title : void 0;
|
|
10454
10455
|
const providerSessionId = typeof parsedRecord?.providerSessionId === "string" ? parsedRecord.providerSessionId : void 0;
|
|
10455
10456
|
if (status) {
|
|
10456
|
-
LOG.
|
|
10457
|
+
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}`);
|
|
10457
10458
|
return buildReadChatCommandResult({
|
|
10458
10459
|
messages: status.messages || [],
|
|
10459
10460
|
status: status.status,
|
|
@@ -10478,7 +10479,7 @@ async function handleReadChat(h, args) {
|
|
|
10478
10479
|
}
|
|
10479
10480
|
if (isExtensionTransport(transport)) {
|
|
10480
10481
|
try {
|
|
10481
|
-
const evalResult = await h.evaluateProviderScript("readChat", void 0,
|
|
10482
|
+
const evalResult = await h.evaluateProviderScript("readChat", void 0, READ_CHAT_PROVIDER_EVAL_TIMEOUT_MS);
|
|
10482
10483
|
if (evalResult?.result) {
|
|
10483
10484
|
let parsed = evalResult.result;
|
|
10484
10485
|
if (typeof parsed === "string") {
|
|
@@ -10582,7 +10583,7 @@ async function handleReadChat(h, args) {
|
|
|
10582
10583
|
const script = h.getProviderScript("readChat") || h.getProviderScript("read_chat");
|
|
10583
10584
|
if (script) {
|
|
10584
10585
|
try {
|
|
10585
|
-
const evalResult = await h.evaluateProviderScript("readChat", void 0,
|
|
10586
|
+
const evalResult = await h.evaluateProviderScript("readChat", void 0, READ_CHAT_PROVIDER_EVAL_TIMEOUT_MS);
|
|
10586
10587
|
if (evalResult?.result) {
|
|
10587
10588
|
let parsed = evalResult.result;
|
|
10588
10589
|
if (typeof parsed === "string") {
|
|
@@ -13164,7 +13165,7 @@ var CliProviderInstance = class {
|
|
|
13164
13165
|
this.generatingDebouncePending = null;
|
|
13165
13166
|
}
|
|
13166
13167
|
this.generatingDebounceTimer = null;
|
|
13167
|
-
},
|
|
13168
|
+
}, 3e3);
|
|
13168
13169
|
} else if (newStatus === "waiting_approval") {
|
|
13169
13170
|
this.suppressIdleHistoryReplay = false;
|
|
13170
13171
|
if (this.generatingDebouncePending) {
|
|
@@ -13220,7 +13221,7 @@ var CliProviderInstance = class {
|
|
|
13220
13221
|
this.generatingStartedAt = 0;
|
|
13221
13222
|
}
|
|
13222
13223
|
this.completedDebounceTimer = null;
|
|
13223
|
-
},
|
|
13224
|
+
}, 3e3);
|
|
13224
13225
|
}
|
|
13225
13226
|
} else if (newStatus === "stopped") {
|
|
13226
13227
|
if (this.generatingDebounceTimer) {
|