惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
J
Java Code Geeks
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
U
Unit 42
B
Blog
宝玉的分享
宝玉的分享
腾讯CDC
Microsoft Azure Blog
Microsoft Azure Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
博客园 - Franky
博客园 - 三生石上(FineUI控件)
人人都是产品经理
人人都是产品经理
Martin Fowler
Martin Fowler
博客园_首页
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
云风的 BLOG
云风的 BLOG
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
博客园 - 叶小钗

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
feat(slack): render progress as native task cards · openc...
steipete · 2026-05-29 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -1120,6 +1120,8 @@ Hide raw command/exec text while keeping compact progress lines:

11201120
11211121

`channels.slack.streaming.nativeTransport` controls Slack native text streaming when `channels.slack.streaming.mode` is `partial` (default: `true`).

11221122
1123+

Slack native progress task cards are opt-in for progress mode. Set `channels.slack.streaming.progress.nativeTaskCards` to `true` with `channels.slack.streaming.mode="progress"` to send a Slack-native plan/task card while work is running, then update the same task card at completion. Without this flag, progress mode keeps the portable draft-preview behavior.

1124+
11231125

- A reply thread must be available for native text streaming and Slack assistant thread status to appear. Thread selection still follows `replyToMode`.

11241126

- Channel, group-chat, and top-level DM roots can still use the normal draft preview when native streaming is unavailable or no reply thread exists.

11251127

- Top-level Slack DMs stay off-thread by default, so they do not show Slack's thread-style native stream/status preview; OpenClaw posts and edits a draft preview in the DM instead.

@@ -1142,6 +1144,24 @@ Use draft preview instead of Slack native text streaming:

11421144

}

11431145

```

11441146
1147+

Opt in to Slack native progress task cards:

1148+
1149+

```json5

1150+

{

1151+

channels: {

1152+

slack: {

1153+

streaming: {

1154+

mode: "progress",

1155+

progress: {

1156+

nativeTaskCards: true,

1157+

render: "rich",

1158+

},

1159+

},

1160+

},

1161+

},

1162+

}

1163+

