refactor(agents): hide session tool helper types · openclaw/openclaw@3d3d8a5
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
File tree
src/agents/sessions/tools
| Original file line number | Diff line number | Diff line change |
|---|
@@ -12,13 +12,13 @@ import {
|
12 | 12 | truncateTail, |
13 | 13 | } from "./truncate.js"; |
14 | 14 | |
15 | | -export interface OutputAccumulatorOptions { |
| 15 | +interface OutputAccumulatorOptions { |
16 | 16 | maxLines?: number; |
17 | 17 | maxBytes?: number; |
18 | 18 | tempFilePrefix?: string; |
19 | 19 | } |
20 | 20 | |
21 | | -export interface OutputSnapshot { |
| 21 | +interface OutputSnapshot { |
22 | 22 | content: string; |
23 | 23 | truncation: TruncationResult; |
24 | 24 | fullOutputPath?: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -5,7 +5,6 @@
|
5 | 5 | */ |
6 | 6 | import * as os from "node:os"; |
7 | 7 | import { getCapabilities, getImageDimensions, imageFallback } from "@earendil-works/pi-tui"; |
8 | | -import type { ImageContent, TextContent } from "../../../llm/types.js"; |
9 | 8 | import type { Theme } from "../../modes/interactive/theme/theme.js"; |
10 | 9 | import { sanitizeBinaryOutput } from "../../shell-utils.js"; |
11 | 10 | import { stripAnsi } from "../../utils/ansi.js"; |
@@ -80,12 +79,6 @@ export function getTextOutput(
|
80 | 79 | return output; |
81 | 80 | } |
82 | 81 | |
83 | | -/** Minimal shape shared by renderers that carry typed tool details. */ |
84 | | -export type ToolRenderResultLike<TDetails> = { |
85 | | -content: (TextContent | ImageContent)[]; |
86 | | -details: TDetails; |
87 | | -}; |
88 | | - |
89 | 82 | /** Formats the invalid-argument marker with the active theme. */ |
90 | 83 | export function invalidArgText(theme: Pick<Theme, "fg">): string { |
91 | 84 | return theme.fg("error", "[invalid arg]"); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。