zot/internal/agent/modes
patriceckhart 36e0efe9ea tui: quote drag-dropped file paths in the input editor
dragging a file onto the terminal pastes its path via bracketed
paste. before this, agents would receive raw paths with literal
spaces and parens that shells/tools then misinterpreted (e.g.
"/Users/pat/foo bar.png" parsed as two arguments).

the editor's KeyPaste handler now runs pastes through
quotePastedFilePaths which:
  - inspects whitespace-separated tokens of single-line pastes
  - normalises file:// urls (decode + scheme strip), backslash
    space escapes (the macOS Terminal default for drag-drop), and
    pre-existing single/double-quoted forms
  - wraps tokens that look like paths (start with / or ~ and
    contain a separator, no shell metacharacters) in single
    quotes, splicing 'foo'\''bar' for embedded apostrophes
  - leaves prose, multi-line code pastes, and anything with
    metachars untouched

regression suite covers the 12 cases that surfaced while
implementing: backslash-escaped spaces, file:// urls, tilde
paths, multi-file drops, pre-quoted paths, embedded apostrophes,
plain prose, multiline pastes, metachar smuggling attempts, and
path-mixed-with-prose. all pass.

verified the build, vet, gofmt, and go test pipeline on darwin,
linux and windows targets.
2026-04-19 13:01:37 +02:00
..
telegram add telegram bot bridge 2026-04-18 09:15:46 +02:00
dialog_frame.go tui: show 'update available' banner at top of chat 2026-04-18 11:49:22 +02:00
help.go add collapsible code blocks 2026-04-18 10:30:29 +02:00
interactive.go tui: quote drag-dropped file paths in the input editor 2026-04-19 13:01:37 +02:00
json.go feat: zotcore SDK + zot rpc subprocess protocol 2026-04-19 12:26:48 +02:00
jump_dialog.go tui: /jump to scroll to past turns, render cache for long transcripts 2026-04-18 12:22:16 +02:00
login_dialog.go initial commit 2026-04-17 20:36:38 +02:00
model_dialog.go add telegram bot bridge 2026-04-18 09:15:46 +02:00
print.go initial commit 2026-04-17 20:36:38 +02:00
session_dialog.go fix ci: portable syscall.Select via x/sys/unix; gofmt pass 2026-04-18 10:55:42 +02:00
slash_suggest.go tui: slash commands work while a turn is in flight 2026-04-19 11:21:37 +02:00
spinner.go tui: switch busy spinner to cli-spinners 'dots3' preset 2026-04-19 11:52:41 +02:00
update_banner.go tui: show 'update available' banner at top of chat 2026-04-18 11:49:22 +02:00
welcome.go initial commit 2026-04-17 20:36:38 +02:00