summaryrefslogtreecommitdiff
path: root/llm.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-11-21 08:23:14 +0300
committerGrail Finder <wohilas@gmail.com>2025-11-21 08:23:14 +0300
commitdc1d1eba0c6a7fa55e336c10c6e53046a75473ae (patch)
treea8390b8c8f72f8d55718c6231bc3dea93a07b8df /llm.go
parente8413ce613a71b6ec0b62b928a1179738655b49b (diff)
Fix: show last attached img on ctrl+j
Diffstat (limited to 'llm.go')
-rw-r--r--llm.go18
1 files changed, 3 insertions, 15 deletions
diff --git a/llm.go b/llm.go
index f5cc4d5..90e63de 100644
--- a/llm.go
+++ b/llm.go
@@ -9,29 +9,17 @@ import (
)
var imageAttachmentPath string // Global variable to track image attachment for next message
+var lastImg string // for ctrl+j
-// SetImageAttachment sets an image to be attached to the next message sent to the LLM and updates UI
+// SetImageAttachment sets an image to be attached to the next message sent to the LLM
func SetImageAttachment(imagePath string) {
imageAttachmentPath = imagePath
- // Update the UI to show image is attached (call function from tui.go)
- // UpdateImageAttachmentStatus(imagePath)
-}
-
-// SetImageAttachmentWithoutUI sets an image to be attached without UI updates (for internal use where UI updates might cause hangs)
-func SetImageAttachmentWithoutUI(imagePath string) {
- imageAttachmentPath = imagePath
+ lastImg = imagePath
}
// ClearImageAttachment clears any pending image attachment and updates UI
func ClearImageAttachment() {
imageAttachmentPath = ""
- // Update the UI to clear image attachment status (call function from tui.go)
- // UpdateImageAttachmentStatus("")
-}
-
-// ClearImageAttachmentWithoutUI clears any pending image attachment without UI updates
-func ClearImageAttachmentWithoutUI() {
- imageAttachmentPath = ""
}
type ChunkParser interface {