diff --git a/src/features/builtin-commands/templates/init-deep.ts b/src/features/builtin-commands/templates/init-deep.ts index dbd8e1df7..f76437f3e 100644 --- a/src/features/builtin-commands/templates/init-deep.ts +++ b/src/features/builtin-commands/templates/init-deep.ts @@ -275,8 +275,8 @@ For each generated file: Mode: {update | create-new} Files: - ✓ ./AGENTS.md (root, {N} lines) - ✓ ./src/hooks/AGENTS.md ({N} lines) + [OK] ./AGENTS.md (root, {N} lines) + [OK] ./src/hooks/AGENTS.md ({N} lines) Dirs Analyzed: {N} AGENTS.md Created: {N} diff --git a/src/features/builtin-commands/templates/start-work.ts b/src/features/builtin-commands/templates/start-work.ts index f3a785bb6..69a70eb0c 100644 --- a/src/features/builtin-commands/templates/start-work.ts +++ b/src/features/builtin-commands/templates/start-work.ts @@ -31,7 +31,7 @@ export const START_WORK_TEMPLATE = `You are starting a Sisyphus work session. When listing plans for selection: \`\`\` -📋 Available Work Plans +Available Work Plans Current Time: {ISO timestamp} Session ID: {current session id} @@ -44,7 +44,7 @@ Which plan would you like to work on? (Enter number or plan name) When resuming existing work: \`\`\` -🔄 Resuming Work Session +Resuming Work Session Active Plan: {plan-name} Progress: {completed}/{total} tasks @@ -55,7 +55,7 @@ Reading plan and continuing from last incomplete task... When auto-selecting single plan: \`\`\` -🚀 Starting Work Session +Starting Work Session Plan: {plan-name} Session ID: {session_id} diff --git a/src/index.ts b/src/index.ts index c75b42785..31b0daf49 100644 --- a/src/index.ts +++ b/src/index.ts @@ -288,7 +288,7 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => { : null; const configHandler = createConfigHandler({ - ctx, + ctx: { directory: ctx.directory, client: ctx.client }, pluginConfig, modelCacheState, }); diff --git a/src/plugin-handlers/config-handler.ts b/src/plugin-handlers/config-handler.ts index 704036d55..d779921d3 100644 --- a/src/plugin-handlers/config-handler.ts +++ b/src/plugin-handlers/config-handler.ts @@ -12,6 +12,10 @@ import { loadProjectSkills, loadOpencodeGlobalSkills, loadOpencodeProjectSkills, + discoverUserClaudeSkills, + discoverProjectClaudeSkills, + discoverOpencodeGlobalSkills, + discoverOpencodeProjectSkills, } from "../features/opencode-skill-loader"; import { loadUserAgents, @@ -31,7 +35,7 @@ import type { ModelCacheState } from "../plugin-state"; import type { CategoryConfig } from "../config/schema"; export interface ConfigHandlerDeps { - ctx: { directory: string }; + ctx: { directory: string; client?: any }; pluginConfig: OhMyOpenCodeConfig; modelCacheState: ModelCacheState; } @@ -116,13 +120,35 @@ export function createConfigHandler(deps: ConfigHandlerDeps) { return AGENT_NAME_MAP[agent.toLowerCase()] ?? AGENT_NAME_MAP[agent] ?? agent }) as typeof pluginConfig.disabled_agents - const builtinAgents = createBuiltinAgents( + const includeClaudeSkillsForAwareness = pluginConfig.claude_code?.skills ?? true; + const [ + discoveredUserSkills, + discoveredProjectSkills, + discoveredOpencodeGlobalSkills, + discoveredOpencodeProjectSkills, + ] = await Promise.all([ + includeClaudeSkillsForAwareness ? discoverUserClaudeSkills() : Promise.resolve([]), + includeClaudeSkillsForAwareness ? discoverProjectClaudeSkills() : Promise.resolve([]), + discoverOpencodeGlobalSkills(), + discoverOpencodeProjectSkills(), + ]); + + const allDiscoveredSkills = [ + ...discoveredOpencodeProjectSkills, + ...discoveredProjectSkills, + ...discoveredOpencodeGlobalSkills, + ...discoveredUserSkills, + ]; + + const builtinAgents = await createBuiltinAgents( migratedDisabledAgents, pluginConfig.agents, ctx.directory, config.model as string | undefined, pluginConfig.categories, - pluginConfig.git_master + pluginConfig.git_master, + allDiscoveredSkills, + ctx.client ); // Claude Code agents: Do NOT apply permission migration diff --git a/src/shared/external-plugin-detector.ts b/src/shared/external-plugin-detector.ts index ff04fe182..ed7f2ab2e 100644 --- a/src/shared/external-plugin-detector.ts +++ b/src/shared/external-plugin-detector.ts @@ -121,7 +121,7 @@ export function detectExternalNotificationPlugin(directory: string): ExternalNot export function getNotificationConflictWarning(pluginName: string): string { return `[oh-my-opencode] External notification plugin detected: ${pluginName} -⚠️ Both oh-my-opencode and ${pluginName} listen to session.idle events. +Both oh-my-opencode and ${pluginName} listen to session.idle events. Running both simultaneously can cause crashes on Windows. oh-my-opencode's session-notification has been auto-disabled.