@adhdev/daemon-core 0.9.76-rc.28 → 0.9.76-rc.29

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 CHANGED
@@ -14523,9 +14523,11 @@ var DaemonCommandHandler = class {
14523
14523
  }
14524
14524
  const sessionLookupFailed = !!targetSessionId && !session;
14525
14525
  const managerKey = this.extractIdeType(args, sessionLookupFailed);
14526
- let providerType;
14526
+ let providerType = args?.agentType || args?.providerType;
14527
14527
  if (!sessionLookupFailed) {
14528
- providerType = session?.providerType || args?.agentType || args?.providerType || this.inferProviderType(managerKey);
14528
+ providerType = session?.providerType || providerType || this.inferProviderType(managerKey);
14529
+ } else if (!providerType) {
14530
+ providerType = this.inferProviderType(managerKey);
14529
14531
  }
14530
14532
  return { session, managerKey, providerType, sessionLookupFailed };
14531
14533
  }
@@ -14605,7 +14607,8 @@ var DaemonCommandHandler = class {
14605
14607
  "pty_resize",
14606
14608
  "invoke_provider_script"
14607
14609
  ]);
14608
- if (this._currentRoute.sessionLookupFailed && sessionScopedCommands.has(cmd)) {
14610
+ const allowsInactiveReadChatFallback = cmd === "read_chat" && !!this._currentRoute.providerType && (typeof args?.providerSessionId === "string" && args.providerSessionId.trim().length > 0 || typeof args?.historySessionId === "string" && args.historySessionId.trim().length > 0);
14611
+ if (this._currentRoute.sessionLookupFailed && sessionScopedCommands.has(cmd) && !allowsInactiveReadChatFallback) {
14609
14612
  const result2 = {
14610
14613
  success: false,
14611
14614
  error: `Live session not found for targetSessionId: ${String(args?.targetSessionId || "").trim() || "unknown"}`