Normalize branch and model selection handling
- Deduplicate terminal IDs and favorite model slugs with trim-aware iteration - Use effect-based filtering for local branch and built-in model lists - Switch stable array handling to non-mutating `toSorted`
This commit is contained in:
1 parent
7f03f4d19a
commit
7793bd6de7
8 files changed
+63
-23
No files matched your search
@@ -1,5 +1,7 @@
|
||||
import { resolveDefaultBranchActionDialogCopy } from "@t3tools/client-runtime";
|
||||
import { resolveAutoFeatureBranchName } from "@t3tools/shared/git";
|
||||
import * as Arr from "effect/Array";
|
||||
import * as Result from "effect/Result";
|
||||
import { useLocalSearchParams, useRouter } from "expo-router";
|
||||
import { useCallback, useMemo } from "react";
|
||||
import { View } from "react-native";
|
||||
@@ -74,7 +76,9 @@ export function GitConfirmSheet() {
|
||||
? gitState.selectedThreadBranches
|
||||
: await gitActions.refreshSelectedThreadBranches();
|
||||
const newBranchName = resolveAutoFeatureBranchName(
|
||||
branches.filter((branch) => !branch.isRemote).map((branch) => branch.name),
|
||||
Arr.filterMap(branches, (branch) =>
|
||||
branch.isRemote ? Result.failVoid : Result.succeed(branch.name),
|
||||
),
|
||||
);
|
||||
await gitActions.onCreateSelectedThreadBranch(newBranchName);
|
||||
await gitActions.onRunSelectedThreadGitAction({ action: confirmAction });
|
||||
|
||||
Reference in new issue
Block a user