style: tidy auto-reply imports and formatting

This commit is contained in:
Peter Steinberger
2026-01-05 01:46:07 +01:00
parent b0dcdc4982
commit 1bad96aa2b
7 changed files with 15 additions and 18 deletions

View File

@@ -20,12 +20,12 @@ import { resolveSessionTranscriptPath } from "../config/sessions.js";
import { logVerbose } from "../globals.js";
import { clearCommandLane, getQueueSize } from "../process/command-queue.js";
import { defaultRuntime } from "../runtime.js";
import { hasControlCommand } from "./command-detection.js";
import { getAbortMemory } from "./reply/abort.js";
import { runReplyAgent } from "./reply/agent-runner.js";
import { resolveBlockStreamingChunking } from "./reply/block-streaming.js";
import { applySessionHints } from "./reply/body.js";
import { buildCommandContext, handleCommands } from "./reply/commands.js";
import { hasControlCommand } from "./command-detection.js";
import {
handleDirectiveOnly,
isDirectiveOnly,
@@ -498,11 +498,7 @@ export async function getReplyFromConfig(
const baseBody = sessionCtx.BodyStripped ?? sessionCtx.Body ?? "";
const rawBodyTrimmed = (ctx.Body ?? "").trim();
const baseBodyTrimmedRaw = baseBody.trim();
if (
!commandAuthorized &&
!baseBodyTrimmedRaw &&
hasControlCommand(rawBody)
) {
if (!commandAuthorized && !baseBodyTrimmedRaw && hasControlCommand(rawBody)) {
typing.cleanup();
return undefined;
}

View File

@@ -20,8 +20,8 @@ import type { MsgContext } from "../templating.js";
import type { ThinkLevel, VerboseLevel } from "../thinking.js";
import type { ReplyPayload } from "../types.js";
import { isAbortTrigger, setAbortMemory } from "./abort.js";
import { stripMentions } from "./mentions.js";
import type { InlineDirectives } from "./directive-handling.js";
import { stripMentions } from "./mentions.js";
export type CommandContext = {
surface: string;

View File

@@ -85,10 +85,8 @@ export function parseInlineDirectives(body: string): InlineDirectives {
rawLevel: rawElevatedLevel,
hasDirective: hasElevatedDirective,
} = extractElevatedDirective(verboseCleaned);
const {
cleaned: statusCleaned,
hasDirective: hasStatusDirective,
} = extractStatusDirective(elevatedCleaned);
const { cleaned: statusCleaned, hasDirective: hasStatusDirective } =
extractStatusDirective(elevatedCleaned);
const {
cleaned: modelCleaned,
rawModel,