feat: add @ file mention support in chat input and unify directory attachment
Support typing "@" in the chat input to trigger a file list popup with filtering, keyboard navigation, and file/directory attachment. Directories from the sidebar file tree now attach as resource links instead of injecting text into the input. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
9
src/lib/path-utils.ts
Normal file
9
src/lib/path-utils.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export function joinFsPath(basePath: string, relPath: string): string {
|
||||
if (!relPath) return basePath
|
||||
const separator = basePath.includes("\\") ? "\\" : "/"
|
||||
const normalizedRel = relPath.replace(/[\\/]/g, separator)
|
||||
if (basePath.endsWith("/") || basePath.endsWith("\\")) {
|
||||
return `${basePath}${normalizedRel}`
|
||||
}
|
||||
return `${basePath}${separator}${normalizedRel}`
|
||||
}
|
||||
Reference in New Issue
Block a user