mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 16:41:36 +00:00
refactor(test): reuse command test harness
This commit is contained in:
@@ -7,6 +7,9 @@ export function buildCommandTestParams(
|
||||
commandBody: string,
|
||||
cfg: OpenClawConfig,
|
||||
ctxOverrides?: Partial<MsgContext>,
|
||||
options?: {
|
||||
workspaceDir?: string;
|
||||
},
|
||||
) {
|
||||
const ctx = {
|
||||
Body: commandBody,
|
||||
@@ -33,7 +36,7 @@ export function buildCommandTestParams(
|
||||
directives: parseInlineDirectives(commandBody),
|
||||
elevated: { enabled: true, allowed: true, failures: [] },
|
||||
sessionKey: "agent:main:main",
|
||||
workspaceDir: "/tmp",
|
||||
workspaceDir: options?.workspaceDir ?? "/tmp",
|
||||
defaultGroupActivation: () => "mention",
|
||||
resolvedVerboseLevel: "off" as const,
|
||||
resolvedReasoningLevel: "off" as const,
|
||||
|
||||
Reference in New Issue
Block a user