lql-cli 0.5.0__tar.gz → 0.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lql_cli-0.5.0 → lql_cli-0.6.0}/PKG-INFO +3 -2
- {lql_cli-0.5.0 → lql_cli-0.6.0}/README.md +2 -1
- {lql_cli-0.5.0 → lql_cli-0.6.0}/pyproject.toml +1 -1
- lql_cli-0.6.0/src/lql/__init__.py +1 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/commands/instructions.py +6 -1
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/commands/tui.py +87 -15
- {lql_cli-0.5.0 → lql_cli-0.6.0}/uv.lock +1 -1
- lql_cli-0.5.0/src/lql/__init__.py +0 -1
- {lql_cli-0.5.0 → lql_cli-0.6.0}/.claude/settings.local.json +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/.gitignore +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/examples/agent-traces.jsonl +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/package-lock.json +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/_group.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/_opts.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/api.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/cli.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/commands/__init__.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/commands/annotations.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/commands/auth.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/commands/buckets.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/commands/datasets.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/commands/edits.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/commands/evals.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/commands/highlights.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/commands/issues.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/commands/preview.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/commands/reports.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/commands/skills.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/commands/spec.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/commands/update.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/commands/workspaces.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/config.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/output.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/sessions.py +0 -0
- {lql_cli-0.5.0 → lql_cli-0.6.0}/src/lql/util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lql-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: lql — CLI for the Liquid DataViewer platform
|
|
5
5
|
Project-URL: Homepage, https://github.com/Liquid4All/lql
|
|
6
6
|
Author: Liquid AI
|
|
@@ -189,10 +189,11 @@ and **`p` plays** the current sample's audio via the system player (`afplay`/
|
|
|
189
189
|
`open`). Images render inline in pager mode (one sample at a time); scroll mode
|
|
190
190
|
shows placeholders to avoid decoding the whole buffer.
|
|
191
191
|
|
|
192
|
-
**Navigation** — two modes, toggle with `m
|
|
192
|
+
**Navigation** — two modes, toggle with `m`:
|
|
193
193
|
|
|
194
194
|
- **pager** (default): one sample at a time · `←/→` or `n`/`b` switch samples · `↑/↓`/`j`/`k`/PgUp-Dn scroll
|
|
195
195
|
- **scroll**: all samples in one buffer · `n`/`b` jump between samples · arrows scroll
|
|
196
|
+
- **copy**: `Tab`/`Shift+Tab` move a highlight between blocks · `c` copies the focused message/field · `Y` copies the whole sample as JSON (via OSC 52 — reaches your **local** clipboard over SSH where the terminal supports it, e.g. Ghostty/iTerm2; not macOS Terminal)
|
|
196
197
|
- `p` play audio · `q` quits
|
|
197
198
|
|
|
198
199
|
```
|
|
@@ -173,10 +173,11 @@ and **`p` plays** the current sample's audio via the system player (`afplay`/
|
|
|
173
173
|
`open`). Images render inline in pager mode (one sample at a time); scroll mode
|
|
174
174
|
shows placeholders to avoid decoding the whole buffer.
|
|
175
175
|
|
|
176
|
-
**Navigation** — two modes, toggle with `m
|
|
176
|
+
**Navigation** — two modes, toggle with `m`:
|
|
177
177
|
|
|
178
178
|
- **pager** (default): one sample at a time · `←/→` or `n`/`b` switch samples · `↑/↓`/`j`/`k`/PgUp-Dn scroll
|
|
179
179
|
- **scroll**: all samples in one buffer · `n`/`b` jump between samples · arrows scroll
|
|
180
|
+
- **copy**: `Tab`/`Shift+Tab` move a highlight between blocks · `c` copies the focused message/field · `Y` copies the whole sample as JSON (via OSC 52 — reaches your **local** clipboard over SSH where the terminal supports it, e.g. Ghostty/iTerm2; not macOS Terminal)
|
|
180
181
|
- `p` play audio · `q` quits
|
|
181
182
|
|
|
182
183
|
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.6.0"
|
|
@@ -103,7 +103,7 @@ Options: -c/--column (field(s) to treat as conversations; default auto-detect,
|
|
|
103
103
|
repeatable), -n/--limit (page size when paging a platform dataset), --offset
|
|
104
104
|
(start row index), --title, --hf, --split, --workspace, --profile, --api-url.
|
|
105
105
|
|
|
106
|
-
Navigation: two modes toggled with m
|
|
106
|
+
Navigation: two modes toggled with m — pager (one sample at a time; ←/→ or
|
|
107
107
|
n/b switch samples, ↑/↓/j/k scroll) and scroll (all samples; n/b jump between
|
|
108
108
|
them). q quits. Works over plain SSH with no browser or port-forward.
|
|
109
109
|
|
|
@@ -112,6 +112,11 @@ Sixel; placeholder otherwise) for both multimodal image segments and image-mode
|
|
|
112
112
|
columns; audio shows a ♪ line and `p` plays the current sample's clip via the
|
|
113
113
|
system player (afplay/open).
|
|
114
114
|
|
|
115
|
+
Copy: Tab/Shift+Tab move a highlight between blocks, `c` copies the focused
|
|
116
|
+
message/field, `Y` copies the whole sample as JSON — via OSC 52, reaching the
|
|
117
|
+
local clipboard over SSH where the terminal supports it (e.g. Ghostty/iTerm2;
|
|
118
|
+
not macOS Terminal).
|
|
119
|
+
|
|
115
120
|
## Evals
|
|
116
121
|
|
|
117
122
|
Eval datasets (evaluation-run output: each row a sample with a model 'response'
|
|
@@ -375,22 +375,44 @@ def _field(key: str, value: object, inline_images: bool = False) -> Panel:
|
|
|
375
375
|
return Panel(body, title=f"[dim]{escape(str(key))}[/]", title_align="left", border_style="grey30", box=box.MINIMAL)
|
|
376
376
|
|
|
377
377
|
|
|
378
|
-
def
|
|
378
|
+
def _field_copy_text(value: object) -> str:
|
|
379
|
+
return value if isinstance(value, str) else json.dumps(value, ensure_ascii=False, indent=2, default=str)
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
def sample_blocks(
|
|
379
383
|
row: object, forced_cols: Optional[List[str]] = None, width: Optional[int] = None, inline_images: bool = False
|
|
380
|
-
) ->
|
|
381
|
-
|
|
384
|
+
) -> List[tuple]:
|
|
385
|
+
"""Return [(renderable, copy_text), ...] — one entry per message/field, with
|
|
386
|
+
the raw text to copy. copy_text is None for non-copyable bits (e.g. a column
|
|
387
|
+
label). Single source for both render_sample (Group) and the focusable
|
|
388
|
+
per-block widgets in the viewer."""
|
|
389
|
+
blocks: List[tuple] = []
|
|
390
|
+
|
|
391
|
+
def _conv(raw: list, col: Optional[str]) -> None:
|
|
392
|
+
if col:
|
|
393
|
+
blocks.append((Text(col, style="dim"), None))
|
|
394
|
+
for m in _parse_messages(raw):
|
|
395
|
+
blocks.append((_message(m, width, inline_images), m.get("content") or ""))
|
|
396
|
+
|
|
382
397
|
if _is_conversation(row):
|
|
383
|
-
|
|
398
|
+
_conv(row, None)
|
|
384
399
|
elif isinstance(row, dict):
|
|
385
400
|
for key, val in row.items():
|
|
386
401
|
forced = forced_cols is not None and key in forced_cols
|
|
387
402
|
auto = forced_cols is None and _is_conversation(val)
|
|
388
403
|
if (forced or auto) and _is_conversation(val):
|
|
389
|
-
|
|
404
|
+
_conv(val, key)
|
|
390
405
|
else:
|
|
391
|
-
blocks.append(_field(key, val, inline_images))
|
|
406
|
+
blocks.append((_field(key, val, inline_images), _field_copy_text(val)))
|
|
392
407
|
else:
|
|
393
|
-
blocks.append(_field("value", row, inline_images))
|
|
408
|
+
blocks.append((_field("value", row, inline_images), _field_copy_text(row)))
|
|
409
|
+
return blocks
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
def render_sample(
|
|
413
|
+
row: object, forced_cols: Optional[List[str]] = None, width: Optional[int] = None, inline_images: bool = False
|
|
414
|
+
) -> RenderableType:
|
|
415
|
+
blocks = [r for r, _ in sample_blocks(row, forced_cols, width, inline_images)]
|
|
394
416
|
return Group(*blocks) if blocks else Text("(empty sample)", style="dim")
|
|
395
417
|
|
|
396
418
|
|
|
@@ -533,16 +555,31 @@ def run(
|
|
|
533
555
|
except Exception:
|
|
534
556
|
pass
|
|
535
557
|
|
|
558
|
+
class CopyBlock(Static):
|
|
559
|
+
"""A focusable block (message/field/sample) that remembers the raw text
|
|
560
|
+
to copy. Tab/Shift+Tab move focus between blocks; `c` copies the focused
|
|
561
|
+
one to the clipboard (via OSC 52, so it works over SSH)."""
|
|
562
|
+
|
|
563
|
+
can_focus = True
|
|
564
|
+
|
|
565
|
+
def __init__(self, renderable, copy_text: str, **kwargs) -> None:
|
|
566
|
+
super().__init__(renderable, **kwargs)
|
|
567
|
+
self.copy_text = copy_text
|
|
568
|
+
|
|
536
569
|
class Viewer(App):
|
|
537
570
|
CSS = """
|
|
538
571
|
Screen { background: $surface; }
|
|
539
572
|
#body { padding: 1 2; }
|
|
540
573
|
#body > Static { margin-bottom: 1; }
|
|
574
|
+
CopyBlock { margin-bottom: 1; }
|
|
575
|
+
CopyBlock:focus { background: $boost; }
|
|
541
576
|
"""
|
|
542
577
|
BINDINGS = [
|
|
543
578
|
Binding("right,n,l", "next", "Next"),
|
|
544
579
|
Binding("left,b,h", "prev", "Prev"),
|
|
545
|
-
Binding("m
|
|
580
|
+
Binding("m", "toggle_mode", "Mode"),
|
|
581
|
+
Binding("c", "copy", "Copy block"),
|
|
582
|
+
Binding("Y", "copy_sample", "Copy JSON"),
|
|
546
583
|
Binding("down,j", "scroll_down", "Down", show=False),
|
|
547
584
|
Binding("up,k", "scroll_up", "Up", show=False),
|
|
548
585
|
Binding("pagedown,space", "page_down", "Page", show=False),
|
|
@@ -591,19 +628,36 @@ def run(
|
|
|
591
628
|
def _update_title(self) -> None:
|
|
592
629
|
self.sub_title = self._counter()
|
|
593
630
|
|
|
594
|
-
async def _rebuild(self) -> None:
|
|
631
|
+
async def _rebuild(self, preserve_focus: bool = False) -> None:
|
|
595
632
|
body = self.query_one("#body", VerticalScroll)
|
|
633
|
+
# Remember which copy-block was focused so a width-driven rebuild
|
|
634
|
+
# (resize) doesn't silently change what `c` copies.
|
|
635
|
+
keep_idx = None
|
|
636
|
+
if preserve_focus and self.mode == "pager" and isinstance(self.focused, CopyBlock):
|
|
637
|
+
cbs = list(self.query("#body CopyBlock"))
|
|
638
|
+
if self.focused in cbs:
|
|
639
|
+
keep_idx = cbs.index(self.focused)
|
|
596
640
|
await body.remove_children()
|
|
597
641
|
w = self._content_width()
|
|
598
642
|
self._last_width = w
|
|
599
643
|
if self.mode == "pager":
|
|
600
644
|
row = self.source.get(self.idx)
|
|
601
645
|
# Inline images only in pager mode (one sample) so we never decode/
|
|
602
|
-
# fetch images for the whole buffer at once.
|
|
603
|
-
|
|
604
|
-
|
|
646
|
+
# fetch images for the whole buffer at once. Each message/field is a
|
|
647
|
+
# focusable CopyBlock (Tab to move, c to copy).
|
|
648
|
+
widgets = []
|
|
649
|
+
if row is None:
|
|
650
|
+
widgets.append(Static(Text("(no data)")))
|
|
651
|
+
else:
|
|
652
|
+
for rend, copy_text in sample_blocks(row, forced_cols, width=w, inline_images=True):
|
|
653
|
+
widgets.append(Static(rend) if copy_text is None else CopyBlock(rend, copy_text))
|
|
654
|
+
await body.mount(*widgets)
|
|
605
655
|
body.scroll_home(animate=False)
|
|
606
656
|
self._mounted = 1
|
|
657
|
+
cbs = [wgt for wgt in widgets if isinstance(wgt, CopyBlock)]
|
|
658
|
+
target = cbs[keep_idx] if (keep_idx is not None and keep_idx < len(cbs)) else (cbs[0] if cbs else None)
|
|
659
|
+
if target is not None:
|
|
660
|
+
target.focus()
|
|
607
661
|
else:
|
|
608
662
|
n = self.source.count()
|
|
609
663
|
widgets = []
|
|
@@ -611,7 +665,9 @@ def run(
|
|
|
611
665
|
row = self.source.get(i)
|
|
612
666
|
label = f"sample {i + 1 + self.index_base}/{n + self.index_base}{'+' if self.source.has_more else ''}"
|
|
613
667
|
header = Rule(label, style="grey42")
|
|
614
|
-
|
|
668
|
+
# In scroll mode each whole sample is one focusable block (c copies the row JSON).
|
|
669
|
+
body_r = Group(header, render_sample(row, forced_cols, width=w))
|
|
670
|
+
widgets.append(CopyBlock(body_r, _field_copy_text(row), id=f"s{i}"))
|
|
615
671
|
if widgets:
|
|
616
672
|
await body.mount(*widgets)
|
|
617
673
|
self._mounted = n
|
|
@@ -619,16 +675,18 @@ def run(
|
|
|
619
675
|
self._update_title()
|
|
620
676
|
|
|
621
677
|
async def on_resize(self, event) -> None:
|
|
622
|
-
# Re-flow bubble widths when the terminal size changes
|
|
678
|
+
# Re-flow bubble widths when the terminal size changes; keep the
|
|
679
|
+
# focused block so `c` still copies what the user selected.
|
|
623
680
|
if self._loading:
|
|
624
681
|
return
|
|
625
682
|
if self._content_width() != self._last_width:
|
|
626
|
-
await self._rebuild()
|
|
683
|
+
await self._rebuild(preserve_focus=True)
|
|
627
684
|
|
|
628
685
|
def _scroll_to_current(self) -> None:
|
|
629
686
|
try:
|
|
630
687
|
target = self.query_one(f"#s{self.idx}")
|
|
631
688
|
self.query_one("#body", VerticalScroll).scroll_to_widget(target, animate=False, top=True)
|
|
689
|
+
target.focus() # so `c` copies the current sample in scroll mode
|
|
632
690
|
except Exception:
|
|
633
691
|
pass
|
|
634
692
|
|
|
@@ -705,4 +763,18 @@ def run(
|
|
|
705
763
|
err = _play_audio(clips[0])
|
|
706
764
|
self._set_status(f"⚠ {err}" if err else "▶ playing audio…")
|
|
707
765
|
|
|
766
|
+
def action_copy(self) -> None:
|
|
767
|
+
focused = self.focused
|
|
768
|
+
if isinstance(focused, CopyBlock):
|
|
769
|
+
self.copy_to_clipboard(focused.copy_text)
|
|
770
|
+
n = len(focused.copy_text)
|
|
771
|
+
self._set_status(f"copied {n} char{'s' if n != 1 else ''} (OSC 52)")
|
|
772
|
+
else:
|
|
773
|
+
self._set_status("Tab to focus a block, then c to copy")
|
|
774
|
+
|
|
775
|
+
def action_copy_sample(self) -> None:
|
|
776
|
+
row = self.source.get(self.idx)
|
|
777
|
+
self.copy_to_clipboard(json.dumps(row, ensure_ascii=False, indent=2, default=str))
|
|
778
|
+
self._set_status("copied sample JSON ✓")
|
|
779
|
+
|
|
708
780
|
Viewer().run()
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.5.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|