diff --git a/package.json b/package.json index c8f2bf04..fab6ea54 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "thinkwatch-lite", "private": true, "description": "Desktop app for a local AI API gateway on macOS, Windows and Linux", - "version": "2026.11.18", + "version": "2026.11.19", "type": "module", "packageManager": "pnpm@11.13.1", "scripts": { diff --git a/release-notes/2026.11.19.md b/release-notes/2026.11.19.md new file mode 100644 index 00000000..60269383 --- /dev/null +++ b/release-notes/2026.11.19.md @@ -0,0 +1,5 @@ +This release bundles Core 0.98.1, which improves request-body handling when several large or compressed requests arrive together. + +- Requests wait for memory in order. Decompression releases partial output before waiting for exclusive memory and retrying once, avoiding stalled requests under memory pressure. +- Memory waits and stalled uploads are bounded to 30 seconds. A request that still cannot obtain memory returns the existing retryable 429 response. +- In **Routing → Auxiliary → Web tools → Test**, press Enter in the query, URL or pattern input to run a test. Confirming an input-method candidate does not submit the request. diff --git a/scripts/shots/core/en/status.json b/scripts/shots/core/en/status.json index cfd5ba01..b9f3f535 100644 --- a/scripts/shots/core/en/status.json +++ b/scripts/shots/core/en/status.json @@ -1,5 +1,5 @@ { - "api_version": 59, + "api_version": 61, "clients": 4, "config_path": "", "draining": 0, @@ -18,5 +18,5 @@ "reachable": [] }, "uptime_secs": 0, - "version": "0.93.0" + "version": "0.98.1" } diff --git a/scripts/shots/core/zh/status.json b/scripts/shots/core/zh/status.json index cfd5ba01..b9f3f535 100644 --- a/scripts/shots/core/zh/status.json +++ b/scripts/shots/core/zh/status.json @@ -1,5 +1,5 @@ { - "api_version": 59, + "api_version": 61, "clients": 4, "config_path": "", "draining": 0, @@ -18,5 +18,5 @@ "reachable": [] }, "uptime_secs": 0, - "version": "0.93.0" + "version": "0.98.1" } diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index b2c0a7ae..3c6da4fe 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -4950,7 +4950,7 @@ dependencies = [ [[package]] name = "thinkwatch-lite" -version = "2026.11.18" +version = "2026.11.19" dependencies = [ "anyhow", "base64 0.22.1", @@ -5459,8 +5459,8 @@ dependencies = [ [[package]] name = "tw-api" -version = "0.98.0" -source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.98.0#8572a2e32f21f18038a40da7545ac58fb49ac6a2" +version = "0.98.1" +source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.98.1#df1022c4d214d58c9774ce32a092854e345ea51e" dependencies = [ "serde", "serde_json", @@ -5471,8 +5471,8 @@ dependencies = [ [[package]] name = "tw-dialect" -version = "0.98.0" -source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.98.0#8572a2e32f21f18038a40da7545ac58fb49ac6a2" +version = "0.98.1" +source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.98.1#df1022c4d214d58c9774ce32a092854e345ea51e" dependencies = [ "memchr", "serde", @@ -5481,8 +5481,8 @@ dependencies = [ [[package]] name = "tw-guard" -version = "0.98.0" -source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.98.0#8572a2e32f21f18038a40da7545ac58fb49ac6a2" +version = "0.98.1" +source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.98.1#df1022c4d214d58c9774ce32a092854e345ea51e" dependencies = [ "aho-corasick", "base64 0.22.1", @@ -5503,8 +5503,8 @@ dependencies = [ [[package]] name = "tw-link" -version = "0.98.0" -source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.98.0#8572a2e32f21f18038a40da7545ac58fb49ac6a2" +version = "0.98.1" +source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.98.1#df1022c4d214d58c9774ce32a092854e345ea51e" dependencies = [ "serde", "serde_json", @@ -5530,8 +5530,8 @@ dependencies = [ [[package]] name = "tw-types" -version = "0.98.0" -source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.98.0#8572a2e32f21f18038a40da7545ac58fb49ac6a2" +version = "0.98.1" +source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.98.1#df1022c4d214d58c9774ce32a092854e345ea51e" dependencies = [ "serde", "ts-rs", @@ -5539,8 +5539,8 @@ dependencies = [ [[package]] name = "tw-watch" -version = "0.98.0" -source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.98.0#8572a2e32f21f18038a40da7545ac58fb49ac6a2" +version = "0.98.1" +source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.98.1#df1022c4d214d58c9774ce32a092854e345ea51e" dependencies = [ "libc", "notify", @@ -5550,8 +5550,8 @@ dependencies = [ [[package]] name = "tw-yaml" -version = "0.98.0" -source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.98.0#8572a2e32f21f18038a40da7545ac58fb49ac6a2" +version = "0.98.1" +source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.98.1#df1022c4d214d58c9774ce32a092854e345ea51e" dependencies = [ "saphyr-parser", "thiserror 2.0.21", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 2c314899..a64f6d03 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thinkwatch-lite" -version = "2026.11.18" +version = "2026.11.19" edition = "2024" # **这个数决定依赖能升到哪一版。**edition 2024 的解析器只挑声明的 Rust # 版本编得动的依赖:写 1.85 的时候,`cargo update` 一直停在旧的 time 和 @@ -26,12 +26,12 @@ license = "MIT" # twcore 二进制必须和这里编译进去的协议镜像来自同一个 core 版本 —— 打包脚本正是 # 从 tw-api 锁到的 tag 去取二进制的(见 scripts/fetch-core.sh)。 [workspace.dependencies] -tw-api = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.98.0" } -tw-types = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.98.0" } -tw-yaml = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.98.0" } -tw-guard = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.98.0" } -tw-watch = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.98.0" } -tw-link = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.98.0" } +tw-api = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.98.1" } +tw-types = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.98.1" } +tw-yaml = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.98.1" } +tw-guard = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.98.1" } +tw-watch = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.98.1" } +tw-link = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.98.1" } [lib] name = "thinkwatch_lite_lib" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 2c01cd36..eab2c822 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "ThinkWatch Lite", - "version": "2026.11.18", + "version": "2026.11.19", "identifier": "app.thinkwatch.lite", "build": { "beforeDevCommand": "pnpm dev", diff --git a/src/i18n/core.zh.json b/src/i18n/core.zh.json index 22037141..d0c1372c 100644 --- a/src/i18n/core.zh.json +++ b/src/i18n/core.zh.json @@ -457,6 +457,7 @@ "gw.request.body_declared_too_large": "请求声明的长度为 {size} 字节,超过上限 {max} 字节。", "gw.request.body_over_limit": "请求体超过上限 {max} 字节。", "gw.request.decoded_body_over_limit": "请求体解码后超过上限 {max} 字节。", + "gw.request.body_idle": "请求内容已连续 30 秒没有新数据,请重新发送请求。", "gw.request.body_unreadable": "无法读取请求体:{detail}", "gw.request.memory_busy": "网关正在处理其他大请求,请稍后重试。", "gw.request.bad_encoding": "请求体无法按 {encoding} 解码:{detail}", diff --git a/src/routing/WebTools.tsx b/src/routing/WebTools.tsx index 7f2d5040..2756d6ec 100644 --- a/src/routing/WebTools.tsx +++ b/src/routing/WebTools.tsx @@ -1,6 +1,6 @@ import { Label } from "@/ui/label"; import { ChevronRightIcon } from "lucide-react"; -import { useId, useRef, useEffect, useState } from "react"; +import { useId, useRef, useEffect, useState, type KeyboardEvent } from "react"; import { call } from "@/control"; import { useResource } from "@/lib/resource"; import { useLang, useText } from "@/i18n"; @@ -138,17 +138,25 @@ function Tester({ view }: { view: WebToolsView }) { const [busy, setBusy] = useState(false); const [error, setError] = useState(null); const [result, setResult] = useState(null); + const canRun = !busy && !!input.trim() && (action !== "find_in_page" || !!pattern.trim()); async function run() { + if (!canRun) return; const request: WebToolRequest = action === "search" ? { action, query: input, allowed_domains: [], blocked_domains: [] } : action === "open_page" ? { action, url: input, offset: 0 } : { action, url: input, pattern }; setBusy(true); setError(null); setResult(null); try { setResult(await call("TestWebTool", request)); } catch (e) { setError(errorText(e)); } finally { setBusy(false); } } + function onInputKeyDown(event: KeyboardEvent) { + // WebKit 确认输入法候选词时可能先结束 composition,仍需检查 229。 + if (event.key !== "Enter" || event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return; + event.preventDefault(); + if (!event.repeat) void run(); + } return <> {t.test} · {t.title}{t.testHelp} { setAction(value); setResult(null); setError(null); }} /> - setInput(e.target.value)} /> - {action === "find_in_page" && setPattern(e.target.value)} />} + setInput(e.target.value)} onKeyDown={onInputKeyDown} /> + {action === "find_in_page" && setPattern(e.target.value)} onKeyDown={onInputKeyDown} />} {result &&

{result.cached ? t.cached : t.fetched} · {t.elapsed(result.elapsed_ms)}{result.truncated ? ` · ${t.truncated}` : ""}

@@ -156,6 +164,6 @@ function Tester({ view }: { view: WebToolsView }) { {!result.sources.length &&

{t.noResults}

} {result.sources.map((source, i) => )}
} - + ; }