```

1164+
11451165

Legacy keys:

11461166
11471167

- `channels.slack.streamMode` (`replace | status_final | append`) is a legacy runtime alias for `channels.slack.streaming.mode`.

Original file line numberDiff line numberDiff line change

@@ -194,6 +194,65 @@ describe("resolveSlackAccount allowFrom precedence", () => {

194194

});

195195

});

196196
197+

it("merges canonical account streaming over top-level defaults field-by-field", () => {

198+

const resolved = resolveSlackAccount({

199+

cfg: {

200+

channels: {

201+

slack: {

202+

streaming: {

203+

mode: "progress",

204+

nativeTransport: true,

205+

preview: { toolProgress: true, commandText: "raw" },

206+

progress: { label: "Shelling", commandText: "status" },

207+

block: { enabled: true, coalesce: { minChars: 40, maxChars: 80, idleMs: 250 } },

208+

},

209+

accounts: {

210+

work: {

211+

botToken: "xoxb-work",

212+

appToken: "xapp-work",

213+

streaming: {

214+

progress: { nativeTaskCards: true },

215+

block: { coalesce: { idleMs: 500 } },

216+

},

217+

},

218+

},

219+

},

220+

},

221+

},

222+

accountId: "work",

223+

});

224+
225+

expect(resolved.config.streaming).toEqual({

226+

mode: "progress",

227+

nativeTransport: true,

228+

preview: { toolProgress: true, commandText: "raw" },

229+

progress: { label: "Shelling", commandText: "status", nativeTaskCards: true },

230+

block: { enabled: true, coalesce: { minChars: 40, maxChars: 80, idleMs: 500 } },

231+

});

232+

});

233+
234+

it("preserves account legacy scalar streaming overrides", () => {

235+

const resolved = resolveSlackAccount({

236+

cfg: {

237+

channels: {

238+

slack: {

239+

streaming: { mode: "progress", progress: { label: "Shelling" } },

240+

accounts: {

241+

work: {

242+

botToken: "xoxb-work",

243+

appToken: "xapp-work",

244+

streaming: "off",

245+

},

246+

},

247+

},

248+

},

249+

} as unknown as OpenClawConfig,

250+

accountId: "work",

251+

});

252+
253+

expect(resolved.config.streaming).toBe("off");

254+

});

255+
197256

it("does not inherit default account allowFrom for named account when top-level is absent", () => {

198257

const resolved = resolveSlackAccount({

199258

cfg: {

Original file line numberDiff line numberDiff line change

@@ -69,16 +69,80 @@ function resolveSlackAccountConfig(

6969

return resolveAccountEntry(cfg.channels?.slack?.accounts, accountId);

7070

}

7171
72+

type SlackStreamingConfig = NonNullable<SlackAccountConfig["streaming"]>;

73+

type SlackStreamingConfigValue = SlackStreamingConfig | boolean | string;

74+
75+

function asStreamingConfigObject(value: unknown): SlackStreamingConfig | undefined {

76+

return value && typeof value === "object" && !Array.isArray(value)

77+

? (value as SlackStreamingConfig)

78+

: undefined;

79+

}

80+
81+

function asLegacyStreamingScalar(value: unknown): boolean | string | undefined {

82+

return typeof value === "boolean" || typeof value === "string" ? value : undefined;

83+

}

84+
85+

function mergeSlackStreamingConfig(

86+

base: unknown,

87+

account: unknown,

88+

): SlackStreamingConfigValue | undefined {

89+

const accountObject = asStreamingConfigObject(account);

90+

if (account !== undefined && !accountObject) {

91+

return asLegacyStreamingScalar(account);

92+

}

93+

const baseObject = asStreamingConfigObject(base);

94+

if (base !== undefined && !baseObject) {

95+

return accountObject ?? asLegacyStreamingScalar(base);

96+

}

97+

const baseConfig = baseObject;

98+

const accountConfig = accountObject;

99+

if (!baseConfig || !accountConfig) {

100+

return accountConfig ?? baseConfig;

101+

}

102+

return {

103+

...baseConfig,

104+

...accountConfig,

105+

...(baseConfig.preview || accountConfig.preview

106+

? { preview: { ...baseConfig.preview, ...accountConfig.preview } }

107+

: {}),

108+

...(baseConfig.progress || accountConfig.progress

109+

? { progress: { ...baseConfig.progress, ...accountConfig.progress } }

110+

: {}),

111+

...(baseConfig.block || accountConfig.block

112+

? {

113+

block: {

114+

...baseConfig.block,

115+

...accountConfig.block,

116+

...(baseConfig.block?.coalesce || accountConfig.block?.coalesce

117+

? {

118+

coalesce: {

119+

...baseConfig.block?.coalesce,

120+

...accountConfig.block?.coalesce,

121+

},

122+

}

123+

: {}),

124+

},

125+

}

126+

: {}),

127+

};

128+

}

129+
72130

export function mergeSlackAccountConfig(

73131

cfg: OpenClawConfig,

74132

accountId: string,

75133

): SlackAccountConfig {

76-

return resolveMergedAccountConfig<SlackAccountConfig>({

134+

const accountConfig = resolveSlackAccountConfig(cfg, accountId);

135+

const merged = resolveMergedAccountConfig<SlackAccountConfig>({

77136

channelConfig: cfg.channels?.slack as SlackAccountConfig,

78137

accounts: cfg.channels?.slack?.accounts as Record<string, Partial<SlackAccountConfig>>,

79138

accountId,

80139

nestedObjectKeys: ["botLoopProtection"],

81140

});

141+

const streaming = mergeSlackStreamingConfig(

142+

(cfg.channels?.slack as Record<string, unknown> | undefined)?.streaming,

143+

(accountConfig as Record<string, unknown> | undefined)?.streaming,

144+

);

145+

return streaming !== undefined ? ({ ...merged, streaming } as SlackAccountConfig) : merged;

82146

}

83147
84148

export function resolveSlackAccountAllowFrom(params: {

Original file line numberDiff line numberDiff line change

@@ -161,6 +161,10 @@ export const slackChannelConfigUiHints = {

161161

label: "Slack Progress Renderer",

162162

help: 'Progress draft renderer: "text" uses one portable text body; "rich" renders structured Slack Block Kit fields with the same text fallback.',

163163

},

164+

"streaming.progress.nativeTaskCards": {

165+

label: "Slack Native Progress Task Cards",

166+

help: 'Opt in to Slack native task-card progress updates when channels.slack.streaming.mode="progress" and streaming.nativeTransport is enabled. Default: false.',

167+

},

164168

"streaming.progress.toolProgress": {

165169

label: "Slack Progress Tool Lines",

166170

help: "Show compact tool/progress lines in progress draft mode (default: true). Set false to keep only the label until final delivery.",