zot/internal/agent
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
..
modes tui: quote drag-dropped file paths in the input editor 2026-04-19 13:01:37 +02:00
tools initial commit 2026-04-17 20:36:38 +02:00
args.go feat: zotcore SDK + zot rpc subprocess protocol 2026-04-19 12:26:48 +02:00
botcmd.go fix ci on windows: split detach helper into posix/windows variants 2026-04-18 10:58:10 +02:00
botcmd_unix.go fix ci on windows: split detach helper into posix/windows variants 2026-04-18 10:58:10 +02:00
botcmd_windows.go fix ci on windows: split detach helper into posix/windows variants 2026-04-18 10:58:10 +02:00
build.go initial commit 2026-04-17 20:36:38 +02:00
cli.go feat: zotcore SDK + zot rpc subprocess protocol 2026-04-19 12:26:48 +02:00
config.go add telegram bot bridge 2026-04-18 09:15:46 +02:00
modelsync.go initial commit 2026-04-17 20:36:38 +02:00
rpc.go fix(rpc): wait for in-flight commands on stdin close, drop dup events 2026-04-19 12:35:13 +02:00
systemprompt.go initial commit 2026-04-17 20:36:38 +02:00
update.go tui: show 'update available' banner at top of chat 2026-04-18 11:49:22 +02:00