fix: session bug
This commit is contained in:
@@ -85,7 +85,8 @@ export function ChatInterface() {
|
||||
const formattedMessages = data.messages.map((m, idx) => ({
|
||||
id: `${Date.now()}-${idx}`,
|
||||
role: m.role as 'user' | 'assistant',
|
||||
content: m.content
|
||||
content: m.content,
|
||||
viz: m.viz ? buildMessageViz(m.viz) : undefined,
|
||||
}));
|
||||
setMessages(formattedMessages);
|
||||
} else {
|
||||
@@ -461,7 +462,7 @@ export function ChatInterface() {
|
||||
onChange={handleFileUpload}
|
||||
/>
|
||||
<div className="min-h-full">
|
||||
{messages.length <= 1 ? (
|
||||
{messages.length === 0 ? (
|
||||
<div className="h-full flex flex-col items-center justify-center pt-[20vh] px-4 pb-32">
|
||||
{/* Logo Area */}
|
||||
<div className="mb-16 flex items-center justify-center gap-4 select-none">
|
||||
|
||||
@@ -36,6 +36,7 @@ export function InlineVisualizationCard({ viz }: InlineVisualizationCardProps) {
|
||||
type: dashboardType,
|
||||
data: objectRows,
|
||||
sql: viz.sql,
|
||||
chartSpec: viz.chartSpec,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ export function VisualizationPanel() {
|
||||
type: dashboardType,
|
||||
data: currentData,
|
||||
sql: currentSQL,
|
||||
chartSpec: currentChartSpec,
|
||||
});
|
||||
alert("Added to Dashboard!");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user