+ {messages.map((message, index) => (
+
+
+
+ {message.role === 'user' ? (
+
+ ) : (
+
+ )}
+
+
+
+
+ {children}
+
+ ) : (
+
+ {String(children).replace(/\n$/, '')}
+
+ )
+ },
+ a({ href, children }) {
+ return (
+
+ {children}
+
+ )
+ },
+ ul({ children }) {
+ return
+ },
+ ol({ children }) {
+ return {children}
+ },
+ li({ children }) {
+ return {children}
+ },
+ p({ children }) {
+ return {children}
+ },
+ h1({ children }) {
+ return {children}
+ },
+ h2({ children }) {
+ return {children}
+ },
+ h3({ children }) {
+ return {children}
+ },
+ blockquote({ children }) {
+ return {children}
+ },
+ table({ children }) {
+ return
+ },
+ th({ children }) {
+ return {children} |
+ },
+ td({ children }) {
+ return {children} |
+ },
+ hr() {
+ return
+ },
+ }}
+ >
+ {message.content}
+
+
+
+ {message.timestamp.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}
+
+
+
+
+ {/* Show suggested prompts after welcome message */}
+ {index === 0 && (
+
+ {SUGGESTED_PROMPTS.map((prompt, i) => (
+
+ ))}
+
+ )}
+
+ ))}
+
+ {isLoading && (
+
+
+
+
+
+ {currentTool ? (
+
+
+
+
+ {toolDisplayInfo[currentTool.name]?.name || currentTool.name}
+
+
+
+ {currentTool.elapsed !== undefined && (
+
+ {currentTool.elapsed.toFixed(1)}s
+
+ )}
+
+ ) : (
+
+
+ Researching...
+
+ )}
+
+
+ )}
+
+
+