mirror of
https://gitee.com/zhangsken/opencode.git
synced 2026-10-16 10:30:01 +08:00
fix(tui): deduplicate projects in the open picker (#51924)
This commit is contained in:
@@ -208,6 +208,8 @@ export function DialogOpen(props: { sessions: SessionInfo[]; onLoad: (sessions:
|
||||
const projectOptions = data.project
|
||||
.list()
|
||||
.filter((project) => project.canonical !== "/")
|
||||
// Historical project identities can share a checkout. The list is newest-active first.
|
||||
.filter((project, index, projects) => projects.findIndex((item) => item.canonical === project.canonical) === index)
|
||||
.map((project) => ({ directory: project.canonical, project }))
|
||||
.map((item) => {
|
||||
const title =
|
||||
|
||||
Reference in New Issue
Block a user