feat: headless_prompt method on AgentProvider + --prompt arg
lint / lint (push) Failing after 2m10s
test / unit (pull_request) Failing after 48s
test / integration (pull_request) Successful in 25s
test / coverage (pull_request) Failing after 53s

This commit is contained in:
2026-06-29 12:55:25 -04:00
parent 4424eee9fa
commit ee5c042c9e
+9
View File
@@ -223,5 +223,14 @@ class TestPiDockerfile(unittest.TestCase):
self.assertIn("chmod 1777 /tmp /var/tmp", dockerfile)
class TestPiHeadlessPrompt(unittest.TestCase):
def test_returns_p_flag_and_prompt(self):
self.assertEqual(["-p", "Do the task"], PiAgentProvider().headless_prompt("Do the task"))
def test_preserves_prompt_text_verbatim(self):
text = "Fix issue #42: the widget breaks on empty input"
self.assertEqual(["-p", text], PiAgentProvider().headless_prompt(text))
if __name__ == "__main__":
unittest.main()