Commit a89374a
committed
Fix --attach flag being silently ignored without a message argument
When running 'docker-agent run --attach image.png' without a message,
readInitialMessage returns nil, so WithFirstMessage was never called.
This caused SendFirstMessage to return nil immediately, silently
discarding the attachment.
Synthesize an empty default first message when --attach is provided
without an explicit message, so SendFirstMessage proceeds to process
the attachment. The downstream CreateUserMessageWithAttachment already
handles empty text by substituting a default prompt.
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>1 parent e20da46 commit a89374a
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
488 | 493 | | |
489 | 494 | | |
490 | 495 | | |
| |||
0 commit comments