Added nono profiles & orca integration - Added some extensions to start working on

This commit is contained in:
jb
2026-08-24 10:23:38 -04:00
parent 8bcb82813c
commit 10f64b593b
83 changed files with 21840 additions and 1353 deletions
+29
View File
@@ -0,0 +1,29 @@
import assert from "node:assert/strict";
import test from "node:test";
import {
BTW_TITLE_MAX_LENGTH,
deriveBtwTitle,
isModelVisible,
} from "./src/by-the-way.ts";
test("deriveBtwTitle uses the first non-empty line and bounds the title", () => {
assert.equal(
deriveBtwTitle("\n Why does this work? \nignore me"),
"Why does this work?",
);
assert.equal(deriveBtwTitle(" \n\t"), "by the way");
const title = deriveBtwTitle("x".repeat(BTW_TITLE_MAX_LENGTH + 10));
assert.equal(title.length, BTW_TITLE_MAX_LENGTH);
assert.equal(title, `${"x".repeat(BTW_TITLE_MAX_LENGTH - 1)}…`);
const emojiTitle = deriveBtwTitle(
`${"x".repeat(BTW_TITLE_MAX_LENGTH - 2)}😀 more`,
);
assert.equal(emojiTitle, `${"x".repeat(BTW_TITLE_MAX_LENGTH - 2)}😀…`);
});
test("only model-origin snapshots are visible to model-facing tools", () => {
assert.equal(isModelVisible({ origin: "model" }), true);
assert.equal(isModelVisible({ origin: "btw" }), false);
});