zot/internal/tui
patriceckhart 8927ac15dc feat(tui): show read's line range in the tool header
read calls now render their requested line range next to the
path, so you can see at a glance what slice of the file the
model looked at.

  before:  ▸ read /Users/pat/Developer/zot/internal/tui/view.go
  after :  ▸ read /Users/pat/Developer/zot/internal/tui/view.go:723-772
           ▸ read /Users/pat/Developer/zot/internal/tui/view.go:100-
           ▸ read /Users/pat/Developer/zot/internal/tui/view.go

The ":START-END" suffix appears when the call had a limit arg;
the ":START-" (open-ended) form appears when only offset was
supplied; no suffix appears for whole-file reads (the common
case). Other tools (write, edit, bash) are unchanged - their
args don't carry a range.

Implementation:

  - shortArgs -> ShortArgs (exported), now takes the tool name
    as a first arg so it can add shape-specific decorations.
    For read, parses offset/limit from the args and appends the
    range; for everything else it falls back to the old
    path-or-command truncated-at-60 shape.
  - The truncation budget shrinks by the length of the suffix
    so absurdly long paths still leave the range visible (path
    gets the "..." in the middle, range stays intact at the
    tail).
  - toInt helper coerces float64 (json.Unmarshal's default),
    int, and numeric strings so we survive the occasional model
    that returns "100" instead of 100.
  - Dropped the duplicate unexported shortArgs in interactive.go
    (pre-dated the tui package's version). All call sites now
    go through tui.ShortArgs(name, args); the json import that
    only the local copy needed is gone too.

No format string changes elsewhere; the extension intercept
protocol, rpc wire schema, and session file format don't see
the header string.
2026-04-20 15:55:34 +02:00
..
editor.go fix(tui): three cursor/alignment fixes in the editor and /help 2026-04-19 20:25:34 +02:00
highlight.go chore: scrub stray "pi" references from source comments 2026-04-19 17:06:45 +02:00
image.go fix ci: portable syscall.Select via x/sys/unix; gofmt pass 2026-04-18 10:55:42 +02:00
input.go add collapsible code blocks 2026-04-18 10:30:29 +02:00
markdown.go feat(tui): context diffs + framed tool blocks + paced streaming 2026-04-20 15:50:39 +02:00
partialjson.go feat(tui): live-stream file body during write/edit tool calls 2026-04-20 08:37:14 +02:00
partialjson_test.go feat(tui): live-stream file body during write/edit tool calls 2026-04-20 08:37:14 +02:00
quote_paste_test.go tui: quote drag-dropped file paths in the input editor 2026-04-19 13:01:37 +02:00
render.go tui: quote drag-dropped file paths in the input editor 2026-04-19 13:01:37 +02:00
resize_unix.go fix ci: portable syscall.Select via x/sys/unix; gofmt pass 2026-04-18 10:55:42 +02:00
resize_windows.go initial commit 2026-04-17 20:36:38 +02:00
statusbar_test.go feat(ext): phase 4 - full-event interception, arg rewrites, /reload-ext 2026-04-19 17:02:04 +02:00
terminal.go initial commit 2026-04-17 20:36:38 +02:00
theme.go fix ci: portable syscall.Select via x/sys/unix; gofmt pass 2026-04-18 10:55:42 +02:00
view.go feat(tui): show read's line range in the tool header 2026-04-20 15:55:34 +02:00
wrap_test.go fix(tui): three cursor/alignment fixes in the editor and /help 2026-04-19 20:25:34 +02:00