diff options
| author | adamdottv <[email protected]> | 2025-05-29 15:37:06 -0500 |
|---|---|---|
| committer | adamdottv <[email protected]> | 2025-05-29 15:37:06 -0500 |
| commit | 0e31bbcd9322e1f667b87c88445a4f6effa1d934 (patch) | |
| tree | 428bbd368a197cb3e80523c629437d8cde86b092 /internal/tui/components/chat/editor.go | |
| parent | 913b3434d8243cc9681a3bf7520e7b027ec3853b (diff) | |
| download | opencode-0e31bbcd9322e1f667b87c88445a4f6effa1d934.tar.gz opencode-0e31bbcd9322e1f667b87c88445a4f6effa1d934.zip | |
wip: refactoring tui
Diffstat (limited to 'internal/tui/components/chat/editor.go')
| -rw-r--r-- | internal/tui/components/chat/editor.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/tui/components/chat/editor.go b/internal/tui/components/chat/editor.go index c3b06787e..6586f2020 100644 --- a/internal/tui/components/chat/editor.go +++ b/internal/tui/components/chat/editor.go @@ -13,7 +13,6 @@ import ( "github.com/charmbracelet/bubbles/textarea" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" - "github.com/sst/opencode/internal/message" "github.com/sst/opencode/internal/status" "github.com/sst/opencode/internal/tui/app" "github.com/sst/opencode/internal/tui/components/dialog" @@ -29,7 +28,7 @@ type editorCmp struct { height int app *app.App textarea textarea.Model - attachments []message.Attachment + attachments []app.Attachment deleteMode bool history []string historyIndex int @@ -233,7 +232,7 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } if len(imageBytes) != 0 { attachmentName := fmt.Sprintf("clipboard-image-%d", len(m.attachments)) - attachment := message.Attachment{FilePath: attachmentName, FileName: attachmentName, Content: imageBytes, MimeType: "image/png"} + attachment := app.Attachment{FilePath: attachmentName, FileName: attachmentName, Content: imageBytes, MimeType: "image/png"} m.attachments = append(m.attachments, attachment) } else { m.textarea.SetValue(m.textarea.Value() + text) |
