* chore(release): stop publishing legacy Windows update packages

* feat(agents): support OpenCode Desktop across platforms

Detect CLI and desktop installations on Windows, macOS, and Linux, and add separate launch and restart controls.

Closes #156

* fix(codex): align model display names and show total session count

- preserve runtime model identity in generated catalogs
- count distinct sessions across database and rollout sources
- update session count labels in all supported languages

* fix(codex): keep config and auth files in sync

- generate auth.json for API key configuration
- preserve and validate OAuth credentials
- include auth.json in transactional updates and rollback
- retain compatibility with legacy Codex configuration states

* fix(cpa-gui): update version to 0.2.59 in Cargo files

* fix(codex): preserve OAuth mode after closing configuration

* feat(config): add TLS management and protocol-aware local URLs

- add TLS controls to advanced settings
- persist certificate and private key paths
- restart the core after TLS changes
- switch WebUI, API and management URLs between HTTP and HTTPS
- synchronize agent configurations and detection with the active protocol

* refactor(config): reorganize network, routing, and TLS settings

- split network settings and session routing into separate tabs
- move TLS configuration into network settings
- preserve TLS restart and HTTPS URL synchronization behavior

* feat(config): add independent network settings and custom listen IP

* fix(navigation): allow access to usage records while core is stopped

* refactor(home): show a single API URL based on the configured listen IP

* feat(config): add file pickers for TLS certificate and private key
This commit is contained in:
lzt404 authored and GitHub committed 2026-08-23 17:56:13 +08:00
1 parent c3cd57bd8e
commit 2b9ceb11fb
21 files changed
+1355 -261

No files matched your search

+15 -2
View File
@@ -837,10 +837,23 @@ pub(crate) fn current_core_status(
}
pub(crate) fn is_management_port_open(port: u16) -> bool {
let address = SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), port);
let listen_host = read_installed_core_config_settings()
.map(|settings| settings.host)
.unwrap_or_else(|_| "127.0.0.1".to_string());
let Ok(address) = core_management_address(&listen_host, port) else {
return false;
};
TcpStream::connect_timeout(&address, Duration::from_millis(150)).is_ok()
}
fn core_management_address(listen_host: &str, port: u16) -> Result<SocketAddr, String> {
let host = core_connect_host(listen_host);
let ip = host
.parse::<IpAddr>()
.map_err(|_| format!("Invalid core listen IP: {listen_host}"))?;
Ok(SocketAddr::new(ip, port))
}
pub(crate) fn start_core_process_inner(
process_state: &CoreProcessState,
gui_config: &GuiConfigFile,
@@ -857,7 +870,7 @@ pub(crate) fn start_core_process_inner(
if process_state.managed_pid().is_some() || is_core_running(&binary_path) {
return Err("CPA 内核已经在运行".to_string());
}
let management_address = SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), gui_config.port);
let management_address = core_management_address(&gui_config.host, gui_config.port)?;
if TcpStream::connect_timeout(&management_address, Duration::from_millis(250)).is_ok() {
return Err(format!(
"端口 {} 已被其他程序占用,请更换端口后重试",