mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
connectors: own app metadata types (#29723)
## Why Connector metadata is consumed by connector discovery, ChatGPT integration, core, and TUI code. Treating app-server's wire DTO as the shared domain model reverses the intended dependency direction. ## What changed - Added connector-owned app branding, review, screenshot, metadata, and info types. - Added explicit conversions in app-server and TUI while preserving app-server's wire payloads. - Removed production app-server-protocol dependencies from connectors and ChatGPT connector code. ## Stack This is PR 4 of 6, stacked on [PR #29722](https://github.com/openai/codex/pull/29722). Review only the delta from `codex/split-config-layer-types`. Next: [PR #29724](https://github.com/openai/codex/pull/29724). ## Validation - Connector and tools coverage passed. - App-server app-list coverage passed: 13 tests.
This commit is contained in:
1 parent
1d65ccabd5
commit
e639e8c4bd
34 files changed
+400
-32
No files matched your search
@@ -7,6 +7,7 @@ use super::app_server_event_targets::server_request_thread_id;
|
||||
use crate::app_command::AppCommand;
|
||||
use crate::app_event::AppEvent;
|
||||
use crate::app_event::ConnectorsSnapshot;
|
||||
use crate::app_info::app_info_from_api;
|
||||
use crate::app_server_session::AppServerSession;
|
||||
use crate::app_server_session::status_account_display_from_auth_mode;
|
||||
use codex_app_server_client::AppServerEvent;
|
||||
@@ -127,7 +128,12 @@ impl App {
|
||||
ServerNotification::AppListUpdated(notification) => {
|
||||
self.chat_widget.on_connectors_loaded(
|
||||
Ok(ConnectorsSnapshot {
|
||||
connectors: notification.data.clone(),
|
||||
connectors: notification
|
||||
.data
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(app_info_from_api)
|
||||
.collect(),
|
||||
}),
|
||||
/*is_final*/ false,
|
||||
);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
use super::plugin_mentions::fetch_plugin_mentions;
|
||||
use super::*;
|
||||
use crate::app_event::ConnectorsSnapshot;
|
||||
use crate::app_info::app_info_from_api;
|
||||
use crate::config_update::format_config_error;
|
||||
use codex_app_server_protocol::AppsListParams;
|
||||
use codex_app_server_protocol::AppsListResponse;
|
||||
@@ -870,7 +871,7 @@ pub(super) async fn fetch_connectors_list(
|
||||
.await
|
||||
.wrap_err("app/list failed in TUI")?;
|
||||
Ok(ConnectorsSnapshot {
|
||||
connectors: response.data,
|
||||
connectors: response.data.into_iter().map(app_info_from_api).collect(),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user