0fe761dc4b
- Added tsconfig.publish.json files to all packages with optimized publish-time configuration. - Updated all package.json scripts with prepublishOnly hooks for correct type checking during publish. - Added @oh-my-pi/omp-stats path mappings to root tsconfig.json for consistent imports. - Added WASM generation script for photon module and integrated into install:dev script.
30 lines
799 B
TypeScript
30 lines
799 B
TypeScript
import { describe, expect, test } from "bun:test";
|
|
import { buildSystemPrompt } from "@oh-my-pi/pi-coding-agent/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`");
|
|
});
|
|
});
|
|
});
|