Skip to content

Commit 961f42e

Browse files
committed
Slack: lazy-load setup wizard surface
1 parent 1e196db commit 961f42e

File tree

6 files changed

+510
-80
lines changed

6 files changed

+510
-80
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { slackSetupWizard } from "./setup-surface.js";

extensions/slack/src/channel.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,14 @@ import {
3737
import { resolveOutboundSendDep } from "../../../src/infra/outbound/send-deps.js";
3838
import { buildPassiveProbedChannelStatusSummary } from "../../shared/channel-status-summary.js";
3939
import { getSlackRuntime } from "./runtime.js";
40-
import { slackSetupAdapter, slackSetupWizard } from "./setup-surface.js";
40+
import { createSlackSetupWizardProxy, slackSetupAdapter } from "./setup-core.js";
4141

4242
const meta = getChatChannelMeta("slack");
4343

44+
async function loadSlackChannelRuntime() {
45+
return await import("./channel.runtime.js");
46+
}
47+
4448
// Select the appropriate Slack token for read/write operations.
4549
function getTokenForOperation(
4650
account: ResolvedSlackAccount,
@@ -106,6 +110,10 @@ const slackConfigBase = createScopedChannelConfigBase({
106110
clearBaseFields: ["botToken", "appToken", "name"],
107111
});
108112

113+
const slackSetupWizard = createSlackSetupWizardProxy(async () => ({
114+
slackSetupWizard: (await loadSlackChannelRuntime()).slackSetupWizard,
115+
}));
116+
109117
export const slackPlugin: ChannelPlugin<ResolvedSlackAccount> = {
110118
id: "slack",
111119
meta: {

0 commit comments

Comments
 (0)