diff --git a/src/auto-reply/dispatch.test.ts b/src/auto-reply/dispatch.test.ts index 08a03ce044f..fcf48a9d19d 100644 --- a/src/auto-reply/dispatch.test.ts +++ b/src/auto-reply/dispatch.test.ts @@ -14,7 +14,7 @@ vi.mock("./reply/dispatch-from-config.js", () => ({ })); vi.mock("./reply/inbound-context.js", () => ({ - finalizeInboundContext: (...args: unknown[]) => hoisted.finalizeInboundContextMock(...args), + finalizeInboundContext: (ctx: unknown) => hoisted.finalizeInboundContextMock(ctx), })); vi.mock("./reply/reply-dispatcher.js", async () => { diff --git a/src/auto-reply/reply/commands-reset.ts b/src/auto-reply/reply/commands-reset.ts index a823b01633d..728ed32e054 100644 --- a/src/auto-reply/reply/commands-reset.ts +++ b/src/auto-reply/reply/commands-reset.ts @@ -1,7 +1,6 @@ import { resetConfiguredBindingTargetInPlace } from "../../channels/plugins/binding-targets.js"; import { logVerbose } from "../../globals.js"; import { isAcpSessionKey } from "../../routing/session-key.js"; -import { normalizeOptionalLowercaseString } from "../../shared/string-coerce.js"; import { resolveBoundAcpThreadSessionKey } from "./commands-acp/targets.js"; import { emitResetCommandHooks, type ResetCommandAction } from "./commands-reset-hooks.js"; import type { CommandHandlerResult, HandleCommandsParams } from "./commands-types.js"; @@ -16,29 +15,6 @@ function applyAcpResetTailContext(ctx: HandleCommandsParams["ctx"], resetTail: s mutableCtx.BodyStripped = resetTail; mutableCtx.AcpDispatchTailAfterReset = true; } - -function resolveSessionEntryForHookSessionKey( - sessionStore: HandleCommandsParams["sessionStore"] | undefined, - sessionKey: string, -): HandleCommandsParams["sessionEntry"] | undefined { - if (!sessionStore) { - return undefined; - } - const directEntry = sessionStore[sessionKey]; - if (directEntry) { - return directEntry; - } - const normalizedTarget = sessionKey.trim().toLowerCase(); - if (!normalizedTarget) { - return undefined; - } - for (const [candidateKey, candidateEntry] of Object.entries(sessionStore)) { - if (normalizeOptionalLowercaseString(candidateKey) === normalizedTarget) { - return candidateEntry; - } - } - return undefined; -} export async function maybeHandleResetCommand( params: HandleCommandsParams, ): Promise {