Files
oh-my-pi/packages/coding-agent/test/system-prompt.test.ts
T
can1357 8dbaded19f feat(coding-agent): reduced default output truncation limit from 4000
- Reduced default output truncation limit from 4000 to 3000 lines.
- Replaced inline truncation notices with structured metadata system.
- Updated executors to track detailed output statistics.
- Modified artifact storage to use pre-allocated paths.
2026-01-23 13:03:09 +01:00

30 lines
776 B
TypeScript

import { describe, expect, test } from "bun:test";
import { buildSystemPrompt } from "$c/system-prompt";
describe("buildSystemPrompt", () => {
describe("empty tools", () => {
test("includes core principles even with no tools", async () => {
const prompt = await buildSystemPrompt({
toolNames: [],
contextFiles: [],
skills: [],
});
// Core <field> principles are always present regardless of tools
expect(prompt).toContain("Code is frozen thought");
});
});
describe("tools available", () => {
test("mentions specialized tools when available", async () => {
const prompt = await buildSystemPrompt({
contextFiles: [],
skills: [],
});
expect(prompt).toContain("`read`");
expect(prompt).toContain("`edit`");
});
});
});