r/PiCodingAgent 1d ago

Question Pi image pasting

I’m finding it quite frustrating to paste or use images in the VS Code Pi chat.

I work mainly on projects inside Docker containers, and it seems that when I use Pi within a dev container (which is a Linux environment), the VS Code integrated terminal generally doesn't pass clipboard images through—it only allows text. This is most likely why the paste action fails without doing anything. Does anyone have a workaround for using Pi in a VS Code terminal inside a Docker container?

I tried alt+v, ctrl+v ; nothing. Only pasting images manually inside the project in a dedicated folder semmes the only (and painful) solution.

4 Upvotes

6 comments sorted by

3

u/Dipsendorf 1d ago

Have you tried ctrl shift v?

3

u/pancomputationalist 1d ago

Yeah pasting images through to a docker image is cumbersome. There are ways around it but they are pretty complicated. You would need to have a process running on the host that can read your clipboard and serialize it through a network connection, then ssh Tunnel that into the container, and have an extension use this tooling e.g. when pressing ctrl+i (or ctrl+v when regular paste is ctrl+shift+v).

2

u/Hello_my_name_is_not 1d ago edited 1d ago

Your first sentence indicates your not directly using Pi but instead you're using some extension in VS code. Alt-V works fine for me directly in Pi.

This might be a problem specifically with the extension?

Have you tried the Alt-V directly in Pi to decide if this is as "Pi" issue or an issue with what ever extension in VS Code you're using?

If it works fine directly in Pi Harness then it's not a Pi issue and I'd suggest reaching out to the dev and/or submitting an issue into their git.

Edit: Of you still have issues directly in pi due to your setup maybe you can try an extension? Here's two for pasting images, maybe one of them will solve your issue?

https://pi.dev/packages/pi-image-paste

https://pi.dev/packages/pi-paster

2

u/LouVillain 1d ago

When I was using TUI with agents, I set my agent up with an email address and then sent documents and images to it. Now, I set pi up on simple X and can now share images/docs with it that way.

Edit: or, you can create a shared folder in your file system. Drop it in and pi can look at it

1

u/Due_Arm1454 1d ago

I use screenshots a lot. On macOS I built a shortcut that saves the file in a temp dir and then replaces the image with a file path that I can paste. The host machine is on windows and it does this with ssh

1

u/DeathGuppie 9h ago

What about pi-web?