mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:20:44 +00:00
chore: remove unused helpers
This commit is contained in:
@@ -4,24 +4,11 @@ import {
|
||||
buildMediaGenerationTaskStatusDetails,
|
||||
buildMediaGenerationTaskStatusText,
|
||||
findActiveMediaGenerationTaskForSession,
|
||||
getMediaGenerationTaskProviderId,
|
||||
isActiveMediaGenerationTask,
|
||||
} from "./media-generation-task-status-shared.js";
|
||||
|
||||
export const MUSIC_GENERATION_TASK_KIND = "music_generation";
|
||||
const MUSIC_GENERATION_SOURCE_PREFIX = "music_generate";
|
||||
|
||||
export function isActiveMusicGenerationTask(task: TaskRecord): boolean {
|
||||
return isActiveMediaGenerationTask({
|
||||
task,
|
||||
taskKind: MUSIC_GENERATION_TASK_KIND,
|
||||
});
|
||||
}
|
||||
|
||||
export function getMusicGenerationTaskProviderId(task: TaskRecord): string | undefined {
|
||||
return getMediaGenerationTaskProviderId(task, MUSIC_GENERATION_SOURCE_PREFIX);
|
||||
}
|
||||
|
||||
export function findActiveMusicGenerationTaskForSession(
|
||||
sessionKey?: string,
|
||||
): TaskRecord | undefined {
|
||||
|
||||
@@ -95,13 +95,6 @@ function visitDiagnosticPayload(
|
||||
return visit(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Redacts image/base64 payload data from diagnostic objects before persistence.
|
||||
*/
|
||||
export function redactImageDataForDiagnostics(value: unknown): unknown {
|
||||
return visitDiagnosticPayload(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes credential-like fields and image/base64 payload data from diagnostic
|
||||
* objects before persistence.
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
export type ArgsRecord = Record<string, unknown>;
|
||||
|
||||
export { asOptionalObjectRecord as asRecord } from "../shared/record-coerce.js";
|
||||
|
||||
@@ -249,19 +249,3 @@ export function formatInboundFromLabel(params: {
|
||||
}
|
||||
return `${directLabel} id:${directId}`;
|
||||
}
|
||||
|
||||
export function formatThreadStarterEnvelope(params: {
|
||||
channel: string;
|
||||
author?: string;
|
||||
timestamp?: number | Date;
|
||||
body: string;
|
||||
envelope?: EnvelopeFormatOptions;
|
||||
}): string {
|
||||
return formatAgentEnvelope({
|
||||
channel: params.channel,
|
||||
from: params.author,
|
||||
timestamp: params.timestamp,
|
||||
envelope: params.envelope,
|
||||
body: params.body,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -25,15 +25,6 @@ export function isBinaryThinkingProvider(provider?: string | null): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
export function supportsBuiltInXHighThinking(
|
||||
provider?: string | null,
|
||||
model?: string | null,
|
||||
): boolean {
|
||||
void provider;
|
||||
void model;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Normalize user-provided thinking level strings to the canonical enum.
|
||||
export function normalizeThinkLevel(raw?: string | null): ThinkLevel | undefined {
|
||||
const key = normalizeOptionalLowercaseString(raw);
|
||||
|
||||
@@ -17,11 +17,3 @@ export function formatHelpExamples(examples: ReadonlyArray<HelpExample>, inline
|
||||
const formatter = inline ? formatHelpExampleLine : formatHelpExample;
|
||||
return examples.map(([command, description]) => formatter(command, description)).join("\n");
|
||||
}
|
||||
|
||||
export function formatHelpExampleGroup(
|
||||
label: string,
|
||||
examples: ReadonlyArray<HelpExample>,
|
||||
inline = false,
|
||||
) {
|
||||
return `${theme.muted(label)}\n${formatHelpExamples(examples, inline)}`;
|
||||
}
|
||||
|
||||
@@ -27,10 +27,6 @@ export type SessionDisplayRow = {
|
||||
contextTokens?: number;
|
||||
};
|
||||
|
||||
export type SessionDisplayDefaults = {
|
||||
model: string;
|
||||
};
|
||||
|
||||
export const SESSION_KEY_PAD = 26;
|
||||
export const SESSION_AGE_PAD = 9;
|
||||
export const SESSION_MODEL_PAD = 14;
|
||||
|
||||
Reference in New Issue
Block a user