fix: speed up fff file search (#31366)
This commit is contained in:
parent
1772e8ee6e
commit
b1a6c40ad0
7 changed files with 68 additions and 39 deletions
|
|
@ -407,6 +407,7 @@ export function DialogSelectFile(props: {
|
|||
items={items}
|
||||
key={(item) => item.id}
|
||||
filterKeys={["title", "description", "category"]}
|
||||
skipFilter={(item) => item.type === "file"}
|
||||
groupBy={grouped() ? (item) => item.category : () => ""}
|
||||
onMove={handleMove}
|
||||
onSelect={handleSelect}
|
||||
|
|
|
|||
|
|
@ -658,6 +658,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
|
|||
},
|
||||
key: atKey,
|
||||
filterKeys: ["display"],
|
||||
skipFilter: (item) => item.type === "file" && !item.recent,
|
||||
groupBy: (item) => {
|
||||
if (item.type === "agent") return "agent"
|
||||
if (item.recent) return "recent"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue