refactor(media): remove common helper facades · openclaw/openclaw@4e6057e
vincentkoc
·
2026-06-18
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,5 +2,5 @@
|
2 | 2 | export { applyMediaUnderstanding } from "../../media-understanding/apply.js"; |
3 | 3 | export { MediaAttachmentCache } from "../../media-understanding/attachments.js"; |
4 | 4 | export { normalizeAttachments } from "../../media-understanding/attachments.normalize.js"; |
5 | | -export { isMediaUnderstandingSkipError } from "../../media-understanding/errors.js"; |
| 5 | +export { isMediaUnderstandingSkipError } from "../../../packages/media-understanding-common/src/errors.js"; |
6 | 6 | export { resolveMediaAttachmentLocalRoots } from "../../media-understanding/runner.js"; |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,7 +7,7 @@ import { AcpRuntimeError } from "../../acp/runtime/errors.js";
|
7 | 7 | import type { AcpSessionStoreEntry } from "../../acp/runtime/session-meta.js"; |
8 | 8 | import type { OpenClawConfig } from "../../config/config.js"; |
9 | 9 | import type { SessionBindingRecord } from "../../infra/outbound/session-binding-service.js"; |
10 | | -import type { MediaUnderstandingSkipError } from "../../media-understanding/errors.js"; |
| 10 | +import type { MediaUnderstandingSkipError } from "../../../packages/media-understanding-common/src/errors.js"; |
11 | 11 | import { withFetchPreconnect } from "../../test-utils/fetch-mock.js"; |
12 | 12 | import { |
13 | 13 | resolveAgentAttachments, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -12,19 +12,19 @@ import { logVerbose, shouldLogVerbose } from "../globals.js";
|
12 | 12 | import { renderFileContextBlock } from "../media/file-context.js"; |
13 | 13 | import { extractFileContentFromSource, normalizeMimeType } from "../media/input-files.js"; |
14 | 14 | import { wrapExternalContent } from "../security/external-content.js"; |
15 | | -import type { ActiveMediaModel } from "./active-model.types.js"; |
| 15 | +import type { ActiveMediaModel } from "../../packages/media-understanding-common/src/active-model.js"; |
| 16 | +import { |
| 17 | +extractMediaUserText, |
| 18 | +formatAudioTranscripts, |
| 19 | +formatMediaUnderstandingBody, |
| 20 | +} from "../../packages/media-understanding-common/src/format.js"; |
16 | 21 | import { resolveAttachmentKind } from "./attachments.js"; |
17 | 22 | import { runWithConcurrency } from "./concurrency.js"; |
18 | 23 | import { DEFAULT_ECHO_TRANSCRIPT_FORMAT, sendTranscriptEcho } from "./echo-transcript.js"; |
19 | 24 | import { |
20 | 25 | type FileExtractionLimits, |
21 | 26 | resolveFileExtractionLimits, |
22 | 27 | } from "./file-extraction-limits.js"; |
23 | | -import { |
24 | | -extractMediaUserText, |
25 | | -formatAudioTranscripts, |
26 | | -formatMediaUnderstandingBody, |
27 | | -} from "./format.js"; |
28 | 28 | import { resolveConcurrency } from "./resolve.js"; |
29 | 29 | import { |
30 | 30 | buildProviderRegistry, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -21,7 +21,7 @@ import {
|
21 | 21 | import { getDefaultMediaLocalRoots } from "../media/local-roots.js"; |
22 | 22 | import { buildRandomTempFilePath } from "../plugin-sdk/temp-path.js"; |
23 | 23 | import { normalizeAttachmentPath } from "./attachments.normalize.js"; |
24 | | -import { MediaUnderstandingSkipError } from "./errors.js"; |
| 24 | +import { MediaUnderstandingSkipError } from "../../packages/media-understanding-common/src/errors.js"; |
25 | 25 | import type { MediaAttachment } from "./types.js"; |
26 | 26 | |
27 | 27 | type MediaBufferResult = { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3,7 +3,7 @@
|
3 | 3 | import type { MsgContext } from "../auto-reply/templating.js"; |
4 | 4 | import type { OpenClawConfig } from "../config/types.js"; |
5 | 5 | import { logVerbose, shouldLogVerbose } from "../globals.js"; |
6 | | -import type { ActiveMediaModel } from "./active-model.types.js"; |
| 6 | +import type { ActiveMediaModel } from "../../packages/media-understanding-common/src/active-model.js"; |
7 | 7 | import { isAudioAttachment } from "./attachments.js"; |
8 | 8 | import { runAudioTranscription } from "./audio-transcription-runner.js"; |
9 | 9 | import { DEFAULT_ECHO_TRANSCRIPT_FORMAT, sendTranscriptEcho } from "./echo-transcript.js"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,7 +2,7 @@
|
2 | 2 | // pipeline and extracts the first transcript output. |
3 | 3 | import type { MsgContext } from "../auto-reply/templating.js"; |
4 | 4 | import type { OpenClawConfig } from "../config/types.js"; |
5 | | -import type { ActiveMediaModel } from "./active-model.types.js"; |
| 5 | +import type { ActiveMediaModel } from "../../packages/media-understanding-common/src/active-model.js"; |
6 | 6 | import { |
7 | 7 | buildProviderRegistry, |
8 | 8 | createMediaAttachmentCache, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,12 +4,12 @@ import { normalizeOptionalString } from "@openclaw/normalization-core/string-coe
|
4 | 4 | import { uniqueStrings } from "@openclaw/normalization-core/string-normalization"; |
5 | 5 | import { resolveRuntimeConfigCacheKey } from "../config/runtime-snapshot.js"; |
6 | 6 | import type { OpenClawConfig } from "../config/types.js"; |
| 7 | +import { providerSupportsCapability } from "../../packages/media-understanding-common/src/provider-supports.js"; |
7 | 8 | import { buildMediaUnderstandingManifestMetadataRegistry } from "./manifest-metadata.js"; |
8 | 9 | import { |
9 | 10 | normalizeMediaExecutionProviderId, |
10 | 11 | normalizeMediaProviderId, |
11 | 12 | } from "./provider-registry.js"; |
12 | | -import { providerSupportsCapability } from "./provider-supports.js"; |
13 | 13 | import type { MediaUnderstandingCapability, MediaUnderstandingProvider } from "./types.js"; |
14 | 14 | export { |
15 | 15 | CLI_OUTPUT_MAX_BUFFER, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。