fix(tui): make use of server dir path for file references in prompts (#13781)
This commit is contained in:
@@ -247,7 +247,8 @@ export function Autocomplete(props: {
|
|||||||
const width = props.anchor().width - 4
|
const width = props.anchor().width - 4
|
||||||
options.push(
|
options.push(
|
||||||
...sortedFiles.map((item): AutocompleteOption => {
|
...sortedFiles.map((item): AutocompleteOption => {
|
||||||
const fullPath = `${process.cwd()}/${item}`
|
const baseDir = (sync.data.path.directory || process.cwd()).replace(/\/+$/, "")
|
||||||
|
const fullPath = `${baseDir}/${item}`
|
||||||
const urlObj = pathToFileURL(fullPath)
|
const urlObj = pathToFileURL(fullPath)
|
||||||
let filename = item
|
let filename = item
|
||||||
if (lineRange && !item.endsWith("/")) {
|
if (lineRange && !item.endsWith("/")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user