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>
10 lines
379 B
TypeScript
10 lines
379 B
TypeScript
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}`
|
|
}
|