mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-06 05:12:03 +08:00
refactor: update cursor request handling and improve parent request management
- 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.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
-- 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);
|
||||
Reference in New Issue
Block a user