From a670bcee7b5443a9fb6ab871202d3d976120065f Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sat, 26 Sep 2026 20:00:24 +0200 Subject: [PATCH] Show the headless hint as the object to merge into the models file --- bin/loop-claude | 2 +- bin/test_loop_claude.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/loop-claude b/bin/loop-claude index f83b2f8c..05e645be 100755 --- a/bin/loop-claude +++ b/bin/loop-claude @@ -276,7 +276,7 @@ def read_models(saved): def ask_model(name, saved): if not (sys.stdin.isatty() and sys.stdout.isatty()): - print(f"{name} has no model in {saved}, and stdin or stdout is not a terminal to ask on; run it on a terminal or add \"{name}\": \"\" to the JSON object in {saved}", file=sys.stderr) + print(f"{name} has no model in {saved}, and stdin or stdout is not a terminal to ask on; run it on a terminal or merge {{\"{name}\": \"\"}} into {saved}", file=sys.stderr) sys.exit(2) offered = catalog() print(f"\nThe model to run {name} on, saved in {saved}:", file=sys.stderr) diff --git a/bin/test_loop_claude.py b/bin/test_loop_claude.py index e300835d..99de1d55 100644 --- a/bin/test_loop_claude.py +++ b/bin/test_loop_claude.py @@ -158,7 +158,7 @@ class ProjectModel(unittest.TestCase): with unittest.mock.patch("sys.stdin.isatty", return_value=False), self.assertRaises(SystemExit) as stopped: loop.project_model("/srv/a") self.assertEqual(stopped.exception.code, 2) - self.assertIn(f'add "srv/a": "" to the JSON object in {saved}', sys.stderr.getvalue()) + self.assertIn(f'merge {{"srv/a": ""}} into {saved}', sys.stderr.getvalue()) self.assertFalse(saved.exists()) with unittest.mock.patch.dict(os.environ, {"LOOP_CLAUDE_JUDGE_MODEL": "j", "LOOP_CLAUDE_WORKER_MODEL": "w"}), unittest.mock.patch("sys.stdin.isatty", return_value=False): self.assertEqual(loop.project_model("/srv/a"), "")