@gguf/claw
Version:
Multi-channel AI gateway with extensible messaging integrations
60 lines (59 loc) • 2.36 kB
TypeScript
import type { SkillCommandSpec } from "../../agents/skills.js";
import type { OpenClawConfig } from "../../config/config.js";
import type { SessionEntry } from "../../config/sessions.js";
import type { MsgContext, TemplateContext } from "../templating.js";
import type { ElevatedLevel, ReasoningLevel, ThinkLevel, VerboseLevel } from "../thinking.js";
import type { GetReplyOptions, ReplyPayload } from "../types.js";
import { buildStatusReply, handleCommands } from "./commands.js";
import type { InlineDirectives } from "./directive-handling.js";
import type { createModelSelectionState } from "./model-selection.js";
import type { TypingController } from "./typing.js";
export type InlineActionResult = {
kind: "reply";
reply: ReplyPayload | ReplyPayload[] | undefined;
} | {
kind: "continue";
directives: InlineDirectives;
abortedLastRun: boolean;
};
export declare function handleInlineActions(params: {
ctx: MsgContext;
sessionCtx: TemplateContext;
cfg: OpenClawConfig;
agentId: string;
agentDir?: string;
sessionEntry?: SessionEntry;
previousSessionEntry?: SessionEntry;
sessionStore?: Record<string, SessionEntry>;
sessionKey: string;
storePath?: string;
sessionScope: Parameters<typeof buildStatusReply>[0]["sessionScope"];
workspaceDir: string;
isGroup: boolean;
opts?: GetReplyOptions;
typing: TypingController;
allowTextCommands: boolean;
inlineStatusRequested: boolean;
command: Parameters<typeof handleCommands>[0]["command"];
skillCommands?: SkillCommandSpec[];
directives: InlineDirectives;
cleanedBody: string;
elevatedEnabled: boolean;
elevatedAllowed: boolean;
elevatedFailures: Array<{
gate: string;
key: string;
}>;
defaultActivation: Parameters<typeof buildStatusReply>[0]["defaultGroupActivation"];
resolvedThinkLevel: ThinkLevel | undefined;
resolvedVerboseLevel: VerboseLevel | undefined;
resolvedReasoningLevel: ReasoningLevel;
resolvedElevatedLevel: ElevatedLevel;
resolveDefaultThinkingLevel: Awaited<ReturnType<typeof createModelSelectionState>>["resolveDefaultThinkingLevel"];
provider: string;
model: string;
contextTokens: number;
directiveAck?: ReplyPayload;
abortedLastRun: boolean;
skillFilter?: string[];
}): Promise<InlineActionResult>;