refactor(agents): hide media tool helper exports · openclaw/openclaw@abee98f
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -22,10 +22,10 @@ import {
|
22 | 22 | type MediaGenerateActionResult, |
23 | 23 | } from "./media-generate-tool-actions-shared.js"; |
24 | 24 | |
25 | | -export type ImageGenerateActionResult = MediaGenerateActionResult; |
| 25 | +type ImageGenerateActionResult = MediaGenerateActionResult; |
26 | 26 | |
27 | 27 | /** Formats provider auth setup hints for the image generation `list` action. */ |
28 | | -export function formatImageGenerationAuthHint(provider: { |
| 28 | +function formatImageGenerationAuthHint(provider: { |
29 | 29 | id: string; |
30 | 30 | authEnvVars: readonly string[]; |
31 | 31 | }): string | undefined { |
@@ -39,12 +39,12 @@ export function formatImageGenerationAuthHint(provider: {
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** Lists supported image-generation modes exposed by a provider. */ |
42 | | -export function listSupportedImageGenerationModes(provider: ImageGenerationProvider): string[] { |
| 42 | +function listSupportedImageGenerationModes(provider: ImageGenerationProvider): string[] { |
43 | 43 | return ["generate", ...(provider.capabilities.edit.enabled ? ["edit"] : [])]; |
44 | 44 | } |
45 | 45 | |
46 | 46 | /** Formats provider capability details for the image generation `list` action. */ |
47 | | -export function summarizeImageGenerationCapabilities(provider: ImageGenerationProvider): string { |
| 47 | +function summarizeImageGenerationCapabilities(provider: ImageGenerationProvider): string { |
48 | 48 | const caps: string[] = []; |
49 | 49 | if (provider.capabilities.edit.enabled) { |
50 | 50 | const maxRefs = provider.capabilities.edit.maxInputImages; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -38,7 +38,7 @@ const OPENAI_PROVIDER_ID = "openai";
|
38 | 38 | const CODEX_MEDIA_PROVIDER_ID = "codex"; |
39 | 39 | const OPENAI_RESPONSES_MODEL_API = "openai-responses"; |
40 | 40 | |
41 | | -export type OpenAiImageMediaCandidateDecision = |
| 41 | +type OpenAiImageMediaCandidateDecision = |
42 | 42 | | { kind: "keep"; ref: string } |
43 | 43 | | { kind: "substitute"; ref: string; provider: string } |
44 | 44 | | { kind: "drop" }; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -13,7 +13,7 @@ import { providerSupportsNativePdfDocument } from "../../media-understanding/def
|
13 | 13 | import { extractAssistantText } from "../embedded-agent-utils.js"; |
14 | 14 | |
15 | 15 | /** Normalized PDF model preference used by tool registration and execution. */ |
16 | | -export type PdfModelConfig = { primary?: string; fallbacks?: string[] }; |
| 16 | +type PdfModelConfig = { primary?: string; fallbacks?: string[] }; |
17 | 17 | |
18 | 18 | /** Reads `pdf` and `pdfs` tool arguments into a trimmed, de-duplicated PDF input list. */ |
19 | 19 | export function resolvePdfInputs(record: Record<string, unknown>): string[] { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。