refactor(agents): trim media helper exports · openclaw/openclaw@3881cb3
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -62,7 +62,7 @@ export function shouldDetachMediaGenerationTask(sessionKey: string | undefined):
|
62 | 62 | } |
63 | 63 | |
64 | 64 | /** Successful media generation output used to complete and wake detached tasks. */ |
65 | | -export type MediaGenerationExecutionResult = { |
| 65 | +type MediaGenerationExecutionResult = { |
66 | 66 | provider: string; |
67 | 67 | model: string; |
68 | 68 | count: number; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -56,15 +56,6 @@ type ProgressExpectation = {
|
56 | 56 | progressSummary: string; |
57 | 57 | }; |
58 | 58 | |
59 | | -type DirectSendExpectation = { |
60 | | -sendMessageMock: unknown; |
61 | | -channel: string; |
62 | | -to: string; |
63 | | -threadId: string; |
64 | | -content: string; |
65 | | -mediaUrls: string[]; |
66 | | -}; |
67 | | - |
68 | 59 | type FallbackAnnouncementExpectation = { |
69 | 60 | deliverAnnouncementMock: unknown; |
70 | 61 | requesterSessionKey: string; |
@@ -180,22 +171,6 @@ export function expectRecordedTaskProgress({
|
180 | 171 | expect(params.progressSummary).toBe(progressSummary); |
181 | 172 | } |
182 | 173 | |
183 | | -export function expectDirectMediaSend({ |
184 | | - sendMessageMock, |
185 | | - channel, |
186 | | - to, |
187 | | - threadId, |
188 | | - content, |
189 | | - mediaUrls, |
190 | | -}: DirectSendExpectation): void { |
191 | | -const params = requireMockFirstParam(sendMessageMock, "sendMessage params"); |
192 | | -expect(params.channel).toBe(channel); |
193 | | -expect(params.to).toBe(to); |
194 | | -expect(params.threadId).toBe(threadId); |
195 | | -expect(params.content).toBe(content); |
196 | | -expect(params.mediaUrls).toEqual(mediaUrls); |
197 | | -} |
198 | | - |
199 | 174 | export function expectFallbackMediaAnnouncement({ |
200 | 175 | deliverAnnouncementMock, |
201 | 176 | requesterSessionKey, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -59,7 +59,7 @@ export const POLICY_REDIRECT_INVOKE_COMMANDS: ReadonlySet<string> = new Set([
|
59 | 59 | "file.write", |
60 | 60 | ]); |
61 | 61 | |
62 | | -export type NodeMediaAction = |
| 62 | +type NodeMediaAction = |
63 | 63 | | "camera_snap" |
64 | 64 | | "photos_latest" |
65 | 65 | | "camera_clip" |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -82,12 +82,6 @@ export const PdfToolSchema = Type.Object({
|
82 | 82 | maxBytesMb: optionalFiniteNumberSchema({ exclusiveMinimum: 0 }), |
83 | 83 | }); |
84 | 84 | |
85 | | -// --------------------------------------------------------------------------- |
86 | | -// Model resolution (mirrors image tool pattern) |
87 | | -// --------------------------------------------------------------------------- |
88 | | - |
89 | | -export { resolvePdfModelConfigForTool } from "./pdf-tool.model-config.js"; |
90 | | - |
91 | 85 | function hasExplicitPdfToolModelConfig(config?: OpenClawConfig): boolean { |
92 | 86 | return ( |
93 | 87 | hasToolModelConfig(coercePdfModelConfig(config)) || |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。