core: keep windows @mentions finding project files

This commit is contained in:
Shoubhit Dash 2026-03-27 18:01:39 +05:30
commit 19a503aa7e
3 changed files with 11 additions and 3 deletions

View file

@ -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"