Skip to content

Commit d0b9e87

Browse files
efecnccursoragent
andauthored
feat(desktop): use DEFAULT_SESSION_TITLE in chatStore (A6.189) (#590)
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent f399456 commit d0b9e87

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

packages/agent-ui/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ consumption of shared panel shells:
304304
| A6.187 | Untitled session meta factory |
305305
| A6.186 | Slash settings/ops toast copy |
306306
| A6.188 | Untitled session title check |
307+
| A6.189 | Desktop New chat uses DEFAULT_SESSION_TITLE |
307308

308309
### A5 complete enough
309310

src/modules/ai/store/chatStore.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { isUntitledSessionTitle } from "@altai/agent-ui";
1+
import {
2+
DEFAULT_SESSION_TITLE,
3+
isUntitledSessionTitle,
4+
} from "@altai/agent-ui";
25
import type { UIMessage } from "ai";
36
import { native } from "../lib/native";
47
import { create } from "zustand";
@@ -865,7 +868,7 @@ export const useChatStore = create<StoreState>((set, get) => ({
865868
} else {
866869
active = {
867870
id: newSessionId(),
868-
title: "New chat",
871+
title: DEFAULT_SESSION_TITLE,
869872
createdAt: Date.now(),
870873
updatedAt: Date.now(),
871874
};
@@ -896,7 +899,7 @@ export const useChatStore = create<StoreState>((set, get) => ({
896899
const id = newSessionId();
897900
const meta: SessionMeta = {
898901
id,
899-
title: "New chat",
902+
title: DEFAULT_SESSION_TITLE,
900903
createdAt: Date.now(),
901904
updatedAt: Date.now(),
902905
};
@@ -1022,7 +1025,7 @@ export const useChatStore = create<StoreState>((set, get) => ({
10221025
if (remaining.length === 0) {
10231026
const fresh: SessionMeta = {
10241027
id: newSessionId(),
1025-
title: "New chat",
1028+
title: DEFAULT_SESSION_TITLE,
10261029
createdAt: Date.now(),
10271030
updatedAt: Date.now(),
10281031
};

0 commit comments

Comments
 (0)