fix: clean up TypeScript exports

This commit is contained in:
Michael Bolin
2025-09-30 13:23:56 -07:00
parent 6910be3224
commit 9b958abf55
+36 -36
View File
@@ -15,43 +15,43 @@ const HEADER: &str = "// GENERATED CODE! DO NOT MODIFY BY HAND!\n\n";
pub fn generate_ts(out_dir: &Path, prettier: Option<&Path>) -> Result<()> {
ensure_dir(out_dir)?;
// Generate TS bindings
mcp_types::InitializeResult::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::ConversationId::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::InputItem::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::ClientRequest::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::ServerRequest::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::InitializeResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::NewConversationResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::ListConversationsResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::ResumeConversationResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::ArchiveConversationResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::AddConversationSubscriptionResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::RemoveConversationSubscriptionResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::SendUserMessageResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::SendUserTurnResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::InterruptConversationResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::GitDiffToRemoteResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::LoginApiKeyParams::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::LoginApiKeyResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::LoginChatGptResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::CancelLoginChatGptResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::LogoutChatGptResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::GetAuthStatusResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::ApplyPatchApprovalResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::ExecCommandApprovalResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::FuzzyFileSearchParams::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::FuzzyFileSearchResult::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::FuzzyFileSearchResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::GetUserSavedConfigResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::SetDefaultModelResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::GetUserAgentResponse::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::UserInfoResponse::export_all_to(out_dir)?;
use codex_protocol::mcp_protocol::*;
// All notification types reachable from this enum will be generated by
// induction, so they do not need to be listed individually.
codex_protocol::mcp_protocol::ServerNotification::export_all_to(out_dir)?;
codex_protocol::mcp_protocol::ClientNotification::export_all_to(out_dir)?;
// Generating the TS bindings for these top-level enums ensures all types
// reachable from them will be generated by induction, so they do not need
// to be listed individually.
ClientRequest::export_all_to(out_dir)?;
ClientNotification::export_all_to(out_dir)?;
ServerRequest::export_all_to(out_dir)?;
ServerNotification::export_all_to(out_dir)?;
// Response types for ClientRequest (mirror enum order).
InitializeResponse::export_all_to(out_dir)?;
NewConversationResponse::export_all_to(out_dir)?;
ListConversationsResponse::export_all_to(out_dir)?;
ResumeConversationResponse::export_all_to(out_dir)?;
ArchiveConversationResponse::export_all_to(out_dir)?;
SendUserMessageResponse::export_all_to(out_dir)?;
SendUserTurnResponse::export_all_to(out_dir)?;
InterruptConversationResponse::export_all_to(out_dir)?;
AddConversationSubscriptionResponse::export_all_to(out_dir)?;
RemoveConversationSubscriptionResponse::export_all_to(out_dir)?;
GitDiffToRemoteResponse::export_all_to(out_dir)?;
LoginApiKeyResponse::export_all_to(out_dir)?;
LoginChatGptResponse::export_all_to(out_dir)?;
CancelLoginChatGptResponse::export_all_to(out_dir)?;
LogoutChatGptResponse::export_all_to(out_dir)?;
GetAuthStatusResponse::export_all_to(out_dir)?;
GetUserSavedConfigResponse::export_all_to(out_dir)?;
SetDefaultModelResponse::export_all_to(out_dir)?;
GetUserAgentResponse::export_all_to(out_dir)?;
UserInfoResponse::export_all_to(out_dir)?;
FuzzyFileSearchResponse::export_all_to(out_dir)?;
ExecArbitraryCommandResponse::export_all_to(out_dir)?;
// Response types for ServerRequest (mirror enum order).
ApplyPatchApprovalResponse::export_all_to(out_dir)?;
ExecCommandApprovalResponse::export_all_to(out_dir)?;
generate_index_ts(out_dir)?;