refactor: trim provider helper exports · openclaw/openclaw@c1f31f3
steipete
·
2026-05-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -12,7 +12,7 @@ type DdgPluginConfig = {
|
12 | 12 | }; |
13 | 13 | }; |
14 | 14 | |
15 | | -export function resolveDdgWebSearchConfig( |
| 15 | +function resolveDdgWebSearchConfig( |
16 | 16 | config?: OpenClawConfig, |
17 | 17 | ): DdgPluginConfig["webSearch"] | undefined { |
18 | 18 | const pluginConfig = config?.plugins?.entries?.duckduckgo?.config as DdgPluginConfig | undefined; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -86,7 +86,7 @@ export function resolveFirecrawlSearchConfig(cfg?: OpenClawConfig): FirecrawlSea
|
86 | 86 | return firecrawl as FirecrawlSearchConfig; |
87 | 87 | } |
88 | 88 | |
89 | | -export function resolveFirecrawlFetchConfig(cfg?: OpenClawConfig): FirecrawlFetchConfig { |
| 89 | +function resolveFirecrawlFetchConfig(cfg?: OpenClawConfig): FirecrawlFetchConfig { |
90 | 90 | const pluginConfig = cfg?.plugins?.entries?.firecrawl?.config as PluginEntryConfig; |
91 | 91 | const pluginWebFetch = pluginConfig?.webFetch; |
92 | 92 | if (pluginWebFetch && typeof pluginWebFetch === "object" && !Array.isArray(pluginWebFetch)) { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -8,8 +8,8 @@ export const AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth";
|
8 | 8 | export const TOKEN_URL = "https://oauth2.googleapis.com/token"; |
9 | 9 | export const USERINFO_URL = "https://www.googleapis.com/oauth2/v1/userinfo?alt=json"; |
10 | 10 | export const CODE_ASSIST_ENDPOINT_PROD = "https://cloudcode-pa.googleapis.com"; |
11 | | -export const CODE_ASSIST_ENDPOINT_DAILY = "https://daily-cloudcode-pa.sandbox.googleapis.com"; |
12 | | -export const CODE_ASSIST_ENDPOINT_AUTOPUSH = "https://autopush-cloudcode-pa.sandbox.googleapis.com"; |
| 11 | +const CODE_ASSIST_ENDPOINT_DAILY = "https://daily-cloudcode-pa.sandbox.googleapis.com"; |
| 12 | +const CODE_ASSIST_ENDPOINT_AUTOPUSH = "https://autopush-cloudcode-pa.sandbox.googleapis.com"; |
13 | 13 | export const LOAD_CODE_ASSIST_ENDPOINTS = [ |
14 | 14 | CODE_ASSIST_ENDPOINT_PROD, |
15 | 15 | CODE_ASSIST_ENDPOINT_DAILY, |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -export const DEFAULT_GEMINI_WEB_SEARCH_MODEL = "gemini-2.5-flash"; |
| 1 | +const DEFAULT_GEMINI_WEB_SEARCH_MODEL = "gemini-2.5-flash"; |
2 | 2 | |
3 | 3 | export type GeminiConfig = { |
4 | 4 | apiKey?: unknown; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -28,15 +28,15 @@ function getOAuthEndpoints(region: MiniMaxRegion) {
|
28 | 28 | }; |
29 | 29 | } |
30 | 30 | |
31 | | -export type MiniMaxOAuthAuthorization = { |
| 31 | +type MiniMaxOAuthAuthorization = { |
32 | 32 | user_code: string; |
33 | 33 | verification_uri: string; |
34 | 34 | expired_in: number; |
35 | 35 | interval?: number; |
36 | 36 | state: string; |
37 | 37 | }; |
38 | 38 | |
39 | | -export type MiniMaxOAuthToken = { |
| 39 | +type MiniMaxOAuthToken = { |
40 | 40 | access: string; |
41 | 41 | refresh: string; |
42 | 42 | expires: number; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -20,7 +20,7 @@ export const MISTRAL_MODEL_TRANSPORT_PATCH = {
|
20 | 20 | maxTokensField: "max_tokens"; |
21 | 21 | }; |
22 | 22 | |
23 | | -export const MISTRAL_SMALL_LATEST_REASONING_EFFORT_MAP: Record<string, string> = { |
| 23 | +const MISTRAL_SMALL_LATEST_REASONING_EFFORT_MAP: Record<string, string> = { |
24 | 24 | off: "none", |
25 | 25 | minimal: "none", |
26 | 26 | low: "high", |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -8,7 +8,7 @@ import { contributeMistralResolvedModelCompat } from "./provider-compat.js";
|
8 | 8 | import { buildMistralRealtimeTranscriptionProvider } from "./realtime-transcription-provider.js"; |
9 | 9 | |
10 | 10 | const PROVIDER_ID = "mistral"; |
11 | | -export function buildMistralReplayPolicy() { |
| 11 | +function buildMistralReplayPolicy() { |
12 | 12 | return { |
13 | 13 | sanitizeToolCallIds: true, |
14 | 14 | toolCallIdMode: "strict9" as const, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -23,7 +23,7 @@ function isMistralModelHint(modelId: string): boolean {
|
23 | 23 | ); |
24 | 24 | } |
25 | 25 | |
26 | | -export function shouldContributeMistralCompat(params: { |
| 26 | +function shouldContributeMistralCompat(params: { |
27 | 27 | modelId: string; |
28 | 28 | model: { api?: unknown; baseUrl?: unknown; provider?: unknown; compat?: unknown }; |
29 | 29 | }): boolean { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -13,7 +13,7 @@ const DEFAULT_CLUSTER = "volcano_tts";
|
13 | 13 | const DEFAULT_RESOURCE_ID = "seed-tts-1.0"; |
14 | 14 | const DEFAULT_APP_KEY = "aGjiRDfUWi"; |
15 | 15 | |
16 | | -export const VOLCENGINE_VOICES: readonly string[] = [ |
| 16 | +const VOLCENGINE_VOICES: readonly string[] = [ |
17 | 17 | "en_female_anna_mars_bigtts", |
18 | 18 | "en_male_adam_mars_bigtts", |
19 | 19 | "en_female_sarah_mars_bigtts", |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3,7 +3,7 @@ import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
|
3 | 3 | |
4 | 4 | export type VolcengineTtsEncoding = "ogg_opus" | "mp3" | "pcm" | "wav"; |
5 | 5 | |
6 | | -export type VolcengineTTSParams = { |
| 6 | +type VolcengineTTSParams = { |
7 | 7 | text: string; |
8 | 8 | apiKey?: string; |
9 | 9 | appId?: string; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。