The client is not the source of truth (#7438)
Co-authored-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Jack Amadeo <jackamadeo@block.xyz>
This commit is contained in:
@@ -60,7 +60,12 @@ export type CallToolResponse = {
|
||||
};
|
||||
|
||||
export type ChatRequest = {
|
||||
conversation_so_far?: Array<Message> | null;
|
||||
/**
|
||||
* Override the server's conversation history. Only use this when you need absolute control
|
||||
* over the conversation state (e.g., administrative tools). For normal operations, the server
|
||||
* is the source of truth - use truncate/fork endpoints to modify conversation history instead.
|
||||
*/
|
||||
override_conversation?: Array<Message> | null;
|
||||
recipe_name?: string | null;
|
||||
recipe_version?: string | null;
|
||||
session_id: string;
|
||||
|
||||
@@ -590,7 +590,6 @@ export function useChatStream({
|
||||
body: {
|
||||
session_id: sessionId,
|
||||
user_message: newMessage,
|
||||
...(hasExistingMessages && { conversation_so_far: currentState.messages }),
|
||||
},
|
||||
throwOnError: true,
|
||||
signal: abortControllerRef.current.signal,
|
||||
@@ -771,7 +770,6 @@ export function useChatStream({
|
||||
body: {
|
||||
session_id: targetSessionId,
|
||||
user_message: updatedUserMessage,
|
||||
conversation_so_far: truncatedMessages,
|
||||
},
|
||||
throwOnError: true,
|
||||
signal: abortControllerRef.current.signal,
|
||||
|
||||
Reference in New Issue
Block a user