diff --git a/packages/coding-agent/src/config/settings.ts b/packages/coding-agent/src/config/settings.ts index 67cc3edf1..7f60e90fd 100644 --- a/packages/coding-agent/src/config/settings.ts +++ b/packages/coding-agent/src/config/settings.ts @@ -19,9 +19,9 @@ import { YAML } from "bun"; import { type Settings as SettingsCapabilityItem, settingsCapability } from "../capability/settings"; import type { ModelRole } from "../config/model-registry"; import { loadCapability } from "../discovery"; -import { type EditMode, normalizeEditMode } from "../edit"; import { isLightTheme, setAutoThemeMapping, setColorBlindMode, setSymbolPreset } from "../modes/theme/theme"; import { AgentStorage } from "../session/agent-storage"; +import { type EditMode, normalizeEditMode } from "../utils/edit-mode"; import { withFileLock } from "./file-lock"; import { type BashInterceptorRule, diff --git a/packages/coding-agent/src/edit/modes/chunk.ts b/packages/coding-agent/src/edit/modes/chunk.ts index c6e679761..536c8d30a 100644 --- a/packages/coding-agent/src/edit/modes/chunk.ts +++ b/packages/coding-agent/src/edit/modes/chunk.ts @@ -88,10 +88,6 @@ export function invalidateChunkCache(filePath: string): void { chunkStateCache.delete(filePath); } -type ParsedChunkTarget = { - selector: string; -}; - type ChunkSourceContext = { resolvedPath: string; sourceFile: BunFile; diff --git a/packages/coding-agent/test/history-storage-sqlite-compat.test.ts b/packages/coding-agent/test/history-storage-sqlite-compat.test.ts index 5d64f8a3c..1c6bdd930 100644 --- a/packages/coding-agent/test/history-storage-sqlite-compat.test.ts +++ b/packages/coding-agent/test/history-storage-sqlite-compat.test.ts @@ -47,7 +47,7 @@ it("migrates legacy history schema away from unixepoch defaults", async () => { const storage = HistoryStorage.open(dbPath); storage.add("new prompt", "/tmp/new"); - await Bun.sleep(10); + await Bun.sleep(100); const db = new Database(dbPath, { readonly: true }); try { diff --git a/packages/coding-agent/test/python-tool-settings.test.ts b/packages/coding-agent/test/python-tool-settings.test.ts index c8252c031..f92737b2d 100644 --- a/packages/coding-agent/test/python-tool-settings.test.ts +++ b/packages/coding-agent/test/python-tool-settings.test.ts @@ -56,6 +56,7 @@ describe("python tool settings", () => { }); it("passes kernel mode from settings to executor", async () => { + vi.spyOn(pythonExecutor, "warmPythonEnvironment").mockResolvedValue({ ok: true }); const executeSpy = vi.spyOn(pythonExecutor, "executePython").mockResolvedValue({ output: "ok", exitCode: 0, diff --git a/packages/coding-agent/test/tools/lsp-regressions.test.ts b/packages/coding-agent/test/tools/lsp-regressions.test.ts index b3e651ce0..513282884 100644 --- a/packages/coding-agent/test/tools/lsp-regressions.test.ts +++ b/packages/coding-agent/test/tools/lsp-regressions.test.ts @@ -17,6 +17,7 @@ import { import { getThemeByName } from "@oh-my-pi/pi-coding-agent/modes/theme/theme"; import { clampTimeout } from "@oh-my-pi/pi-coding-agent/tools/tool-timeouts"; import { sanitizeText } from "@oh-my-pi/pi-natives"; +import * as piUtils from "@oh-my-pi/pi-utils"; import { TempDir } from "@oh-my-pi/pi-utils"; describe("lsp regressions", () => { @@ -236,7 +237,7 @@ describe("lsp regressions", () => { await Bun.write(specPath, "---- MODULE Spec ----\n====\n"); const whichSpy = vi - .spyOn(Bun, "which") + .spyOn(piUtils, "$which") .mockImplementation(command => (command === "tlapm_lsp" ? "/usr/local/bin/tlapm_lsp" : null)); const existsSpy = vi .spyOn(fs, "existsSync") diff --git a/packages/coding-agent/test/tools/python-execution.test.ts b/packages/coding-agent/test/tools/python-execution.test.ts index 2fdaee3f6..3a7c1083c 100644 --- a/packages/coding-agent/test/tools/python-execution.test.ts +++ b/packages/coding-agent/test/tools/python-execution.test.ts @@ -23,6 +23,7 @@ function createSession(cwd: string): ToolSession { describe("python tool execution", () => { it("passes kernel options from settings and args", async () => { const tempDir = TempDir.createSync("@python-tool-"); + vi.spyOn(pythonExecutor, "warmPythonEnvironment").mockResolvedValue({ ok: true }); const executeSpy = vi.spyOn(pythonExecutor, "executePython").mockResolvedValue({ output: "ok", exitCode: 0, diff --git a/packages/natives/native/embedded-addon.js b/packages/natives/native/embedded-addon.js index a462bdf94..66a045fd4 100644 --- a/packages/natives/native/embedded-addon.js +++ b/packages/natives/native/embedded-addon.js @@ -1,3 +1,4 @@ + // AUTOGENERATED FILE -- DO NOT EDIT DIRECTLY // See scripts/embed-native.ts