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:
@@ -16,6 +16,7 @@ import { buildCurrentTimeAgentPrefix, buildTaskRoutingAgentText } from './user-m
|
||||
import { reconcileAgentSession } from './session-reconcile.mjs';
|
||||
import { createImgproxySigner } from './imgproxy-signer.mjs';
|
||||
import { isDirectChatSessionId } from './direct-chat-service.mjs';
|
||||
import { ensureGooseUserMessageMetadata } from './goose-message.mjs';
|
||||
import {
|
||||
memoryLimitForIntervention,
|
||||
resolveMemoryInterventionMode,
|
||||
@@ -1375,6 +1376,10 @@ export function createTkmindProxy({
|
||||
await userAuth.getAgentSessionPolicy(userId),
|
||||
);
|
||||
}
|
||||
body = {
|
||||
...body,
|
||||
user_message: ensureGooseUserMessageMetadata(body.user_message),
|
||||
};
|
||||
|
||||
const target = await resolveTarget(sessionId);
|
||||
const upstream = await apiFetch(
|
||||
|
||||
Reference in New Issue
Block a user