@@ -851,21 +851,10 @@ export const AiNlqResponseSchema = z.object({
851851 suggestions : z . array ( z . string ( ) ) . optional ( ) . describe ( 'Suggested follow-up queries' ) ,
852852} ) ;
853853
854- export const AiChatRequestSchema = z . object ( {
855- message : z . string ( ) . describe ( 'User message' ) ,
856- conversationId : z . string ( ) . optional ( ) . describe ( 'Conversation ID for context' ) ,
857- context : z . record ( z . string ( ) , z . unknown ( ) ) . optional ( ) . describe ( 'Additional context data' ) ,
858- } ) ;
859-
860- export const AiChatResponseSchema = z . object ( {
861- message : z . string ( ) . describe ( 'Assistant response message' ) ,
862- conversationId : z . string ( ) . describe ( 'Conversation ID' ) ,
863- actions : z . array ( z . object ( {
864- type : z . string ( ) . describe ( 'Action type' ) ,
865- label : z . string ( ) . describe ( 'Action display label' ) ,
866- data : z . record ( z . string ( ) , z . unknown ( ) ) . optional ( ) . describe ( 'Action data' ) ,
867- } ) ) . optional ( ) . describe ( 'Suggested actions' ) ,
868- } ) ;
854+ // AiChatRequestSchema and AiChatResponseSchema have been removed.
855+ // The AI chat wire protocol is now fully aligned with the Vercel AI SDK (`ai`).
856+ // Frontend consumers should use `@ai-sdk/react/useChat` directly.
857+ // See: https://ai-sdk.dev/docs
869858
870859export const AiSuggestRequestSchema = z . object ( {
871860 object : z . string ( ) . describe ( 'Object name for context' ) ,
@@ -1264,8 +1253,6 @@ export type MarkAllNotificationsReadResponse = z.infer<typeof MarkAllNotificatio
12641253// AI Types
12651254export type AiNlqRequest = z . input < typeof AiNlqRequestSchema > ;
12661255export type AiNlqResponse = z . infer < typeof AiNlqResponseSchema > ;
1267- export type AiChatRequest = z . input < typeof AiChatRequestSchema > ;
1268- export type AiChatResponse = z . infer < typeof AiChatResponseSchema > ;
12691256export type AiSuggestRequest = z . input < typeof AiSuggestRequestSchema > ;
12701257export type AiSuggestResponse = z . infer < typeof AiSuggestResponseSchema > ;
12711258export type AiInsightsRequest = z . input < typeof AiInsightsRequestSchema > ;
@@ -1416,9 +1403,8 @@ export interface ObjectStackProtocol {
14161403 markNotificationsRead ?( request : MarkNotificationsReadRequest ) : Promise < MarkNotificationsReadResponse > ;
14171404 markAllNotificationsRead ?( request : MarkAllNotificationsReadRequest ) : Promise < MarkAllNotificationsReadResponse > ;
14181405
1419- // AI (optional)
1406+ // AI (optional — chat is now handled by Vercel AI SDK wire protocol )
14201407 aiNlq ?( request : AiNlqRequest ) : Promise < AiNlqResponse > ;
1421- aiChat ?( request : AiChatRequest ) : Promise < AiChatResponse > ;
14221408 aiSuggest ?( request : AiSuggestRequest ) : Promise < AiSuggestResponse > ;
14231409 aiInsights ?( request : AiInsightsRequest ) : Promise < AiInsightsResponse > ;
14241410
0 commit comments