mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-06 21:52:51 +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:
@@ -54,6 +54,7 @@ async fn a_replaced_run_cannot_overwrite_its_cancelled_status() {
|
||||
let base_revision_id = store.ensure_conversation(&conversation_id).await.unwrap();
|
||||
let prepared = |run_id: &str| PreparedRun {
|
||||
run_id: RunId::new(run_id),
|
||||
cursor_request_id: None,
|
||||
conversation_id: conversation_id.clone(),
|
||||
kind: RunKind::Root,
|
||||
model: ModelSpec::new("model"),
|
||||
|
||||
Reference in New Issue
Block a user