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 <cursoragent@cursor.com>
This commit is contained in:
Benjiyaya
2026-08-23 15:39:20 +08:00
co-authored by Cursor
parent d79c9f4aba
commit b587c56ce3
+7 -1
View File
@@ -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}
/>