wip: tui api

This commit is contained in:
Dax Raad
2025-07-22 12:14:14 -04:00
parent 01f8d3b05d
commit 5aafab118f
13 changed files with 127 additions and 414 deletions

View File

@@ -486,7 +486,9 @@ func (m *editorComponent) SetValueWithAttachments(value string) {
if end > start {
filePath := value[start:end]
if _, err := os.Stat(filePath); err == nil {
slog.Debug("test", "filePath", filePath)
if _, err := os.Stat(filepath.Join(m.app.Info.Path.Cwd, filePath)); err == nil {
slog.Debug("test", "found", true)
attachment := m.createAttachmentFromFile(filePath)
if attachment != nil {
m.textarea.InsertAttachment(attachment)