MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / showGoalQueueManager

Function showGoalQueueManager

apps/kimi-code/src/tui/commands/goal.ts:214–244  ·  view source on GitHub ↗
(
  host: SlashCommandHost,
  selectedGoalId?: string,
)

Source from the content-addressed store, hash-verified

212}
213
214async function showGoalQueueManager(
215 host: SlashCommandHost,
216 selectedGoalId?: string,
217): Promise<void> {
218 let snapshot: GoalQueueSnapshot;
219 try {
220 snapshot = await readGoalQueue(host.requireSession());
221 } catch (error) {
222 host.showError(`Failed to load upcoming goals: ${formatErrorMessage(error)}`);
223 return;
224 }
225
226 host.track('goal_queue_manage');
227 host.mountEditorReplacement(
228 new GoalQueueManagerComponent({
229 goals: snapshot.goals,
230 selectedGoalId,
231 onAction: async (action) => {
232 try {
233 return await handleGoalQueueManagerAction(host, action);
234 } catch (error) {
235 host.showError(`Failed to update upcoming goals: ${formatErrorMessage(error)}`);
236 return undefined;
237 }
238 },
239 onCancel: () => {
240 host.restoreEditor();
241 },
242 }),
243 );
244}
245
246async function handleGoalQueueManagerAction(
247 host: SlashCommandHost,

Callers 3

handleGoalCommandFunction · 0.85
showGoalQueueEditDialogFunction · 0.85

Calls 8

readGoalQueueFunction · 0.90
formatErrorMessageFunction · 0.90
requireSessionMethod · 0.65
showErrorMethod · 0.65
trackMethod · 0.65
restoreEditorMethod · 0.65

Tested by

no test coverage detected