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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions litecli/packages/special/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down
Loading