Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 0 additions & 80 deletions .github/workflows/release.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .release-please-manifest.json

This file was deleted.

5 changes: 2 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,5 @@
two modes, config is TOML-only, and the catalog is live with an empty fallback.
For config or hook changes, consult `docs/configuration.md` or `docs/hooks.md`
and reconcile with the implementation.
- Releases use conventional commits and release-please, with wheel/sdist attached
to GitHub Releases, not PyPI. `.github/workflows/release.yml` separately re-locks
`uv.lock` after release-please bumps `pyproject.toml`.
- Releases are manual: there is no release automation. Commits still follow
conventional commits; `pyproject.toml` carries a static version.
8 changes: 0 additions & 8 deletions release-please-config.json

This file was deleted.

12 changes: 1 addition & 11 deletions src/lecode/cli.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""lecode command-line interface.

Scope: ``--version``, the startup dependency check (fd / rg / rtk), headless
Scope: the startup dependency check (fd / rg / rtk), headless
mode (``-p/--prompt``: auto-approved tools, auto-named session, final
response on stdout, token/cost summary on stderr, exit codes 0 done /
1 error / 2 startup / 3 max turns / 4-9 provider failures), and the interactive TUI (default when
Expand Down Expand Up @@ -156,12 +156,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
)


def _version_callback(value: bool) -> None:
if value:
typer.echo(f"lecode {__version__}")
raise typer.Exit(EXIT_OK)


def check_dependencies() -> None:
"""Abort startup (exit code 2) if fd/rg/rtk are missing from PATH."""
missing = find_missing_binaries()
Expand Down Expand Up @@ -986,10 +980,6 @@ def run_setup() -> int:

@app.callback(cls=_LeCodeGroup, invoke_without_command=True)
def callback(
version: Annotated[
bool,
typer.Option("--version", "-V", callback=_version_callback, is_eager=True),
] = False,
prompt: Annotated[
str | None,
typer.Option(
Expand Down
6 changes: 1 addition & 5 deletions src/lecode/tui/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,14 +315,10 @@ def build_load_report(


def _byline_text(theme: Theme, splash: str | None) -> Text:
"""Version, ``by Kalvad`` link, and the splash tagline on one line."""
from lecode import __version__

"""The ``by Kalvad`` link and the splash tagline on one line."""
if splash is None:
splash = random.choice(_SPLASHES)
line = Text()
line.append(f"v{__version__}", style=theme.muted)
line.append(" · ", style=theme.muted)
line.append("by ", style=theme.muted)
line.append("Kalvad", style=f"bold {theme.accent} link https://kalvad.com")
line.append(f" — {splash}", style=f"italic {theme.permission}")
Expand Down
15 changes: 1 addition & 14 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Tests for the CLI bootstrap (version flag, dependency gating)."""
"""Tests for the CLI bootstrap (dependency gating)."""

from __future__ import annotations

Expand All @@ -7,24 +7,11 @@
import pytest
from typer.testing import CliRunner

from lecode import __version__
from lecode.cli import EXIT_OK, EXIT_STARTUP, app

runner = CliRunner()


def test_version_flag():
result = runner.invoke(app, ["--version"])
assert result.exit_code == EXIT_OK
assert f"lecode {__version__}" in result.stdout


def test_version_flag_short():
result = runner.invoke(app, ["-V"])
assert result.exit_code == EXIT_OK
assert __version__ in result.stdout


def test_help_flag_short():
"""``-h`` is an alias for ``--help``."""
for flag in ("-h", "--help"):
Expand Down
4 changes: 1 addition & 3 deletions tests/test_tui_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,7 @@ def test_progressive_banner_prints_immediately():
assert "by Kalvad" in text


def test_banner_shows_version_splash_and_gradient():
from lecode import __version__
def test_banner_shows_splash_and_gradient():
from lecode.tui.loading import print_banner

out = io.StringIO()
Expand All @@ -427,7 +426,6 @@ def test_banner_shows_version_splash_and_gradient():
print_banner(console, THEME, splash="test splash")
raw = out.getvalue()
text = Text.from_ansi(raw).plain
assert f"v{__version__}" in text
assert "by Kalvad" in text
assert "test splash" in text
# the banner is colored per column — leftmost glyph is the deep-purple endpoint
Expand Down
Loading