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

推荐订阅源

V
V2EX
人人都是产品经理
人人都是产品经理
WordPress大学
WordPress大学
博客园 - Franky
小众软件
小众软件
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
IT之家
IT之家
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Visual Studio Blog
S
SegmentFault 最新的问题
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
有赞技术团队
有赞技术团队
B
Blog RSS Feed
Last Week in AI
Last Week in AI
Jina AI
Jina AI
博客园 - 司徒正美
The Cloudflare 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
Fix check type errors · openclaw/openclaw@462074c
gumadeiras · 2026-04-18 · via Recent Commits to openclaw:main

@@ -1,27 +1,61 @@

11

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

223+

type MockChannelSetupEntry = {

4+

id: string;

5+

pluginId?: string;

6+

meta: {

7+

id: string;

8+

label: string;

9+

selectionLabel?: string;

10+

docsPath?: string;

11+

docsLabel?: string;

12+

blurb?: string;

13+

selectionDocsPrefix?: string;

14+

selectionExtras?: readonly string[];

15+

exposure?: { setup?: boolean };

16+

showInSetup?: boolean;

17+

quickstartAllowFrom?: boolean;

18+

};

19+

};

20+21+

type MockChannelSetupEntries = {

22+

entries: MockChannelSetupEntry[];

23+

installedCatalogEntries: MockChannelSetupEntry[];

24+

installableCatalogEntries: MockChannelSetupEntry[];

25+

installedCatalogById: Map<unknown, unknown>;

26+

installableCatalogById: Map<unknown, unknown>;

27+

};

28+329

const listChatChannels = vi.hoisted(() =>

430

vi.fn(() => [

531

{ id: "discord", label: "Discord" },

632

{ id: "bluebubbles", label: "BlueBubbles" },

733

]),

834

);

935

const resolveChannelSetupEntries = vi.hoisted(() =>

10-

vi.fn(() => ({

11-

entries: [],

12-

installedCatalogEntries: [],

13-

installableCatalogEntries: [],

14-

installedCatalogById: new Map(),

15-

installableCatalogById: new Map(),

16-

})),

36+

vi.fn(

37+

(_params?: unknown): MockChannelSetupEntries => ({

38+

entries: [],

39+

installedCatalogEntries: [],

40+

installableCatalogEntries: [],

41+

installedCatalogById: new Map(),

42+

installableCatalogById: new Map(),

43+

}),

44+

),

1745

);

1846

const formatChannelPrimerLine = vi.hoisted(() =>

19-

vi.fn((meta: { label: string; blurb: string }) => `${meta.label}: ${meta.blurb}`),

47+

vi.fn((meta: unknown) => {

48+

const channel = meta as { label: string; blurb: string };

49+

return `${channel.label}: ${channel.blurb}`;

50+

}),

2051

);

2152

const formatChannelSelectionLine = vi.hoisted(() =>

22-

vi.fn((meta: { label: string; blurb: string }) => `${meta.label}${meta.blurb}`),

53+

vi.fn((meta: unknown, _docsLink?: unknown) => {

54+

const channel = meta as { label: string; blurb: string };

55+

return `${channel.label}${channel.blurb}`;

56+

}),

2357

);

24-

const isChannelConfigured = vi.hoisted(() => vi.fn(() => false));

58+

const isChannelConfigured = vi.hoisted(() => vi.fn((_cfg?: unknown, _channelId?: string) => false));

25592660

vi.mock("../channels/chat-meta.js", () => ({

2761

listChatChannels: () => listChatChannels(),

@@ -64,12 +98,14 @@ describe("resolveChannelSetupSelectionContributions", () => {

6498

installedCatalogById: new Map(),

6599

installableCatalogById: new Map(),

66100

});

67-

formatChannelPrimerLine.mockImplementation(

68-

(meta: { label: string; blurb: string }) => `${meta.label}: ${meta.blurb}`,

69-

);

70-

formatChannelSelectionLine.mockImplementation(

71-

(meta: { label: string; blurb: string }) => `${meta.label}${meta.blurb}`,

72-

);

101+

formatChannelPrimerLine.mockImplementation((meta: unknown) => {

102+

const channel = meta as { label: string; blurb: string };

103+

return `${channel.label}: ${channel.blurb}`;

104+

});

105+

formatChannelSelectionLine.mockImplementation((meta: unknown) => {

106+

const channel = meta as { label: string; blurb: string };

107+

return `${channel.label}${channel.blurb}`;

108+

});

73109

isChannelConfigured.mockReturnValue(false);

74110

});

75111