fix(session): track prompt readiness

This commit is contained in:
Shoubhit Dash
2026-04-01 21:43:43 +05:30
parent 44f83015cd
commit 554f41a6ea
+2 -3
View File
@@ -329,10 +329,9 @@ export default function Page() {
const { params, sessionKey, tabs, view } = useSessionLayout()
createEffect(() => {
if (!untrack(() => prompt.ready())) return
prompt.ready()
if (!prompt.ready()) return
untrack(() => {
if (params.id || !prompt.ready()) return
if (params.id) return
const text = searchParams.prompt
if (!text) return
prompt.set([{ type: "text", content: text, start: 0, end: text.length }], text.length)