From b587c56ce3bc66367498811349a80274498c68f9 Mon Sep 17 00:00:00 2001 From: Benjiyaya Date: Sun, 23 Aug 2026 15:39:20 +0800 Subject: [PATCH] Keep Agents welcome chips on a newly created session. Empty chats still offer Create a film, Draft a storyline, and Write a script. Co-authored-by: Cursor --- calliope-web/src/routes/agents/+page.svelte | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/calliope-web/src/routes/agents/+page.svelte b/calliope-web/src/routes/agents/+page.svelte index a05fe358..fb7b3dc0 100644 --- a/calliope-web/src/routes/agents/+page.svelte +++ b/calliope-web/src/routes/agents/+page.svelte @@ -167,10 +167,15 @@ composerNonce = 0; } + function seedEmptySession(s: AgentSession) { + client.setQueryData(['agent-session', s.id], { ...s, messages: [], plan: null }); + } + async function newSandbox() { resetComposer(); try { const s = await agentApi.createSession({}); + seedEmptySession(s); await client.invalidateQueries({ queryKey: ['agent-sessions'] }); activeId = s.id; } catch (err) { @@ -182,6 +187,7 @@ resetComposer(); try { const s = await agentApi.createSession({ project_id: projectId }); + seedEmptySession(s); await client.invalidateQueries({ queryKey: ['agent-sessions'] }); activeId = s.id; toast.success('Linked chat created'); @@ -518,7 +524,7 @@ {jobs} {running} loading={activeId != null && $sessionQuery.isLoading} - suggestions={activeSession ? [] : SUGGESTIONS} + suggestions={SUGGESTIONS} onSuggestion={setComposerDraft} />