lithe-cli 0.3.1__tar.gz → 0.3.2__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.
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/PKG-INFO +1 -1
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/__init__.py +1 -1
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/commands.py +1 -1
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/main.py +3 -3
- lithe_cli-0.3.2/lithe_cli/ttui/__init__.py +44 -0
- lithe_cli-0.3.1/lithe_cli/ttui.py → lithe_cli-0.3.2/lithe_cli/ttui/app.py +32 -596
- lithe_cli-0.3.2/lithe_cli/ttui/copy.py +102 -0
- lithe_cli-0.3.2/lithe_cli/ttui/pickers.py +466 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/ttui_render.py +2 -2
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/ttui_widgets.py +45 -0
- lithe_cli-0.3.2/lithe_cli/workbench/__init__.py +33 -0
- lithe_cli-0.3.2/lithe_cli/workbench/core.py +212 -0
- lithe_cli-0.3.2/lithe_cli/workbench/dispatch.py +212 -0
- lithe_cli-0.3.2/lithe_cli/workbench/endpoints.py +406 -0
- lithe_cli-0.3.2/lithe_cli/workbench/settings.py +150 -0
- lithe_cli-0.3.2/lithe_cli/workbench/turns.py +168 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli.egg-info/PKG-INFO +1 -1
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli.egg-info/SOURCES.txt +12 -4
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_cli.py +24 -16
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_cli_budget_steer.py +1 -1
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_cli_subagents.py +3 -3
- lithe_cli-0.3.1/tests/test_tui_v2.py → lithe_cli-0.3.2/tests/test_present.py +2 -2
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_ttui.py +43 -3
- lithe_cli-0.3.1/lithe_cli/workbench.py +0 -1118
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/LICENSE +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/README.md +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/__main__.py +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/agent.py +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/cli_parser.py +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/clipboard.py +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/config.py +0 -0
- /lithe_cli-0.3.1/lithe_cli/tui.py → /lithe_cli-0.3.2/lithe_cli/present.py +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/profiles.py +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/prompts.py +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/py.typed +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/sessions.py +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/setup.py +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/ui.py +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli.egg-info/dependency_links.txt +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli.egg-info/entry_points.txt +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli.egg-info/requires.txt +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli.egg-info/top_level.txt +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/pyproject.toml +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/setup.cfg +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_cli_clipboard.py +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_cli_guard.py +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_cli_sessions.py +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_profiles.py +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_setup.py +0 -0
- {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_workbench.py +0 -0
|
@@ -15,7 +15,7 @@ from collections.abc import Callable
|
|
|
15
15
|
|
|
16
16
|
# The /copy scope vocabulary lives with the feed it extracts from, so the
|
|
17
17
|
# completion hint, the help line and the parser can never drift apart.
|
|
18
|
-
from .
|
|
18
|
+
from .present import COPY_SCOPE_HELP
|
|
19
19
|
|
|
20
20
|
# name → (args hint, one-line description); order is the help order.
|
|
21
21
|
COMMANDS: dict[str, tuple[str, str]] = {
|
|
@@ -38,7 +38,7 @@ from .cli_parser import build_parser
|
|
|
38
38
|
from .agent import build_registry, execute, render_event, sandbox_backend, undo
|
|
39
39
|
from .config import config_file, load_config, require_endpoint
|
|
40
40
|
from .prompts import open_history
|
|
41
|
-
from .
|
|
41
|
+
from .present import screen_supported
|
|
42
42
|
from .ui import BOLD, CYAN, GREEN, RED, YELLOW, configure, truncate, ui
|
|
43
43
|
|
|
44
44
|
|
|
@@ -122,7 +122,7 @@ def _cmd_sessions(cfg: Any, args: Any) -> int:
|
|
|
122
122
|
if args.export:
|
|
123
123
|
# Plain text on stdout, so a copy-and-paste workflow works outside
|
|
124
124
|
# the full-screen UI too: `lithe sessions --export 12 | pbcopy`.
|
|
125
|
-
from .
|
|
125
|
+
from .present import feed_text, transcript_feed_lines
|
|
126
126
|
|
|
127
127
|
row, err = mgr.resolve_exact(args.export)
|
|
128
128
|
if row is None:
|
|
@@ -431,7 +431,7 @@ def _copy_plain(wb: Any, scope: str) -> None:
|
|
|
431
431
|
text through the same layered :mod:`lithe_cli.clipboard` channels.
|
|
432
432
|
"""
|
|
433
433
|
from .clipboard import deliver_clipboard
|
|
434
|
-
from .
|
|
434
|
+
from .present import COPY_SCOPE_LABELS, describe_copy, feed_text, \
|
|
435
435
|
transcript_feed_lines
|
|
436
436
|
|
|
437
437
|
label = COPY_SCOPE_LABELS.get(scope, scope)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""The full-screen front-end (Textual).
|
|
2
|
+
|
|
3
|
+
The only interactive UI: `lithe chat` / `lithe run` on an interactive
|
|
4
|
+
terminal always launch it; without a TTY `main` falls back to the plain
|
|
5
|
+
per-line REPL. Layout, modals, scrolling and repaint are Textual's.
|
|
6
|
+
|
|
7
|
+
What it builds on from :mod:`lithe_cli.present`: ``TuiState`` (kernel-event
|
|
8
|
+
folding, usage accounting), ``transcript_feed_lines`` (store → feed
|
|
9
|
+
rows). The conversation pane renders *from* the state's feed.
|
|
10
|
+
|
|
11
|
+
Input niceties: ``/``-commands complete inline (suggestions above the
|
|
12
|
+
prompt, Tab accepts the first), and ↑/↓ recall the persistent chat history
|
|
13
|
+
(shared with the plain REPL through prompt_toolkit's FileHistory store).
|
|
14
|
+
|
|
15
|
+
Copying: mouse reporting means the terminal's own drag-select and menu
|
|
16
|
+
never reach it, so the app brings its own — right-click opens a copy menu,
|
|
17
|
+
``/copy`` takes the whole conversation (or the last answer, the user's
|
|
18
|
+
lines, the tool output), and ``Ctrl+C`` copies a Textual text selection
|
|
19
|
+
when there is one before it falls back to cancel/exit. Delivery is
|
|
20
|
+
layered (platform tool → OSC 52 → file) in :mod:`lithe_cli.clipboard`;
|
|
21
|
+
Shift+drag still works in terminals that keep native selection.
|
|
22
|
+
"""
|
|
23
|
+
from __future__ import annotations
|
|
24
|
+
|
|
25
|
+
from .. import ttui_widgets as _widgets
|
|
26
|
+
from ..ttui_widgets import ( # noqa: F401 - re-exported surface
|
|
27
|
+
ConfirmModal, PickerModal, SubagentCard, selected_text,
|
|
28
|
+
)
|
|
29
|
+
from ..ttui_render import ( # noqa: F401 - legacy re-export kept
|
|
30
|
+
sidebar_markup as sidebar_markup,
|
|
31
|
+
)
|
|
32
|
+
from ..ui import fmt_duration as fmt_duration # noqa: F401 - legacy re-export
|
|
33
|
+
from .app import LitheApp, run_textual_screen
|
|
34
|
+
|
|
35
|
+
__all__ = ["LitheApp", "run_textual_screen"]
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def __getattr__(name: str):
|
|
39
|
+
"""Forward extracted widget names for existing `lithe_cli.ttui` users."""
|
|
40
|
+
try:
|
|
41
|
+
return getattr(_widgets, name)
|
|
42
|
+
except AttributeError:
|
|
43
|
+
raise AttributeError(
|
|
44
|
+
f"module {__name__!r} has no attribute {name!r}") from None
|