2026-09-14 09:06:48 +03:00
|
|
|
import { NewSession } from "@/components/new-session";
|
2026-09-22 13:54:28 +03:00
|
|
|
import { readDefaultSettings, readSettingsRecord } from "@/src/server";
|
|
|
|
|
import { slotsConfigured } from "@/src/core";
|
2026-09-14 09:06:48 +03:00
|
|
|
|
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The draft view behind "+ New session" (owner, 2026-09-13): NO session is
|
|
|
|
|
* created until the first message is sent — the view is a sessionless empty
|
|
|
|
|
* chat; on send it creates the chat (title = that message) and redirects to
|
|
|
|
|
* the real page, whose initialPrompt path delivers the message as turn 1.
|
|
|
|
|
* Static segment beats the dynamic [id] route — "new" is never a chat id.
|
2026-09-18 09:37:20 +03:00
|
|
|
*
|
|
|
|
|
* The default settings record is server-rendered in (readDefaultSettings →
|
|
|
|
|
* initialSettings): the controls show truth on the first frame, no
|
|
|
|
|
* default-model flash (the default IS the user's last choice — "no model"
|
|
|
|
|
* only before the first-ever pick).
|
2026-09-14 09:06:48 +03:00
|
|
|
*/
|
|
|
|
|
export default function NewSessionPage() {
|
2026-09-22 13:54:28 +03:00
|
|
|
return (
|
|
|
|
|
<NewSession
|
|
|
|
|
initialSettings={readDefaultSettings()}
|
|
|
|
|
initialConfigured={slotsConfigured(readSettingsRecord()?.models)}
|
|
|
|
|
/>
|
|
|
|
|
);
|
2026-09-18 09:37:20 +03:00
|
|
|
}
|