mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
section 5: Phase 5: Session goals in the TUI (/goal, composer status
This commit is contained in:
1 parent
87e55372c0
commit
e63f756c32
7 files changed
+1018
-4
No files matched your search
@@ -15,10 +15,18 @@ 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 { runGoalCommand } from './tui-goal.js'
|
||||
import type { GoalStore } from './goal-store.js'
|
||||
import type { RemoteContext } from './remote-context.js'
|
||||
|
||||
export type MoveProgressSetter = (progress: MoveProgress | null) => void
|
||||
|
||||
export async function setupOcm(context: Context, setMoveProgress: MoveProgressSetter): Promise<() => void> {
|
||||
export type OcmFeatures = {
|
||||
remote: RemoteContext | undefined
|
||||
goals: GoalStore | undefined
|
||||
}
|
||||
|
||||
export async function setupOcm(context: Context, setMoveProgress: MoveProgressSetter, features: OcmFeatures): Promise<() => void> {
|
||||
showInstallNotice(context)
|
||||
context.ui.slot({
|
||||
append: 'app',
|
||||
@@ -35,6 +43,15 @@ export async function setupOcm(context: Context, setMoveProgress: MoveProgressSe
|
||||
slash: { name: 'ocm-move' },
|
||||
run: () => runSessionMove(context, setMoveProgress),
|
||||
},
|
||||
{
|
||||
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', arguments: true },
|
||||
run: (input) => runGoalCommand(context, { remote: features.remote, store: features.goals }, input),
|
||||
},
|
||||
],
|
||||
}))
|
||||
return null
|
||||
|
||||
Reference in new issue
Block a user