story-206: default to claude-code-pty on first use

Squash merge of feature/story-206

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Dave
2026-02-26 15:02:16 +00:00
parent 17fd3b2dc2
commit a2465f476a
4 changed files with 85 additions and 11 deletions

View File

@@ -13,20 +13,31 @@ describe("parseCodeRefs (Story 193)", () => {
it("returns a single text part for plain text with no code refs", () => {
const parts = parseCodeRefs("Hello world, no code here");
expect(parts).toHaveLength(1);
expect(parts[0]).toEqual({ type: "text", value: "Hello world, no code here" });
expect(parts[0]).toEqual({
type: "text",
value: "Hello world, no code here",
});
});
it("detects a simple code reference", () => {
const parts = parseCodeRefs("src/main.rs:42");
expect(parts).toHaveLength(1);
expect(parts[0]).toMatchObject({ type: "ref", path: "src/main.rs", line: 42 });
expect(parts[0]).toMatchObject({
type: "ref",
path: "src/main.rs",
line: 42,
});
});
it("detects a code reference embedded in surrounding text", () => {
const parts = parseCodeRefs("See src/lib.rs:100 for details");
expect(parts).toHaveLength(3);
expect(parts[0]).toEqual({ type: "text", value: "See " });
expect(parts[1]).toMatchObject({ type: "ref", path: "src/lib.rs", line: 100 });
expect(parts[1]).toMatchObject({
type: "ref",
path: "src/lib.rs",
line: 100,
});
expect(parts[2]).toEqual({ type: "text", value: " for details" });
});