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.
2 parents db35fb0 + 7a24ef1 commit d492541Copy full SHA for d492541
src/components/agent-preview-react.tsx
@@ -184,8 +184,13 @@ export function AgentPreviewReact(props: {
184
const session = await agent.start();
185
setSessionId(session.sessionId);
186
setHeader(`New session started with "${props.name}" (${session.sessionId})`);
187
+
188
await sleep(500); // Add a short delay to make it feel more natural
189
setIsTyping(false);
190
+ // Add the initial agent message if present
191
+ if (session.messages.at(0)?.message) {
192
+ setMessages([{ role: name, content: session.messages[0].message, timestamp: new Date() }]);
193
+ }
194
} catch (e) {
195
const sfError = SfError.wrap(e);
196
0 commit comments