diff options
| author | sigoden <sigoden@gmail.com> | 2024-10-16 20:33:11 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-16 20:33:11 +0800 |
| commit | 0673dca816d733b703a447882b0fcbe83fcdb7e5 (patch) | |
| tree | cef1b170cf0a71c3b39b610dff7f9b13d5fea109 /src/config/mod.rs | |
| parent | 98cc9879c7a87526548c325aa42eeb401cc11f35 (diff) | |
| download | aichat-0673dca816d733b703a447882b0fcbe83fcdb7e5.tar.gz | |
refactor: generated config.yaml (#927)
Diffstat (limited to 'src/config/mod.rs')
| -rw-r--r-- | src/config/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index f8e3672..34da912 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -2104,6 +2104,9 @@ fn create_config_file(config_path: &Path) -> Result<()> { config[CLIENTS_FIELD] = clients_config; let config_data = serde_yaml::to_string(&config).with_context(|| "Failed to create config")?; + let config_data = format!( + "# see https://github.com/sigoden/aichat/blob/main/config.example.yaml\n\n{config_data}" + ); ensure_parent_exists(config_path)?; std::fs::write(config_path, config_data).with_context(|| "Failed to write to config file")?; |
