chore(deadcode): collapse stale provider registry views · openclaw/openclaw@adb9abe
vincentkoc
·
2026-06-22
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ import { uniqueSortedStrings } from "../../plugin-sdk/test-helpers/string-utils.
|
4 | 4 | import { resolveManifestContractPluginIds } from "../plugin-registry.js"; |
5 | 5 | import { testing as providerTesting } from "../providers.js"; |
6 | 6 | import { resolveBundledContractSnapshotPluginIds } from "./inventory/bundled-capability-metadata.js"; |
7 | | -import { providerContractCompatPluginIds } from "./registry.js"; |
| 7 | +import { providerContractPluginIds } from "./registry.js"; |
8 | 8 | |
9 | 9 | function resolveBundledManifestProviderPluginIds() { |
10 | 10 | return uniqueSortedStrings(resolveBundledContractSnapshotPluginIds("providerIds")); |
@@ -31,7 +31,7 @@ describe("plugin loader contract", () => {
|
31 | 31 | let bundledWebSearchPluginIds: string[] = []; |
32 | 32 | |
33 | 33 | beforeAll(() => { |
34 | | -providerPluginIds = uniqueSortedStrings(providerContractCompatPluginIds); |
| 34 | +providerPluginIds = uniqueSortedStrings(providerContractPluginIds); |
35 | 35 | manifestProviderPluginIds = resolveBundledManifestProviderPluginIds(); |
36 | 36 | vitestCompatConfig = providerTesting.withBundledProviderVitestCompat({ |
37 | 37 | config: undefined, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -263,10 +263,6 @@ function loadProviderContractPluginIds(): string[] {
|
263 | 263 | return [...resolveBundledProviderContractPluginIds()]; |
264 | 264 | } |
265 | 265 | |
266 | | -function loadProviderContractCompatPluginIds(): string[] { |
267 | | -return loadProviderContractPluginIds(); |
268 | | -} |
269 | | - |
270 | 266 | function resolveWebSearchCredentialValue(provider: WebSearchProviderPlugin): unknown { |
271 | 267 | if (provider.requiresCredential === false) { |
272 | 268 | return `${provider.id}-no-key-needed`; |
@@ -396,13 +392,6 @@ export function requireProviderContractProvider(providerId: string): ProviderPlu
|
396 | 392 | return provider; |
397 | 393 | } |
398 | 394 | |
399 | | -export function resolveProviderContractPluginIdsForProvider( |
400 | | -providerId: string, |
401 | | -): string[] | undefined { |
402 | | -const pluginIds = resolveBundledProviderContractPluginIdsByProviderId().get(providerId) ?? []; |
403 | | -return pluginIds.length > 0 ? pluginIds : undefined; |
404 | | -} |
405 | | - |
406 | 395 | export function resolveProviderContractPluginIdsForProviderAlias( |
407 | 396 | providerId: string, |
408 | 397 | ): string[] | undefined { |
@@ -443,9 +432,6 @@ export function resolveProviderContractProvidersForPluginIds(
|
443 | 432 | export const providerContractPluginIds: string[] = createLazyArrayView( |
444 | 433 | loadProviderContractPluginIds, |
445 | 434 | ); |
446 | | -export const providerContractCompatPluginIds: string[] = createLazyArrayView( |
447 | | -loadProviderContractCompatPluginIds, |
448 | | -); |
449 | 435 | |
450 | 436 | function loadPluginRegistrationContractRegistry(): PluginRegistrationContractEntry[] { |
451 | 437 | return resolveBundledManifestContracts(); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。