summaryrefslogtreecommitdiffhomepage
path: root/packages/tui
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-07-04 17:57:48 -0400
committerDax Raad <[email protected]>2025-07-04 17:58:03 -0400
commitea6bfef21a972a4213ee7b14fb53abbf2737b5ab (patch)
tree8c68c56bff5b12b1b1f3f4bd968abd3c2d50c754 /packages/tui
parent107363b1d9f3eec6b180170e428f66162bf622c7 (diff)
downloadopencode-ea6bfef21a972a4213ee7b14fb53abbf2737b5ab.tar.gz
opencode-ea6bfef21a972a4213ee7b14fb53abbf2737b5ab.zip
use full filepath
Diffstat (limited to 'packages/tui')
-rw-r--r--packages/tui/internal/components/chat/editor.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/tui/internal/components/chat/editor.go b/packages/tui/internal/components/chat/editor.go
index 1516c0c28..9466d541c 100644
--- a/packages/tui/internal/components/chat/editor.go
+++ b/packages/tui/internal/components/chat/editor.go
@@ -92,7 +92,6 @@ func (m *editorComponent) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
// Now, insert the attachment at the position where the '@' was.
// The cursor is now at `atIndex` after the replacement.
filePath := msg.CompletionValue
- fileName := filepath.Base(filePath)
extension := filepath.Ext(filePath)
mediaType := ""
switch extension {
@@ -107,7 +106,7 @@ func (m *editorComponent) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
attachment := &textarea.Attachment{
ID: uuid.NewString(),
- Display: "@" + fileName,
+ Display: "@" + filePath,
URL: fmt.Sprintf("file://./%s", filePath),
Filename: filePath,
MediaType: mediaType,