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

推荐订阅源

博客园 - 叶小钗
D
Docker
GbyAI
GbyAI
Y
Y Combinator Blog
Google DeepMind News
Google DeepMind News
G
Google Developers Blog
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Stack Overflow Blog
Stack Overflow Blog
WordPress大学
WordPress大学
小众软件
小众软件
Engineering at Meta
Engineering at Meta
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
B
Blog
H
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
B
Blog RSS Feed
Microsoft Security Blog
Microsoft Security 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
test: avoid discord native command cold load · openclaw/o...
steipete · 2026-05-06 · via Recent Commits to openclaw:main

@@ -127,7 +127,7 @@ const STORE_PATH = path.join(

127127

const SESSION_KEY = "agent:main:main";

128128

let findCommandByNativeName: typeof import("openclaw/plugin-sdk/command-auth").findCommandByNativeName;

129129

let resolveCommandArgChoices: typeof import("openclaw/plugin-sdk/command-auth").resolveCommandArgChoices;

130-

let resolveDiscordNativeChoiceContext: typeof import("./native-command-ui.js").resolveDiscordNativeChoiceContext;

130+

let resolveDiscordNativeChoiceContext: typeof import("./native-command-model-picker-ui.js").resolveDiscordNativeChoiceContext;

131131132132

function installProviderThinkingRegistryForTest(): void {

133133

const registry = createEmptyPluginRegistry();

@@ -165,10 +165,9 @@ function installProviderThinkingRegistryForTest(): void {

165165

}

166166167167

async function loadDiscordThinkAutocompleteModulesForTest() {

168-

vi.resetModules();

169168

installProviderThinkingRegistryForTest();

170169

const commandAuth = await import("openclaw/plugin-sdk/command-auth");

171-

const nativeCommandUi = await import("./native-command-ui.js");

170+

const nativeCommandUi = await import("./native-command-model-picker-ui.js");

172171

return {

173172

findCommandByNativeName: commandAuth.findCommandByNativeName,

174173

resolveCommandArgChoices: commandAuth.resolveCommandArgChoices,

@@ -265,12 +264,14 @@ describe("discord native /think autocomplete", () => {

265264

channel: { id: "D1", type: ChannelType.DM },

266265

user: { id: "U1" },

267266

guild: undefined,

268-

client: {},

267+

client: { fetchChannel: async () => ({ id: "D1", type: ChannelType.DM }) },

269268

} as unknown as AutocompleteInteraction & {

270269

respond: (choices: Array<{ name: string; value: string }>) => Promise<void>;

271270

};

272271273-

const command = findCommandByNativeName("think", "discord");

272+

const command = findCommandByNativeName("think", "discord", {

273+

includeBundledChannelFallback: false,

274+

});

274275

expect(command).toBeTruthy();

275276

const levelArg = command?.args?.find((entry) => entry.name === "level");

276277

expect(levelArg).toBeTruthy();

@@ -295,6 +296,7 @@ describe("discord native /think autocomplete", () => {

295296

cfg,

296297

provider: context?.provider,

297298

model: context?.model,

299+

catalog: [],

298300

});

299301

const values = choices.map((choice) => choice.value);

300302

expect(values).toContain("xhigh");

@@ -333,7 +335,7 @@ describe("discord native /think autocomplete", () => {

333335

channel: { id: "C1", type: ChannelType.GuildText },

334336

user: { id: "U1" },

335337

guild: { id: "G1" },

336-

client: {},

338+

client: { fetchChannel: async () => ({ id: "C1", type: ChannelType.GuildText }) },

337339

} as unknown as AutocompleteInteraction & {

338340

respond: (choices: Array<{ name: string; value: string }>) => Promise<void>;

339341

};

@@ -344,7 +346,9 @@ describe("discord native /think autocomplete", () => {

344346

accountId: "default",

345347

threadBindings: createNoopThreadBindingManager("default"),

346348

});

347-

const command = findCommandByNativeName("think", "discord");

349+

const command = findCommandByNativeName("think", "discord", {

350+

includeBundledChannelFallback: false,

351+

});

348352

const levelArg = command?.args?.find((entry) => entry.name === "level");

349353

expect(command).toBeTruthy();

350354

expect(levelArg).toBeTruthy();

@@ -358,6 +362,7 @@ describe("discord native /think autocomplete", () => {

358362

cfg,

359363

provider: context?.provider,

360364

model: context?.model,

365+

catalog: [],

361366

});

362367

const values = choices.map((choice) => choice.value);

363368

expect(values).toContain("max");

@@ -381,7 +386,7 @@ describe("discord native /think autocomplete", () => {

381386

channel: { id: "C1", type: ChannelType.GuildText },

382387

user: { id: "U1" },

383388

guild: { id: "G1" },

384-

client: {},

389+

client: { fetchChannel: async () => ({ id: "C1", type: ChannelType.GuildText }) },

385390

} as unknown as AutocompleteInteraction & {

386391

respond: (choices: Array<{ name: string; value: string }>) => Promise<void>;

387392

};

@@ -396,7 +401,9 @@ describe("discord native /think autocomplete", () => {

396401

expect(context).toBeNull();

397402

expect(ensureConfiguredBindingRouteReadyMock).toHaveBeenCalledTimes(1);

398403399-

const command = findCommandByNativeName("think", "discord");

404+

const command = findCommandByNativeName("think", "discord", {

405+

includeBundledChannelFallback: false,

406+

});

400407

const levelArg = command?.args?.find((entry) => entry.name === "level");

401408

expect(command).toBeTruthy();

402409

expect(levelArg).toBeTruthy();

@@ -409,6 +416,7 @@ describe("discord native /think autocomplete", () => {

409416

cfg,

410417

provider: context?.provider,

411418

model: context?.model,

419+

catalog: [],

412420

});

413421

const values = choices.map((choice) => choice.value);

414422

expect(values).not.toContain("xhigh");