mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 10:56:10 +00:00
Do not require claude on PATH when assistant uses a hosted provider
This commit is contained in:
+1
-1
@@ -873,7 +873,7 @@ def cmd_doctor(opts):
|
|||||||
# Recording, the device list, and KDE's shortcut registry.
|
# Recording, the device list, and KDE's shortcut registry.
|
||||||
wanted += ["pw-record", "pactl", "kwriteconfig6"]
|
wanted += ["pw-record", "pactl", "kwriteconfig6"]
|
||||||
wanted += ["ffmpeg",
|
wanted += ["ffmpeg",
|
||||||
assistant.executable(assistant.provider(conf)) or "claude",
|
assistant.executable(assistant.provider(conf)),
|
||||||
cleanup.executable(cleanup.provider(conf))]
|
cleanup.executable(cleanup.provider(conf))]
|
||||||
programs = {name: shutil.which(name) or "" for name in wanted if name}
|
programs = {name: shutil.which(name) or "" for name in wanted if name}
|
||||||
target = conf.transcribe_target()
|
target = conf.transcribe_target()
|
||||||
|
|||||||
@@ -577,6 +577,21 @@ class Doctor(DikteTest):
|
|||||||
self.run_doctor(as_json=False, cleanup_provider="codex",
|
self.run_doctor(as_json=False, cleanup_provider="codex",
|
||||||
cleanup_codex_model="gpt-5.4"))
|
cleanup_codex_model="gpt-5.4"))
|
||||||
|
|
||||||
|
def test_agent_on_hosted_provider_does_not_ask_for_a_cli_program(self):
|
||||||
|
for provider in ("openrouter", "opencode"):
|
||||||
|
with self.subTest(provider=provider):
|
||||||
|
reply = self.run_doctor(assistant_provider=provider)
|
||||||
|
self.assertEqual(reply["agent"]["provider"], provider)
|
||||||
|
for cli_name in ("claude", "codex", "agy"):
|
||||||
|
self.assertNotIn(cli_name, reply["programs"])
|
||||||
|
|
||||||
|
def test_agent_on_a_cli_asks_for_the_program(self):
|
||||||
|
for provider, binary in (("claude", "claude"), ("codex", "codex"), ("agy", "agy")):
|
||||||
|
with self.subTest(provider=provider):
|
||||||
|
reply = self.run_doctor(assistant_provider=provider)
|
||||||
|
self.assertEqual(reply["agent"]["provider"], provider)
|
||||||
|
self.assertIn(binary, reply["programs"])
|
||||||
|
|
||||||
|
|
||||||
class Devices(DikteTest):
|
class Devices(DikteTest):
|
||||||
def test_a_machine_with_nothing_names_its_own_missing_program(self):
|
def test_a_machine_with_nothing_names_its_own_missing_program(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user