fix(schedule): auto-create reminders when agent only writes schedule items
When schedule_create_item includes a start time and reminder intent, create the matching h5_schedule_reminders row in the same tool call so 10:00 pushes are not lost. Also reconcile Goose SSE request ids with the portal agent-run gate to keep MindSpace chat streaming reliable. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import {
|
||||
reconcileSessionEventRequestContext,
|
||||
resolvePostAgentRunChatState,
|
||||
shouldPromoteSessionIdToStreaming,
|
||||
} from './chat-agent-run-gate.mjs';
|
||||
@@ -29,3 +30,24 @@ test('shouldPromoteSessionIdToStreaming skips re-streaming after Finish', () =>
|
||||
assert.equal(shouldPromoteSessionIdToStreaming('waiting'), true);
|
||||
assert.equal(shouldPromoteSessionIdToStreaming('streaming'), true);
|
||||
});
|
||||
|
||||
test('reconcileSessionEventRequestContext adopts Goose request id while agent-run gate waits', () => {
|
||||
assert.deepEqual(
|
||||
reconcileSessionEventRequestContext({
|
||||
activeRequestId: 'portal-req',
|
||||
chatState: 'waiting',
|
||||
eventType: 'ActiveRequests',
|
||||
activeRequestIds: ['goose-req'],
|
||||
}),
|
||||
{ activeRequestId: 'goose-req', promoteStreaming: true, allowMissingGrace: false },
|
||||
);
|
||||
assert.deepEqual(
|
||||
reconcileSessionEventRequestContext({
|
||||
activeRequestId: 'portal-req',
|
||||
chatState: 'waiting',
|
||||
eventType: 'Message',
|
||||
eventRequestId: 'goose-req',
|
||||
}),
|
||||
{ activeRequestId: 'goose-req', promoteStreaming: true, allowMissingGrace: false },
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user