@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 21 lines 718 Bytes
Raw
1 import type { ReviewSectionItem } from "./reviewModel";
2
3 export interface ReviewSectionMenu {
4 readonly workingTree: ReviewSectionItem | null;
5 readonly branchChanges: ReviewSectionItem | null;
6 readonly latestTurn: ReviewSectionItem | null;
7 readonly turns: ReadonlyArray<ReviewSectionItem>;
8 }
9
10 export function buildReviewSectionMenu(
11 sections: ReadonlyArray<ReviewSectionItem>,
12 ): ReviewSectionMenu {
13 const turns = sections.filter((section) => section.kind === "turn");
14
15 return {
16 workingTree: sections.find((section) => section.kind === "working-tree") ?? null,
17 branchChanges: sections.find((section) => section.kind === "branch-range") ?? null,
18 latestTurn: turns[0] ?? null,
19 turns,
20 };
21 }