File tree Expand file tree Collapse file tree
packages/api-contract/src/schemas Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -501,9 +501,9 @@ The widget appends an assistant message only when `answer` is non-null. For
501501here ” state and continues polling the same thread .
502502
503503Public chat request validation requires a 1 –4 ,000 - character ` message ` and
504- either both ` conversationId ` and ` conversationToken ` or neither . The legacy
505- client ` history ` field may be accepted during rollout but is ignored ; persisted
506- ticket messages are the only history supplied to the model .
504+ either both ` conversationId ` and ` conversationToken ` or neither . Clients don ' t
505+ send history ; persisted ticket messages are the only history supplied to the
506+ model .
507507
508508Permissions are field - level :
509509
Original file line number Diff line number Diff line change @@ -456,10 +456,6 @@ export function useVisitorChat({
456456 if ( ( ! question && pendingFiles . length === 0 ) || isSending || attaching ) return ;
457457 if ( sessionExpired ) return ;
458458
459- const history = messages
460- . filter ( ( m ) => ! m . error )
461- . map ( ( m ) => ( { role : m . role , content : m . content } ) ) ;
462-
463459 const userMessage : ChatMessage = {
464460 id : newId ( "local" ) ,
465461 role : "user" ,
@@ -482,7 +478,6 @@ export function useVisitorChat({
482478 headers : { "content-type" : "application/json" } ,
483479 body : JSON . stringify ( {
484480 message : question ,
485- history,
486481 attachmentIds : pendingFiles . map ( ( file ) => file . attachmentId ) ,
487482 ...( conversation
488483 ? {
Original file line number Diff line number Diff line change @@ -98,16 +98,6 @@ export const chatRequestBodySchema = z
9898 * ticket from the session, or continues their open one. */
9999 sessionToken : z . string ( ) . optional ( ) ,
100100 attachmentIds : z . array ( z . string ( ) . min ( 1 ) ) . max ( 5 ) . optional ( ) ,
101- /** Ignored. Persisted ticket messages are the only model history. */
102- history : z
103- . array (
104- z . object ( {
105- role : z . enum ( [ "user" , "assistant" ] ) ,
106- content : z . string ( ) ,
107- } ) ,
108- )
109- . max ( 20 )
110- . optional ( ) ,
111101 } )
112102 . refine (
113103 ( value ) => Boolean ( value . conversationId ) === Boolean ( value . conversationToken ) ,
You can’t perform that action at this time.
0 commit comments