This commit is contained in:
retoor 2026-01-28 19:50:07 +01:00
parent 5ee81eb58e
commit 6a8947a67e
4 changed files with 6 additions and 5 deletions

View File

@ -80,7 +80,8 @@ char *r_bash_execute(const char *command, bool interactive) {
size_t total_size = 0; size_t total_size = 0;
while (fgets(buffer, sizeof(buffer), fp)) { while (fgets(buffer, sizeof(buffer), fp)) {
fprintf(stderr, "%s", buffer); // Print to stderr for the user in a subtle dim/gray color
fprintf(stderr, "\033[2m%s\033[0m", buffer);
size_t chunk_len = strlen(buffer); size_t chunk_len = strlen(buffer);
char *new_output = realloc(output, total_size + chunk_len + 1); char *new_output = realloc(output, total_size + chunk_len + 1);

View File

@ -135,7 +135,7 @@ struct json_object *tool_registry_execute(tool_registry_t *registry,
} }
if (verbose && args) { if (verbose && args) {
fprintf(stderr, " [verbose] %s args: %s\n", fprintf(stderr, " \033[2m[verbose] %s args: %s\033[0m\n",
tool->name, json_object_to_json_string(args)); tool->name, json_object_to_json_string(args));
} }

View File

@ -30,7 +30,7 @@ tool_t *tool_python_execute_create(void) {
static void python_execute_print_action(const char *name, struct json_object *args) { static void python_execute_print_action(const char *name, struct json_object *args) {
(void)name; (void)name;
(void)args; (void)args;
fprintf(stderr, " -> Executing Python code\n"); fprintf(stderr, " \033[1m-> Executing Python code\033[0m\n");
} }
static char *python_execute_execute(tool_t *self, struct json_object *args) { static char *python_execute_execute(tool_t *self, struct json_object *args) {

View File

@ -52,9 +52,9 @@ static void terminal_print_action(const char *name, struct json_object *args) {
struct json_object *cmd; struct json_object *cmd;
if (json_object_object_get_ex(args, "command", &cmd)) { if (json_object_object_get_ex(args, "command", &cmd)) {
if (strcmp(name, "linux_terminal_execute_interactive") == 0) { if (strcmp(name, "linux_terminal_execute_interactive") == 0) {
fprintf(stderr, " -> Running interactive: %s\n", json_object_get_string(cmd)); fprintf(stderr, " \033[1m-> Running interactive:\033[0m %s\n", json_object_get_string(cmd));
} else { } else {
fprintf(stderr, " -> Running command: %s\n", json_object_get_string(cmd)); fprintf(stderr, " \033[1m-> Running command:\033[0m %s\n", json_object_get_string(cmd));
} }
} }
} }