chore: drop non-code junk (pi-mono-reference, runtime state, root duplicates)

Remove files that should never have been tracked:

- pi-mono-reference/: 688-file copy of an upstream monorepo, zero imports,
  used only as offline human reference
- build/electron-builder.runtime.json: environment-specific build artifact
  with hardcoded local paths
- state/cancel-signal-state.json: runtime state written by the app
- prompt.txt, logo.svg (root): exact duplicates of the canonical copies
  under .planning/archive/ and assets/

Add state/ to .gitignore so future runtime state stays out.
This commit is contained in:
ZacharyZhang-NY committed 2026-04-17 22:37:39 -04:00
1 parent 34ca5b77f1
commit 1f7230fe87
691 files changed
+3 -190434

No files matched your search

@@ -1,64 +0,0 @@
import { describe, expect, it } from "vitest";
import type { AssistantMessage } from "../src/types.js";
import { isContextOverflow } from "../src/utils/overflow.js";
function createErrorMessage(errorMessage: string): AssistantMessage {
return {
role: "assistant",
content: [],
api: "openai-completions",
provider: "ollama",
model: "qwen3.5:35b",
usage: {
input: 0,
output: 0,
cacheRead: 0,
cacheWrite: 0,
totalTokens: 0,
cost: {
input: 0,
output: 0,
cacheRead: 0,
cacheWrite: 0,
total: 0,
},
},
stopReason: "error",
errorMessage,
timestamp: Date.now(),
};
}
describe("isContextOverflow", () => {
it("detects explicit Ollama prompt-too-long errors", () => {
const message = createErrorMessage("400 `prompt too long; exceeded max context length by 100918 tokens`");
expect(isContextOverflow(message, 32768)).toBe(true);
});
it("does not treat generic non-overflow Ollama errors as overflow", () => {
const message = createErrorMessage("500 `model runner crashed unexpectedly`");
expect(isContextOverflow(message, 32768)).toBe(false);
});
it("does not treat Bedrock throttling 'Too many tokens' as overflow", () => {
// Bedrock returns this for HTTP 429 rate limiting, NOT context overflow.
// formatBedrockError uses a human-readable prefix for ThrottlingException.
const message = createErrorMessage("Throttling error: Too many tokens, please wait before trying again.");
expect(isContextOverflow(message, 200000)).toBe(false);
});
it("does not treat Bedrock service unavailable as overflow", () => {
const message = createErrorMessage("Service unavailable: The service is temporarily unavailable.");
expect(isContextOverflow(message, 200000)).toBe(false);
});
it("does not treat generic rate limit errors as overflow", () => {
const message = createErrorMessage("Rate limit exceeded, please retry after 30 seconds.");
expect(isContextOverflow(message, 200000)).toBe(false);
});
it("does not treat HTTP 429 style errors as overflow", () => {
const message = createErrorMessage("Too many requests. Please slow down.");
expect(isContextOverflow(message, 200000)).toBe(false);
});
});