mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-04 02:52:55 +08:00
- Changed `run_id` to `request_id` in `CursorParent` struct for clarity. - Enhanced the `prepare` function to handle parent requests asynchronously, ensuring proper error handling for active runs. - Updated database interactions to include `cursor_request_id` for better tracking of requests. - Added tests to verify the behavior of reused cursor request IDs and their mapping to distinct executions.
7 lines
313 B
SQL
7 lines
313 B
SQL
-- Cursor may reuse one transport request id for multiple queued executions.
|
|
-- Keep that id as an association key while each local Run keeps its own identity.
|
|
ALTER TABLE runs ADD COLUMN cursor_request_id TEXT;
|
|
|
|
CREATE INDEX idx_runs_cursor_request_active
|
|
ON runs(cursor_request_id, status, created_at_ms DESC);
|