From ea6bfef21a972a4213ee7b14fb53abbf2737b5ab Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Fri, 4 Jul 2025 17:57:48 -0400 Subject: use full filepath --- packages/tui/internal/components/chat/editor.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'packages/tui/internal') 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, -- cgit v1.2.3