diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 93e416344..bb30eb7ac 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -14,6 +14,7 @@ - Fixed llama.cpp discovery mapping unlimited `max_tokens = -1` / `n_predict = -1` output limits to the generic 32K discovery cap instead of the discovered runtime context window. ([#3781](https://github.com/can1357/oh-my-pi/issues/3781)) - Fixed the bash interceptor blocking `echo` / `printf` redirects to `/dev/null`, `/dev/tty`, `/dev/stdout`, and `/dev/stderr` device sinks while still directing real file writes to the write tool. ([#3763](https://github.com/can1357/oh-my-pi/issues/3763)) - Fixed the `edit` tool persisting unbounded full-file `oldText` / `newText` snapshots in tool-result `details`, inflating per-turn session JSONL lines (hundreds of KB per edit on large files). `details.oldText`/`details.newText` are now pruned when their combined length exceeds 32 KB; the visible diff, path, line, and diagnostic metadata are preserved, and ACP `diff` content still flows for smaller edits. ([#3786](https://github.com/can1357/oh-my-pi/issues/3786)) +- Fixed todo HUD and goal-mode continuations preserving accurate persisted todo context across `/btw` branches, hidden goal prompts, and discovery-only todo tool states. ## [16.2.5] - 2026-06-28 diff --git a/packages/coding-agent/test/goals/goal-mode-integration.test.ts b/packages/coding-agent/test/goals/goal-mode-integration.test.ts index 5979b107f..449063de9 100644 --- a/packages/coding-agent/test/goals/goal-mode-integration.test.ts +++ b/packages/coding-agent/test/goals/goal-mode-integration.test.ts @@ -10,6 +10,7 @@ import { initTheme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme"; import { AgentSession } from "@oh-my-pi/pi-coding-agent/session/agent-session"; import { AuthStorage } from "@oh-my-pi/pi-coding-agent/session/auth-storage"; import { SessionManager } from "@oh-my-pi/pi-coding-agent/session/session-manager"; +import type { DiscoverableTool } from "@oh-my-pi/pi-coding-agent/tool-discovery/tool-index"; import { createTools, type Tool, type ToolSession } from "@oh-my-pi/pi-coding-agent/tools"; import type { TodoPhase } from "@oh-my-pi/pi-coding-agent/tools/todo"; import { TempDir } from "@oh-my-pi/pi-utils"; @@ -338,7 +339,7 @@ describe("InteractiveMode goal mode integration", () => { isToolDiscoveryEnabled: () => harness.session.isToolDiscoveryEnabled(), getSelectedDiscoveredToolNames: () => harness.session.getSelectedDiscoveredToolNames(), activateDiscoveredTools: (toolNames: string[]) => harness.session.activateDiscoveredTools(toolNames), - getDiscoverableTools: (filter?: Parameters[0]) => + getDiscoverableTools: (filter?: { source?: DiscoverableTool["source"] }) => harness.session.getDiscoverableTools(filter), }); for (const tool of await createTools(harness.toolSession, ["search_tool_bm25"])) { diff --git a/packages/coding-agent/test/interactive-mode-todo-clear.test.ts b/packages/coding-agent/test/interactive-mode-todo-clear.test.ts index 24b989361..d068983ec 100644 --- a/packages/coding-agent/test/interactive-mode-todo-clear.test.ts +++ b/packages/coding-agent/test/interactive-mode-todo-clear.test.ts @@ -1,6 +1,7 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "bun:test"; import * as path from "node:path"; import { Agent } from "@oh-my-pi/pi-agent-core"; +import type { AssistantMessage } from "@oh-my-pi/pi-ai"; import { ModelRegistry } from "@oh-my-pi/pi-coding-agent/config/model-registry"; import { resetSettingsForTest, Settings } from "@oh-my-pi/pi-coding-agent/config/settings"; import { InteractiveMode } from "@oh-my-pi/pi-coding-agent/modes/interactive-mode"; @@ -193,7 +194,7 @@ describe("InteractiveMode todo HUD persistence", () => { vi.spyOn(mode, "updateEditorBorderColor").mockImplementation(() => {}); vi.spyOn(mode, "showStatus").mockImplementation(() => {}); - await mode.handleBtwBranch("why did this fail?", {} as Parameters[1]); + await mode.handleBtwBranch("why did this fail?", {} as AssistantMessage); expect(mode.todoReminderContainer.children).toHaveLength(0); });