chore(app-server): mark thread/rollback as deprecated (#29928)

We will drop support for this in the near future due to the complexity
it introduces.
This commit is contained in:
Owen Lin
2026-06-25 17:15:46 +00:00
committed by GitHub
parent c38b2e9ba6
commit 268328001f
10 changed files with 46 additions and 1 deletions
@@ -56,6 +56,7 @@ use codex_app_server_protocol::ConsumeAccountRateLimitResetCreditParams;
use codex_app_server_protocol::ConsumeAccountRateLimitResetCreditResponse;
use codex_app_server_protocol::ConversationGitInfo;
use codex_app_server_protocol::ConversationSummary;
use codex_app_server_protocol::DeprecationNoticeNotification;
use codex_app_server_protocol::DynamicToolFunctionSpec;
use codex_app_server_protocol::DynamicToolNamespaceTool;
use codex_app_server_protocol::DynamicToolSpec;
@@ -8,6 +8,8 @@ use codex_protocol::models::BUILT_IN_PERMISSION_PROFILE_WORKSPACE;
const THREAD_LIST_DEFAULT_LIMIT: usize = 25;
const THREAD_LIST_MAX_LIMIT: usize = 100;
const THREAD_ROLLBACK_DEPRECATION_SUMMARY: &str =
"thread/rollback is deprecated and will be removed soon";
struct ThreadListFilters {
model_providers: Option<Vec<String>>,
@@ -633,11 +635,25 @@ impl ThreadRequestProcessor {
request_id: &ConnectionRequestId,
params: ThreadRollbackParams,
) -> Result<Option<ClientResponsePayload>, JSONRPCErrorError> {
self.send_thread_rollback_deprecation_notice(request_id.connection_id)
.await;
self.thread_rollback_inner(request_id, params)
.await
.map(|()| None)
}
async fn send_thread_rollback_deprecation_notice(&self, connection_id: ConnectionId) {
self.outgoing
.send_server_notification_to_connections(
&[connection_id],
ServerNotification::DeprecationNotice(DeprecationNoticeNotification {
summary: THREAD_ROLLBACK_DEPRECATION_SUMMARY.to_string(),
details: None,
}),
)
.await;
}
pub(crate) async fn thread_list(
&self,
params: ThreadListParams,