This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository edi.

View the commit online.

commit 6bb7ce437cf1adcf3570e5ec2363f2acb92fa30b
Author: Alastair Poole <[email protected]>
AuthorDate: Fri Apr 24 07:57:39 2026 +0100

    aipanel: print commands run to console.
    
    Fix indentation too.
---
 src/bin/edi_aipanel.c | 123 ++++++++++++++++++++++++--------------------------
 1 file changed, 60 insertions(+), 63 deletions(-)

diff --git a/src/bin/edi_aipanel.c b/src/bin/edi_aipanel.c
index 788c4dc..34777b6 100644
--- a/src/bin/edi_aipanel.c
+++ b/src/bin/edi_aipanel.c
@@ -1665,20 +1665,18 @@ _edi_aipanel_response_cb(const char *response, const char *error, void *data EIN
         /* Agent loop: execute <edi-run>, then issue a follow-up prompt with results. */
         if (run_cmd && _edi_ai_agent_steps < _edi_aipanel_steps_max_get())
           {
-	             const char *deny_reason = NULL;
-	             char *output;
-	             char *file_preview;
-	             char *followup_prompt;
-	             int exit_code;
-	             Eina_Bool allowed;
+             const char *deny_reason = NULL;
+             char *output;
+             char *file_preview;
+             char *followup_prompt;
+             int exit_code;
+             Eina_Bool allowed;
 
              allowed = _edi_aipanel_command_allowed(run_cmd, &deny_reason);
-                  if (!allowed)
-                    {
-                      if (_edi_ai_stream_row)
-                        {
-                       _edi_aipanel_stream_error_set(eina_slstr_printf("Error: %s", deny_reason));
-                        }
+             if (!allowed)
+               {
+                  if (_edi_ai_stream_row)
+                    _edi_aipanel_stream_error_set(eina_slstr_printf("Error: %s", deny_reason));
                   else
                     _edi_aipanel_append_line(eina_slstr_printf("Error: %s", deny_reason));
                   apply_response = EINA_FALSE;
@@ -1713,64 +1711,63 @@ _edi_aipanel_response_cb(const char *response, const char *error, void *data EIN
                     }
                   else
                     {
-	                  _edi_ai_agent_steps++;
-	                  output = _edi_aipanel_command_run(run_cmd, &exit_code);
-	                  file_preview = _edi_aipanel_created_file_preview_get(run_cmd);
-	                  free(_edi_ai_last_stage_cmd);
-	                  _edi_ai_last_stage_cmd = strdup(run_cmd ?: "");
-	                  free(_edi_ai_last_stage_output);
-	                  _edi_ai_last_stage_output = strdup(output ?: "");
-                  _edi_ai_last_stage_exit_code = exit_code;
-                  _edi_ai_last_stage_index = _edi_ai_agent_steps;
-                  _edi_ai_last_stage_valid = EINA_TRUE;
-		                  if (inspect_cmd)
-		                    _edi_aipanel_inspection_state_update(run_cmd, exit_code);
+                       _edi_ai_agent_steps++;
+                       _edi_aipanel_append_line(eina_slstr_printf("Running: %s", run_cmd));
+                       output = _edi_aipanel_command_run(run_cmd, &exit_code);
+                       file_preview = _edi_aipanel_created_file_preview_get(run_cmd);
+                       free(_edi_ai_last_stage_cmd);
+                       _edi_ai_last_stage_cmd = strdup(run_cmd ?: "");
+                       free(_edi_ai_last_stage_output);
+                       _edi_ai_last_stage_output = strdup(output ?: "");
+                       _edi_ai_last_stage_exit_code = exit_code;
+                       _edi_ai_last_stage_index = _edi_ai_agent_steps;
+                       _edi_ai_last_stage_valid = EINA_TRUE;
+                       if (inspect_cmd)
+                         _edi_aipanel_inspection_state_update(run_cmd, exit_code);
 
-                  if (file_preview && file_preview[0])
-                    {
-                       char *file_summary;
+                       if (file_preview && file_preview[0])
+                         {
+                            char *file_summary;
 
-                       _edi_aipanel_append_line("[run] File result (content hidden):");
-                       file_summary = _edi_aipanel_file_preview_widget_summary_get(file_preview);
-                       _edi_aipanel_append_multiline(file_summary ?: file_preview);
-                       free(file_summary);
-                    }
-                  if (_edi_aipanel_file_preview_indicates_failure(file_preview))
-                    {
-                       Eina_Strbuf *combined;
-                       char *combined_out;
+                            _edi_aipanel_append_line("[run] File result (content hidden):");
+                            file_summary = _edi_aipanel_file_preview_widget_summary_get(file_preview);
+                            _edi_aipanel_append_multiline(file_summary ?: file_preview);
+                            free(file_summary);
+                         }
+                       if (_edi_aipanel_file_preview_indicates_failure(file_preview))
+                         {
+                            Eina_Strbuf *combined;
+                            char *combined_out;
 
-                       combined = eina_strbuf_new();
-                       eina_strbuf_append_printf(combined, "%s\n\nFile verification failed:\n%s",
-                                                 output ?: "",
-                                                 file_preview ?: "status: unknown");
-                       combined_out = eina_strbuf_string_steal(combined);
-                       eina_strbuf_free(combined);
+                            combined = eina_strbuf_new();
+                            eina_strbuf_append_printf(combined, "%s\n\nFile verification failed:\n%s",
+                                                      output ?: "",
+                                                      file_preview ?: "status: unknown");
+                            combined_out = eina_strbuf_string_steal(combined);
+                            eina_strbuf_free(combined);
+                            free(output);
+                            output = combined_out;
+                            exit_code = 98;
+                         }
+                       followup_prompt = _edi_aipanel_prompt_build_followup(run_cmd, exit_code,
+                                                                            output ?: "",
+                                                                            file_preview ?: "");
                        free(output);
-                       output = combined_out;
-                       exit_code = 98;
-                    }
-                  followup_prompt = _edi_aipanel_prompt_build_followup(run_cmd, exit_code,
-                                                                       output ?: "",
-                                                                       file_preview ?: "");
-	                  free(output);
-	                  free(file_preview);
-	                  _edi_ai_request = edi_agent_request_send(followup_prompt, _edi_aipanel_response_cb, NULL);
-                  free(followup_prompt);
-                  free(run_cmd);
-                  run_cmd = NULL;
+                       free(file_preview);
+                       _edi_ai_request = edi_agent_request_send(followup_prompt, _edi_aipanel_response_cb, NULL);
+                       free(followup_prompt);
+                       free(run_cmd);
+                       run_cmd = NULL;
 
-                  if (_edi_ai_request)
-                    return;
+                       if (_edi_ai_request)
+                         return;
 
-                  if (_edi_ai_stream_row)
-                    {
-                       _edi_aipanel_stream_error_set("Error: Failed to continue agent request.");
+                       if (_edi_ai_stream_row)
+                         _edi_aipanel_stream_error_set("Error: Failed to continue agent request.");
+                       else
+                         _edi_aipanel_append_line("Error: Failed to continue agent request.");
+                       apply_response = EINA_FALSE;
                     }
-                  else
-                    _edi_aipanel_append_line("Error: Failed to continue agent request.");
-                  apply_response = EINA_FALSE;
-               }
                }
           }
         else if (run_cmd)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to