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:
@@ -1,6 +1,4 @@
|
||||
import type { SkillDefinition } from './types'
|
||||
import type { Mode } from '../mode/modeState'
|
||||
import { getModesForSkill } from './modeMap'
|
||||
import { windowsSkills } from './windows'
|
||||
import { macSkills } from './mac'
|
||||
import { visionSkills } from './vision'
|
||||
@@ -25,11 +23,6 @@ export function loadSkills(): SkillDefinition[] {
|
||||
]
|
||||
}
|
||||
|
||||
/** Filtre les skills exposes a l'IA selon le mode actif (voir docs/skills.md). */
|
||||
export function getSkillsForMode(mode: Mode): SkillDefinition[] {
|
||||
return loadSkills().filter((skill) => getModesForSkill(skill.name).includes(mode))
|
||||
}
|
||||
|
||||
export function findSkill(name: string): SkillDefinition | undefined {
|
||||
return loadSkills().find((skill) => skill.name === name)
|
||||
}
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
import type { Mode } from '../mode/modeState'
|
||||
|
||||
// Repartition verrouillee dans docs/skills.md. Un skill absent de cette table n'est expose dans
|
||||
// aucun mode (voir l'avertissement dans getSkillsForMode) : toute nouvelle competence doit y etre
|
||||
// ajoutee explicitement.
|
||||
export const SKILL_MODES: Record<string, Mode[]> = {
|
||||
// Transversal : disponible dans les 3 modes, y compris Coach (aucun effet de bord systeme).
|
||||
search_web: ['basic', 'coach', 'assistant'],
|
||||
navigate_browser: ['basic', 'coach', 'assistant'],
|
||||
read_browser_page: ['basic', 'coach', 'assistant'],
|
||||
click_browser_element: ['basic', 'coach', 'assistant'],
|
||||
go_back_browser: ['basic', 'coach', 'assistant'],
|
||||
translate_browser_page: ['basic', 'coach', 'assistant'],
|
||||
highlight_browser_text: ['basic', 'coach', 'assistant'],
|
||||
adjust_mood: ['basic', 'coach', 'assistant'],
|
||||
|
||||
// Basic + herite par Coach (lecture seule, sans effet de bord).
|
||||
check_system_memory: ['basic', 'coach', 'assistant'],
|
||||
check_storage: ['basic', 'coach', 'assistant'],
|
||||
check_battery_and_cpu: ['basic', 'coach', 'assistant'],
|
||||
check_internet_connection: ['basic', 'coach', 'assistant'],
|
||||
|
||||
// Basic uniquement (herite par Assistant, jamais par Coach : actions avec effet de bord reel).
|
||||
play_music: ['basic', 'assistant'],
|
||||
open_app: ['basic', 'assistant'],
|
||||
close_app: ['basic', 'assistant'],
|
||||
open_notepad: ['basic', 'assistant'],
|
||||
create_document: ['basic', 'assistant'],
|
||||
create_powerpoint: ['basic', 'assistant'],
|
||||
control_volume: ['basic', 'assistant'],
|
||||
control_media_playback: ['basic', 'assistant'],
|
||||
take_screenshot: ['basic', 'assistant'],
|
||||
clipboard: ['basic', 'assistant'],
|
||||
search_file: ['basic', 'assistant'],
|
||||
set_reminder: ['basic', 'assistant'],
|
||||
lock_screen: ['basic', 'assistant'],
|
||||
empty_recycle_bin: ['basic', 'assistant'],
|
||||
show_notification: ['basic', 'assistant'],
|
||||
print_file: ['basic', 'assistant'],
|
||||
create_folder: ['basic', 'assistant'],
|
||||
create_file: ['basic', 'assistant'],
|
||||
delete_file: ['basic', 'assistant'],
|
||||
fill_browser_field: ['basic', 'assistant'],
|
||||
|
||||
// Exclusif Coach : mecanisme central de detection des blocages.
|
||||
analyze_screen: ['coach'],
|
||||
watch_camera: ['coach'],
|
||||
track_concept_mastery: ['coach'],
|
||||
ask_written_exercise: ['coach'],
|
||||
record_subject_level: ['coach'],
|
||||
draw_schema: ['coach'],
|
||||
draw_flow_diagram: ['coach'],
|
||||
research_topic: ['coach'],
|
||||
get_course_plan: ['coach'],
|
||||
generate_course_plan: ['coach'],
|
||||
complete_module: ['coach'],
|
||||
complete_subject: ['coach'],
|
||||
write_module_content: ['coach'],
|
||||
open_module_for_user: ['coach'],
|
||||
|
||||
// Exclusif Assistant.
|
||||
get_last_meeting_summary: ['assistant'],
|
||||
remember_info: ['assistant'],
|
||||
forget_info: ['assistant']
|
||||
}
|
||||
|
||||
export function getModesForSkill(skillName: string): Mode[] {
|
||||
const modes = Object.hasOwn(SKILL_MODES, skillName)
|
||||
? Reflect.get(SKILL_MODES, skillName)
|
||||
: undefined
|
||||
if (!modes) {
|
||||
console.warn(`[mode] skill "${skillName}" absent de SKILL_MODES : expose dans aucun mode.`)
|
||||
return []
|
||||
}
|
||||
return modes
|
||||
}
|
||||
Reference in New Issue
Block a user