diff --git a/AGENTS.md b/AGENTS.md index 5515da6..b219607 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -108,7 +108,7 @@ Allowed types: 1. 确保 `master` 分支代码已更新 (pull latest)。 2. 创建发布分支,如 `release-v1.2.0`。 -3. 更新 `frontend/package.json` 中的版本号。 +3. 更新 `frontend/package.json`、`frontend/tauri/tauri.conf.json` 中的版本号。 4. 运行全链路测试 (`npm run test:e2e` 与 `go test ./...`) 确保版本稳定性。 5. 提交变更并创建 PR。 6. PR 合并后,切换回 `master` 分支并拉取最新代码。 diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 28a3315..d8985b3 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -206,7 +206,7 @@ function App() {
{/* Titlebar / Tab Bar */}
-
+
{sessions.map((session, index) => (
vstable - +
diff --git a/frontend/src/layouts/TabWorkspace.tsx b/frontend/src/layouts/TabWorkspace.tsx index 2802c59..32df0be 100644 --- a/frontend/src/layouts/TabWorkspace.tsx +++ b/frontend/src/layouts/TabWorkspace.tsx @@ -50,7 +50,7 @@ export const TabWorkspace: React.FC = ({ isMaximized, setIsMa >
{ if (e.target === e.currentTarget) setIsMaximized(!isMaximized); }} diff --git a/frontend/tauri/src/lib.rs b/frontend/tauri/src/lib.rs index a4a33d0..1da0947 100644 --- a/frontend/tauri/src/lib.rs +++ b/frontend/tauri/src/lib.rs @@ -42,7 +42,7 @@ pub fn run() { }); // Give the sidecar some time to start before the frontend tries to connect - std::thread::sleep(std::time::Duration::from_secs(2)); + std::thread::sleep(std::time::Duration::from_millis(500)); Ok(()) }) diff --git a/frontend/tauri/src/utils.rs b/frontend/tauri/src/utils.rs index d1381e6..aa31e0e 100644 --- a/frontend/tauri/src/utils.rs +++ b/frontend/tauri/src/utils.rs @@ -47,7 +47,16 @@ pub fn prost_value_to_json(v: prost_types::Value) -> serde_json::Value { Some(Kind::NumberValue(n)) => serde_json::Value::Number( serde_json::Number::from_f64(n).unwrap_or(serde_json::Number::from(0)), ), - Some(Kind::StringValue(s)) => serde_json::Value::String(s), + Some(Kind::StringValue(s)) => { + // Attempt to parse string as JSON. If it's a valid JSON object or array, + // return the parsed value instead of the string. + if (s.starts_with('{') && s.ends_with('}')) || (s.starts_with('[') && s.ends_with(']')) { + if let Ok(json_val) = serde_json::from_str(&s) { + return json_val; + } + } + serde_json::Value::String(s) + } Some(Kind::ListValue(l)) => { serde_json::Value::Array(l.values.into_iter().map(prost_value_to_json).collect()) } diff --git a/frontend/tauri/tauri.conf.json b/frontend/tauri/tauri.conf.json index 5c28acc..afff007 100644 --- a/frontend/tauri/tauri.conf.json +++ b/frontend/tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "productName": "vstable", - "version": "0.1.0", + "version": "0.5.2", "identifier": "com.rust17.vstable", "build": { "frontendDist": "../dist",