feat: removed chunk-mode modules and read/edit entrypoints from pi-natives

- Removed `pi-natives` chunk language classifier modules and all core chunk subsystems (kind, state, render, edit, resolve).
- Removed chunk-mode CLI/read/edit entrypoints, including `read` command and chunk mode registration/prompt tooling.
- Removed chunk selectors from `read` and `grep` tools, switching behavior to raw/L-range handling.
- Fixed poll wait parsing to keep defaulting to `30s` when the provided value is empty.
This commit is contained in:
can1357
2026-04-26 08:19:02 +02:00
parent a227adad1b
commit 5ea1d55e56
88 changed files with 49 additions and 30753 deletions
@@ -1,33 +0,0 @@
import { afterEach, describe, expect, it, vi } from "bun:test";
import * as os from "node:os";
import * as path from "node:path";
import { runReadCommand } from "@oh-my-pi/pi-coding-agent/cli/read-cli";
import { Settings } from "@oh-my-pi/pi-coding-agent/config/settings";
import * as scrapers from "@oh-my-pi/pi-coding-agent/web/scrapers/types";
describe("runReadCommand URL handling", () => {
afterEach(() => {
vi.restoreAllMocks();
});
it("delegates URL inputs through the read tool pipeline", async () => {
const cwd = path.join(os.tmpdir(), "read-cli-url-test");
const settings = Settings.isolated({ "fetch.enabled": true });
const pageUrl = "https://example.com/cli-read";
const consoleLogSpy = vi.spyOn(console, "log").mockImplementation(() => {});
vi.spyOn(Settings, "init").mockResolvedValue(settings);
vi.spyOn(scrapers, "loadPage").mockResolvedValue({
ok: true,
status: 200,
contentType: "text/plain",
finalUrl: pageUrl,
content: "CLI URL content",
});
const cwdSpy = vi.spyOn(process, "cwd").mockReturnValue(cwd);
await runReadCommand({ path: pageUrl });
expect(cwdSpy).toHaveBeenCalled();
expect(consoleLogSpy).toHaveBeenCalledWith(expect.stringContaining("CLI URL content"));
});
});