We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f6d219 commit 42917ceCopy full SHA for 42917ce
apps/sim/executor/handlers/agent/agent-handler.ts
@@ -317,11 +317,13 @@ export class AgentBlockHandler implements BlockHandler {
317
}
318
319
private addUserPrompt(messages: Message[], userPrompt: any) {
320
- let content = userPrompt
+ let content: string
321
if (typeof userPrompt === 'object' && userPrompt.input) {
322
- content = userPrompt.input
+ content = String(userPrompt.input)
323
} else if (typeof userPrompt === 'object') {
324
content = JSON.stringify(userPrompt)
325
+ } else {
326
+ content = String(userPrompt)
327
328
329
messages.push({ role: 'user', content })
0 commit comments