mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
refactor: satisfy no-array-filter-map and no-accumulating-spread
This commit is contained in:
1 parent
b96a248cef
commit
19ee1d9173
16 files changed
+68
-68
No files matched your search
@@ -114,7 +114,7 @@ async function chooseFromLocal(
|
||||
const matchIds = new Set(matches.map((repo) => repo.repoId))
|
||||
return selectDialog<SwitchChoice>(context, 'Switch to Manager repo', [
|
||||
...matches.map((repo) => repoOption(repo, MATCH_CATEGORY)),
|
||||
...repos.filter((repo) => !matchIds.has(repo.repoId)).map((repo) => repoOption(repo, REPO_CATEGORY)),
|
||||
...repos.flatMap((repo) => (matchIds.has(repo.repoId) ? [] : [repoOption(repo, REPO_CATEGORY)])),
|
||||
])
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user