enh: only copy text message content

This commit is contained in:
Timothy Jaeryang Baek
2025-04-12 15:11:03 -07:00
parent bdef1001ac
commit c3497da5dd
2 changed files with 9 additions and 1 deletions

View File

@@ -683,6 +683,11 @@ export const removeDetails = (content, types) => {
return content;
};
export const removeAllDetails = (content) => {
content = content.replace(/<details[^>]*>.*?<\/details>/gis, '');
return content;
};
export const processDetails = (content) => {
content = removeDetails(content, ['reasoning', 'code_interpreter']);