feat(mindspace): gate published page delivery

This commit is contained in:
john
2026-07-14 19:13:01 +08:00
parent ae9090948a
commit 27b11894f2
16 changed files with 448 additions and 39 deletions
+11
View File
@@ -36,6 +36,17 @@ test('resolvePostAgentRunChatState idles after worker-side agent run success', (
);
});
test('completed run wins when the direct-chat snapshot is not ready', () => {
assert.equal(
resolvePostAgentRunChatState({
chatState: 'streaming',
finishedViaPortalDirectChat: false,
agentRunSucceeded: true,
}),
'idle',
);
});
test('shouldPromoteSessionIdToStreaming skips re-streaming after Finish', () => {
assert.equal(shouldPromoteSessionIdToStreaming('idle'), false);
assert.equal(shouldPromoteSessionIdToStreaming('waiting'), true);