fix: ensure userVisible metadata on Goosed session replies

Goosed rejects /sessions/:id/reply when user_message.metadata lacks
userVisible. Normalize metadata before submit and during agent orchestration
so page-generation runs no longer fail before streaming starts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-05 11:58:17 +08:00
parent 5f8ef9ddb0
commit cb7a446d3e
5 changed files with 94 additions and 0 deletions
+2
View File
@@ -406,6 +406,8 @@ export function applyAgentOrchestrationToUserMessage(userMessage, classification
displayText: displayText || undefined,
chatIntentRoute: CHAT_INTENT_ROUTE.AGENT,
chatIntentSource: classification?.source ?? null,
userVisible: userMessage?.metadata?.userVisible ?? true,
agentVisible: userMessage?.metadata?.agentVisible ?? true,
};
return {
...userMessage,