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

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
博客园 - 【当耐特】
M
MIT News - Artificial intelligence
D
Docker
博客园 - 三生石上(FineUI控件)
博客园 - 司徒正美
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
月光博客
月光博客
S
SegmentFault 最新的问题
Jina AI
Jina AI
Blog — PlanetScale
Blog — PlanetScale
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - Franky
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI

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
chore(deadcode): remove stale preview helper APIs · openc...
vincentkoc · 2026-06-22 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -842,7 +842,6 @@ vi.mock("../../stream-mode.js", () => ({

842842

rendered: incoming,

843843

source: incoming,

844844

}),

845-

buildStatusFinalPreviewText: () => "status",

846845

resolveSlackStreamingConfig: () => ({

847846

mode: mockedSlackStreamingMode,

848847

nativeStreaming: mockedNativeStreaming,

Original file line numberDiff line numberDiff line change

@@ -1,25 +1,6 @@

11

// Slack tests cover stream mode plugin behavior.

22

import { describe, expect, it } from "vitest";

3-

import {

4-

applyAppendOnlyStreamUpdate,

5-

buildStatusFinalPreviewText,

6-

resolveSlackStreamingConfig,

7-

resolveSlackStreamMode,

8-

} from "./stream-mode.js";

9-
10-

describe("resolveSlackStreamMode", () => {

11-

it("defaults to replace", () => {

12-

expect(resolveSlackStreamMode(undefined)).toBe("replace");

13-

expect(resolveSlackStreamMode("")).toBe("replace");

14-

expect(resolveSlackStreamMode("unknown")).toBe("replace");

15-

});

16-
17-

it("accepts valid modes", () => {

18-

expect(resolveSlackStreamMode("replace")).toBe("replace");

19-

expect(resolveSlackStreamMode("status_final")).toBe("status_final");

20-

expect(resolveSlackStreamMode("append")).toBe("append");

21-

});

22-

});

3+

import { applyAppendOnlyStreamUpdate, resolveSlackStreamingConfig } from "./stream-mode.js";

234
245

describe("resolveSlackStreamingConfig", () => {

256

it("defaults to partial mode with native streaming enabled", () => {

@@ -119,11 +100,3 @@ describe("applyAppendOnlyStreamUpdate", () => {

119100

});

120101

});

121102

});

122-
123-

describe("buildStatusFinalPreviewText", () => {

124-

it("cycles status dots", () => {

125-

expect(buildStatusFinalPreviewText(1)).toBe("Status: thinking..");

126-

expect(buildStatusFinalPreviewText(2)).toBe("Status: thinking...");

127-

expect(buildStatusFinalPreviewText(3)).toBe("Status: thinking.");

128-

});

129-

});

Original file line numberDiff line numberDiff line change

@@ -1,5 +1,4 @@

11

// Slack plugin module implements stream mode behavior.

2-

import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";

32

import {

43

mapStreamingModeToSlackLegacyDraftStreamMode,

54

resolveSlackNativeStreaming,

@@ -8,26 +7,17 @@ import {

87

type StreamingMode,

98

} from "./streaming-compat.js";

109
11-

type SlackStreamMode = SlackLegacyDraftStreamMode;

1210

type SlackStreamingMode = StreamingMode;

13-

const DEFAULT_STREAM_MODE: SlackStreamMode = "replace";

14-
15-

export function resolveSlackStreamMode(raw: unknown): SlackStreamMode {

16-

if (typeof raw !== "string") {

17-

return DEFAULT_STREAM_MODE;

18-

}

19-

const normalized = normalizeLowercaseStringOrEmpty(raw);

20-

if (normalized === "replace" || normalized === "status_final" || normalized === "append") {

21-

return normalized;

22-

}

23-

return DEFAULT_STREAM_MODE;

24-

}

2511
2612

export function resolveSlackStreamingConfig(params: {

2713

streaming?: unknown;

2814

streamMode?: unknown;

2915

nativeStreaming?: unknown;

30-

}): { mode: SlackStreamingMode; nativeStreaming: boolean; draftMode: SlackStreamMode } {

16+

}): {

17+

mode: SlackStreamingMode;

18+

nativeStreaming: boolean;

19+

draftMode: SlackLegacyDraftStreamMode;

20+

} {

3121

const mode = resolveSlackStreamingMode(params);

3222

const nativeStreaming = resolveSlackNativeStreaming(params);

3323

return {

@@ -70,8 +60,3 @@ export function applyAppendOnlyStreamUpdate(params: {

7060

changed: true,

7161

};

7262

}

73-
74-

export function buildStatusFinalPreviewText(updateCount: number): string {

75-

const dots = ".".repeat((Math.max(1, updateCount) % 3) + 1);

76-

return `Status: thinking${dots}`;

77-

}

Original file line numberDiff line numberDiff line change

@@ -1242,7 +1242,6 @@ vi.mock("./doctor/shared/preview-warnings.js", () => {

12421242

warningNotes: await collectWarnings(params),

12431243

};

12441244

}),

1245-

collectDoctorPreviewWarnings: vi.fn(collectWarnings),

12461245

};

12471246

});

12481247
Original file line numberDiff line numberDiff line change

@@ -7,11 +7,16 @@ import type { OpenClawConfig } from "../../../config/config.js";

77

import {

88

collectDoctorPreviewNotes,

99

collectChannelBoundMessageToolPolicyWarnings,

10-

collectDoctorPreviewWarnings,

1110

collectProfileConfiguredToolSectionWarnings,

1211

collectVisibleReplyToolPolicyWarnings,

1312

} from "./preview-warnings.js";

1413
14+

async function collectDoctorPreviewWarnings(

15+

params: Parameters<typeof collectDoctorPreviewNotes>[0],

16+

): Promise<string[]> {

17+

return (await collectDoctorPreviewNotes(params)).warningNotes;

18+

}

19+
1520

type TestManifestRecord = {

1621

id: string;

1722

channels: string[];

Original file line numberDiff line numberDiff line change

@@ -983,13 +983,3 @@ export async function collectDoctorPreviewNotes(params: {

983983
984984

return { infoNotes, warningNotes: warnings };

985985

}

986-
987-

/** Collect warning notes only for callers that do not display info notes. */

988-

export async function collectDoctorPreviewWarnings(params: {

989-

cfg: OpenClawConfig;

990-

doctorFixCommand: string;

991-

env?: NodeJS.ProcessEnv;

992-

allowExec?: boolean;

993-

}): Promise<string[]> {

994-

return (await collectDoctorPreviewNotes(params)).warningNotes;

995-

}