| 482 | *out = (int)v; |
| 483 | return true; |
| 484 | } |
| 485 | |
| 486 | static bool agent_slash_command_with_args(const char *cmd, const char *name) { |
| 487 | size_t len = strlen(name); |
| 488 | return !strncmp(cmd, name, len) && |
| 489 | (cmd[len] == '\0' || isspace((unsigned char)cmd[len])); |
| 490 | } |
| 491 | |
| 492 | static bool agent_slash_command_known(const char *cmd) { |
| 493 | return !strcmp(cmd, "/help") || |
| 494 | !strcmp(cmd, "/save") || |
| 495 | !strcmp(cmd, "/compact") || |