From ecae024014b2a05cd10453a95a346b218bc4f6ba Mon Sep 17 00:00:00 2001 From: Amjith Ramanujam Date: Mon, 17 Feb 2025 17:41:53 -0800 Subject: [PATCH 1/2] Check for `\llm` in a loop to make sure alternate invokations are not missed. --- litecli/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litecli/main.py b/litecli/main.py index 8895980..263a434 100644 --- a/litecli/main.py +++ b/litecli/main.py @@ -444,7 +444,7 @@ def one_iteration(text=None): self.echo(str(e), err=True, fg="red") return - if special.is_llm_command(text): + while special.is_llm_command(text): try: start = time() cur = self.sqlexecute.conn and self.sqlexecute.conn.cursor() From 20f8b46656e5238235bf5c8b63e20df8a1671386 Mon Sep 17 00:00:00 2001 From: Amjith Ramanujam Date: Mon, 17 Feb 2025 17:43:12 -0800 Subject: [PATCH 2/2] Update changelog. --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index be389b6..6e1a495 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ * Make the history file location configurable. ([#206](https://github.com/dbcli/litecli/issues/206)) +### Bug Fixes + +* Fix a bug where the `\llm` command on alternate invocations weren't detected correctly. (#211) + ### Internal * Fix typo `pormpt`to `prompt` in `special/llm.py`.