From 5eaab7a2cf53f3d748c71e82c34512c48bdde95f Mon Sep 17 00:00:00 2001 From: Joost de Valk Date: Sat, 22 Mar 2025 11:16:48 +0100 Subject: [PATCH] Do not require a prompt --- src/AiCommand.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/AiCommand.php b/src/AiCommand.php index c98c630..16e4374 100644 --- a/src/AiCommand.php +++ b/src/AiCommand.php @@ -59,7 +59,12 @@ public function __invoke( $args, $assoc_args ) { $this->register_tools($this->server); $this->register_resources($this->server); - $result = $this->client->call_ai_service_with_prompt( $args[0] ); + $prompt = ''; + if ( isset( $args[0] ) ) { + $prompt = $args[0]; + } + + $result = $this->client->call_ai_service_with_prompt( $prompt ); WP_CLI::success( $result ); }