Skip to content

Commit a654666

Browse files
committed
fix(agents): accept runtime Pick in followup CLI helpers
resolveFollowupAgentRuntimeId only needs sessionId and runtime pin fields, so share FollowupCliRuntimeParams instead of requiring a full SessionEntry. Unblocks tsgo after the ownsNativeCompaction preflight gate.
1 parent 88d8689 commit a654666

1 file changed

Lines changed: 4 additions & 21 deletions

File tree

‎src/auto-reply/reply/agent-runner-memory.ts‎

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -324,13 +324,7 @@ function followupOwnsNativeCompaction(params: FollowupCliRuntimeParams): boolean
324324
return false;
325325
}
326326

327-
function resolveFollowupContextConfigProvider(params: {
328-
cfg: OpenClawConfig;
329-
followupRun: FollowupRun;
330-
sessionEntry?: SessionEntry;
331-
sessionKey?: string;
332-
runtimePolicySessionKey?: string;
333-
}): string {
327+
function resolveFollowupContextConfigProvider(params: FollowupCliRuntimeParams): string {
334328
const provider = params.followupRun.run.provider;
335329
return resolveContextConfigProviderForRuntime({
336330
provider,
@@ -339,13 +333,8 @@ function resolveFollowupContextConfigProvider(params: {
339333
});
340334
}
341335

342-
function resolveFollowupAgentRuntimeId(params: {
343-
cfg: OpenClawConfig;
344-
followupRun: FollowupRun;
345-
sessionEntry?: SessionEntry;
346-
sessionKey?: string;
347-
runtimePolicySessionKey?: string;
348-
}): string {
336+
function resolveFollowupAgentRuntimeId(params: FollowupCliRuntimeParams): string {
337+
// Only sessionId + runtime pin fields are needed; callers may pass a Pick.
349338
const matchingSessionEntry =
350339
params.sessionEntry?.sessionId === params.followupRun.run.sessionId
351340
? params.sessionEntry
@@ -364,13 +353,7 @@ function resolveFollowupAgentRuntimeId(params: {
364353
});
365354
}
366355

367-
function followupUsesCodexRuntime(params: {
368-
cfg: OpenClawConfig;
369-
followupRun: FollowupRun;
370-
sessionEntry?: SessionEntry;
371-
sessionKey?: string;
372-
runtimePolicySessionKey?: string;
373-
}): boolean {
356+
function followupUsesCodexRuntime(params: FollowupCliRuntimeParams): boolean {
374357
return normalizeLowercaseStringOrEmpty(resolveFollowupAgentRuntimeId(params)) === "codex";
375358
}
376359

0 commit comments

Comments
 (0)