chore(cleanup): remove mode selection system

Max no longer has a Basic/Coach/Assistant mode selection: it will start
directly as a freelance coach, with a single server-side pipeline built in
a later step. Removes the Mode type/state, the skill-to-mode mapping, the
per-mode skill filtering and system prompt branching, and the 3-way mode
submenu in the context menu. Skills now always load as a single flat set
via loadSkills(); mode-specific behavior removal is a prerequisite for
retiring the old pipeline itself in the next cleanup commit.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
william
2026-10-31 17:51:30 +01:00
parent 885e24d037
commit 9aa5abc121
12 changed files with 28 additions and 494 deletions
+3 -14
View File
@@ -39,7 +39,7 @@ vi.mock('@electron-toolkit/utils', () => ({
optimizer: { watchWindowShortcuts: vi.fn() }
}))
const { loadSkills, getSkillsForMode, findSkill } = await import('../../src/main/skills')
const { loadSkills, findSkill } = await import('../../src/main/skills')
describe('loadSkills()', () => {
it('should load a non-empty list of skills without throwing', () => {
@@ -51,20 +51,9 @@ describe('loadSkills()', () => {
const names = loadSkills().map((s) => s.name)
expect(new Set(names).size).toBe(names.length)
})
})
describe('getSkillsForMode()', () => {
it('should include a coach-only skill in coach mode but not in basic mode', () => {
const coachSkills = getSkillsForMode('coach').map((s) => s.name)
const basicSkills = getSkillsForMode('basic').map((s) => s.name)
expect(coachSkills).toContain('draw_schema')
expect(basicSkills).not.toContain('draw_schema')
})
it('should include a transversal skill in every mode', () => {
for (const mode of ['basic', 'coach', 'assistant'] as const) {
expect(getSkillsForMode(mode).map((s) => s.name)).toContain('search_web')
}
it('should include a transversal skill', () => {
expect(loadSkills().map((s) => s.name)).toContain('search_web')
})
})