diff options
| author | sigoden <sigoden@gmail.com> | 2024-10-05 07:15:51 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-05 07:15:51 +0800 |
| commit | 11a706a68d1a1a22817f2264bdbbbe7036897378 (patch) | |
| tree | bc51aad062d9667be8d334f5d9fc8ebe146ec5a0 /src/config/mod.rs | |
| parent | 7f37317afb4c4d2b373b30b8066084ce6439d694 (diff) | |
| download | aichat-11a706a68d1a1a22817f2264bdbbbe7036897378.tar.gz | |
feat: when saving input to message.md, use file paths instead of file contents (#905)
Diffstat (limited to 'src/config/mod.rs')
| -rw-r--r-- | src/config/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index 4aa0873..3243c26 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -1759,7 +1759,7 @@ impl Config { } let timestamp = now(); let summary = input.summary(); - let input_markdown = input.render(); + let raw_input = input.raw(); let scope = if self.agent.is_none() { let role_name = if input.role().is_derived() { None @@ -1775,7 +1775,9 @@ impl Config { } else { String::new() }; - let output = format!("# CHAT: {summary} [{timestamp}]{scope}\n{input_markdown}\n--------\n{output}\n--------\n\n",); + let output = format!( + "# CHAT: {summary} [{timestamp}]{scope}\n{raw_input}\n--------\n{output}\n--------\n\n", + ); file.write_all(output.as_bytes()) .with_context(|| "Failed to save message") } |
