diff --git a/apps/server/src/wsServer.ts b/apps/server/src/wsServer.ts index 19e510931a..8a1524e396 100644 --- a/apps/server/src/wsServer.ts +++ b/apps/server/src/wsServer.ts @@ -19,6 +19,7 @@ import { type WsRequest, type WsResponse, wsRequestSchema, + DEFAULT_MODEL, } from "@t3tools/contracts"; import { WebSocketServer, type WebSocket } from "ws"; @@ -379,7 +380,7 @@ export function createServer(options: ServerOptions) { id: result.project.id, name: result.project.name, cwd: result.project.cwd, - model: "gpt-5", + model: DEFAULT_MODEL, }, }, }; diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 41adde274d..945b521f14 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -1769,10 +1769,11 @@ export default function ChatView({ threadId }: ChatViewProps) { sizeBytes: image.sizeBytes, previewUrl: image.previewUrl, })); + const messageId = crypto.randomUUID(); dispatch({ type: "PUSH_USER_MESSAGE", threadId: activeThread.id, - id: crypto.randomUUID(), + id: messageId, text: trimmed, ...(messageAttachments.length > 0 ? { attachments: messageAttachments } : {}), }); @@ -1783,7 +1784,7 @@ export default function ChatView({ threadId }: ChatViewProps) { issuedAt: new Date().toISOString(), payload: { threadId: activeThread.id, - messageId: crypto.randomUUID(), + messageId, text: trimmed, createdAt: new Date().toISOString(), }, diff --git a/apps/web/src/store.ts b/apps/web/src/store.ts index 8011c18379..b89204e9be 100644 --- a/apps/web/src/store.ts +++ b/apps/web/src/store.ts @@ -513,6 +513,8 @@ export function reducer(state: AppState, action: Action): AppState { } case "gitStatusUpsert": return state; + default: + return state; } }