Session ID:
{session.sessionId || session.id}
Start Time:
{new Date(session.startTime).toLocaleString()}
{session.endTime && (
End Time:
{new Date(session.endTime).toLocaleString()}
)}
{session.category && (
Category:
{session.category}
)}
{session.language && (
Language:
({session.language.toUpperCase()})
)}
{session.country && (
Country:
({session.country})
)}
{session.sentiment !== null && session.sentiment !== undefined && (
Sentiment Score:
0.3
? "text-green-500"
: session.sentiment < -0.3
? "text-red-500"
: "text-orange-500"
}`}
>
{session.sentiment > 0.3
? "Positive"
: session.sentiment < -0.3
? "Negative"
: "Neutral"}{" "}
({session.sentiment.toFixed(2)})
)}
{session.sentimentCategory && (
AI Sentiment:
{session.sentimentCategory}
)}
Messages Sent:
{session.messagesSent || 0}
{typeof session.tokens === "number" && (
Tokens:
{session.tokens}
)}
{typeof session.tokensEur === "number" && (
Cost:
€{session.tokensEur.toFixed(4)}
)}
{session.avgResponseTime !== null &&
session.avgResponseTime !== undefined && (
Avg Response Time:
{session.avgResponseTime.toFixed(2)}s
)}
{session.escalated !== null && session.escalated !== undefined && (
Escalated:
{session.escalated ? "Yes" : "No"}
)}
{session.forwardedHr !== null && session.forwardedHr !== undefined && (
Forwarded to HR:
{session.forwardedHr ? "Yes" : "No"}
)}
{session.ipAddress && (
IP Address:
{session.ipAddress}
)}
{session.processed !== null && session.processed !== undefined && (
AI Processed:
{session.processed ? "Yes" : "No"}
)}
{session.initialMsg && (
Initial Message:
"{session.initialMsg}"
)}
{session.summary && (
AI Summary:
{session.summary}
)}
{session.questions && (
Questions Asked:
{(() => {
try {
const questions = JSON.parse(session.questions);
if (Array.isArray(questions) && questions.length > 0) {
return (
{questions.map((question: string, index: number) => (
- {question}
))}
);
}
return "No questions identified";
} catch {
return session.questions;
}
})()}
)}
{/* Transcript rendering is now handled by the parent page (app/dashboard/sessions/[id]/page.tsx) */}
{/* Fallback to link only if we only have the URL but no content - this might also be redundant if parent handles all transcript display */}
{(!session.transcriptContent ||
session.transcriptContent.length === 0) &&
session.fullTranscriptUrl && (
)}