mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:30:42 +00:00
fix(mattermost): expose streaming config hints
This commit is contained in:
@@ -40,6 +40,7 @@ Docs: https://docs.openclaw.ai
|
||||
- Tlon: expose `groupInviteAllowlist` in the channel config schema and clarify that group invite auto-accept fails closed without an invite allowlist. Thanks @vincentkoc.
|
||||
- Control UI/WebChat: collapse duplicate in-flight internal text sends onto the active Gateway run so rapid repeat submits do not start fresh `agent:main:main` dispatches. Fixes #75737. Thanks @dsdsddd1 and @BunsDev.
|
||||
- Mattermost: accept the documented `channels.mattermost.streaming` config and honor `streaming: "off"` by disabling draft preview posts. Thanks @vincentkoc.
|
||||
- Mattermost: expose streaming progress config labels and help text in generated channel config metadata so Control UI/docs can explain the new `channels.mattermost.streaming.progress.*` fields. Thanks @vincentkoc.
|
||||
- Discord: keep progress draft boundary callbacks bound during streaming replies, so extension lint stays green while progress previews transition between assistant and reasoning blocks. Thanks @vincentkoc.
|
||||
- Discord: resolve SecretRef-backed bot tokens from the active runtime snapshot for named accounts and keep unresolved configured tokens from crashing status or health checks. (#76987) Thanks @joshavant.
|
||||
- Channels/streaming: expose `streaming.progress.label`, `labels`, `maxLines`, and `toolProgress` in bundled channel config metadata so progress draft settings appear in config, docs, and control surfaces. Thanks @vincentkoc.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
e56c45e488ccd3a5849d170b3c696358f0c04c39d0d15b0a4ca47892e6eee0d0 config-baseline.json
|
||||
34e7f2742624de44bfd1df7743e65ff33a04b0f6fe251bc417a6b33f85529772 config-baseline.json
|
||||
5b5ebd95939d75496597d9858a375e27544812d0f79dc3b4bf87c794ada2ba08 config-baseline.core.json
|
||||
c2b5883fe161cd97b2787c92cf71726840de84d097d85d741791f523bd55a865 config-baseline.channel.json
|
||||
655d1309b70505e73198df20c5088784290b33098efd42027d3c09beeb3704a7 config-baseline.channel.json
|
||||
055fae0d0067a751dc10125af7421da45633f73519c94c982d02b0c4eb2bdf67 config-baseline.plugin.json
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-primitives";
|
||||
import { MattermostConfigSchema } from "./config-schema-core.js";
|
||||
import { mattermostChannelConfigUiHints } from "./config-ui-hints.js";
|
||||
|
||||
export const MattermostChannelConfigSchema = buildChannelConfigSchema(MattermostConfigSchema);
|
||||
export const MattermostChannelConfigSchema = buildChannelConfigSchema(MattermostConfigSchema, {
|
||||
uiHints: mattermostChannelConfigUiHints,
|
||||
});
|
||||
|
||||
48
extensions/mattermost/src/config-ui-hints.ts
Normal file
48
extensions/mattermost/src/config-ui-hints.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import type { ChannelConfigUiHint } from "openclaw/plugin-sdk/channel-core";
|
||||
|
||||
export const mattermostChannelConfigUiHints = {
|
||||
"": {
|
||||
label: "Mattermost",
|
||||
help: "Mattermost channel provider configuration for bot auth, access policy, slash commands, and preview streaming.",
|
||||
},
|
||||
dmPolicy: {
|
||||
label: "Mattermost DM Policy",
|
||||
help: 'Direct message access control ("pairing" recommended). "open" requires channels.mattermost.allowFrom=["*"].',
|
||||
},
|
||||
streaming: {
|
||||
label: "Mattermost Streaming Mode",
|
||||
help: 'Unified Mattermost stream preview mode: "off" | "partial" | "block" | "progress". "progress" keeps a single editable progress draft until final delivery.',
|
||||
},
|
||||
"streaming.mode": {
|
||||
label: "Mattermost Streaming Mode",
|
||||
help: 'Canonical Mattermost preview mode: "off" | "partial" | "block" | "progress".',
|
||||
},
|
||||
"streaming.progress.label": {
|
||||
label: "Mattermost Progress Label",
|
||||
help: 'Initial progress draft title. Use "auto" for built-in single-word labels, a custom string, or false to hide the title.',
|
||||
},
|
||||
"streaming.progress.labels": {
|
||||
label: "Mattermost Progress Label Pool",
|
||||
help: 'Candidate labels for streaming.progress.label="auto". Leave unset to use OpenClaw built-in progress labels.',
|
||||
},
|
||||
"streaming.progress.maxLines": {
|
||||
label: "Mattermost Progress Max Lines",
|
||||
help: "Maximum number of compact progress lines to keep below the draft label (default: 8).",
|
||||
},
|
||||
"streaming.progress.toolProgress": {
|
||||
label: "Mattermost Progress Tool Lines",
|
||||
help: "Show compact tool/progress lines in progress draft mode (default: true). Set false to keep only the label until final delivery.",
|
||||
},
|
||||
"streaming.preview.toolProgress": {
|
||||
label: "Mattermost Draft Tool Progress",
|
||||
help: "Show tool/progress activity in the live draft preview post (default: true). Set false to keep tool updates as separate messages.",
|
||||
},
|
||||
"streaming.block.enabled": {
|
||||
label: "Mattermost Block Streaming Enabled",
|
||||
help: 'Enable chunked block-style Mattermost preview delivery when channels.mattermost.streaming.mode="block".',
|
||||
},
|
||||
"streaming.block.coalesce": {
|
||||
label: "Mattermost Block Streaming Coalesce",
|
||||
help: "Merge streamed Mattermost block replies before final delivery.",
|
||||
},
|
||||
} satisfies Record<string, ChannelConfigUiHint>;
|
||||
@@ -8841,6 +8841,52 @@ export const GENERATED_BUNDLED_CHANNEL_CONFIG_METADATA = [
|
||||
required: ["dmPolicy", "groupPolicy"],
|
||||
additionalProperties: false,
|
||||
},
|
||||
uiHints: {
|
||||
"": {
|
||||
label: "Mattermost",
|
||||
help: "Mattermost channel provider configuration for bot auth, access policy, slash commands, and preview streaming.",
|
||||
},
|
||||
dmPolicy: {
|
||||
label: "Mattermost DM Policy",
|
||||
help: 'Direct message access control ("pairing" recommended). "open" requires channels.mattermost.allowFrom=["*"].',
|
||||
},
|
||||
streaming: {
|
||||
label: "Mattermost Streaming Mode",
|
||||
help: 'Unified Mattermost stream preview mode: "off" | "partial" | "block" | "progress". "progress" keeps a single editable progress draft until final delivery.',
|
||||
},
|
||||
"streaming.mode": {
|
||||
label: "Mattermost Streaming Mode",
|
||||
help: 'Canonical Mattermost preview mode: "off" | "partial" | "block" | "progress".',
|
||||
},
|
||||
"streaming.progress.label": {
|
||||
label: "Mattermost Progress Label",
|
||||
help: 'Initial progress draft title. Use "auto" for built-in single-word labels, a custom string, or false to hide the title.',
|
||||
},
|
||||
"streaming.progress.labels": {
|
||||
label: "Mattermost Progress Label Pool",
|
||||
help: 'Candidate labels for streaming.progress.label="auto". Leave unset to use OpenClaw built-in progress labels.',
|
||||
},
|
||||
"streaming.progress.maxLines": {
|
||||
label: "Mattermost Progress Max Lines",
|
||||
help: "Maximum number of compact progress lines to keep below the draft label (default: 8).",
|
||||
},
|
||||
"streaming.progress.toolProgress": {
|
||||
label: "Mattermost Progress Tool Lines",
|
||||
help: "Show compact tool/progress lines in progress draft mode (default: true). Set false to keep only the label until final delivery.",
|
||||
},
|
||||
"streaming.preview.toolProgress": {
|
||||
label: "Mattermost Draft Tool Progress",
|
||||
help: "Show tool/progress activity in the live draft preview post (default: true). Set false to keep tool updates as separate messages.",
|
||||
},
|
||||
"streaming.block.enabled": {
|
||||
label: "Mattermost Block Streaming Enabled",
|
||||
help: 'Enable chunked block-style Mattermost preview delivery when channels.mattermost.streaming.mode="block".',
|
||||
},
|
||||
"streaming.block.coalesce": {
|
||||
label: "Mattermost Block Streaming Coalesce",
|
||||
help: "Merge streamed Mattermost block replies before final delivery.",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
pluginId: "msteams",
|
||||
|
||||
@@ -183,6 +183,9 @@ describe("config schema", () => {
|
||||
expect(res.uiHints["channels.discord.streaming.progress.toolProgress"]?.label).toBe(
|
||||
"Discord Progress Tool Lines",
|
||||
);
|
||||
expect(res.uiHints["channels.mattermost.streaming.progress.label"]?.label).toBe(
|
||||
"Mattermost Progress Label",
|
||||
);
|
||||
});
|
||||
|
||||
it("omits a single oversized plugin schema from the full schema response", () => {
|
||||
|
||||
Reference in New Issue
Block a user