Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions desktop/src-tauri/src/brand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ pub const DESKTOP_UPDATE_BASE: &str = match option_env!("JX_DESKTOP_UPDATE_BASE"
None => "",
};

/// 本机服务 `/health` 返回的 `service` 标识(backend `api/health.py`)。就绪判定
/// 靠它确认端口上跑的是我们的后端——两侧必须一致,否则健康检查 200 也永远
/// 不算就绪,本机模式卡在「启动超时」(iChain 分支实测踩坑)。
pub const LOCAL_SERVICE_NAME: &str = match option_env!("JX_LOCAL_SERVICE_NAME") {
Some(v) => v,
None => "hugagent",
};

/// 登录卡片上展示的 logo(走本地反代的静态路径,或可访问的绝对 URL)。
pub const LOGIN_LOGO_URL: &str = match option_env!("JX_BRAND_LOGO_URL") {
Some(v) => v,
Expand Down
2 changes: 1 addition & 1 deletion desktop/src-tauri/src/local_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ impl LocalServerManager {
.map(str::to_owned)
})
.as_deref()
== Some("hugagent")
== Some(crate::brand::LOCAL_SERVICE_NAME)
}

/// 后台启动已安装的本机服务;重复调用是幂等的。
Expand Down
Loading