stynx-code-commands 3.6.1

Slash commands and file reference expansion
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::domain::CommandResult;

const BOLD: &str = "\x1b[1m";
const DIM: &str = "\x1b[2m";
const RESET: &str = "\x1b[0m";

pub fn handle_config(settings_json: &str) -> CommandResult {
    let mut output = format!("  {BOLD}Merged Settings{RESET}\n\n");

    for line in settings_json.lines() {
        output.push_str(&format!("  {DIM}{line}{RESET}\n"));
    }
    CommandResult::Output(output)
}