mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-20 01:12:15 +00:00
fix(tui): make use of server dir path for file references in prompts (#13781)
This commit is contained in:
parent
ae6e85b2a4
commit
16332a8583
1 changed files with 2 additions and 1 deletions
|
|
@ -247,7 +247,8 @@ export function Autocomplete(props: {
|
|||
const width = props.anchor().width - 4
|
||||
options.push(
|
||||
...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)
|
||||
let filename = item
|
||||
if (lineRange && !item.endsWith("/")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue