mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-08 22:24:00 +00:00
refactor(agents): hide session tool helper types
This commit is contained in:
@@ -12,13 +12,13 @@ import {
|
||||
truncateTail,
|
||||
} from "./truncate.js";
|
||||
|
||||
export interface OutputAccumulatorOptions {
|
||||
interface OutputAccumulatorOptions {
|
||||
maxLines?: number;
|
||||
maxBytes?: number;
|
||||
tempFilePrefix?: string;
|
||||
}
|
||||
|
||||
export interface OutputSnapshot {
|
||||
interface OutputSnapshot {
|
||||
content: string;
|
||||
truncation: TruncationResult;
|
||||
fullOutputPath?: string;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
import * as os from "node:os";
|
||||
import { getCapabilities, getImageDimensions, imageFallback } from "@earendil-works/pi-tui";
|
||||
import type { ImageContent, TextContent } from "../../../llm/types.js";
|
||||
import type { Theme } from "../../modes/interactive/theme/theme.js";
|
||||
import { sanitizeBinaryOutput } from "../../shell-utils.js";
|
||||
import { stripAnsi } from "../../utils/ansi.js";
|
||||
@@ -80,12 +79,6 @@ export function getTextOutput(
|
||||
return output;
|
||||
}
|
||||
|
||||
/** Minimal shape shared by renderers that carry typed tool details. */
|
||||
export type ToolRenderResultLike<TDetails> = {
|
||||
content: (TextContent | ImageContent)[];
|
||||
details: TDetails;
|
||||
};
|
||||
|
||||
/** Formats the invalid-argument marker with the active theme. */
|
||||
export function invalidArgText(theme: Pick<Theme, "fg">): string {
|
||||
return theme.fg("error", "[invalid arg]");
|
||||
|
||||
Reference in New Issue
Block a user