bugfix for #8187 (infinite loop when delegating) (#8189)

This commit is contained in:
Chase
2025-05-02 13:49:42 -07:00
committed by GitHub
parent 976019ce11
commit de175dcc87
2 changed files with 14 additions and 9 deletions

View File

@@ -412,7 +412,7 @@ class ConversationMemory:
logger.debug('Vision disabled for browsing, showing text')
elif isinstance(obs, AgentDelegateObservation):
text = truncate_content(
obs.outputs['content'] if 'content' in obs.outputs else '',
obs.outputs.get('content', obs.content),
max_message_chars,
)
message = Message(role='user', content=[TextContent(text=text)])