summaryrefslogtreecommitdiff
path: root/tests/tui.exp
diff options
context:
space:
mode:
authort <t@tjp.lol>2026-12-04 15:30:05 -0700
committert <t@tjp.lol>2026-12-04 15:31:08 -0700
commit48b14add01cb106217832e036e3569e494f1d65c (patch)
treebe561d29fa32d393c8d91d1e01eedfab9d5ffc86 /tests/tui.exp
parent835b962682c13a16696dd3f4fe1428dbab9141b5 (diff)
Send dropped images as native ACP prompt content blocksHEADmain
Panto expands a pasted image into a multi-block user message (text, [Image-N] path text, base64 media). The adapter only accepted a single text block, so any image drop failed with 'No matching Antigravity tool handoff or text prompt'. Translate text and image/* media blocks into ACP ContentBlocks for new turns, warm follow-ups, boundary steering and transcript reseeds, gated on the agent's advertised promptCapabilities.image. Image data rides outside agy's ~191 KB user-text cap, so only text bytes count toward message_bytes; reseeds prefix the leading text block and reserve room for the path context block. Non-image attachments (PDFs) are refused before launch because agy's ACP inlineMedia accepts image/* only. The offline check now drops a real PNG via bracketed paste across a warm turn, /tree reseed and cold resume, and asserts PDF rejection.
Diffstat (limited to 'tests/tui.exp')
-rw-r--r--tests/tui.exp12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/tui.exp b/tests/tui.exp
index fdbad27..efa4cda 100644
--- a/tests/tui.exp
+++ b/tests/tui.exp
@@ -22,6 +22,7 @@ foreach {prompt answer} {hello primary-tool-ok again same-session-ok} {
}
send -- "late-tool"; see {late-tool}; send -- "\r"; see {timeout-handled-ok}
send -- "/fixture-notice "; see {/fixture-notice }; send -- "\r"; see {workflow-notice-ok}
+send -- "\033\[200~$env(HOME)/drop.png\033\[201~ image-probe"; see {\[Image-1\] image-probe}; send -- "\r"; see {image-drop-ok}
send -- "\003"; expect eof; wait
set flag [open "$env(HOME)/.local/share/panto-antigravity/google/usage-failure" w]; close $flag
spawn -noecho $env(PANTO) resume -m antigravity:fast -r high
@@ -33,9 +34,8 @@ send -- "\003"; expect eof; wait
spawn -noecho $env(PANTO) resume -m antigravity:fast -r low
see {antigravity:}; send -- "/tree "; see {/tree }; send -- "\r"; see {session tree}
send -- "primary-tool-ok"; after 150; send -- "\r"; see {branched from}
-foreach {query answer} {branch-probe branch-seed-ok warm-probe warm-after-seed-ok} {
- send -- $query; see $query; send -- "\r"; see $answer
-}
+send -- "\033\[200~$env(HOME)/drop.png\033\[201~ branch-probe"; see {\[Image-2\] branch-probe}; send -- "\r"; see {branch-seed-ok}
+send -- "warm-probe"; see {warm-probe}; send -- "\r"; see {warm-after-seed-ok}
send -- "esc-probe"; see {esc-probe}; send -- "\r"; see {esc-window-open}
send -- "\033"; see {\[interrupted\]}
send -- "after-esc-probe"; see {after-esc-probe}; send -- "\r"; see {after-esc-ok}
@@ -75,8 +75,10 @@ see {requires direct TUI input}; send -- "\003"; expect eof; wait
spawn -noecho $env(PANTO) --incognito -m antigravity:fast -r low -- no-tools
see {no-tools-ok}
send -- "\003"; expect eof; wait
-# xhigh exists before switching models, but not on gemini-test.
+# xhigh exists before switching models, but not on gemini-test; PDFs are rejected before ACP launch.
spawn -noecho $env(PANTO) --incognito -m antigravity:fast -r xhigh
-see {antigravity:}; send -- "unsupported"; see {unsupported}; send -- "\r"
+see {antigravity:}; send -- "\033\[200~$env(HOME)/drop.pdf\033\[201~"; see {\[Attachment-1\]}; send -- "\r"
+see {only text and image}
+send -- "unsupported"; see {unsupported}; send -- "\r"
see {reasoning level xhigh}
send -- "\003"; expect eof; wait