Pass TurnContext around instead of sub_id (#5421)
Today `sub_id` is an ID of a single incoming Codex Op submition. We then associate all events triggered by this operation using the same `sub_id`. At the same time we are also creating a TurnContext per submission and we'd like to start associating some events (item added/item completed) with an entire turn instead of just the operation that started it. Using turn context when sending events give us flexibility to change notification scheme.
This commit is contained in:
@@ -24,19 +24,10 @@ impl SessionTask for RegularTask {
|
||||
self: Arc<Self>,
|
||||
session: Arc<SessionTaskContext>,
|
||||
ctx: Arc<TurnContext>,
|
||||
sub_id: String,
|
||||
input: Vec<UserInput>,
|
||||
cancellation_token: CancellationToken,
|
||||
) -> Option<String> {
|
||||
let sess = session.clone_session();
|
||||
run_task(
|
||||
sess,
|
||||
ctx,
|
||||
sub_id,
|
||||
input,
|
||||
TaskKind::Regular,
|
||||
cancellation_token,
|
||||
)
|
||||
.await
|
||||
run_task(sess, ctx, input, TaskKind::Regular, cancellation_token).await
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user