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

推荐订阅源

大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
M
MIT News - Artificial intelligence
量子位
N
Netflix TechBlog - Medium
The Cloudflare Blog
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
B
Blog
博客园_首页
博客园 - Franky
MyScale Blog
MyScale Blog
有赞技术团队
有赞技术团队
Apple Machine Learning Research
Apple Machine Learning Research
MongoDB | Blog
MongoDB | Blog
云风的 BLOG
云风的 BLOG
爱范儿
爱范儿
H
Help Net Security
Y
Y Combinator Blog
Stack Overflow Blog
Stack Overflow Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell

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(commands): keep slash handling off reply startup · op...
keshavbotage · 2026-05-27 · via Recent Commits to openclaw:main

@@ -3,7 +3,11 @@ import { resolveSessionAgentId } from "../../agents/agent-scope.js";

33

import type { OpenClawConfig } from "../../config/config.js";

44

import type { MsgContext } from "../templating.js";

55

import { handleContextCommand } from "./commands-context-command.js";

6-

import { handleExportTrajectoryCommand, handleStatusCommand } from "./commands-info.js";

6+

import {

7+

handleExportTrajectoryCommand,

8+

handleSkillCommandUsage,

9+

handleStatusCommand,

10+

} from "./commands-info.js";

711

import { buildStatusReply } from "./commands-status.js";

812

import type { HandleCommandsParams } from "./commands-types.js";

913

import { handleWhoamiCommand } from "./commands-whoami.js";

@@ -39,9 +43,14 @@ vi.mock("../../agents/agent-scope.js", async () => {

3943

};

4044

});

414542-

vi.mock("../skill-commands.js", () => ({

43-

listSkillCommandsForAgents: listSkillCommandsForAgentsMock,

44-

}));

46+

vi.mock("../skill-commands.js", async () => {

47+

const actual =

48+

await vi.importActual<typeof import("../skill-commands.js")>("../skill-commands.js");

49+

return {

50+

...actual,

51+

listSkillCommandsForAgents: listSkillCommandsForAgentsMock,

52+

};

53+

});

45544655

vi.mock("../status.js", async () => {

4756

const actual = await vi.importActual<typeof import("../status.js")>("../status.js");

@@ -156,6 +165,54 @@ describe("info command handlers", () => {

156165

expect(result?.reply?.text).toContain("AllowFrom: 12345");

157166

});

158167168+

it("returns usage for bare /skill without continuing to the agent", async () => {

169+

const params = buildInfoParams("/skill", {

170+

commands: { text: true },

171+

} as OpenClawConfig);

172+

params.skillCommands = [

173+

{

174+

name: "demo_skill",

175+

skillName: "demo-skill",

176+

description: "Demo skill",

177+

},

178+

];

179+180+

const result = await handleSkillCommandUsage(params, true);

181+182+

expect(result?.shouldContinue).toBe(false);

183+

expect(result?.reply?.text).toContain("Usage: /skill <name> [input]");

184+

expect(result?.reply?.text).toContain("Available: demo-skill");

185+

});

186+187+

it("returns an unknown skill reply for unmatched /skill targets", async () => {

188+

const params = buildInfoParams("/skill missing input", {

189+

commands: { text: true },

190+

} as OpenClawConfig);

191+192+

const result = await handleSkillCommandUsage(params, true);

193+194+

expect(result?.shouldContinue).toBe(false);

195+

expect(result?.reply?.text).toContain("Unknown skill: missing");

196+

expect(result?.reply?.text).toContain("Usage: /skill <name> [input]");

197+

});

198+199+

it("lets valid /skill invocations continue to the skill command path", async () => {

200+

const params = buildInfoParams("/skill demo_skill input", {

201+

commands: { text: true },

202+

} as OpenClawConfig);

203+

params.skillCommands = [

204+

{

205+

name: "demo_skill",

206+

skillName: "demo-skill",

207+

description: "Demo skill",

208+

},

209+

];

210+211+

const result = await handleSkillCommandUsage(params, true);

212+213+

expect(result).toBeNull();

214+

});

215+159216

it("uses the canonical command sender identity for /whoami AllowFrom", async () => {

160217

const params = buildInfoParams(

161218

"/whoami",