diff options
| author | sigoden <sigoden@gmail.com> | 2025-03-11 08:28:28 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-11 08:28:28 +0800 |
| commit | f374bb830cda0a7e74801586a83fe0f84e152436 (patch) | |
| tree | 3277c77ac98b099b7c713c9027f16d9faea85e77 /src | |
| parent | 9222713afccb8042ceb237cf6156606724279fb8 (diff) | |
| download | aichat-f374bb830cda0a7e74801586a83fe0f84e152436.tar.gz | |
feat: `--code` (tty) strips `<think>` tag (#1227)
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/common.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/common.rs b/src/client/common.rs index 89523c7..89e0367 100644 --- a/src/client/common.rs +++ b/src/client/common.rs @@ -421,7 +421,7 @@ pub async fn call_chat_completions( } = ret; if !text.is_empty() { if extract_code { - text = extract_code_block(&text).to_string(); + text = extract_code_block(&strip_think_tag(&text)).to_string(); } if print { client.global_config().read().print_markdown(&text)?; |
