Skip to content

Commit ecf39d3

Browse files
committed
fix(mothership): Stop no longer requires client-buffered content
The worker persists partials itself; requiring content made a bare Stop 400 and left the turn running detached (the H2 mis-measure class). Empty default keeps the legacy partial-persistence path intact when content IS buffered. Claude-Session: https://claude.ai/code/session_01CgaxNAaeD3taGdghbXn17w
1 parent 36b9faa commit ecf39d3

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

apps/sim/lib/api/contracts/copilot.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,12 @@ const copilotContentBlockSchema = z.object({
238238
export const copilotChatStopBodySchema = z.object({
239239
chatId: z.string(),
240240
streamId: z.string(),
241-
content: z.string(),
241+
/**
242+
* Partial assistant content to persist. Optional: the worker backend persists partials
243+
* itself, so a Stop with nothing client-buffered is valid — requiring this made bare
244+
* stops 400 and left the turn running detached.
245+
*/
246+
content: z.string().default(''),
242247
contentBlocks: z.array(copilotContentBlockSchema).optional(),
243248
requestId: z.string().optional(),
244249
})

0 commit comments

Comments
 (0)