Add initial wrangler configuration for livedash-node project

- Created wrangler.json with project metadata and settings
- Configured D1 database binding for database interaction
- Enabled observability for monitoring
- Added placeholders for smart placement, environment variables, static assets, and service bindings
This commit is contained in:
2025-06-01 04:51:57 +02:00
parent c9e24298cd
commit 0c18e8be57
21 changed files with 14443 additions and 9721 deletions

View File

@ -8,6 +8,10 @@ import TranscriptViewer from "../../../../components/TranscriptViewer";
import { ChatSession } from "../../../../lib/types";
import Link from "next/link";
interface SessionApiResponse {
session: ChatSession;
}
export default function SessionViewPage() {
const params = useParams();
const router = useRouter(); // Initialize useRouter
@ -30,13 +34,13 @@ export default function SessionViewPage() {
try {
const response = await fetch(`/api/dashboard/session/${id}`);
if (!response.ok) {
const errorData = await response.json();
const errorData = (await response.json()) as { error: string; };
throw new Error(
errorData.error ||
`Failed to fetch session: ${response.statusText}`
);
}
const data = await response.json();
const data = (await response.json()) as SessionApiResponse;
setSession(data.session);
} catch (err) {
setError(
@ -150,16 +154,17 @@ export default function SessionViewPage() {
<p className="text-gray-600">
No transcript content available for this session.
</p>
{session.fullTranscriptUrl && (
<a
href={session.fullTranscriptUrl}
target="_blank"
rel="noopener noreferrer"
className="text-sky-600 hover:underline mt-2 inline-block"
>
View Source Transcript URL
</a>
)}
{session.fullTranscriptUrl &&
process.env.NODE_ENV !== "production" && (
<a
href={session.fullTranscriptUrl}
target="_blank"
rel="noopener noreferrer"
className="text-sky-600 hover:underline mt-2 inline-block"
>
View Source Transcript URL
</a>
)}
</div>
)}
</div>