feat: improve /new model hints and reset confirmation

This commit is contained in:
Peter Steinberger
2026-01-20 14:28:53 +00:00
parent 41f6d06967
commit 15e5bb3459
16 changed files with 385 additions and 32 deletions

View File

@@ -19,6 +19,7 @@ import { handleInlineActions } from "./get-reply-inline-actions.js";
import { runPreparedReply } from "./get-reply-run.js";
import { finalizeInboundContext } from "./inbound-context.js";
import { initSessionState } from "./session.js";
import { applyResetModelOverride } from "./session-reset-model.js";
import { stageSandboxMedia } from "./stage-sandbox-media.js";
import { createTypingController } from "./typing.js";
@@ -103,6 +104,7 @@ export async function getReplyFromConfig(
sessionKey,
sessionId,
isNewSession,
resetTriggered,
systemSent,
abortedLastRun,
storePath,
@@ -110,8 +112,24 @@ export async function getReplyFromConfig(
groupResolution,
isGroup,
triggerBodyNormalized,
bodyStripped,
} = sessionState;
await applyResetModelOverride({
cfg,
resetTriggered,
bodyStripped,
sessionCtx,
ctx: finalized,
sessionEntry,
sessionStore,
sessionKey,
storePath,
defaultProvider,
defaultModel,
aliasIndex,
});
const directiveResult = await resolveReplyDirectives({
ctx: finalized,
cfg,
@@ -256,9 +274,11 @@ export async function getReplyFromConfig(
perMessageQueueOptions,
typing,
opts,
defaultProvider,
defaultModel,
timeoutMs,
isNewSession,
resetTriggered,
systemSent,
sessionEntry,
sessionStore,