mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-16 11:19:33 +01:00
feat(agent-skill): turn the Codeman agent skill on by default
An absent `agentSkillEnabled` now means on, on the server (`getAgentSkillEnabled()` reads `!== false`, like `workspaceHooksEnabled`) and on the page (the App Settings switch loads `!== false`, so a Save of any other setting no longer writes the old default back). Only an explicit false turns it off. A partial settings PUT that omits the key leaves it as stored, since the route merges the request into the file. The switch's help text says it is on by default, that the copy stays out of git, and that turning it off removes no copy already written. The shared route-test mock now defaults to on too, so route tests see what a user sees. Tests: quick-start against a real server (absent key injects, a partial PUT keeps it on, an explicit false stays off through a later partial PUT), the real openAppSettings/saveAppSettings in JSDOM (absent shows on, explicit false shows off, a Save on a never-touched install sends true and passes the schema), and the plain create route at the mock's default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ba9d311cb7
commit
b3f0ba9e29
11 files changed
+297
-45
No files matched your search
@@ -128,10 +128,10 @@ export function createMockRouteContext(options?: {
|
||||
getModelConfig: vi.fn(async () => null),
|
||||
getClaudeModeConfig: vi.fn(async () => ({})),
|
||||
getTerminalHistoryConfig: vi.fn(async () => resolveTerminalHistoryConfig({})),
|
||||
// Default OFF mirrors the shipped setting, so existing tests never touch a
|
||||
// case's .claude/skills. Overridable per test because the create-time
|
||||
// injection call sites are otherwise unreachable from a route test.
|
||||
getAgentSkillEnabled: vi.fn(async () => options?.agentSkillEnabled ?? false),
|
||||
// Default ON mirrors the shipped setting (since 1.50.0), so a route test sees
|
||||
// what a user sees. Writes land in the test's temp working dir, never in a real
|
||||
// repo. Overridable per test, so the OFF branch stays reachable.
|
||||
getAgentSkillEnabled: vi.fn(async () => options?.agentSkillEnabled ?? true),
|
||||
// Default OFF mirrors the shipped setting: no test opens a voice relay by accident.
|
||||
getClaudeVoiceEnabled: vi.fn(async () => options?.claudeVoiceEnabled ?? false),
|
||||
// Default ON mirrors the shipped setting, so a route test sees what a user sees.
|
||||
|
||||
Reference in new issue
Block a user