diff --git a/README.md b/README.md index 266cfa3..61d345b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ai 0.3.5 +# ai 0.3.6 Terminal AI-klient för OpenRouter, anpassad för Lyra/PicoCalc. diff --git a/pyproject.toml b/pyproject.toml index ee52ad2..b802dd0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "ai-terminal" -version = "0.3.5" +version = "0.3.6" description = "Compact terminal AI client for OpenRouter" requires-python = ">=3.10" dependencies = ["httpx>=0.27,<1", "PyYAML>=6.0"] diff --git a/src/ai/tui.py b/src/ai/tui.py index 7444b65..15ba718 100644 --- a/src/ai/tui.py +++ b/src/ai/tui.py @@ -188,8 +188,11 @@ class App: attr = curses.color_pair(1) if self.focus == "input" and curses.has_colors() else 0 screen.addnstr(first_row + i, 0, pfx + text, max(0, width), attr) - if status: - screen.addnstr(height - 1, 0, status, max(0, width), + if status and width > 1: + # The bottom-right terminal cell is special in curses: writing + # into it can return ERR even when the text length is exactly + # the terminal width. Leave the last column unused. + screen.addnstr(height - 1, 0, status, width - 1, curses.color_pair(3) if curses.has_colors() else 0) if self.focus == "input":