Skip to content

feat: chat attachments and speech-to-speech talk - #3

Merged
Andarius merged 19 commits into
masterfrom
feat/chat-attachments-and-talk
Aug 19, 2026
Merged

Andarius merged 19 commits into
masterfrom
feat/chat-attachments-and-talk

Conversation

@Andarius

Copy link
Copy Markdown
Contributor

Description

  • chat:send: file and image attachments — drag-and-drop in the TUI, content parts built with the padwan-llm multimodal helpers; images unsupported by the model are skipped with a warning.
  • talk: speech-to-speech voice chat on padwan-llm's Realtime client — hold-Space push-to-talk (release to send), batched mic audio flushed before commit, your transcript printed before the assistant's reply, generic assistant persona (--instructions overrides), clean Ctrl-C shutdown.
  • just chat opens the chat TUI with .env loaded automatically; env.template documents the expected keys.

Depends on padwan-llm feat/multimodal (polarsen-io/padwan-ai#24) — the realtime extra and content-part helpers are not in a published release yet, hence the local editable source and draft status.

Andarius added 13 commits July 16, 2026 07:56
Chat:
- Drag-and-drop files onto the terminal to queue attachments, sent with the
  next message. Text files are inlined, images sent as data URLs.
- Vision-capable models receive images; text-only models skip them (badge
  still shows what was dropped). Input bars turn amber on unsupported images.
- Ctrl+U clears the pending queue.

Talk:
- New `padwan-talk` command / `talk` subcommand: speech-to-speech language
  tutor over OpenAI realtime (gpt-realtime), gated behind the `voice` extra
  (sounddevice + PortAudio).

Deps:
- padwan-llm[realtime]; local editable padwan-llm/piou sources while the
  content-parts/vision + paste-hook work lands upstream.
The transport lets roughly one send through per read-poll tick, so
per-chunk appends starved the stream and the commit fired with most
audio still queued locally. Batch everything captured between sends,
wait for the queue to drain before committing, and print the seconds
of audio actually sent per turn.
Headless prompt loop over one persistent AgentSession (same store and
options as chat:send). Async stdin so exit never blocks on a reader
thread; Ctrl-C routes through task cancellation; Ctrl-D exits.
bytearray slice+del memmoved the whole queued backlog on every 50 ms
audio callback; BytesBuffer appends by reference and reads only copy at
chunk boundaries.
…urce

Bump the pin to >=0.8.0, drop the [tool.uv.sources] override, and migrate
talk.py to the 0.8.0 realtime API: top-level RealtimeClient factory with
session config on the constructor, connection opened via async with.
@Andarius Andarius self-assigned this Aug 19, 2026
@Andarius
Andarius marked this pull request as ready for review August 19, 2026 20:17
@Andarius
Andarius merged commit 0aec5b5 into master Aug 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant