core: keep windows @mentions finding project files
This commit is contained in:
parent
3b32584efa
commit
19a503aa7e
3 changed files with 11 additions and 3 deletions
|
|
@ -573,7 +573,8 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
|
|||
const pinned: AtOption[] = open.map((path) => ({ type: "file", path, display: path, recent: true }))
|
||||
if (!query.trim()) return [...agents, ...pinned]
|
||||
const pathy = /[./\\]/.test(query)
|
||||
const paths = await files.searchFiles(query)
|
||||
const seek = query.replaceAll("\\", "/")
|
||||
const paths = await files.searchFiles(seek)
|
||||
const fileOptions: AtOption[] = paths
|
||||
.filter((path) => !seen.has(path))
|
||||
.map((path) => ({ type: "file", path, display: path }))
|
||||
|
|
@ -583,6 +584,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
|
|||
key: atKey,
|
||||
filterKeys: ["display"],
|
||||
stale: false,
|
||||
fuzzy: (query) => !/[./\\]/.test(query),
|
||||
groupBy: (item) => {
|
||||
if (item.type === "agent") return "agent"
|
||||
if (item.recent) return "recent"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue