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
| 1 | export interface ReviewPaneFileSelection { |
| 2 | readonly sectionId: string | null; |
| 3 | readonly fileId: string | null; |
| 4 | } |
| 5 | |
| 6 | export function resolveSelectedReviewFileId(input: { |
| 7 | readonly selection: ReviewPaneFileSelection; |
| 8 | readonly sectionId: string | null; |
| 9 | readonly availableFileIds: ReadonlyArray<string>; |
| 10 | }): string | null { |
| 11 | if (input.selection.sectionId !== input.sectionId || input.selection.fileId === null) { |
| 12 | return null; |
| 13 | } |
| 14 | |
| 15 | return input.availableFileIds.includes(input.selection.fileId) ? input.selection.fileId : null; |
| 16 | } |