refactor(tui): organize source by feature boundaries (#5975)
* refactor(tui): group source files by feature * refactor(tui): split app and gateway responsibilities
This commit is contained in:
1 parent
b7abbcd70b
commit
f18423800e
73 files changed
+6401
-6006
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { expect, test } from "bun:test"
|
||||
|
||||
import { branchPoints } from "./branch-menu"
|
||||
|
||||
test("branch points preserve absolute user indices from paginated history", () => {
|
||||
expect(branchPoints([
|
||||
{ role: "user", content: "question" },
|
||||
{ role: "assistant", content: " first\nreply ", forkIndex: 11 },
|
||||
{ role: "activity", content: "read_file" },
|
||||
{ role: "assistant", content: "second", forkIndex: 12 },
|
||||
])).toEqual([
|
||||
{ beforeUserIndex: 11, preview: "first reply" },
|
||||
{ beforeUserIndex: 12, preview: "second" },
|
||||
])
|
||||
})
|
||||
Reference in new issue
Block a user