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

推荐订阅源

月光博客
月光博客
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
J
Java Code Geeks
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
MyScale Blog
MyScale Blog
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
博客园 - 三生石上(FineUI控件)
Google DeepMind News
Google DeepMind News
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
N
Netflix TechBlog - Medium
MongoDB | Blog
MongoDB | Blog
I
InfoQ
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Help Net Security

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
fix(mattermost): merge progress preview lines by identity...
iloveleon19 · 2026-06-14 · via Recent Commits to openclaw:main

@@ -4,7 +4,8 @@ import {

44

deliverWithFinalizableLivePreviewAdapter,

55

} from "openclaw/plugin-sdk/channel-outbound";

66

import {

7-

formatChannelProgressDraftLineForEntry,

7+

buildChannelProgressDraftLineForEntry,

8+

createChannelProgressDraftCompositor,

89

resolveChannelStreamingPreviewToolProgress,

910

} from "openclaw/plugin-sdk/channel-outbound";

1011

import { isLoopbackHost } from "openclaw/plugin-sdk/gateway-runtime";

@@ -38,7 +39,7 @@ import {

3839

type MattermostPost,

3940

type MattermostUser,

4041

} from "./client.js";

41-

import { buildMattermostToolStatusText, createMattermostDraftStream } from "./draft-stream.js";

42+

import { createMattermostDraftStream } from "./draft-stream.js";

4243

import {

4344

computeInteractionCallbackUrl,

4445

createMattermostInteractionHandler,

@@ -1682,6 +1683,18 @@ export async function monitorMattermostProvider(opts: MonitorMattermostOpts = {}

16821683

})

16831684

: createDisabledMattermostDraftStream();

16841685

let lastPartialText = "";

1686+

const progressDraft = createChannelProgressDraftCompositor({

1687+

entry: account.config,

1688+

mode: account.streamingMode,

1689+

active: draftPreviewEnabled,

1690+

seed: `${account.accountId}:${channelId}`,

1691+

update: async (previewText, options) => {

1692+

draftStream.update(previewText);

1693+

if (options?.flush) {

1694+

await draftStream.flush();

1695+

}

1696+

},

1697+

});

16851698

const previewState: MattermostDraftPreviewState = {

16861699

finalizedViaPreviewPost: false,

16871700

};

@@ -1746,6 +1759,9 @@ export async function monitorMattermostProvider(opts: MonitorMattermostOpts = {}

17461759

humanDelay: core.channel.reply.resolveHumanDelayConfig(cfg, route.agentId),

17471760

typingCallbacks,

17481761

deliver: async (payloadEntry: ReplyPayload, info) => {

1762+

if (info.kind === "final") {

1763+

progressDraft.markFinalReplyStarted();

1764+

}

17491765

await deliverMattermostReplyWithDraftPreview({

17501766

payload: payloadEntry,

17511767

info,

@@ -1785,6 +1801,9 @@ export async function monitorMattermostProvider(opts: MonitorMattermostOpts = {}

17851801

}

17861802

},

17871803

});

1804+

if (info.kind === "final") {

1805+

progressDraft.markFinalReplyDelivered();

1806+

}

17881807

},

17891808

onError: (err, info) => {

17901809

runtime.error?.(`mattermost ${info.kind} reply failed: ${String(err)}`);

@@ -1893,11 +1912,26 @@ export async function monitorMattermostProvider(opts: MonitorMattermostOpts = {}

18931912

},

18941913

onAssistantMessageStart: () => {

18951914

lastPartialText = "";

1915+

progressDraft.resetReasoningProgress();

1916+

if (account.streamingMode !== "progress") {

1917+

progressDraft.reset();

1918+

}

18961919

},

18971920

onReasoningEnd: () => {

18981921

lastPartialText = "";

1922+

progressDraft.resetReasoningProgress();

1923+

if (account.streamingMode !== "progress") {

1924+

progressDraft.reset();

1925+

}

18991926

},

1900-

onReasoningStream: async () => {

1927+

onReasoningStream: async (payloadResult) => {

1928+

if (account.streamingMode === "progress") {

1929+

await progressDraft.pushReasoningProgress(

1930+

payloadResult.text || "Thinking…",

1931+

{ snapshot: payloadResult.isReasoningSnapshot === true },

1932+

);

1933+

return;

1934+

}

19011935

if (!lastPartialText) {

19021936

draftStream.update("Thinking…");

19031937

}

@@ -1906,20 +1940,30 @@ export async function monitorMattermostProvider(opts: MonitorMattermostOpts = {}

19061940

if (!draftToolProgressEnabled) {

19071941

return;

19081942

}

1909-

draftStream.update(

1910-

buildMattermostToolStatusText({

1911-

...payloadValue,

1912-

config: account.config,

1913-

}),

1943+

await progressDraft.pushToolProgress(

1944+

buildChannelProgressDraftLineForEntry(

1945+

account.config,

1946+

{

1947+

event: "tool",

1948+

itemId: payloadValue.itemId,

1949+

toolCallId: payloadValue.toolCallId,

1950+

name: payloadValue.name,

1951+

phase: payloadValue.phase,

1952+

args: payloadValue.args,

1953+

},

1954+

payloadValue.detailMode

1955+

? { detailMode: payloadValue.detailMode }

1956+

: undefined,

1957+

),

1958+

{ startImmediately: true },

19141959

);

19151960

},

19161961

onItemEvent: async (payloadLocal) => {

19171962

if (!draftToolProgressEnabled) {

19181963

return;

19191964

}

1920-

const progressText = formatChannelProgressDraftLineForEntry(

1921-

account.config,

1922-

{

1965+

await progressDraft.pushToolProgress(

1966+

buildChannelProgressDraftLineForEntry(account.config, {

19231967

event: "item",

19241968

itemId: payloadLocal.itemId,

19251969

itemKind: payloadLocal.kind,

@@ -1930,11 +1974,9 @@ export async function monitorMattermostProvider(opts: MonitorMattermostOpts = {}

19301974

summary: payloadLocal.summary,

19311975

progressText: payloadLocal.progressText,

19321976

meta: payloadLocal.meta,

1933-

},

1977+

}),

1978+

{ startImmediately: true },

19341979

);

1935-

if (progressText) {

1936-

draftStream.update(progressText);

1937-

}

19381980

},

19391981

},

19401982

}),