@adhdev/daemon-core 0.9.49 → 0.9.50
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 +10 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -3
- 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/commands/chat-commands.ts +5 -1
- package/src/commands/handler.ts +1 -0
- package/src/commands/router.ts +12 -2
package/dist/index.mjs
CHANGED
|
@@ -11001,9 +11001,12 @@ function buildDebugBundleText(bundle) {
|
|
|
11001
11001
|
].join("\n");
|
|
11002
11002
|
}
|
|
11003
11003
|
async function handleGetChatDebugBundle(h, args) {
|
|
11004
|
+
const targetSessionId = typeof args?.targetSessionId === "string" ? args.targetSessionId.trim() : "";
|
|
11005
|
+
if (!targetSessionId && !h.currentSession) {
|
|
11006
|
+
return { success: false, error: "No targetSessionId specified \u2014 cannot route command" };
|
|
11007
|
+
}
|
|
11004
11008
|
const provider = h.getProvider(args?.agentType);
|
|
11005
11009
|
const transport = getTargetTransport(h, provider);
|
|
11006
|
-
const targetSessionId = typeof args?.targetSessionId === "string" ? args.targetSessionId.trim() : "";
|
|
11007
11010
|
const providerType = provider?.type || getCurrentProviderType(h, args?.agentType || "");
|
|
11008
11011
|
const adapter = isCliLikeTransport(transport) ? getTargetedCliAdapter(h, args, provider?.type) : null;
|
|
11009
11012
|
const targetInstance = getTargetInstance(h, args);
|
|
@@ -13263,6 +13266,7 @@ var DaemonCommandHandler = class {
|
|
|
13263
13266
|
this.logCommandStart(cmd, args);
|
|
13264
13267
|
const sessionScopedCommands = /* @__PURE__ */ new Set([
|
|
13265
13268
|
"read_chat",
|
|
13269
|
+
"get_chat_debug_bundle",
|
|
13266
13270
|
"send_chat",
|
|
13267
13271
|
"list_chats",
|
|
13268
13272
|
"new_chat",
|
|
@@ -19840,6 +19844,8 @@ var DaemonCommandRouter = class {
|
|
|
19840
19844
|
const wantsAll = args?.all === true;
|
|
19841
19845
|
const offset = wantsAll ? 0 : Math.max(0, Number(args?.offset) || 0);
|
|
19842
19846
|
const limit = wantsAll ? Number.MAX_SAFE_INTEGER : Math.max(1, Math.min(100, Number(args?.limit) || 30));
|
|
19847
|
+
const requestedWorkspace = typeof args?.workspace === "string" ? args.workspace.trim() : "";
|
|
19848
|
+
const requestedProviderSessionId = typeof args?.providerSessionId === "string" ? args.providerSessionId.trim() : typeof args?.activeProviderSessionId === "string" ? args.activeProviderSessionId.trim() : "";
|
|
19843
19849
|
const providerMeta = this.deps.providerLoader.resolve?.(providerType) || this.deps.providerLoader.getMeta(providerType);
|
|
19844
19850
|
const { sessions: historySessions, hasMore, source } = listProviderHistorySessions(providerType, {
|
|
19845
19851
|
canonicalHistory: providerMeta?.canonicalHistory,
|
|
@@ -19859,6 +19865,7 @@ var DaemonCommandRouter = class {
|
|
|
19859
19865
|
sessions: historySessions.map((session) => {
|
|
19860
19866
|
const saved = savedSessionById.get(session.historySessionId);
|
|
19861
19867
|
const recent = recentSessionById.get(session.historySessionId);
|
|
19868
|
+
const workspace = saved?.workspace || recent?.workspace || session.workspace || (requestedWorkspace && requestedProviderSessionId === session.historySessionId ? requestedWorkspace : void 0);
|
|
19862
19869
|
return {
|
|
19863
19870
|
id: session.historySessionId,
|
|
19864
19871
|
providerSessionId: session.historySessionId,
|
|
@@ -19866,13 +19873,13 @@ var DaemonCommandRouter = class {
|
|
|
19866
19873
|
providerName: saved?.providerName || recent?.providerName || providerType,
|
|
19867
19874
|
kind: saved?.kind || recent?.kind || kind,
|
|
19868
19875
|
title: saved?.title || recent?.title || session.sessionTitle || session.preview || providerType,
|
|
19869
|
-
workspace
|
|
19876
|
+
workspace,
|
|
19870
19877
|
summaryMetadata: saved?.summaryMetadata || recent?.summaryMetadata,
|
|
19871
19878
|
preview: session.preview,
|
|
19872
19879
|
messageCount: session.messageCount,
|
|
19873
19880
|
firstMessageAt: session.firstMessageAt,
|
|
19874
19881
|
lastMessageAt: session.lastMessageAt,
|
|
19875
|
-
canResume: !!
|
|
19882
|
+
canResume: !!workspace && canResumeById,
|
|
19876
19883
|
historySource: session.source,
|
|
19877
19884
|
sourcePath: session.sourcePath,
|
|
19878
19885
|
sourceMtimeMs: session.sourceMtimeMs
|