aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ChatBox/ChatBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/ChatBox/ChatBox.tsx')
-rw-r--r--src/client/views/nodes/ChatBox/ChatBox.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/nodes/ChatBox/ChatBox.tsx b/src/client/views/nodes/ChatBox/ChatBox.tsx
index ffede6901..345bfd8d1 100644
--- a/src/client/views/nodes/ChatBox/ChatBox.tsx
+++ b/src/client/views/nodes/ChatBox/ChatBox.tsx
@@ -445,7 +445,11 @@ export class ChatBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
get formattedHistory(): string {
let history = '<chat_history>\n';
for (const message of this.history) {
- history += `<${message.role}>${message.content.map(content => content.text).join(' ')}</${message.role}>\n`;
+ history += `<${message.role}>${message.content.map(content => content.text).join(' ')}`;
+ if (message.loop_summary) {
+ history += `<loop_summary>${message.loop_summary}</loop_summary>`;
+ }
+ history += `</${message.role}>\n`;
}
history += '</chat_history>';
return history;