detached 9cc50ec

fix(telegram): pass images from bridge to agent

SubmitOrQueue was discarding the images parameter. Now passes them through to startTurnWithImages so photos sent via Telegram are included in the prompt.
commit
9cc50ecf7145b7be94260b7110f96f77f9b07152
author
patriceckhart · · 2026-04-26 12:25 UTC
parent
b2fa0e3
signature
unsigned
refs
tag: v0.1.22
1 file · +7 -3
M internal/agent/modes/interactive.go +7 -3
@@ -1671,7 +1671,6 @@ func (i *Interactive) Submit(text string) {
16711671 // forwarded — because the queued-prompt path is text-only; a
16721672 // follow-up can expand the queue entry to carry images.
16731673 func (i *Interactive) SubmitOrQueue(text string, images []provider.ImageBlock) {
1674- _ = images // reserved for future queued-with-images support
16751674 i.mu.Lock()
16761675 if i.agent == nil {
16771676 i.statusErr = "not logged in. type /login first."
@@ -1680,13 +1679,14 @@ func (i *Interactive) SubmitOrQueue(text string, images []provider.ImageBlock) {
16801679 return
16811680 }
16821681 if i.busy {
1682+ // Queue text only; images are dropped for queued prompts.
16831683 i.queued = append(i.queued, text)
16841684 i.mu.Unlock()
16851685 i.invalidate()
16861686 return
16871687 }
16881688 i.mu.Unlock()
1689- i.startTurn(i.runCtx, text)
1689+ i.startTurnWithImages(i.runCtx, text, images)
16901690 }
16911691
16921692 // CancelTurn aborts the active turn if one is running. Used by the
@@ -2548,6 +2548,10 @@ func (i *Interactive) runCompact(parent context.Context, auto bool) {
25482548 }
25492549
25502550 func (i *Interactive) startTurn(parent context.Context, prompt string) {
2551+ i.startTurnWithImages(parent, prompt, nil)
2552+}
2553+
2554+func (i *Interactive) startTurnWithImages(parent context.Context, prompt string, images []provider.ImageBlock) {
25512555 if i.agent == nil {
25522556 return
25532557 }
@@ -2575,7 +2579,7 @@ func (i *Interactive) startTurn(parent context.Context, prompt string) {
25752579 }
25762580
25772581 go func() {
2578- err := i.agent.Prompt(ctx, prompt, nil, sink)
2582+ err := i.agent.Prompt(ctx, prompt, images, sink)
25792583 i.mu.Lock()
25802584 i.busy = false
25812585 // Don't touch streamPending / streamFlushPending here — the
@@ -1671,7 +1671,6 @@ func (i *Interactive) Submit(text string) {
1671 // forwarded — because the queued-prompt path is text-only; a1671 // forwarded — because the queued-prompt path is text-only; a
1672 // follow-up can expand the queue entry to carry images.1672 // follow-up can expand the queue entry to carry images.
1673 func (i *Interactive) SubmitOrQueue(text string, images []provider.ImageBlock) {1673 func (i *Interactive) SubmitOrQueue(text string, images []provider.ImageBlock) {
1674- _ = images // reserved for future queued-with-images support
1675 i.mu.Lock()1674 i.mu.Lock()
1676 if i.agent == nil {1675 if i.agent == nil {
1677 i.statusErr = "not logged in. type /login first."1676 i.statusErr = "not logged in. type /login first."
@@ -1680,13 +1679,14 @@ func (i *Interactive) SubmitOrQueue(text string, images []provider.ImageBlock) {
1680 return1679 return
1681 }1680 }
1682 if i.busy {1681 if i.busy {
1682+ // Queue text only; images are dropped for queued prompts.
1683 i.queued = append(i.queued, text)1683 i.queued = append(i.queued, text)
1684 i.mu.Unlock()1684 i.mu.Unlock()
1685 i.invalidate()1685 i.invalidate()
1686 return1686 return
1687 }1687 }
1688 i.mu.Unlock()1688 i.mu.Unlock()
1689- i.startTurn(i.runCtx, text)1689+ i.startTurnWithImages(i.runCtx, text, images)
1690 }1690 }
1691 1691
1692 // CancelTurn aborts the active turn if one is running. Used by the1692 // CancelTurn aborts the active turn if one is running. Used by the
@@ -2548,6 +2548,10 @@ func (i *Interactive) runCompact(parent context.Context, auto bool) {
2548 }2548 }
2549 2549
2550 func (i *Interactive) startTurn(parent context.Context, prompt string) {2550 func (i *Interactive) startTurn(parent context.Context, prompt string) {
2551+ i.startTurnWithImages(parent, prompt, nil)
2552+}
2553+
2554+func (i *Interactive) startTurnWithImages(parent context.Context, prompt string, images []provider.ImageBlock) {
2551 if i.agent == nil {2555 if i.agent == nil {
2552 return2556 return
2553 }2557 }
@@ -2575,7 +2579,7 @@ func (i *Interactive) startTurn(parent context.Context, prompt string) {
2575 }2579 }
2576 2580
2577 go func() {2581 go func() {
2578- err := i.agent.Prompt(ctx, prompt, nil, sink)2582+ err := i.agent.Prompt(ctx, prompt, images, sink)
2579 i.mu.Lock()2583 i.mu.Lock()
2580 i.busy = false2584 i.busy = false
2581 // Don't touch streamPending / streamFlushPending here — the2585 // Don't touch streamPending / streamFlushPending here — the

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 476

↑↓ moveenter openesc close