Files
GenericAgent/frontends
nianyucatfish dfac66d972 fix(tui): file paste, block-delete, ctrl+c copy, per-session input (#389)
- Pasting non-image files (.docx/.pdf/.py …) was folded as `[Image #N]`
  because clipboard helper returned any file path. Split into image vs
  file by extension; non-images now fold as `[File #N]` and expand to
  the path on submit, same flow as images.
- Backspace/Delete used to nibble placeholders one char at a time.
  Override `action_delete_left/right`: when the caret sits flush against
  a `[Pasted text #N +X lines]` / `[Image #N]` / `[File #N]` placeholder
  on the matching side, remove the whole span and drop its dict entry.
- Ctrl+C inside the input was clearing the whole field. Root cause:
  `screen.get_selected_text()` doesn't see TextArea's internal selection,
  so the handler fell through to the input-reset branch. Fixed by
  preferring the focused InputArea's `selected_text` before screen-level
  drag selection.
- Input text/history/pastes were globally shared across agent sessions
  (single InputArea widget). Moved the four state slots
  (text/history/pastes/paste_counter) onto `AgentSession`, with a
  `_swap_input_for_session` snapshot/restore on session switch.
2026-05-15 15:38:53 +08:00
..
2026-05-14 22:46:06 +08:00
…
…