refactor(goals): replace the Manager session-goal API with OpenCode built-in /goal

This commit is contained in:
Chris Scott committed 2026-10-29 12:38:39 -04:00
1 parent c8647c1eec
commit cbe92c92ad
84 files changed
+2099 -6321

No files matched your search

-15
View File
@@ -14,25 +14,20 @@ import { setPendingWarp, runPendingWarp } from './warp.js'
import { pushPhaseProgress, importProgress } from './move-progress.js'
import { warmRepoProxy } from './repo-proxy.js'
import type { MoveProgress } from './move-progress.js'
import { GOAL_COMMAND, runGoalCommand } from './tui-goal.js'
import type { GoalDialogProps } from './tui-goal.js'
import { MULTI_RUN_COMMAND, runMultiRunCommand } from './tui-multi-run.js'
import type { MultiRunLaunchDialogProps, MultiRunsDialogProps } from './tui-multi-run.js'
import { runOcmSwitch } from './tui-ocm.js'
import type { GoalStore } from './goal-store.js'
import type { RemoteContext } from './remote-context.js'
export type MoveProgressSetter = (progress: MoveProgress | null) => void
export type OcmDialogs = {
goal: (props: GoalDialogProps) => void
multiRunLaunch: (props: MultiRunLaunchDialogProps) => void
multiRuns: (props: MultiRunsDialogProps) => void
}
export type OcmFeatures = {
remote: RemoteContext | undefined
goals: GoalStore | undefined
dialogs: OcmDialogs
}
@@ -62,16 +57,6 @@ export async function setupOcm(context: Context, setMoveProgress: MoveProgressSe
slash: { name: 'ocm' },
run: () => runOcmSwitch(context, { remote: features.remote }),
},
{
id: 'ocm.goal',
title: 'Goal',
description: 'Start, pause, resume, or cancel a Manager goal for this session',
group: 'OpenCode Manager',
palette: true,
slash: { name: GOAL_COMMAND, arguments: true },
run: (input) =>
runGoalCommand(context, { remote: features.remote, store: features.goals, showDialog: features.dialogs.goal }, input),
},
{
id: 'ocm.multirun',
title: 'Multi-run',