mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-18 13:23:45 +00:00
chore: generate
This commit is contained in:
parent
4119051077
commit
ea5f97609a
1 changed files with 2 additions and 9 deletions
|
|
@ -140,17 +140,10 @@ function collectPaths<T>(items: T[], scores: Array<{ total: number }>, toPath: (
|
|||
return [{ text, score: scores[index]?.total ?? 0 }]
|
||||
})
|
||||
rows.sort(
|
||||
(a, b) =>
|
||||
b.score - a.score ||
|
||||
a.text.length - b.text.length ||
|
||||
(a.text < b.text ? -1 : a.text > b.text ? 1 : 0),
|
||||
(a, b) => b.score - a.score || a.text.length - b.text.length || (a.text < b.text ? -1 : a.text > b.text ? 1 : 0),
|
||||
)
|
||||
|
||||
return Array.from(
|
||||
new Set(
|
||||
rows.map((item) => item.text),
|
||||
),
|
||||
)
|
||||
return Array.from(new Set(rows.map((item) => item.text)))
|
||||
}
|
||||
|
||||
function searchFff(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue