mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 20:38:27 +00:00
test: stabilize gateway tests
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { DEFAULT_AGENT_WORKSPACE_DIR } from "../../agents/workspace.js";
|
||||
import { installSkill } from "../../agents/skills-install.js";
|
||||
import { buildWorkspaceSkillStatus } from "../../agents/skills-status.js";
|
||||
import { DEFAULT_AGENT_WORKSPACE_DIR } from "../../agents/workspace.js";
|
||||
import type { ClawdisConfig } from "../../config/config.js";
|
||||
import { loadConfig, writeConfigFile } from "../../config/config.js";
|
||||
import { resolveUserPath } from "../../utils.js";
|
||||
@@ -64,7 +64,9 @@ export const skillsHandlers: GatewayRequestHandlers = {
|
||||
respond(
|
||||
result.ok,
|
||||
result,
|
||||
result.ok ? undefined : errorShape(ErrorCodes.UNAVAILABLE, result.message),
|
||||
result.ok
|
||||
? undefined
|
||||
: errorShape(ErrorCodes.UNAVAILABLE, result.message),
|
||||
);
|
||||
},
|
||||
"skills.update": async ({ params, respond }) => {
|
||||
@@ -115,6 +117,10 @@ export const skillsHandlers: GatewayRequestHandlers = {
|
||||
skills,
|
||||
};
|
||||
await writeConfigFile(nextConfig);
|
||||
respond(true, { ok: true, skillKey: p.skillKey, config: current }, undefined);
|
||||
respond(
|
||||
true,
|
||||
{ ok: true, skillKey: p.skillKey, config: current },
|
||||
undefined,
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user