Allow user actions over websockets (#10420)

Co-authored-by: Xingyao Wang <xingyaoww@gmail.com>
Co-authored-by: Xingyao Wang <xingyao@all-hands.dev>
This commit is contained in:
olyashok
2025-08-16 17:29:28 -04:00
committed by GitHub
parent ab9fb50c4f
commit 95ef8965b7

View File

@@ -234,8 +234,23 @@ class ConversationMemory:
),
) or (isinstance(action, CmdRunAction) and action.source == 'agent'):
tool_metadata = action.tool_call_metadata
# Allow user actions to skip tool metadata validation
if action.source == 'user' and tool_metadata is None:
# For user-initiated actions without tool metadata, create a simple message
return [
Message(
role='user',
content=[
TextContent(
text=f'User requested to read file: {str(action)}'
)
],
)
]
assert tool_metadata is not None, (
'Tool call metadata should NOT be None when function calling is enabled. Action: '
'Tool call metadata should NOT be None when function calling is enabled for agent actions. Action: '
+ str(action)
)