refactor(core): remove unused helper exports · openclaw/openclaw@acc37e2
vincentkoc
·
2026-06-18
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -5,22 +5,9 @@ export const OPENAI_CHATGPT_LOGIN_HINT = "Sign in with your ChatGPT or Codex sub
|
5 | 5 | export const OPENAI_CHATGPT_DEVICE_PAIRING_LABEL = "ChatGPT Device Pairing"; |
6 | 6 | export const OPENAI_CHATGPT_DEVICE_PAIRING_HINT = |
7 | 7 | "Pair your ChatGPT account in browser with a device code"; |
8 | | -export const OPENAI_CODEX_API_KEY_BACKUP_LABEL = "OpenAI API Key Backup"; |
9 | | -export const OPENAI_CODEX_API_KEY_BACKUP_HINT = |
10 | | -"Use an OpenAI API key when your Codex subscription is unavailable"; |
11 | | -export const OPENAI_CODEX_LOGIN_LABEL = "ChatGPT/Codex Browser Login"; |
12 | | -export const OPENAI_CODEX_LOGIN_HINT = "Sign in with OpenAI in your browser"; |
13 | | -export const OPENAI_CODEX_DEVICE_PAIRING_LABEL = "ChatGPT/Codex Device Pairing"; |
14 | | -export const OPENAI_CODEX_DEVICE_PAIRING_HINT = "Pair in browser with a device code"; |
15 | 8 | |
16 | 9 | const OPENAI_UNIFIED_GROUP_HINT = "ChatGPT/Codex sign-in or API key"; |
17 | 10 | |
18 | | -export const OPENAI_API_KEY_WIZARD_GROUP = { |
19 | | -groupId: "openai", |
20 | | -groupLabel: "OpenAI", |
21 | | -groupHint: "Direct API key", |
22 | | -} as const; |
23 | | - |
24 | 11 | export const OPENAI_ACCOUNT_WIZARD_GROUP = { |
25 | 12 | groupId: "openai", |
26 | 13 | groupLabel: "OpenAI", |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -257,12 +257,6 @@ export function resolveThinkingProfile(params: {
|
257 | 257 | return profile; |
258 | 258 | } |
259 | 259 | |
260 | | -/** Return whether provider/model exposes only off/on thinking controls. */ |
261 | | -export function isBinaryThinkingProvider(provider?: string | null, model?: string | null): boolean { |
262 | | -const profile = resolveThinkingProfile({ provider, model }); |
263 | | -return profile.levels.length === 2 && profile.levels.some((level) => level.label === "on"); |
264 | | -} |
265 | | - |
266 | 260 | function supportsThinkingLevel( |
267 | 261 | provider: string | null | undefined, |
268 | 262 | model: string | null | undefined, |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | // Cloudflare provider metadata describes Cloudflare-hosted model capabilities. |
2 | 2 | import type { Model } from "../types.js"; |
3 | 3 | |
4 | | -/** Workers AI direct endpoint. */ |
5 | | -export const CLOUDFLARE_WORKERS_AI_BASE_URL = |
6 | | -"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1"; |
7 | | - |
8 | | -/** AI Gateway Unified API. https://developers.cloudflare.com/ai-gateway/usage/unified-api/ */ |
9 | | -export const CLOUDFLARE_AI_GATEWAY_COMPAT_BASE_URL = |
10 | | -"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/compat"; |
11 | | - |
12 | | -/** AI Gateway → OpenAI passthrough. Used until /compat supports /v1/responses. */ |
13 | | -export const CLOUDFLARE_AI_GATEWAY_OPENAI_BASE_URL = |
14 | | -"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai"; |
15 | | - |
16 | | -/** AI Gateway → Anthropic passthrough. */ |
17 | | -export const CLOUDFLARE_AI_GATEWAY_ANTHROPIC_BASE_URL = |
18 | | -"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic"; |
19 | | - |
20 | 4 | export function isCloudflareProvider(provider: string): boolean { |
21 | 5 | return provider === "cloudflare-workers-ai" || provider === "cloudflare-ai-gateway"; |
22 | 6 | } |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -215,9 +215,3 @@ export function updateActivityFromToolEvent(host: ActivityHost, payload: ToolEve
|
215 | 215 | : [...host.activityEntries, nextEntry]; |
216 | 216 | host.activityEntries = next.slice(-ACTIVITY_ENTRY_LIMIT); |
217 | 217 | } |
218 | | - |
219 | | -export function resetActivityEntries(host: ActivityHost) { |
220 | | -if (Array.isArray(host.activityEntries)) { |
221 | | -host.activityEntries = []; |
222 | | -} |
223 | | -} |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。