Merge origin/main into orchestrator v2
Port current mainline fixes onto the orchestrator v2 architecture. Co-authored-by: codex <[email protected]>
This commit is contained in:
commit
309fcabe1f
880 files changed
+82635
-12286
No files matched your search
@@ -11,6 +11,7 @@ export type DiffPanelSelection =
|
||||
| { kind: "turn"; turnId: RunId; filePath: string | null; revealRequestId: number };
|
||||
|
||||
const DEFAULT_SELECTION: DiffPanelSelection = { kind: "branch", baseRef: null };
|
||||
const DEFAULT_WORKING_TREE_SELECTION: DiffPanelSelection = { kind: "unstaged" };
|
||||
|
||||
interface DiffPanelStoreState {
|
||||
byThreadKey: Record<string, DiffPanelSelection>;
|
||||
@@ -133,7 +134,11 @@ export const useDiffPanelStore = create<DiffPanelStoreState>()(
|
||||
export function selectThreadDiffPanelSelection(
|
||||
byThreadKey: Record<string, DiffPanelSelection>,
|
||||
ref: ScopedThreadRef | null | undefined,
|
||||
hasWorkingTreeChanges = false,
|
||||
): DiffPanelSelection {
|
||||
if (!ref) return DEFAULT_SELECTION;
|
||||
return byThreadKey[scopedThreadKey(ref)] ?? DEFAULT_SELECTION;
|
||||
return (
|
||||
byThreadKey[scopedThreadKey(ref)] ??
|
||||
(hasWorkingTreeChanges ? DEFAULT_WORKING_TREE_SELECTION : DEFAULT_SELECTION)
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user