feat: GameConfig 新增 hostPort 字段

- Rust GameConfig 添加 host_port: u16(#[serde(default)],默认 0)
- TypeScript GameConfig 添加 hostPort?: number(可选,匹配其他带默认值字段的模式)
This commit is contained in:
2026-05-31 14:58:45 +08:00
parent 105aa968e0
commit 6da7b7a43b
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -122,6 +122,8 @@ pub struct GameConfig {
#[serde(default)]
pub remote_address: String,
#[serde(default)]
pub host_port: u16,
#[serde(default)]
pub use_llm: bool,
#[serde(default)]
pub llm_endpoint: String,
@@ -142,6 +144,7 @@ impl Default for GameConfig {
player_color: Color::Black,
is_server: false,
remote_address: String::new(),
host_port: 0,
use_llm: false,
llm_endpoint: String::new(),
llm_api_key: String::new(),
+1
View File
@@ -20,6 +20,7 @@ export interface GameConfig {
playerColor: Color;
isServer: boolean;
remoteAddress: string;
hostPort?: number;
useLlm?: boolean;
llmEndpoint?: string;
llmApiKey?: string;