diff --git a/CHANGELOG.md b/CHANGELOG.md index 4aa5281..baeecd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.14.1 - 2025-01-25 + +### Bug Fixes + +* Capture stderr in addition to stdout when capturing output from `llm` cli. + ## 1.14.0 - 2025-01-22 ### Features diff --git a/README.md b/README.md index 81f0769..ac4b3b8 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ A command-line client for SQLite databases that has auto-completion and syntax highlighting. -![Completion](screenshots/litecli.png) -![CompletionGif](screenshots/litecli.gif) +![Completion](https://raw.githubusercontent.com/dbcli/litecli/refs/heads/main/screenshots/litecli.png) +![CompletionGif](https://raw.githubusercontent.com/dbcli/litecli/refs/heads/main/screenshots/litecli.gif) ## Installation diff --git a/litecli/packages/special/llm.py b/litecli/packages/special/llm.py index 0cf4c6f..f18495b 100644 --- a/litecli/packages/special/llm.py +++ b/litecli/packages/special/llm.py @@ -36,9 +36,10 @@ def run_external_cmd(cmd, *args, capture_output=False, restart_cli=False, raise_ if capture_output: buffer = io.StringIO() - redirect = contextlib.redirect_stdout(buffer) + redirect = contextlib.ExitStack() + redirect.enter_context(contextlib.redirect_stdout(buffer)) + redirect.enter_context(contextlib.redirect_stderr(buffer)) else: - # Use nullcontext to do nothing when not capturing output redirect = contextlib.nullcontext() with redirect: @@ -172,7 +173,6 @@ def initialize_llm(): if click.confirm("This feature requires additional libraries. Install LLM library?", default=True): click.echo("Installing LLM library. Please wait...") run_external_cmd("pip", "install", "--quiet", "llm", restart_cli=True) - ensure_litecli_template() def ensure_litecli_template(replace=False):