refactor: extend media understanding

This commit is contained in:
Peter Steinberger
2026-01-17 07:17:09 +00:00
parent 86a46874da
commit 0c0e1e4226
16 changed files with 674 additions and 550 deletions

View File

@@ -68,6 +68,7 @@ export const handleStatusCommand: CommandHandler = async (params, allowTextComma
resolveDefaultThinkingLevel: params.resolveDefaultThinkingLevel,
isGroup: params.isGroup,
defaultGroupActivation: params.defaultGroupActivation,
mediaDecisions: params.ctx.MediaUnderstandingDecisions,
});
return { shouldContinue: false, reply };
};

View File

@@ -24,6 +24,7 @@ import type { ElevatedLevel, ReasoningLevel, ThinkLevel, VerboseLevel } from "..
import type { ReplyPayload } from "../types.js";
import type { CommandContext } from "./commands-types.js";
import { getFollowupQueueDepth, resolveQueueSettings } from "./queue.js";
import type { MediaUnderstandingDecision } from "../../media-understanding/types.js";
function formatApiKeySnippet(apiKey: string): string {
const compact = apiKey.replace(/\s+/g, "");
@@ -105,6 +106,7 @@ export async function buildStatusReply(params: {
resolveDefaultThinkingLevel: () => Promise<ThinkLevel | undefined>;
isGroup: boolean;
defaultGroupActivation: () => "always" | "mention";
mediaDecisions?: MediaUnderstandingDecision[];
}): Promise<ReplyPayload | undefined> {
const {
cfg,
@@ -200,6 +202,7 @@ export async function buildStatusReply(params: {
dropPolicy: queueSettings.dropPolicy,
showDetails: queueOverrides,
},
mediaDecisions: params.mediaDecisions,
includeTranscriptUsage: false,
});

View File

@@ -188,6 +188,7 @@ export async function applyInlineDirectiveOverrides(params: {
resolveDefaultThinkingLevel: async () => resolvedDefaultThinkLevel,
isGroup,
defaultGroupActivation: defaultActivation,
mediaDecisions: ctx.MediaUnderstandingDecisions,
});
}
typing.cleanup();

View File

@@ -185,6 +185,7 @@ export async function handleInlineActions(params: {
resolveDefaultThinkingLevel,
isGroup,
defaultGroupActivation: defaultActivation,
mediaDecisions: ctx.MediaUnderstandingDecisions,
});
await sendInlineReply(inlineStatusReply);
directives = { ...directives, hasStatusDirective: false };