Allow 'leann ask' to accept a positional question (#116)

This commit is contained in:
Andy Lee
2025-09-23 21:18:57 -07:00
committed by GitHub
parent 322e5c162d
commit ec889f7ef4
3 changed files with 50 additions and 33 deletions

14
tests/test_cli_ask.py Normal file
View File

@@ -0,0 +1,14 @@
from leann.cli import LeannCLI
def test_cli_ask_accepts_positional_query(tmp_path, monkeypatch):
monkeypatch.chdir(tmp_path)
cli = LeannCLI()
parser = cli.create_parser()
args = parser.parse_args(["ask", "my-docs", "Where are prompts configured?"])
assert args.command == "ask"
assert args.index_name == "my-docs"
assert args.query == "Where are prompts configured?"