refactor: trim generation helper types · openclaw/openclaw@01c5df6
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -16,7 +16,7 @@ import type {
|
16 | 16 | ImageGenerationSourceImage, |
17 | 17 | } from "./types.js"; |
18 | 18 | |
19 | | -export type ResolvedImageGenerationOverrides = { |
| 19 | +type ResolvedImageGenerationOverrides = { |
20 | 20 | size?: string; |
21 | 21 | aspectRatio?: string; |
22 | 22 | resolution?: ImageGenerationResolution; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -33,7 +33,7 @@ export type ImageGenerationProviderOptions = {
|
33 | 33 | openai?: ImageGenerationOpenAIOptions; |
34 | 34 | }; |
35 | 35 | |
36 | | -export type ImageGenerationIgnoredOverrideKey = |
| 36 | +type ImageGenerationIgnoredOverrideKey = |
37 | 37 | | "size" |
38 | 38 | | "aspectRatio" |
39 | 39 | | "resolution" |
@@ -83,25 +83,25 @@ export type ImageGenerationResult = {
|
83 | 83 | metadata?: Record<string, unknown>; |
84 | 84 | }; |
85 | 85 | |
86 | | -export type ImageGenerationModeCapabilities = { |
| 86 | +type ImageGenerationModeCapabilities = { |
87 | 87 | maxCount?: number; |
88 | 88 | supportsSize?: boolean; |
89 | 89 | supportsAspectRatio?: boolean; |
90 | 90 | supportsResolution?: boolean; |
91 | 91 | }; |
92 | 92 | |
93 | | -export type ImageGenerationEditCapabilities = ImageGenerationModeCapabilities & { |
| 93 | +type ImageGenerationEditCapabilities = ImageGenerationModeCapabilities & { |
94 | 94 | enabled: boolean; |
95 | 95 | maxInputImages?: number; |
96 | 96 | }; |
97 | 97 | |
98 | | -export type ImageGenerationGeometryCapabilities = { |
| 98 | +type ImageGenerationGeometryCapabilities = { |
99 | 99 | sizes?: string[]; |
100 | 100 | aspectRatios?: string[]; |
101 | 101 | resolutions?: ImageGenerationResolution[]; |
102 | 102 | }; |
103 | 103 | |
104 | | -export type ImageGenerationOutputCapabilities = { |
| 104 | +type ImageGenerationOutputCapabilities = { |
105 | 105 | qualities?: ImageGenerationQuality[]; |
106 | 106 | formats?: ImageGenerationOutputFormat[]; |
107 | 107 | backgrounds?: ImageGenerationBackground[]; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { normalizeOptionalString } from "../shared/string-coerce.js"; |
2 | 2 | |
3 | | -export type ParsedGenerationModelRef = { |
| 3 | +type ParsedGenerationModelRef = { |
4 | 4 | provider: string; |
5 | 5 | model: string; |
6 | 6 | }; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -11,7 +11,7 @@ import type {
|
11 | 11 | MusicGenerationSourceImage, |
12 | 12 | } from "./types.js"; |
13 | 13 | |
14 | | -export type ResolvedMusicGenerationOverrides = { |
| 14 | +type ResolvedMusicGenerationOverrides = { |
15 | 15 | lyrics?: string; |
16 | 16 | instrumental?: boolean; |
17 | 17 | durationSeconds?: number; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -19,7 +19,7 @@ export type MusicGenerationSourceImage = {
|
19 | 19 | metadata?: Record<string, unknown>; |
20 | 20 | }; |
21 | 21 | |
22 | | -export type MusicGenerationProviderConfiguredContext = { |
| 22 | +type MusicGenerationProviderConfiguredContext = { |
23 | 23 | cfg?: OpenClawConfig; |
24 | 24 | agentDir?: string; |
25 | 25 | }; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。