@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 13 lines 534 Bytes
Raw
1 import { describe, expect, it } from "vite-plus/test";
2
3 import { subagentThreadTitle } from "./subagentProjection.ts";
4
5 describe("subagentThreadTitle", () => {
6 it("clips a long prompt without splitting a surrogate pair", () => {
7 const title = (prompt: string) =>
8 subagentThreadTitle({ parentTitle: "Parent", prompt, ordinal: 1 });
9
10 expect(title(`${"a".repeat(68)}😀 and more work.`)).toBe(`${"a".repeat(68)}...`);
11 expect(title(`${"a".repeat(67)}😀 and more work.`)).toBe(`${"a".repeat(67)}😀...`);
12 });
13 });