Skip to content

Commit 16332a8

Browse files
authored
fix(tui): make use of server dir path for file references in prompts (#13781)
1 parent ae6e85b commit 16332a8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ export function Autocomplete(props: {
247247
const width = props.anchor().width - 4
248248
options.push(
249249
...sortedFiles.map((item): AutocompleteOption => {
250-
const fullPath = `${process.cwd()}/${item}`
250+
const baseDir = (sync.data.path.directory || process.cwd()).replace(/\/+$/, "")
251+
const fullPath = `${baseDir}/${item}`
251252
const urlObj = pathToFileURL(fullPath)
252253
let filename = item
253254
if (lineRange && !item.endsWith("/")) {

0 commit comments

Comments
 (0)