test: stabilize gateway tests

This commit is contained in:
Peter Steinberger
2026-01-04 04:16:38 +01:00
parent 3c4c2aa98c
commit 24aa3e3311
21 changed files with 192 additions and 104 deletions

View File

@@ -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,
);
},
};