refactor(channels): remove stale setup adapter lookup · openclaw/openclaw@c654641
vincentkoc
·
2026-06-19
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | // Adapts declarative and imperative channel setup wizards to the command-facing interface. |
2 | | -import { listChannelSetupPlugins } from "../../channels/plugins/setup-registry.js"; |
3 | 2 | import { buildChannelSetupWizardAdapterFromSetupWizard } from "../../channels/plugins/setup-wizard.js"; |
4 | 3 | import type { ChannelSetupWizard } from "../../channels/plugins/setup-wizard.js"; |
5 | 4 | import type { ChannelPlugin } from "../../channels/plugins/types.plugin.js"; |
6 | | -import type { ChannelChoice } from "../onboard-types.js"; |
7 | 5 | import type { ChannelSetupWizardAdapter } from "./types.js"; |
8 | 6 | |
9 | 7 | const setupWizardAdapters = new WeakMap<object, ChannelSetupWizardAdapter>(); |
@@ -57,22 +55,3 @@ export function resolveChannelSetupWizardAdapterForPlugin(
|
57 | 55 | } |
58 | 56 | return undefined; |
59 | 57 | } |
60 | | - |
61 | | -const getChannelSetupWizardAdapterMap = () => { |
62 | | -const adapters = new Map<ChannelChoice, ChannelSetupWizardAdapter>(); |
63 | | -for (const plugin of listChannelSetupPlugins()) { |
64 | | -const adapter = resolveChannelSetupWizardAdapterForPlugin(plugin); |
65 | | -if (!adapter) { |
66 | | -continue; |
67 | | -} |
68 | | -adapters.set(plugin.id, adapter); |
69 | | -} |
70 | | -return adapters; |
71 | | -}; |
72 | | - |
73 | | -/** Look up the setup wizard adapter for a registered setup channel. */ |
74 | | -export function getChannelSetupWizardAdapter( |
75 | | -channel: ChannelChoice, |
76 | | -): ChannelSetupWizardAdapter | undefined { |
77 | | -return getChannelSetupWizardAdapterMap().get(channel); |
78 | | -} |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。