chore: Fix types in tests 8/N.

This commit is contained in:
cpojer
2026-02-17 11:16:36 +09:00
parent ac38d51290
commit 5dc8983954
5 changed files with 22 additions and 17 deletions

View File

@@ -1,15 +1,12 @@
import fs from "node:fs";
import type { SkillCommandSpec } from "../agents/skills.js";
import type { OpenClawConfig } from "../config/config.js";
import type { MediaUnderstandingDecision } from "../media-understanding/types.js";
import type { CommandCategory } from "./commands-registry.types.js";
import type { ElevatedLevel, ReasoningLevel, ThinkLevel, VerboseLevel } from "./thinking.js";
import { lookupContextTokens } from "../agents/context.js";
import { DEFAULT_CONTEXT_TOKENS, DEFAULT_MODEL, DEFAULT_PROVIDER } from "../agents/defaults.js";
import { resolveModelAuthMode } from "../agents/model-auth.js";
import { resolveConfiguredModelRef } from "../agents/model-selection.js";
import { resolveSandboxRuntimeStatus } from "../agents/sandbox.js";
import type { SkillCommandSpec } from "../agents/skills.js";
import { derivePromptTokens, normalizeUsage, type UsageLike } from "../agents/usage.js";
import type { OpenClawConfig } from "../config/config.js";
import {
resolveMainSessionKey,
resolveSessionFilePath,
@@ -19,6 +16,7 @@ import {
} from "../config/sessions.js";
import { formatTimeAgo } from "../infra/format-time/format-relative.ts";
import { resolveCommitHash } from "../infra/git-commit.js";
import type { MediaUnderstandingDecision } from "../media-understanding/types.js";
import { listPluginCommands } from "../plugins/commands.js";
import { resolveAgentIdFromSessionKey } from "../routing/session-key.js";
import {
@@ -41,8 +39,13 @@ import {
listChatCommandsForConfig,
type ChatCommandDefinition,
} from "./commands-registry.js";
import type { CommandCategory } from "./commands-registry.types.js";
import type { ElevatedLevel, ReasoningLevel, ThinkLevel, VerboseLevel } from "./thinking.js";
type AgentConfig = Partial<NonNullable<NonNullable<OpenClawConfig["agents"]>["defaults"]>>;
type AgentDefaults = NonNullable<NonNullable<OpenClawConfig["agents"]>["defaults"]>;
type AgentConfig = Partial<AgentDefaults> & {
model?: AgentDefaults["model"] | string;
};
export const formatTokenCount = formatTokenCountShared;
@@ -72,7 +75,7 @@ type StatusArgs = {
usageLine?: string;
timeLine?: string;
queue?: QueueStatus;
mediaDecisions?: MediaUnderstandingDecision[];
mediaDecisions?: ReadonlyArray<MediaUnderstandingDecision>;
subagentsLine?: string;
includeTranscriptUsage?: boolean;
now?: number;