@kenkaiiii/ggcoder 4.3.232 → 4.3.233
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +7 -89
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +2 -2
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/prompt-commands.d.ts.map +1 -1
- package/dist/core/prompt-commands.js +8 -16
- package/dist/core/prompt-commands.js.map +1 -1
- package/dist/core/prompt-commands.test.js +14 -44
- package/dist/core/prompt-commands.test.js.map +1 -1
- package/dist/core/runtime-mode.d.ts +0 -11
- package/dist/core/runtime-mode.d.ts.map +1 -1
- package/dist/core/runtime-mode.js +0 -9
- package/dist/core/runtime-mode.js.map +1 -1
- package/dist/core/session-restore-display.test.js +4 -110
- package/dist/core/session-restore-display.test.js.map +1 -1
- package/dist/interactive.d.ts.map +1 -1
- package/dist/interactive.js +1 -1
- package/dist/interactive.js.map +1 -1
- package/dist/system-prompt.d.ts +1 -2
- package/dist/system-prompt.d.ts.map +1 -1
- package/dist/system-prompt.js +11 -58
- package/dist/system-prompt.js.map +1 -1
- package/dist/system-prompt.test.js +3 -158
- package/dist/system-prompt.test.js.map +1 -1
- package/dist/tools/bash.d.ts +1 -4
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +3 -12
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/checkpoint-hook.test.js +3 -3
- package/dist/tools/checkpoint-hook.test.js.map +1 -1
- package/dist/tools/edit.d.ts +1 -4
- package/dist/tools/edit.d.ts.map +1 -1
- package/dist/tools/edit.js +5 -13
- package/dist/tools/edit.js.map +1 -1
- package/dist/tools/enter-plan.js +1 -1
- package/dist/tools/enter-plan.js.map +1 -1
- package/dist/tools/index.d.ts +0 -9
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -8
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/prompt-hints.d.ts.map +1 -1
- package/dist/tools/prompt-hints.js +0 -2
- package/dist/tools/prompt-hints.js.map +1 -1
- package/dist/tools/screenshot.d.ts +1 -1
- package/dist/tools/subagent.d.ts +1 -4
- package/dist/tools/subagent.d.ts.map +1 -1
- package/dist/tools/subagent.js +2 -5
- package/dist/tools/subagent.js.map +1 -1
- package/dist/tools/write.d.ts +1 -4
- package/dist/tools/write.d.ts.map +1 -1
- package/dist/tools/write.js +5 -13
- package/dist/tools/write.js.map +1 -1
- package/dist/ui/App.d.ts +5 -20
- package/dist/ui/App.d.ts.map +1 -1
- package/dist/ui/App.js +71 -309
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/app-items.d.ts +23 -25
- package/dist/ui/app-items.d.ts.map +1 -1
- package/dist/ui/app-items.js +37 -0
- package/dist/ui/app-items.js.map +1 -1
- package/dist/ui/app-items.test.d.ts +2 -0
- package/dist/ui/app-items.test.d.ts.map +1 -0
- package/dist/ui/app-items.test.js +38 -0
- package/dist/ui/app-items.test.js.map +1 -0
- package/dist/ui/app-state-persistence.test.js +14 -318
- package/dist/ui/app-state-persistence.test.js.map +1 -1
- package/dist/ui/chat-layout-pinning.test.js +74 -4
- package/dist/ui/chat-layout-pinning.test.js.map +1 -1
- package/dist/ui/components/AssistantMessage.test.js +6 -9
- package/dist/ui/components/AssistantMessage.test.js.map +1 -1
- package/dist/ui/components/Banner.js +1 -1
- package/dist/ui/components/Banner.js.map +1 -1
- package/dist/ui/components/ChatFooterPane.d.ts +1 -5
- package/dist/ui/components/ChatFooterPane.d.ts.map +1 -1
- package/dist/ui/components/ChatFooterPane.js +3 -4
- package/dist/ui/components/ChatFooterPane.js.map +1 -1
- package/dist/ui/components/ChatInputStack.d.ts +3 -1
- package/dist/ui/components/ChatInputStack.d.ts.map +1 -1
- package/dist/ui/components/ChatInputStack.js +4 -3
- package/dist/ui/components/ChatInputStack.js.map +1 -1
- package/dist/ui/components/ChatScreen.d.ts +3 -16
- package/dist/ui/components/ChatScreen.d.ts.map +1 -1
- package/dist/ui/components/ChatScreen.js +2 -3
- package/dist/ui/components/ChatScreen.js.map +1 -1
- package/dist/ui/components/Footer.d.ts +3 -8
- package/dist/ui/components/Footer.d.ts.map +1 -1
- package/dist/ui/components/Footer.js +5 -25
- package/dist/ui/components/Footer.js.map +1 -1
- package/dist/ui/components/InputArea.d.ts +1 -9
- package/dist/ui/components/InputArea.d.ts.map +1 -1
- package/dist/ui/components/InputArea.js +2 -44
- package/dist/ui/components/InputArea.js.map +1 -1
- package/dist/ui/components/LiveToolPanel.d.ts +30 -0
- package/dist/ui/components/LiveToolPanel.d.ts.map +1 -0
- package/dist/ui/components/LiveToolPanel.js +66 -0
- package/dist/ui/components/LiveToolPanel.js.map +1 -0
- package/dist/ui/components/ToolExecution.js +0 -2
- package/dist/ui/components/ToolExecution.js.map +1 -1
- package/dist/ui/components/TranscriptViewport.d.ts +1 -1
- package/dist/ui/components/TranscriptViewport.js +1 -1
- package/dist/ui/footer-jump-regression.test.js +12 -2
- package/dist/ui/footer-jump-regression.test.js.map +1 -1
- package/dist/ui/footer-status-layout.test.js +4 -12
- package/dist/ui/footer-status-layout.test.js.map +1 -1
- package/dist/ui/hooks/useChatLayoutMeasurements.d.ts +3 -4
- package/dist/ui/hooks/useChatLayoutMeasurements.d.ts.map +1 -1
- package/dist/ui/hooks/useChatLayoutMeasurements.js +26 -4
- package/dist/ui/hooks/useChatLayoutMeasurements.js.map +1 -1
- package/dist/ui/hooks/useModeState.d.ts +4 -19
- package/dist/ui/hooks/useModeState.d.ts.map +1 -1
- package/dist/ui/hooks/useModeState.js +5 -45
- package/dist/ui/hooks/useModeState.js.map +1 -1
- package/dist/ui/hooks/usePixelFixFlow.js +2 -2
- package/dist/ui/layout-decisions.d.ts +11 -34
- package/dist/ui/layout-decisions.d.ts.map +1 -1
- package/dist/ui/layout-decisions.js +15 -42
- package/dist/ui/layout-decisions.js.map +1 -1
- package/dist/ui/live-area-height.d.ts.map +1 -1
- package/dist/ui/live-area-height.js +6 -1
- package/dist/ui/live-area-height.js.map +1 -1
- package/dist/ui/live-frame-height.test.js +26 -1
- package/dist/ui/live-frame-height.test.js.map +1 -1
- package/dist/ui/plan-overlay.test.js +1 -1
- package/dist/ui/plan-overlay.test.js.map +1 -1
- package/dist/ui/prompt-routing.d.ts +1 -19
- package/dist/ui/prompt-routing.d.ts.map +1 -1
- package/dist/ui/prompt-routing.js +1 -79
- package/dist/ui/prompt-routing.js.map +1 -1
- package/dist/ui/render.d.ts +3 -18
- package/dist/ui/render.d.ts.map +1 -1
- package/dist/ui/render.js +0 -10
- package/dist/ui/render.js.map +1 -1
- package/dist/ui/scroll-stabilization.test.js +1 -7
- package/dist/ui/scroll-stabilization.test.js.map +1 -1
- package/dist/ui/slash-command-images.test.js +11 -86
- package/dist/ui/slash-command-images.test.js.map +1 -1
- package/dist/ui/streaming-flush-bounce.test.d.ts +2 -0
- package/dist/ui/streaming-flush-bounce.test.d.ts.map +1 -0
- package/dist/ui/streaming-flush-bounce.test.js +156 -0
- package/dist/ui/streaming-flush-bounce.test.js.map +1 -0
- package/dist/ui/submit-prompt-command.d.ts +1 -16
- package/dist/ui/submit-prompt-command.d.ts.map +1 -1
- package/dist/ui/submit-prompt-command.js +4 -54
- package/dist/ui/submit-prompt-command.js.map +1 -1
- package/dist/ui/submit-slash-commands.d.ts +0 -1
- package/dist/ui/submit-slash-commands.d.ts.map +1 -1
- package/dist/ui/submit-slash-commands.js +0 -4
- package/dist/ui/submit-slash-commands.js.map +1 -1
- package/dist/ui/terminal-history-status-renderers.d.ts +0 -1
- package/dist/ui/terminal-history-status-renderers.d.ts.map +1 -1
- package/dist/ui/terminal-history-status-renderers.js +0 -3
- package/dist/ui/terminal-history-status-renderers.js.map +1 -1
- package/dist/ui/terminal-history.d.ts.map +1 -1
- package/dist/ui/terminal-history.js +11 -56
- package/dist/ui/terminal-history.js.map +1 -1
- package/dist/ui/terminal-history.test.js +6 -33
- package/dist/ui/terminal-history.test.js.map +1 -1
- package/dist/ui/tool-line-summary.d.ts +29 -0
- package/dist/ui/tool-line-summary.d.ts.map +1 -0
- package/dist/ui/tool-line-summary.js +153 -0
- package/dist/ui/tool-line-summary.js.map +1 -0
- package/dist/ui/transcript/TranscriptRenderer.d.ts +1 -1
- package/dist/ui/transcript/TranscriptRenderer.d.ts.map +1 -1
- package/dist/ui/transcript/TranscriptRenderer.js +18 -12
- package/dist/ui/transcript/TranscriptRenderer.js.map +1 -1
- package/dist/ui/transcript/presentation.d.ts +1 -17
- package/dist/ui/transcript/presentation.d.ts.map +1 -1
- package/dist/ui/transcript/presentation.js +0 -26
- package/dist/ui/transcript/presentation.js.map +1 -1
- package/dist/ui/transcript/spacing.d.ts +2 -2
- package/dist/ui/transcript/spacing.d.ts.map +1 -1
- package/dist/ui/transcript/spacing.js +14 -9
- package/dist/ui/transcript/spacing.js.map +1 -1
- package/dist/ui/transcript/spacing.test.js +5 -8
- package/dist/ui/transcript/spacing.test.js.map +1 -1
- package/dist/ui/transcript/tool-presentation.js +1 -1
- package/dist/ui/transcript/tool-presentation.js.map +1 -1
- package/dist/ui/transcript/transcript-lines.d.ts.map +1 -1
- package/dist/ui/transcript/transcript-lines.js +4 -0
- package/dist/ui/transcript/transcript-lines.js.map +1 -1
- package/dist/ui/tui-history-parity.test.js +0 -47
- package/dist/ui/tui-history-parity.test.js.map +1 -1
- package/dist/ui/tui-simulation.test.js +2 -1
- package/dist/ui/tui-simulation.test.js.map +1 -1
- package/package.json +4 -4
- package/dist/core/goal-controller.d.ts +0 -82
- package/dist/core/goal-controller.d.ts.map +0 -1
- package/dist/core/goal-controller.js +0 -838
- package/dist/core/goal-controller.js.map +0 -1
- package/dist/core/goal-controller.test.d.ts +0 -2
- package/dist/core/goal-controller.test.d.ts.map +0 -1
- package/dist/core/goal-controller.test.js +0 -1279
- package/dist/core/goal-controller.test.js.map +0 -1
- package/dist/core/goal-engine.d.ts +0 -61
- package/dist/core/goal-engine.d.ts.map +0 -1
- package/dist/core/goal-engine.js +0 -123
- package/dist/core/goal-engine.js.map +0 -1
- package/dist/core/goal-engine.test.d.ts +0 -2
- package/dist/core/goal-engine.test.d.ts.map +0 -1
- package/dist/core/goal-engine.test.js +0 -295
- package/dist/core/goal-engine.test.js.map +0 -1
- package/dist/core/goal-integration.d.ts +0 -80
- package/dist/core/goal-integration.d.ts.map +0 -1
- package/dist/core/goal-integration.js +0 -296
- package/dist/core/goal-integration.js.map +0 -1
- package/dist/core/goal-integration.test.d.ts +0 -2
- package/dist/core/goal-integration.test.d.ts.map +0 -1
- package/dist/core/goal-integration.test.js +0 -369
- package/dist/core/goal-integration.test.js.map +0 -1
- package/dist/core/goal-lifecycle-smoke.test.d.ts +0 -2
- package/dist/core/goal-lifecycle-smoke.test.d.ts.map +0 -1
- package/dist/core/goal-lifecycle-smoke.test.js +0 -248
- package/dist/core/goal-lifecycle-smoke.test.js.map +0 -1
- package/dist/core/goal-overhead-harness.d.ts +0 -33
- package/dist/core/goal-overhead-harness.d.ts.map +0 -1
- package/dist/core/goal-overhead-harness.js +0 -268
- package/dist/core/goal-overhead-harness.js.map +0 -1
- package/dist/core/goal-prerequisites.d.ts +0 -23
- package/dist/core/goal-prerequisites.d.ts.map +0 -1
- package/dist/core/goal-prerequisites.js +0 -114
- package/dist/core/goal-prerequisites.js.map +0 -1
- package/dist/core/goal-prerequisites.test.d.ts +0 -2
- package/dist/core/goal-prerequisites.test.d.ts.map +0 -1
- package/dist/core/goal-prerequisites.test.js +0 -154
- package/dist/core/goal-prerequisites.test.js.map +0 -1
- package/dist/core/goal-references.d.ts +0 -14
- package/dist/core/goal-references.d.ts.map +0 -1
- package/dist/core/goal-references.js +0 -153
- package/dist/core/goal-references.js.map +0 -1
- package/dist/core/goal-references.test.d.ts +0 -2
- package/dist/core/goal-references.test.d.ts.map +0 -1
- package/dist/core/goal-references.test.js +0 -77
- package/dist/core/goal-references.test.js.map +0 -1
- package/dist/core/goal-store.d.ts +0 -289
- package/dist/core/goal-store.d.ts.map +0 -1
- package/dist/core/goal-store.js +0 -1156
- package/dist/core/goal-store.js.map +0 -1
- package/dist/core/goal-store.test.d.ts +0 -2
- package/dist/core/goal-store.test.d.ts.map +0 -1
- package/dist/core/goal-store.test.js +0 -530
- package/dist/core/goal-store.test.js.map +0 -1
- package/dist/core/goal-verifier.d.ts +0 -17
- package/dist/core/goal-verifier.d.ts.map +0 -1
- package/dist/core/goal-verifier.js +0 -87
- package/dist/core/goal-verifier.js.map +0 -1
- package/dist/core/goal-verifier.test.d.ts +0 -2
- package/dist/core/goal-verifier.test.d.ts.map +0 -1
- package/dist/core/goal-verifier.test.js +0 -131
- package/dist/core/goal-verifier.test.js.map +0 -1
- package/dist/core/goal-worker-dev-server-lifecycle.test.d.ts +0 -2
- package/dist/core/goal-worker-dev-server-lifecycle.test.d.ts.map +0 -1
- package/dist/core/goal-worker-dev-server-lifecycle.test.js +0 -68
- package/dist/core/goal-worker-dev-server-lifecycle.test.js.map +0 -1
- package/dist/core/goal-worker.d.ts +0 -61
- package/dist/core/goal-worker.d.ts.map +0 -1
- package/dist/core/goal-worker.js +0 -467
- package/dist/core/goal-worker.js.map +0 -1
- package/dist/core/goal-worker.test.d.ts +0 -2
- package/dist/core/goal-worker.test.d.ts.map +0 -1
- package/dist/core/goal-worker.test.js +0 -493
- package/dist/core/goal-worker.test.js.map +0 -1
- package/dist/core/goal-worktree.d.ts +0 -108
- package/dist/core/goal-worktree.d.ts.map +0 -1
- package/dist/core/goal-worktree.js +0 -300
- package/dist/core/goal-worktree.js.map +0 -1
- package/dist/core/goal-worktree.test.d.ts +0 -2
- package/dist/core/goal-worktree.test.d.ts.map +0 -1
- package/dist/core/goal-worktree.test.js +0 -448
- package/dist/core/goal-worktree.test.js.map +0 -1
- package/dist/tools/goal-mode.test.d.ts +0 -2
- package/dist/tools/goal-mode.test.d.ts.map +0 -1
- package/dist/tools/goal-mode.test.js +0 -121
- package/dist/tools/goal-mode.test.js.map +0 -1
- package/dist/tools/goals.d.ts +0 -143
- package/dist/tools/goals.d.ts.map +0 -1
- package/dist/tools/goals.js +0 -1038
- package/dist/tools/goals.js.map +0 -1
- package/dist/tools/goals.test.d.ts +0 -2
- package/dist/tools/goals.test.d.ts.map +0 -1
- package/dist/tools/goals.test.js +0 -1444
- package/dist/tools/goals.test.js.map +0 -1
- package/dist/ui/components/GoalOverlay.d.ts +0 -83
- package/dist/ui/components/GoalOverlay.d.ts.map +0 -1
- package/dist/ui/components/GoalOverlay.js +0 -710
- package/dist/ui/components/GoalOverlay.js.map +0 -1
- package/dist/ui/components/GoalPickerMenu.d.ts +0 -9
- package/dist/ui/components/GoalPickerMenu.d.ts.map +0 -1
- package/dist/ui/components/GoalPickerMenu.js +0 -37
- package/dist/ui/components/GoalPickerMenu.js.map +0 -1
- package/dist/ui/components/GoalStatusBar.d.ts +0 -26
- package/dist/ui/components/GoalStatusBar.d.ts.map +0 -1
- package/dist/ui/components/GoalStatusBar.js +0 -130
- package/dist/ui/components/GoalStatusBar.js.map +0 -1
- package/dist/ui/components/GoalStatusBar.test.d.ts +0 -2
- package/dist/ui/components/GoalStatusBar.test.d.ts.map +0 -1
- package/dist/ui/components/GoalStatusBar.test.js +0 -17
- package/dist/ui/components/GoalStatusBar.test.js.map +0 -1
- package/dist/ui/goal-events.d.ts +0 -125
- package/dist/ui/goal-events.d.ts.map +0 -1
- package/dist/ui/goal-events.js +0 -407
- package/dist/ui/goal-events.js.map +0 -1
- package/dist/ui/goal-events.test.d.ts +0 -2
- package/dist/ui/goal-events.test.d.ts.map +0 -1
- package/dist/ui/goal-events.test.js +0 -416
- package/dist/ui/goal-events.test.js.map +0 -1
- package/dist/ui/goal-lifecycle-orchestration.test.d.ts +0 -2
- package/dist/ui/goal-lifecycle-orchestration.test.d.ts.map +0 -1
- package/dist/ui/goal-lifecycle-orchestration.test.js +0 -555
- package/dist/ui/goal-lifecycle-orchestration.test.js.map +0 -1
- package/dist/ui/goal-overlay.test.d.ts +0 -2
- package/dist/ui/goal-overlay.test.d.ts.map +0 -1
- package/dist/ui/goal-overlay.test.js +0 -384
- package/dist/ui/goal-overlay.test.js.map +0 -1
- package/dist/ui/goal-progress.d.ts +0 -31
- package/dist/ui/goal-progress.d.ts.map +0 -1
- package/dist/ui/goal-progress.js +0 -149
- package/dist/ui/goal-progress.js.map +0 -1
- package/dist/ui/goal-run-helpers.d.ts +0 -12
- package/dist/ui/goal-run-helpers.d.ts.map +0 -1
- package/dist/ui/goal-run-helpers.js +0 -42
- package/dist/ui/goal-run-helpers.js.map +0 -1
- package/dist/ui/goal-status-bar.test.d.ts +0 -2
- package/dist/ui/goal-status-bar.test.d.ts.map +0 -1
- package/dist/ui/goal-status-bar.test.js +0 -174
- package/dist/ui/goal-status-bar.test.js.map +0 -1
- package/dist/ui/goal-summary.d.ts +0 -14
- package/dist/ui/goal-summary.d.ts.map +0 -1
- package/dist/ui/goal-summary.js +0 -194
- package/dist/ui/goal-summary.js.map +0 -1
- package/dist/ui/hooks/useGoalOrchestration.d.ts +0 -82
- package/dist/ui/hooks/useGoalOrchestration.d.ts.map +0 -1
- package/dist/ui/hooks/useGoalOrchestration.js +0 -863
- package/dist/ui/hooks/useGoalOrchestration.js.map +0 -1
- package/dist/ui/hooks/useGoalPickerController.d.ts +0 -22
- package/dist/ui/hooks/useGoalPickerController.d.ts.map +0 -1
- package/dist/ui/hooks/useGoalPickerController.js +0 -35
- package/dist/ui/hooks/useGoalPickerController.js.map +0 -1
- package/dist/ui/prompt-routing.test.d.ts +0 -2
- package/dist/ui/prompt-routing.test.d.ts.map +0 -1
- package/dist/ui/prompt-routing.test.js +0 -48
- package/dist/ui/prompt-routing.test.js.map +0 -1
- package/dist/ui/transcript/GoalRows.d.ts +0 -10
- package/dist/ui/transcript/GoalRows.d.ts.map +0 -1
- package/dist/ui/transcript/GoalRows.js +0 -35
- package/dist/ui/transcript/GoalRows.js.map +0 -1
package/dist/ui/App.js
CHANGED
|
@@ -4,12 +4,10 @@ import { Box, useStdout } from "ink";
|
|
|
4
4
|
import { useTerminalSize } from "./hooks/useTerminalSize.js";
|
|
5
5
|
import { useChatLayoutMeasurements } from "./hooks/useChatLayoutMeasurements.js";
|
|
6
6
|
import { useTaskPickerController } from "./hooks/useTaskPickerController.js";
|
|
7
|
-
import { useGoalPickerController } from "./hooks/useGoalPickerController.js";
|
|
8
7
|
import { useModeState } from "./hooks/useModeState.js";
|
|
9
8
|
import { useSessionPersistence } from "./hooks/useSessionPersistence.js";
|
|
10
9
|
import { useContextCompaction } from "./hooks/useContextCompaction.js";
|
|
11
10
|
import { usePixelFixFlow } from "./hooks/usePixelFixFlow.js";
|
|
12
|
-
import { useGoalOrchestration } from "./hooks/useGoalOrchestration.js";
|
|
13
11
|
import { useDoublePress } from "./hooks/useDoublePress.js";
|
|
14
12
|
import { useTaskBarStore, useTaskBarPolling, focusTaskBar, exitTaskBar, expandTaskBar, collapseTaskBar, navigateTaskBar, killTask, } from "./stores/taskbar-store.js";
|
|
15
13
|
import { playNotificationSound } from "../utils/sound.js";
|
|
@@ -19,9 +17,9 @@ import { useAgentLoop } from "./hooks/useAgentLoop.js";
|
|
|
19
17
|
import { useTranscriptHistory } from "./hooks/useTranscriptHistory.js";
|
|
20
18
|
import { createWebSearchTool } from "../tools/web-search.js";
|
|
21
19
|
import { ChatScreen } from "./components/ChatScreen.js";
|
|
20
|
+
import { LIVE_TOOL_PANEL_ROWS } from "./components/LiveToolPanel.js";
|
|
22
21
|
import { FullScreenOverlayRouter } from "./components/FullScreenOverlayRouter.js";
|
|
23
22
|
import { SessionSummaryDisplay } from "./components/SessionSummary.js";
|
|
24
|
-
import { reconcileGoalStatusEntriesWithRuns, removeGoalStatusEntry, syncGoalStatusEntries, } from "./components/GoalStatusBar.js";
|
|
25
23
|
import { useTheme, useSetTheme } from "./theme/theme.js";
|
|
26
24
|
import { useTerminalTitle } from "./hooks/useTerminalTitle.js";
|
|
27
25
|
import { getGitBranch } from "../utils/git.js";
|
|
@@ -41,17 +39,13 @@ import { extractPlanSteps, findCompletedMarkers, markStepsCompleted, segmentDisp
|
|
|
41
39
|
import { getMCPServers } from "../core/mcp/index.js";
|
|
42
40
|
import { trimFlushedItems, flushOnTurnText, flushOnTurnEnd, flushOverflow, } from "./live-item-flush.js";
|
|
43
41
|
import { splitAssistantStreamingText } from "./utils/assistant-stream-split.js";
|
|
44
|
-
import { goalHasBlockingPrerequisites, loadGoalRuns, reconcileActiveGoalRuns, upsertGoalRun, } from "../core/goal-store.js";
|
|
45
42
|
import { getNextPendingTask, markTaskInProgress } from "../core/tasks-store.js";
|
|
46
|
-
import { listGoalWorkers, stopGoalWorker } from "../core/goal-worker.js";
|
|
47
|
-
import { isGoalSyntheticEvent, parseGoalSyntheticEvent } from "./goal-events.js";
|
|
48
43
|
import { buildUserContentWithAttachments } from "./prompt-routing.js";
|
|
49
44
|
import { submitPromptCommand } from "./submit-prompt-command.js";
|
|
50
45
|
import { handleUiSlashCommand } from "./submit-slash-commands.js";
|
|
51
46
|
import { buildIdealReviewMessage, evaluateIdealReview } from "../core/ideal-review.js";
|
|
52
47
|
import { getNextThinkingLevel, isThinkingLevelSupported } from "./thinking-level.js";
|
|
53
|
-
import {
|
|
54
|
-
import { getDoneFlushDecision, nextGoalModeAfterAgentDone, shouldTopSpaceAfterPrintedAgentBoundary, shouldTopSpaceStreamingAssistant, } from "./layout-decisions.js";
|
|
48
|
+
import { getDoneFlushDecision, shouldTopSpaceAfterPrintedAgentBoundary, shouldTopSpaceStreamingAssistant, } from "./layout-decisions.js";
|
|
55
49
|
import { isTranscriptSpacingItem } from "./transcript/spacing.js";
|
|
56
50
|
import { buildTranscriptLines } from "./transcript/transcript-lines.js";
|
|
57
51
|
import { useTranscriptScroll } from "./hooks/useTranscriptScroll.js";
|
|
@@ -62,13 +56,11 @@ import { pickDurationVerb } from "./duration-summary.js";
|
|
|
62
56
|
import { toErrorItem } from "./error-item.js";
|
|
63
57
|
import { addLinesChanged, buildSessionSummary, createSessionStats, recordServerToolCall, recordToolEnd, recordTurnEnd, } from "./session-summary.js";
|
|
64
58
|
import { compactHistory, getNextGeneratedItemId, isActiveItem, isSameAssistantText, normalizeAssistantText, partitionCompleted, pinStreamingTextBeforeToolBoundary, removeItemsWithIds, uniqueItemsById, } from "./item-helpers.js";
|
|
65
|
-
import { IDEAL_HOOK_NOTICE_TEXT } from "./app-items.js";
|
|
66
|
-
export {
|
|
59
|
+
import { IDEAL_HOOK_NOTICE_TEXT, lastVisibleTranscriptItem } from "./app-items.js";
|
|
60
|
+
export { buildUserContentWithAttachments, routePromptCommandInput } from "./prompt-routing.js";
|
|
67
61
|
export { getNextThinkingLevel } from "./thinking-level.js";
|
|
68
|
-
export {
|
|
69
|
-
export { getChatControlsLayoutDecision, getDoneFlushDecision, getGoalActivationPaneTransition, getGoalSetupFinishedPaneTransition, getGoalSetupPaneTransitionAfterRun, getScrollStabilizationDecision, getStaticHistoryKey, hasParagraphBreakLiveUserMessage, isTallLiveUserMessage, nextGoalModeAfterAgentDone, shouldHideHistoryForOverlayView, shouldHideStaticItemsForOverlayView, shouldResetUIForGoalSetupPaneTransition, shouldStabilizeOverlayPaneRerender, shouldTopSpaceAfterPrintedAgentBoundary, shouldTopSpaceAssistantAfterToolBoundary, shouldTopSpaceStreamingAssistant, } from "./layout-decisions.js";
|
|
62
|
+
export { getChatControlsLayoutDecision, getDoneFlushDecision, getScrollStabilizationDecision, getStaticHistoryKey, hasParagraphBreakLiveUserMessage, isTallLiveUserMessage, shouldHideHistoryForOverlayView, shouldHideStaticItemsForOverlayView, shouldStabilizeOverlayPaneRerender, shouldTopSpaceAfterPrintedAgentBoundary, shouldTopSpaceAssistantAfterToolBoundary, shouldTopSpaceStreamingAssistant, } from "./layout-decisions.js";
|
|
70
63
|
export { getNextGeneratedItemId, isActiveItem, partitionCompleted, pinStreamingTextBeforeToolBoundary, } from "./item-helpers.js";
|
|
71
|
-
export { buildGoalUserPauseRun, goalRunNeedsExplicitContinuationAfterWorker, shouldKeepGoalRunTrackedAfterDecision, shouldRunGoalTaskInMainCheckout, } from "./goal-run-helpers.js";
|
|
72
64
|
/** Tools that get aggregated into a single compact group when possible. */
|
|
73
65
|
const AGGREGATABLE_TOOLS = new Set([
|
|
74
66
|
"read",
|
|
@@ -133,29 +125,26 @@ export function App(props) {
|
|
|
133
125
|
return [{ kind: "banner", id: "banner" }];
|
|
134
126
|
});
|
|
135
127
|
// Items from the current/last turn — rendered in the live area so they stay visible.
|
|
136
|
-
// Seed from sessionStore so
|
|
137
|
-
//
|
|
128
|
+
// Seed from sessionStore so live output
|
|
129
|
+
// survives pane/overlay/resize remounts before it is finalized.
|
|
138
130
|
const [liveItems, setLiveItems] = useState(() => {
|
|
139
131
|
const restoredLiveItems = uniqueItemsById(props.sessionStore?.liveItems ?? []);
|
|
140
132
|
const restoredHistoryIds = new Set(history.map((item) => item.id));
|
|
141
133
|
return removeItemsWithIds(restoredLiveItems, restoredHistoryIds);
|
|
142
134
|
});
|
|
135
|
+
// Rolling feed of recent tool actions for the pinned LiveToolPanel. Kept
|
|
136
|
+
// separate from `liveItems` (the scrollback record) so tool calls mutate in
|
|
137
|
+
// place above the activity bar instead of spamming the transcript.
|
|
138
|
+
const [liveToolFeed, setLiveToolFeed] = useState([]);
|
|
143
139
|
// overlay seeded from sessionStore (lives across remount). Falls back to
|
|
144
140
|
// props.initialOverlay (CLI launched with one), then null.
|
|
145
141
|
const [overlay, setOverlay] = useState(props.sessionStore?.overlay ?? props.initialOverlay ?? null);
|
|
146
|
-
const [goalStatusEntries, setGoalStatusEntries] = useState(props.sessionStore?.goalStatusEntries ?? []);
|
|
147
142
|
const [updatePending, setUpdatePending] = useState(() => getPendingUpdate(props.version) !== null);
|
|
148
143
|
// Signal that pushes text into the InputArea composer (e.g. restoring queued
|
|
149
144
|
// messages after an interrupt). Bumping `nonce` triggers the injection even
|
|
150
145
|
// when the text is identical to a prior restore.
|
|
151
146
|
const [composerInject, setComposerInject] = useState(null);
|
|
152
147
|
const agentRunningRef = useRef(false);
|
|
153
|
-
const runningGoalIdsRef = useRef(new Set());
|
|
154
|
-
const activeVerifierRunIdsRef = useRef(new Set());
|
|
155
|
-
const queuedGoalSyntheticEventsRef = useRef(0);
|
|
156
|
-
const goalContinuationFlightsRef = useRef(new Set());
|
|
157
|
-
const goalContinuationRecentChoicesRef = useRef(new Map());
|
|
158
|
-
const startGoalRunRef = useRef(() => { });
|
|
159
148
|
const [runAllTasks, setRunAllTasks] = useState(props.sessionStore?.runAllTasks ?? false);
|
|
160
149
|
const runAllTasksRef = useRef(props.sessionStore?.runAllTasks ?? false);
|
|
161
150
|
const startTaskRef = useRef(() => { });
|
|
@@ -176,7 +165,6 @@ export function App(props) {
|
|
|
176
165
|
const [doneStatus, setDoneStatus] = useState(props.sessionStore?.doneStatus ?? null);
|
|
177
166
|
// Suppress "done" status when a plan overlay is about to open
|
|
178
167
|
const planOverlayPendingRef = useRef(false);
|
|
179
|
-
const goalSetupPanePendingRef = useRef(false);
|
|
180
168
|
const [gitBranch, setGitBranch] = useState(null);
|
|
181
169
|
const [currentModel, setCurrentModel] = useState(props.model);
|
|
182
170
|
const [currentProvider, setCurrentProvider] = useState(props.provider);
|
|
@@ -187,8 +175,6 @@ export function App(props) {
|
|
|
187
175
|
const [renderMarkdown, setRenderMarkdown] = useState(true);
|
|
188
176
|
const messagesRef = useRef(props.sessionStore?.messages ?? props.messages);
|
|
189
177
|
const [planAutoExpand, setPlanAutoExpand] = useState(props.sessionStore?.planAutoExpand ?? false);
|
|
190
|
-
const [goalAutoExpand, setGoalAutoExpand] = useState(props.sessionStore?.goalAutoExpand ?? false);
|
|
191
|
-
const goalAutoExpandRef = useRef(props.sessionStore?.goalAutoExpand ?? false);
|
|
192
178
|
const approvedPlanPathRef = useRef(props.sessionStore?.approvedPlanPath);
|
|
193
179
|
const planStepsRef = useRef(props.sessionStore?.planSteps ?? []);
|
|
194
180
|
const [planSteps, setPlanSteps] = useState(props.sessionStore?.planSteps ?? []);
|
|
@@ -199,7 +185,7 @@ export function App(props) {
|
|
|
199
185
|
const followUpNudgesRef = useRef({ step: 0, count: 0 });
|
|
200
186
|
// Seed the per-item ID counter so it doesn't collide with IDs already in
|
|
201
187
|
// sessionStore.history (which survives remount). Without this, a remount
|
|
202
|
-
// (resize, overlay toggle,
|
|
188
|
+
// (resize, overlay toggle, task pane open, etc.) starts the counter at 0
|
|
203
189
|
// and new items generate ids "ui-0", "ui-1", "ui-2"… that collide with
|
|
204
190
|
// the same ids from the previous mount, triggering React's duplicate-key
|
|
205
191
|
// warning and causing duplicate/omitted renders.
|
|
@@ -239,40 +225,15 @@ export function App(props) {
|
|
|
239
225
|
*/
|
|
240
226
|
const triggerAutoSetupRef = useRef(async () => { });
|
|
241
227
|
const getId = () => `ui-${nextIdRef.current++}`;
|
|
242
|
-
const appendGoalAgentTransition = useCallback((text) => {
|
|
243
|
-
setLiveItems((prev) => [...prev, { kind: "goal_agent_transition", text, id: getId() }]);
|
|
244
|
-
}, []);
|
|
245
|
-
const appendGoalProgress = useCallback((item) => {
|
|
246
|
-
setLiveItems((prev) => appendGoalProgressDraft(prev, item, getId));
|
|
247
|
-
}, []);
|
|
248
228
|
useEffect(() => {
|
|
249
229
|
idealReviewEnabledRef.current = idealReviewEnabled;
|
|
250
230
|
if (props.sessionStore)
|
|
251
231
|
props.sessionStore.idealReviewEnabled = idealReviewEnabled;
|
|
252
232
|
}, [idealReviewEnabled, props.sessionStore]);
|
|
253
|
-
const goalNumberForRun = useCallback((runId) => Math.max(1, goalStatusEntries.findIndex((entry) => entry.runId === runId) + 1), [goalStatusEntries]);
|
|
254
|
-
const clearGoalStatusEntry = useCallback((runId) => {
|
|
255
|
-
setGoalStatusEntries((prev) => {
|
|
256
|
-
const next = removeGoalStatusEntry(prev, runId);
|
|
257
|
-
if (props.sessionStore)
|
|
258
|
-
props.sessionStore.goalStatusEntries = next;
|
|
259
|
-
return next;
|
|
260
|
-
});
|
|
261
|
-
}, [props.sessionStore]);
|
|
262
|
-
const upsertGoalStatusEntry = useCallback((entry) => {
|
|
263
|
-
setGoalStatusEntries((prev) => {
|
|
264
|
-
const next = syncGoalStatusEntries(prev, entry);
|
|
265
|
-
if (props.sessionStore)
|
|
266
|
-
props.sessionStore.goalStatusEntries = next;
|
|
267
|
-
return next;
|
|
268
|
-
});
|
|
269
|
-
}, [props.sessionStore]);
|
|
270
233
|
const sessionStore = props.sessionStore;
|
|
271
|
-
const {
|
|
272
|
-
initialGoalMode: props.sessionStore?.goalMode ?? props.goalModeRef?.current ?? "off",
|
|
234
|
+
const { planMode, rebuildSystemPrompt, replaceSystemPrompt, setPlanModeAndPrompt } = useModeState({
|
|
273
235
|
initialPlanMode: props.sessionStore?.planMode ?? props.planModeRef?.current ?? false,
|
|
274
236
|
skills: props.skills,
|
|
275
|
-
goalModeRef: props.goalModeRef,
|
|
276
237
|
planModeRef: props.planModeRef,
|
|
277
238
|
sessionStore: props.sessionStore,
|
|
278
239
|
cwdRef,
|
|
@@ -281,9 +242,6 @@ export function App(props) {
|
|
|
281
242
|
approvedPlanPathRef,
|
|
282
243
|
injectedLanguagesRef,
|
|
283
244
|
messagesRef,
|
|
284
|
-
runningGoalIdsRef,
|
|
285
|
-
activeVerifierRunIdsRef,
|
|
286
|
-
queuedGoalSyntheticEventsRef,
|
|
287
245
|
});
|
|
288
246
|
const { pendingHistoryFlushRef, streamedAssistantFlushRef, queueFlush, finalizeSubmittedUserItem, clearPendingHistory, } = useTranscriptHistory({
|
|
289
247
|
// In fullscreen alt-screen mode the transcript renders inside Ink (the
|
|
@@ -359,19 +317,6 @@ export function App(props) {
|
|
|
359
317
|
if (sessionStore)
|
|
360
318
|
sessionStore.overlay = overlay;
|
|
361
319
|
}, [overlay, sessionStore]);
|
|
362
|
-
useEffect(() => {
|
|
363
|
-
goalAutoExpandRef.current = goalAutoExpand;
|
|
364
|
-
if (sessionStore)
|
|
365
|
-
sessionStore.goalAutoExpand = goalAutoExpand;
|
|
366
|
-
}, [goalAutoExpand, sessionStore]);
|
|
367
|
-
useEffect(() => {
|
|
368
|
-
if (sessionStore)
|
|
369
|
-
sessionStore.goalStatusEntries = goalStatusEntries;
|
|
370
|
-
}, [goalStatusEntries, sessionStore]);
|
|
371
|
-
useEffect(() => {
|
|
372
|
-
if (sessionStore)
|
|
373
|
-
sessionStore.goalMode = goalMode;
|
|
374
|
-
}, [goalMode, sessionStore]);
|
|
375
320
|
useEffect(() => {
|
|
376
321
|
if (sessionStore)
|
|
377
322
|
sessionStore.planMode = planMode;
|
|
@@ -395,35 +340,6 @@ export function App(props) {
|
|
|
395
340
|
useEffect(() => {
|
|
396
341
|
getGitBranch(displayedCwd).then(setGitBranch);
|
|
397
342
|
}, [displayedCwd]);
|
|
398
|
-
useEffect(() => {
|
|
399
|
-
let cancelled = false;
|
|
400
|
-
const refreshGoalCount = () => {
|
|
401
|
-
void reconcileActiveGoalRuns(props.cwd, {
|
|
402
|
-
isWorkerActive: (workerId) => listGoalWorkers(props.cwd).some((worker) => worker.id === workerId && worker.status === "running"),
|
|
403
|
-
}).then(({ runs }) => {
|
|
404
|
-
if (cancelled)
|
|
405
|
-
return;
|
|
406
|
-
setHistory((prev) => completedItemsWithDurableGoalTerminalProgress(prev, runs));
|
|
407
|
-
setGoalStatusEntries((prev) => {
|
|
408
|
-
const next = reconcileGoalStatusEntriesWithRuns(prev, runs, {
|
|
409
|
-
isWorkerActive: (workerId, run) => listGoalWorkers(props.cwd).some((worker) => worker.id === workerId &&
|
|
410
|
-
worker.goalRunId === run.id &&
|
|
411
|
-
worker.status === "running"),
|
|
412
|
-
isVerifierActive: (run) => activeVerifierRunIdsRef.current.has(run.id),
|
|
413
|
-
});
|
|
414
|
-
if (props.sessionStore)
|
|
415
|
-
props.sessionStore.goalStatusEntries = next;
|
|
416
|
-
return next;
|
|
417
|
-
});
|
|
418
|
-
});
|
|
419
|
-
};
|
|
420
|
-
refreshGoalCount();
|
|
421
|
-
const interval = setInterval(refreshGoalCount, 1000);
|
|
422
|
-
return () => {
|
|
423
|
-
cancelled = true;
|
|
424
|
-
clearInterval(interval);
|
|
425
|
-
};
|
|
426
|
-
}, [props.cwd]);
|
|
427
343
|
// Periodic update check during long sessions
|
|
428
344
|
useEffect(() => {
|
|
429
345
|
startPeriodicUpdateCheck(props.version, (msg) => {
|
|
@@ -443,10 +359,6 @@ export function App(props) {
|
|
|
443
359
|
useEffect(() => {
|
|
444
360
|
currentToolsRef.current = currentTools;
|
|
445
361
|
}, [currentTools]);
|
|
446
|
-
const setActiveGoalReferences = useCallback((references) => {
|
|
447
|
-
if (props.goalReferencesRef)
|
|
448
|
-
props.goalReferencesRef.current = references;
|
|
449
|
-
}, [props.goalReferencesRef]);
|
|
450
362
|
useEffect(() => {
|
|
451
363
|
if (!props.connectInitialMcpTools)
|
|
452
364
|
return;
|
|
@@ -735,9 +647,6 @@ export function App(props) {
|
|
|
735
647
|
resolveCredentials,
|
|
736
648
|
]),
|
|
737
649
|
onTurnText: useCallback((text, thinking, thinkingMs) => {
|
|
738
|
-
if (goalModeStateRef.current === "planner") {
|
|
739
|
-
return;
|
|
740
|
-
}
|
|
741
650
|
const hadStreamedAssistantFlush = streamedAssistantFlushRef.current.flushedChars > 0;
|
|
742
651
|
const unflushedAssistantText = text.slice(streamedAssistantFlushRef.current.flushedChars);
|
|
743
652
|
// Track [DONE:n] markers for plan step progress
|
|
@@ -822,6 +731,9 @@ export function App(props) {
|
|
|
822
731
|
log("INFO", "tool", `Tool call started: ${name}`, { id: toolCallId });
|
|
823
732
|
const startedAt = Date.now();
|
|
824
733
|
const animateUntil = startedAt + RUNNING_INDICATOR_ANIMATION_MS;
|
|
734
|
+
// Feed the pinned LiveToolPanel. Keep a small tail (panel shows the
|
|
735
|
+
// last few rows) so memory stays bounded across long sessions.
|
|
736
|
+
setLiveToolFeed((prev) => [...prev, { id: toolCallId, name, args, status: "running" }].slice(-(LIVE_TOOL_PANEL_ROWS * 2)));
|
|
825
737
|
const appendToolStart = (prev) => {
|
|
826
738
|
const visible = pinStreamingTextBeforeToolBoundary({
|
|
827
739
|
items: prev,
|
|
@@ -945,6 +857,9 @@ export function App(props) {
|
|
|
945
857
|
}, []),
|
|
946
858
|
onToolEnd: useCallback((toolCallId, name, result, isError, durationMs, details) => {
|
|
947
859
|
recordToolEnd(sessionStatsRef.current, name, isError, durationMs);
|
|
860
|
+
setLiveToolFeed((prev) => prev.map((entry) => entry.id === toolCallId
|
|
861
|
+
? { ...entry, status: "done", isError, result, details }
|
|
862
|
+
: entry));
|
|
948
863
|
if (name === "edit" && !isError) {
|
|
949
864
|
const diff = details?.diff ?? result;
|
|
950
865
|
addLinesChanged(sessionStatsRef.current, {
|
|
@@ -1180,10 +1095,8 @@ export function App(props) {
|
|
|
1180
1095
|
});
|
|
1181
1096
|
const doneDecision = getDoneFlushDecision({
|
|
1182
1097
|
planOverlayPending: planOverlayPendingRef.current,
|
|
1183
|
-
goalMode: goalModeStateRef.current,
|
|
1184
|
-
goalAutoExpand: goalAutoExpandRef.current,
|
|
1185
1098
|
});
|
|
1186
|
-
// Don't show "done" status when plan
|
|
1099
|
+
// Don't show "done" status when the plan review pane is about to open —
|
|
1187
1100
|
// the agent loop finished but we're waiting for user approval/review.
|
|
1188
1101
|
// Still flush live transcript rows before the pane remounts; otherwise
|
|
1189
1102
|
// setup output remains in ephemeral liveItems and appears to vanish.
|
|
@@ -1196,7 +1109,7 @@ export function App(props) {
|
|
|
1196
1109
|
// history at this moment writes many scrollback rows while the footer is
|
|
1197
1110
|
// still mounted, which visibly pushes the input/footer upward. The final
|
|
1198
1111
|
// response is flushed on the next submit before the new prompt is shown.
|
|
1199
|
-
// Non-chat overlay transitions still flush so setup/plan
|
|
1112
|
+
// Non-chat overlay transitions still flush so setup/plan output
|
|
1200
1113
|
// does not vanish during remounts.
|
|
1201
1114
|
if (doneDecision.flushLiveItems && !doneDecision.showDoneStatus) {
|
|
1202
1115
|
setLiveItems((prev) => {
|
|
@@ -1205,15 +1118,6 @@ export function App(props) {
|
|
|
1205
1118
|
return prev;
|
|
1206
1119
|
});
|
|
1207
1120
|
}
|
|
1208
|
-
const nextGoalMode = nextGoalModeAfterAgentDone({
|
|
1209
|
-
currentMode: goalModeStateRef.current,
|
|
1210
|
-
runningGoalIds: runningGoalIdsRef.current.size,
|
|
1211
|
-
queuedSyntheticEvents: queuedGoalSyntheticEventsRef.current,
|
|
1212
|
-
activeContinuationFlights: goalContinuationFlightsRef.current.size,
|
|
1213
|
-
});
|
|
1214
|
-
if (nextGoalMode !== goalModeStateRef.current) {
|
|
1215
|
-
void setGoalModeAndPrompt(nextGoalMode);
|
|
1216
|
-
}
|
|
1217
1121
|
// Run-all: auto-start next pending task after a short delay.
|
|
1218
1122
|
if (runAllTasksRef.current) {
|
|
1219
1123
|
setTimeout(() => {
|
|
@@ -1229,11 +1133,6 @@ export function App(props) {
|
|
|
1229
1133
|
}
|
|
1230
1134
|
}, 500);
|
|
1231
1135
|
}
|
|
1232
|
-
// Goal loop: after the orchestrator handles a worker/verifier event,
|
|
1233
|
-
// continue the same Goal automatically until it reaches a terminal state.
|
|
1234
|
-
for (const runId of [...runningGoalIdsRef.current]) {
|
|
1235
|
-
setTimeout(() => continueGoalRun(runId), 500);
|
|
1236
|
-
}
|
|
1237
1136
|
// Pixel fix: observe branch + commits, patch status, optionally pick
|
|
1238
1137
|
// up the next open error if run-all is active.
|
|
1239
1138
|
const pendingFix = currentPixelFixRef.current;
|
|
@@ -1269,16 +1168,11 @@ export function App(props) {
|
|
|
1269
1168
|
}
|
|
1270
1169
|
})();
|
|
1271
1170
|
}
|
|
1272
|
-
}, [
|
|
1171
|
+
}, []),
|
|
1273
1172
|
onAborted: useCallback(() => {
|
|
1274
1173
|
log("WARN", "agent", "Agent run aborted by user");
|
|
1275
1174
|
setRunAllPixel(false);
|
|
1276
1175
|
currentPixelFixRef.current = null;
|
|
1277
|
-
queuedGoalSyntheticEventsRef.current = 0;
|
|
1278
|
-
goalSetupPanePendingRef.current = false;
|
|
1279
|
-
setActiveGoalReferences(undefined);
|
|
1280
|
-
if (goalModeStateRef.current !== "off")
|
|
1281
|
-
void setGoalModeAndPrompt("off");
|
|
1282
1176
|
setDoneStatus(null);
|
|
1283
1177
|
setLiveItems((prev) => {
|
|
1284
1178
|
const next = prev.map((item) => {
|
|
@@ -1321,42 +1215,16 @@ export function App(props) {
|
|
|
1321
1215
|
});
|
|
1322
1216
|
return [...next, { kind: "stopped", text: "Request was stopped.", id: getId() }];
|
|
1323
1217
|
});
|
|
1324
|
-
}, [
|
|
1218
|
+
}, []),
|
|
1325
1219
|
onQueuedStart: useCallback((content) => {
|
|
1326
1220
|
// When a queued message starts processing, show it as a UserItem
|
|
1327
|
-
// and flush prior items to history.
|
|
1328
|
-
// from the transcript but still routed through the main agent context.
|
|
1221
|
+
// and flush prior items to history.
|
|
1329
1222
|
const displayText = typeof content === "string"
|
|
1330
1223
|
? content
|
|
1331
1224
|
: content
|
|
1332
1225
|
.filter((c) => c.type === "text")
|
|
1333
1226
|
.map((c) => c.text)
|
|
1334
1227
|
.join("\n");
|
|
1335
|
-
if (isGoalSyntheticEvent(displayText)) {
|
|
1336
|
-
queuedGoalSyntheticEventsRef.current = Math.max(0, queuedGoalSyntheticEventsRef.current - 1);
|
|
1337
|
-
void setGoalModeAndPrompt("coordinator");
|
|
1338
|
-
const eventInfo = parseGoalSyntheticEvent(displayText);
|
|
1339
|
-
// Write-then-clear: keep the rows mounted and let the flush drain
|
|
1340
|
-
// print them to scrollback before removing them, so they don't blink
|
|
1341
|
-
// out of the live area a frame before reappearing in scrollback.
|
|
1342
|
-
setLiveItems((prev) => {
|
|
1343
|
-
if (prev.length > 0)
|
|
1344
|
-
queueFlush(prev);
|
|
1345
|
-
return prev;
|
|
1346
|
-
});
|
|
1347
|
-
setDoneStatus(null);
|
|
1348
|
-
appendGoalProgress({
|
|
1349
|
-
kind: "goal_progress",
|
|
1350
|
-
phase: "orchestrator_reviewing",
|
|
1351
|
-
title: "Orchestrator reviewing Goal update",
|
|
1352
|
-
detail: eventInfo?.kind === "worker"
|
|
1353
|
-
? `Worker ${eventInfo.worker ?? "finished"} reported back${eventInfo.task ? ` on ${eventInfo.task}` : ""}. Inspecting Goal state.`
|
|
1354
|
-
: `Verifier reported ${eventInfo?.status ?? "status"}. Inspecting evidence and next action.`,
|
|
1355
|
-
workerId: eventInfo?.worker,
|
|
1356
|
-
status: eventInfo?.status,
|
|
1357
|
-
});
|
|
1358
|
-
return;
|
|
1359
|
-
}
|
|
1360
1228
|
const imageCount = typeof content === "string"
|
|
1361
1229
|
? undefined
|
|
1362
1230
|
: content.filter((c) => c.type === "image").length || undefined;
|
|
@@ -1369,7 +1237,7 @@ export function App(props) {
|
|
|
1369
1237
|
setLastUserMessage(displayText);
|
|
1370
1238
|
setDoneStatus(null);
|
|
1371
1239
|
finalizeSubmittedUserItem(userItem);
|
|
1372
|
-
}, [
|
|
1240
|
+
}, [finalizeSubmittedUserItem]),
|
|
1373
1241
|
// Inject a "continue with the next step" follow-up when the agent
|
|
1374
1242
|
// would otherwise stop mid-plan. The prompt-only instruction wasn't
|
|
1375
1243
|
// enough — some models (notably Opus) treat each [DONE:n] as a
|
|
@@ -1486,27 +1354,19 @@ export function App(props) {
|
|
|
1486
1354
|
}, [currentModel, currentProvider, displayedCwd, writeStdout]);
|
|
1487
1355
|
// Consume pending post-remount work once on mount. Set by resetUI options
|
|
1488
1356
|
// for paths that remount AND immediately drive work (plan accept/reject,
|
|
1489
|
-
// pixel fix,
|
|
1357
|
+
// pixel fix, plan accept/reject). The work survives the unmount because
|
|
1490
1358
|
// it lives in renderApp's closure (sessionStore), not React state.
|
|
1491
1359
|
useEffect(() => {
|
|
1492
1360
|
if (pendingActionConsumedRef.current)
|
|
1493
1361
|
return;
|
|
1494
1362
|
const action = sessionStore?.pendingAction;
|
|
1495
|
-
|
|
1496
|
-
if (!action && !pendingGoalRun)
|
|
1363
|
+
if (!action)
|
|
1497
1364
|
return;
|
|
1498
1365
|
pendingActionConsumedRef.current = true;
|
|
1499
1366
|
if (sessionStore) {
|
|
1500
1367
|
sessionStore.pendingAction = undefined;
|
|
1501
|
-
sessionStore.pendingGoalRun = undefined;
|
|
1502
1368
|
}
|
|
1503
1369
|
setDoneStatus(null);
|
|
1504
|
-
if (pendingGoalRun) {
|
|
1505
|
-
startGoalRunRef.current(pendingGoalRun);
|
|
1506
|
-
return;
|
|
1507
|
-
}
|
|
1508
|
-
if (!action)
|
|
1509
|
-
return;
|
|
1510
1370
|
if (action.planEvent) {
|
|
1511
1371
|
const ev = action.planEvent;
|
|
1512
1372
|
setLiveItems((prev) => [
|
|
@@ -1649,36 +1509,20 @@ export function App(props) {
|
|
|
1649
1509
|
void replaceSystemPrompt({ clearApprovedPlan: true });
|
|
1650
1510
|
setLiveItems([{ kind: "plan_event", event: "dismissed", id: getId() }]);
|
|
1651
1511
|
},
|
|
1652
|
-
openGoalsPicker: () => {
|
|
1653
|
-
taskPicker.close();
|
|
1654
|
-
goalPicker.openPicker();
|
|
1655
|
-
},
|
|
1656
1512
|
})) {
|
|
1657
1513
|
return;
|
|
1658
1514
|
}
|
|
1659
1515
|
if (await submitPromptCommand({
|
|
1660
1516
|
trimmed,
|
|
1661
1517
|
inputImages,
|
|
1662
|
-
cwd: props.cwd,
|
|
1663
1518
|
currentModel,
|
|
1664
1519
|
customCommands,
|
|
1665
|
-
messagesRef,
|
|
1666
|
-
goalSetupPanePendingRef,
|
|
1667
|
-
goalModeStateRef,
|
|
1668
|
-
goalAutoExpandRef,
|
|
1669
|
-
setActiveGoalReferences,
|
|
1670
1520
|
setLastUserMessage,
|
|
1671
1521
|
setDoneStatus,
|
|
1672
1522
|
finalizeSubmittedUserItem,
|
|
1673
|
-
setGoalModeAndPrompt,
|
|
1674
1523
|
runAgent: (content) => agentLoop.run(content),
|
|
1675
|
-
appendGoalAgentTransition,
|
|
1676
1524
|
setLiveItems,
|
|
1677
1525
|
getId,
|
|
1678
|
-
setGoalAutoExpand,
|
|
1679
|
-
setPlanAutoExpand,
|
|
1680
|
-
closeTaskPicker: taskPicker.close,
|
|
1681
|
-
openGoalPicker: goalPicker.openPicker,
|
|
1682
1526
|
reloadCustomCommands,
|
|
1683
1527
|
})) {
|
|
1684
1528
|
return;
|
|
@@ -1776,7 +1620,6 @@ export function App(props) {
|
|
|
1776
1620
|
}
|
|
1777
1621
|
}, [
|
|
1778
1622
|
agentLoop,
|
|
1779
|
-
appendGoalAgentTransition,
|
|
1780
1623
|
compactConversation,
|
|
1781
1624
|
currentModel,
|
|
1782
1625
|
finalizeSubmittedUserItem,
|
|
@@ -1789,8 +1632,6 @@ export function App(props) {
|
|
|
1789
1632
|
showSessionSummaryAndExit,
|
|
1790
1633
|
reloadCustomCommands,
|
|
1791
1634
|
replaceSystemPrompt,
|
|
1792
|
-
setActiveGoalReferences,
|
|
1793
|
-
setGoalModeAndPrompt,
|
|
1794
1635
|
]);
|
|
1795
1636
|
const handleDoubleExit = useDoublePress(setExitPending, showSessionSummaryAndExit);
|
|
1796
1637
|
const handleAbort = useCallback(() => {
|
|
@@ -1947,7 +1788,6 @@ export function App(props) {
|
|
|
1947
1788
|
};
|
|
1948
1789
|
const promptOrder = [
|
|
1949
1790
|
// Project audits / one-shot analysis
|
|
1950
|
-
"goal",
|
|
1951
1791
|
"init",
|
|
1952
1792
|
"expand",
|
|
1953
1793
|
"bullet-proof",
|
|
@@ -2006,8 +1846,8 @@ export function App(props) {
|
|
|
2006
1846
|
item,
|
|
2007
1847
|
index,
|
|
2008
1848
|
items,
|
|
2009
|
-
pendingHistoryFlushLastItem: index === 0 ? pendingHistoryFlushRef.current
|
|
2010
|
-
historyLastItem: index === 0 ? history
|
|
1849
|
+
pendingHistoryFlushLastItem: index === 0 ? lastVisibleTranscriptItem(pendingHistoryFlushRef.current) : undefined,
|
|
1850
|
+
historyLastItem: index === 0 ? lastVisibleTranscriptItem(history) : undefined,
|
|
2011
1851
|
version: props.version,
|
|
2012
1852
|
currentModel,
|
|
2013
1853
|
currentProvider,
|
|
@@ -2022,8 +1862,6 @@ export function App(props) {
|
|
|
2022
1862
|
props.sessionStore.overlay = kind;
|
|
2023
1863
|
if (kind !== "plan")
|
|
2024
1864
|
props.sessionStore.planAutoExpand = false;
|
|
2025
|
-
if (kind !== "goal")
|
|
2026
|
-
props.sessionStore.goalAutoExpand = false;
|
|
2027
1865
|
props.resetUI();
|
|
2028
1866
|
}
|
|
2029
1867
|
else {
|
|
@@ -2031,53 +1869,15 @@ export function App(props) {
|
|
|
2031
1869
|
props.sessionStore.overlay = kind;
|
|
2032
1870
|
if (kind !== "plan")
|
|
2033
1871
|
props.sessionStore.planAutoExpand = false;
|
|
2034
|
-
if (kind !== "
|
|
2035
|
-
props.sessionStore.goalAutoExpand = false;
|
|
2036
|
-
if (agentLoop.isRunning && kind !== "goal" && kind !== "plan") {
|
|
1872
|
+
if (agentLoop.isRunning && kind !== "plan") {
|
|
2037
1873
|
props.sessionStore.pendingResetUI = true;
|
|
2038
1874
|
}
|
|
2039
1875
|
}
|
|
2040
1876
|
if (kind !== "plan")
|
|
2041
1877
|
setPlanAutoExpand(false);
|
|
2042
|
-
if (kind !== "goal")
|
|
2043
|
-
setGoalAutoExpand(false);
|
|
2044
1878
|
setOverlay(kind);
|
|
2045
1879
|
}
|
|
2046
1880
|
}, [agentLoop.isRunning, props]);
|
|
2047
|
-
const { continueGoalRun, startGoalRun, pauseGoalRun } = useGoalOrchestration({
|
|
2048
|
-
cwd: props.cwd,
|
|
2049
|
-
resetUI: props.resetUI,
|
|
2050
|
-
sessionStore: props.sessionStore,
|
|
2051
|
-
currentProvider,
|
|
2052
|
-
currentModel,
|
|
2053
|
-
thinkingLevel,
|
|
2054
|
-
agentLoop,
|
|
2055
|
-
appendGoalProgress,
|
|
2056
|
-
goalNumberForRun,
|
|
2057
|
-
clearGoalStatusEntry,
|
|
2058
|
-
upsertGoalStatusEntry,
|
|
2059
|
-
setGoalModeAndPrompt,
|
|
2060
|
-
clearGoalModeIfIdle,
|
|
2061
|
-
agentRunningRef,
|
|
2062
|
-
runningGoalIdsRef,
|
|
2063
|
-
activeVerifierRunIdsRef,
|
|
2064
|
-
queuedGoalSyntheticEventsRef,
|
|
2065
|
-
goalContinuationFlightsRef,
|
|
2066
|
-
goalContinuationRecentChoicesRef,
|
|
2067
|
-
startGoalRunRef,
|
|
2068
|
-
startTaskRef,
|
|
2069
|
-
messagesRef,
|
|
2070
|
-
persistedIndexRef,
|
|
2071
|
-
sessionManagerRef,
|
|
2072
|
-
sessionPathRef,
|
|
2073
|
-
cwdRef,
|
|
2074
|
-
setLiveItems,
|
|
2075
|
-
setHistory,
|
|
2076
|
-
setLastUserMessage,
|
|
2077
|
-
setDoneStatus,
|
|
2078
|
-
getId,
|
|
2079
|
-
clearPendingHistory,
|
|
2080
|
-
});
|
|
2081
1881
|
useEffect(() => {
|
|
2082
1882
|
runAllTasksRef.current = runAllTasks;
|
|
2083
1883
|
if (props.sessionStore)
|
|
@@ -2115,6 +1915,15 @@ export function App(props) {
|
|
|
2115
1915
|
getId,
|
|
2116
1916
|
initialRunAllPixel: props.sessionStore?.runAllPixel ?? false,
|
|
2117
1917
|
});
|
|
1918
|
+
// Reset the live tool feed at the start of each run so the pinned panel only
|
|
1919
|
+
// ever reflects the current turn's activity, not the previous one's.
|
|
1920
|
+
const wasRunningRef = useRef(false);
|
|
1921
|
+
useEffect(() => {
|
|
1922
|
+
if (agentLoop.isRunning && !wasRunningRef.current) {
|
|
1923
|
+
setLiveToolFeed([]);
|
|
1924
|
+
}
|
|
1925
|
+
wasRunningRef.current = agentLoop.isRunning;
|
|
1926
|
+
}, [agentLoop.isRunning]);
|
|
2118
1927
|
const isSkillsView = overlay === "skills";
|
|
2119
1928
|
const isPlanView = overlay === "plan";
|
|
2120
1929
|
const { footerStatusLayout, activityVisible, stallStatusVisible, statusSlotVisible, mainControlsRef, measuredLiveAreaRows, viewportRows, } = useChatLayoutMeasurements({
|
|
@@ -2132,14 +1941,26 @@ export function App(props) {
|
|
|
2132
1941
|
displayedCwd,
|
|
2133
1942
|
gitBranch,
|
|
2134
1943
|
thinkingLevel,
|
|
2135
|
-
goalMode,
|
|
2136
1944
|
exitPending,
|
|
2137
1945
|
taskBarExpanded,
|
|
2138
|
-
|
|
1946
|
+
liveToolFeedCount: liveToolFeed.length,
|
|
2139
1947
|
});
|
|
2140
1948
|
const isPixelView = overlay === "pixel";
|
|
2141
1949
|
const hasLiveAssistantItem = liveItems.some((item) => item.kind === "assistant");
|
|
2142
|
-
const rawVisibleStreamingText =
|
|
1950
|
+
const rawVisibleStreamingText = hasLiveAssistantItem ? "" : agentLoop.streamingText;
|
|
1951
|
+
// Compute the prospective paragraph flush DURING render so the live frame
|
|
1952
|
+
// immediately drops the prefix that is about to be written to scrollback.
|
|
1953
|
+
// The queueFlush below runs in an effect (after paint), so if the live text
|
|
1954
|
+
// were sliced only by the already-committed `flushedChars`, the just-flushed
|
|
1955
|
+
// paragraph would render BOTH in scrollback and live for one frame — that
|
|
1956
|
+
// transient extra height is what shoves the footer up and then back down on
|
|
1957
|
+
// every chunk boundary. Slicing by the prospective flush here keeps the live
|
|
1958
|
+
// frame height monotonic, so the footer never bounces.
|
|
1959
|
+
const alreadyFlushedChars = streamedAssistantFlushRef.current.flushedChars;
|
|
1960
|
+
const pendingFlushChars = rawVisibleStreamingText
|
|
1961
|
+
? splitAssistantStreamingText(rawVisibleStreamingText.slice(alreadyFlushedChars)).flushedText
|
|
1962
|
+
.length
|
|
1963
|
+
: 0;
|
|
2143
1964
|
useEffect(() => {
|
|
2144
1965
|
if (!rawVisibleStreamingText) {
|
|
2145
1966
|
streamedAssistantFlushRef.current = { flushedChars: 0, text: "" };
|
|
@@ -2170,10 +1991,20 @@ export function App(props) {
|
|
|
2170
1991
|
text: rawVisibleStreamingText,
|
|
2171
1992
|
};
|
|
2172
1993
|
}, [rawVisibleStreamingText, queueFlush]);
|
|
2173
|
-
const visibleStreamingText = stripDoneMarkers(rawVisibleStreamingText.slice(
|
|
1994
|
+
const visibleStreamingText = stripDoneMarkers(rawVisibleStreamingText.slice(alreadyFlushedChars + pendingFlushChars));
|
|
2174
1995
|
const lastLiveItem = liveItems.at(-1);
|
|
1996
|
+
// For spacing decisions, the previous row is the last item that actually
|
|
1997
|
+
// RENDERS. Panel-replaced tool items (now shown only in the LiveToolPanel)
|
|
1998
|
+
// render null, so counting them as the boundary inserts a blank separator
|
|
1999
|
+
// above the streamed response with nothing visible above it.
|
|
2000
|
+
const lastVisibleLiveItem = lastVisibleTranscriptItem(liveItems);
|
|
2175
2001
|
const lastPendingHistoryItem = pendingHistoryFlushRef.current.at(-1);
|
|
2176
2002
|
const lastHistoryItem = history.at(-1);
|
|
2003
|
+
// Spacing variants: flushed tool rows render null (LiveToolPanel owns them), so
|
|
2004
|
+
// the streamed/first-live boundary must look past them to the last row that
|
|
2005
|
+
// actually printed — otherwise a tool→assistant separator leaves a phantom gap.
|
|
2006
|
+
const lastVisiblePendingHistoryItem = lastVisibleTranscriptItem(pendingHistoryFlushRef.current);
|
|
2007
|
+
const lastVisibleHistoryItem = lastVisibleTranscriptItem(history);
|
|
2177
2008
|
const previousTranscriptItem = lastPendingHistoryItem ?? lastHistoryItem;
|
|
2178
2009
|
const isAwaitingAssistantAfterUser = agentLoop.isRunning &&
|
|
2179
2010
|
!hasLiveAssistantItem &&
|
|
@@ -2186,14 +2017,14 @@ export function App(props) {
|
|
|
2186
2017
|
isAwaitingAssistantAfterUser);
|
|
2187
2018
|
const shouldTopSpaceStreamingText = shouldTopSpaceStreamingAssistant({
|
|
2188
2019
|
visibleStreamingText,
|
|
2189
|
-
lastLiveItem,
|
|
2190
|
-
lastPendingHistoryItem,
|
|
2191
|
-
lastHistoryItem,
|
|
2020
|
+
lastLiveItem: lastVisibleLiveItem,
|
|
2021
|
+
lastPendingHistoryItem: lastVisiblePendingHistoryItem,
|
|
2022
|
+
lastHistoryItem: lastVisibleHistoryItem,
|
|
2192
2023
|
});
|
|
2193
2024
|
// When earlier paragraphs of THIS response were already flushed to scrollback
|
|
2194
2025
|
// mid-stream, the live remainder is the next paragraph — re-insert the blank
|
|
2195
2026
|
// line that separated them so the live tail lines up with the flushed history.
|
|
2196
|
-
const streamingContinuesFlushed =
|
|
2027
|
+
const streamingContinuesFlushed = alreadyFlushedChars + pendingFlushChars > 0;
|
|
2197
2028
|
// ── Fullscreen alt-screen transcript ───────────────────
|
|
2198
2029
|
// Flatten history + live items + in-flight streaming into the flat ANSI line
|
|
2199
2030
|
// buffer the viewport renders. Reuses the same serializer the legacy
|
|
@@ -2466,70 +2297,9 @@ export function App(props) {
|
|
|
2466
2297
|
setLiveItems((prev) => [...prev, toErrorItem(err, getId())]);
|
|
2467
2298
|
});
|
|
2468
2299
|
};
|
|
2469
|
-
const handleRunGoalFromPicker = (run) => {
|
|
2470
|
-
setDoneStatus(null);
|
|
2471
|
-
appendGoalProgress({
|
|
2472
|
-
kind: "goal_progress",
|
|
2473
|
-
phase: "continuing",
|
|
2474
|
-
title: `Goal run requested: ${run.title}`,
|
|
2475
|
-
detail: "Enter pressed in Ctrl+G; starting the Goal orchestrator.",
|
|
2476
|
-
status: run.status,
|
|
2477
|
-
});
|
|
2478
|
-
log("INFO", "goal", `Goal run requested from Ctrl+G: ${run.title}`, { id: run.id });
|
|
2479
|
-
void (async () => {
|
|
2480
|
-
const latestRun = (await loadGoalRuns(props.cwd)).find((item) => item.id === run.id) ?? run;
|
|
2481
|
-
const requestedAt = new Date().toISOString();
|
|
2482
|
-
const runWithContinuation = await upsertGoalRun(props.cwd, {
|
|
2483
|
-
...latestRun,
|
|
2484
|
-
status: latestRun.status === "running" || latestRun.status === "verifying"
|
|
2485
|
-
? latestRun.status
|
|
2486
|
-
: "ready",
|
|
2487
|
-
continueRequestedAt: requestedAt,
|
|
2488
|
-
blockers: goalHasBlockingPrerequisites(latestRun) ? latestRun.blockers : [],
|
|
2489
|
-
evidence: [
|
|
2490
|
-
...latestRun.evidence,
|
|
2491
|
-
{
|
|
2492
|
-
id: `goal-rerun-${requestedAt}`,
|
|
2493
|
-
kind: "summary",
|
|
2494
|
-
label: "Goal rerun requested",
|
|
2495
|
-
content: "Continuation requested from Ctrl+G; the orchestrator will choose the next eligible Goal action.",
|
|
2496
|
-
createdAt: requestedAt,
|
|
2497
|
-
},
|
|
2498
|
-
],
|
|
2499
|
-
});
|
|
2500
|
-
startGoalRun(runWithContinuation);
|
|
2501
|
-
})().catch((err) => {
|
|
2502
|
-
log("ERROR", "goal", err instanceof Error ? err.message : String(err));
|
|
2503
|
-
setLiveItems((prev) => [...prev, toErrorItem(err, getId(), "Goal")]);
|
|
2504
|
-
});
|
|
2505
|
-
};
|
|
2506
|
-
const handleDeleteGoalSideEffects = async (run) => {
|
|
2507
|
-
runningGoalIdsRef.current.delete(run.id);
|
|
2508
|
-
const latestRun = (await loadGoalRuns(props.cwd)).find((item) => item.id === run.id) ?? run;
|
|
2509
|
-
if (latestRun.activeWorkerId)
|
|
2510
|
-
await stopGoalWorker(latestRun.activeWorkerId);
|
|
2511
|
-
clearGoalStatusEntry(run.id);
|
|
2512
|
-
clearGoalModeIfIdle();
|
|
2513
|
-
};
|
|
2514
|
-
const handleGoalPickerError = (err) => {
|
|
2515
|
-
log("ERROR", "goal", err instanceof Error ? err.message : String(err));
|
|
2516
|
-
setLiveItems((prev) => [...prev, toErrorItem(err, getId(), "Goal")]);
|
|
2517
|
-
};
|
|
2518
|
-
const goalPicker = useGoalPickerController({
|
|
2519
|
-
cwd: props.cwd,
|
|
2520
|
-
onRunGoal: handleRunGoalFromPicker,
|
|
2521
|
-
onDeleteGoalSideEffects: handleDeleteGoalSideEffects,
|
|
2522
|
-
onPauseGoal: pauseGoalRun,
|
|
2523
|
-
onError: handleGoalPickerError,
|
|
2524
|
-
});
|
|
2525
2300
|
const handleToggleTasks = () => {
|
|
2526
|
-
goalPicker.close();
|
|
2527
2301
|
taskPicker.toggle();
|
|
2528
2302
|
};
|
|
2529
|
-
const handleToggleGoalPicker = () => {
|
|
2530
|
-
taskPicker.close();
|
|
2531
|
-
goalPicker.toggle();
|
|
2532
|
-
};
|
|
2533
2303
|
const fullScreenOverlay = isPixelView
|
|
2534
2304
|
? "pixel"
|
|
2535
2305
|
: isSkillsView
|
|
@@ -2540,7 +2310,7 @@ export function App(props) {
|
|
|
2540
2310
|
if (quittingSummary) {
|
|
2541
2311
|
return (_jsx(Box, { flexDirection: "column", width: columns, flexShrink: 0, flexGrow: 0, children: _jsx(SessionSummaryDisplay, { summary: quittingSummary }) }));
|
|
2542
2312
|
}
|
|
2543
|
-
return (_jsx(Box, { flexDirection: "column", width: columns, flexShrink: 0, flexGrow: 0, children: rewindCheckpoints ? (_jsx(RewindOverlay, { checkpoints: rewindCheckpoints, onRestore: handleRewindRestore, onCancel: handleRewindCancel })) : fullScreenOverlay ? (_jsx(FullScreenOverlayRouter, { overlay: fullScreenOverlay, version: props.version, cwd: props.cwd, agentRunning: agentLoop.isRunning, planAutoExpand: planAutoExpand, onClosePixel: handleCloseRemountableOverlay, onPixelFixOne: handlePixelFixOne, onPixelFixAll: handlePixelFixAll, onCloseSkills: handleCloseRemountableOverlay, onClosePlan: handleClosePlanOverlay, onApprovePlan: handleApprovePlan, onRejectPlan: handleRejectPlan })) : (_jsx(ChatScreen, { columns: columns, liveItems: uniqueItemsById(liveItems), renderItem: renderItem, isRunning: agentLoop.isRunning, visibleStreamingText: visibleStreamingText, streamingThinking: agentLoop.streamingThinking, thinkingMs: agentLoop.thinkingMs, reserveStreamingSpacing: shouldReserveStreamingSpacing, renderMarkdown: renderMarkdown, measuredLiveAreaRows: measuredLiveAreaRows, fullscreen: props.fullscreen, rows: rows, transcriptLines: transcriptLines, viewportRows: viewportRows, assistantMarginTop: shouldTopSpaceStreamingText || streamingContinuesFlushed ? 1 : 0, streamingContinuation: streamingContinuesFlushed, controlsRef: mainControlsRef, hiddenQueuedCount: hiddenQueuedCount, queueIndicatorMarginTop: shouldTopSpaceQueueIndicator ? 2 : 1, theme: theme, statusSlotVisible: statusSlotVisible, activityVisible: activityVisible, stallStatusVisible: stallStatusVisible, doneStatus: doneStatus, activityPhase: agentLoop.activityPhase, elapsedMs: agentLoop.elapsedMs, runStartRef: agentLoop.runStartRef, isThinking: agentLoop.isThinking, thinkingLevel: thinkingLevel, tokenEstimate: agentLoop.streamedTokenEstimate, charCountRef: agentLoop.charCountRef, realTokensAccumRef: agentLoop.realTokensAccumRef, lastUserMessage: lastUserMessage, activeToolNames: agentLoop.activeToolCalls.map((tc) => tc.name), retryInfo: agentLoop.retryInfo, planDone: planSteps.filter((s) => s.completed).length, planTotal: planSteps.length, formatDuration: formatDuration, inputControls: {
|
|
2313
|
+
return (_jsx(Box, { flexDirection: "column", width: columns, flexShrink: 0, flexGrow: 0, children: rewindCheckpoints ? (_jsx(RewindOverlay, { checkpoints: rewindCheckpoints, onRestore: handleRewindRestore, onCancel: handleRewindCancel })) : fullScreenOverlay ? (_jsx(FullScreenOverlayRouter, { overlay: fullScreenOverlay, version: props.version, cwd: props.cwd, agentRunning: agentLoop.isRunning, planAutoExpand: planAutoExpand, onClosePixel: handleCloseRemountableOverlay, onPixelFixOne: handlePixelFixOne, onPixelFixAll: handlePixelFixAll, onCloseSkills: handleCloseRemountableOverlay, onClosePlan: handleClosePlanOverlay, onApprovePlan: handleApprovePlan, onRejectPlan: handleRejectPlan })) : (_jsx(ChatScreen, { columns: columns, liveItems: uniqueItemsById(liveItems), renderItem: renderItem, isRunning: agentLoop.isRunning, visibleStreamingText: visibleStreamingText, streamingThinking: agentLoop.streamingThinking, thinkingMs: agentLoop.thinkingMs, reserveStreamingSpacing: shouldReserveStreamingSpacing, renderMarkdown: renderMarkdown, measuredLiveAreaRows: measuredLiveAreaRows, fullscreen: props.fullscreen, rows: rows, transcriptLines: transcriptLines, viewportRows: viewportRows, assistantMarginTop: shouldTopSpaceStreamingText || streamingContinuesFlushed ? 1 : 0, streamingContinuation: streamingContinuesFlushed, controlsRef: mainControlsRef, hiddenQueuedCount: hiddenQueuedCount, queueIndicatorMarginTop: shouldTopSpaceQueueIndicator ? 2 : 1, theme: theme, statusSlotVisible: statusSlotVisible, activityVisible: activityVisible, stallStatusVisible: stallStatusVisible, liveToolFeed: liveToolFeed, doneStatus: doneStatus, activityPhase: agentLoop.activityPhase, elapsedMs: agentLoop.elapsedMs, runStartRef: agentLoop.runStartRef, isThinking: agentLoop.isThinking, thinkingLevel: thinkingLevel, tokenEstimate: agentLoop.streamedTokenEstimate, charCountRef: agentLoop.charCountRef, realTokensAccumRef: agentLoop.realTokensAccumRef, lastUserMessage: lastUserMessage, activeToolNames: agentLoop.activeToolCalls.map((tc) => tc.name), retryInfo: agentLoop.retryInfo, planDone: planSteps.filter((s) => s.completed).length, planTotal: planSteps.length, formatDuration: formatDuration, inputControls: {
|
|
2544
2314
|
onSubmit: handleSubmit,
|
|
2545
2315
|
onAbort: handleAbort,
|
|
2546
2316
|
injectText: composerInject,
|
|
@@ -2548,7 +2318,6 @@ export function App(props) {
|
|
|
2548
2318
|
onDownAtEnd: handleFocusTaskBar,
|
|
2549
2319
|
onShiftTab: handleToggleThinking,
|
|
2550
2320
|
onToggleTasks: handleToggleTasks,
|
|
2551
|
-
onToggleGoal: handleToggleGoalPicker,
|
|
2552
2321
|
onToggleSkills: () => openOverlay("skills"),
|
|
2553
2322
|
onTogglePixel: () => openOverlay("pixel"),
|
|
2554
2323
|
onToggleMarkdown: () => setRenderMarkdown((prev) => !prev),
|
|
@@ -2563,13 +2332,6 @@ export function App(props) {
|
|
|
2563
2332
|
onStart: taskPicker.start,
|
|
2564
2333
|
onRunAll: taskPicker.runAll,
|
|
2565
2334
|
onDelete: taskPicker.deleteTask,
|
|
2566
|
-
},
|
|
2567
|
-
open: goalPicker.open,
|
|
2568
|
-
goals: goalPicker.goals,
|
|
2569
|
-
onClose: goalPicker.close,
|
|
2570
|
-
onRun: goalPicker.run,
|
|
2571
|
-
onDelete: goalPicker.deleteGoal,
|
|
2572
|
-
onPause: goalPicker.pause,
|
|
2573
|
-
}, overlay: overlay, onModelSelect: handleModelSelect, onModelCancel: () => setOverlay(null), loggedInProviders: props.loggedInProviders ?? [currentProvider], currentModel: currentModel, currentProvider: currentProvider, onThemeSelect: handleThemeSelect, onThemeCancel: () => setOverlay(null), currentTheme: theme.name, contextUsed: agentLoop.contextUsed, contextWindowOptions: contextWindowOptions, displayedCwd: displayedCwd, gitBranch: gitBranch, goalMode: goalMode, planMode: planMode, exitPending: exitPending, goalStatusEntries: goalStatusEntries, footerStatusLayout: footerStatusLayout, backgroundTasks: bgTasks, taskBarFocused: taskBarFocused, taskBarExpanded: taskBarExpanded, selectedTaskIndex: selectedTaskIndex, onTaskBarExpand: handleTaskBarExpand, onTaskBarCollapse: handleTaskBarCollapse, onTaskKill: handleTaskKill, onTaskBarExit: handleTaskBarExit, onTaskNavigate: handleTaskNavigate })) }));
|
|
2335
|
+
}, overlay: overlay, onModelSelect: handleModelSelect, onModelCancel: () => setOverlay(null), loggedInProviders: props.loggedInProviders ?? [currentProvider], currentModel: currentModel, currentProvider: currentProvider, onThemeSelect: handleThemeSelect, onThemeCancel: () => setOverlay(null), currentTheme: theme.name, contextUsed: agentLoop.contextUsed, contextWindowOptions: contextWindowOptions, displayedCwd: displayedCwd, gitBranch: gitBranch, planMode: planMode, exitPending: exitPending, footerStatusLayout: footerStatusLayout, backgroundTasks: bgTasks, taskBarFocused: taskBarFocused, taskBarExpanded: taskBarExpanded, selectedTaskIndex: selectedTaskIndex, onTaskBarExpand: handleTaskBarExpand, onTaskBarCollapse: handleTaskBarCollapse, onTaskKill: handleTaskKill, onTaskBarExit: handleTaskBarExit, onTaskNavigate: handleTaskNavigate })) }));
|
|
2574
2336
|
}
|
|
2575
2337
|
//# sourceMappingURL=App.js.map
|