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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
5 changes: 5 additions & 0 deletions release-notes/2026.11.19.md
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions scripts/shots/core/en/status.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"api_version": 59,
"api_version": 61,
"clients": 4,
"config_path": "",
"draining": 0,
Expand All @@ -18,5 +18,5 @@
"reachable": []
},
"uptime_secs": 0,
"version": "0.93.0"
"version": "0.98.1"
}
4 changes: 2 additions & 2 deletions scripts/shots/core/zh/status.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"api_version": 59,
"api_version": 61,
"clients": 4,
"config_path": "",
"draining": 0,
Expand All @@ -18,5 +18,5 @@
"reachable": []
},
"uptime_secs": 0,
"version": "0.93.0"
"version": "0.98.1"
}
30 changes: 15 additions & 15 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 和
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/core.zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
Expand Down
16 changes: 12 additions & 4 deletions src/routing/WebTools.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -138,24 +138,32 @@ function Tester({ view }: { view: WebToolsView }) {
const [busy, setBusy] = useState(false);
const [error, setError] = useState<string | null>(null);
const [result, setResult] = useState<WebToolResult | null>(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<HTMLInputElement>) {
// WebKit 确认输入法候选词时可能先结束 composition,仍需检查 229。
if (event.key !== "Enter" || event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;
event.preventDefault();
if (!event.repeat) void run();
}
return <>
<DialogHeader><DialogTitle>{t.test} · {t.title}</DialogTitle><DialogDescription>{t.testHelp}</DialogDescription></DialogHeader>
<Segmented label={t.test} disabled={busy} value={action} options={[{ id: "search", label: t.search }, { id: "open_page", label: t.open }, { id: "find_in_page", label: t.find }]} onChange={(value) => { setAction(value); setResult(null); setError(null); }} />
<FormItem label={action === "search" ? t.query : t.url} htmlFor={`${id}-input`}><Input id={`${id}-input`} disabled={busy} value={input} onChange={(e) => setInput(e.target.value)} /></FormItem>
{action === "find_in_page" && <FormItem label={t.pattern} htmlFor={`${id}-pattern`}><Input id={`${id}-pattern`} disabled={busy} value={pattern} onChange={(e) => setPattern(e.target.value)} /></FormItem>}
<FormItem label={action === "search" ? t.query : t.url} htmlFor={`${id}-input`}><Input id={`${id}-input`} disabled={busy} value={input} onChange={(e) => setInput(e.target.value)} onKeyDown={onInputKeyDown} /></FormItem>
{action === "find_in_page" && <FormItem label={t.pattern} htmlFor={`${id}-pattern`}><Input id={`${id}-pattern`} disabled={busy} value={pattern} onChange={(e) => setPattern(e.target.value)} onKeyDown={onInputKeyDown} /></FormItem>}
<DialogError error={error} />
{result && <div className="grid min-h-0 gap-3 overflow-y-auto">
<p className="tw-label text-muted-foreground">{result.cached ? t.cached : t.fetched} · {t.elapsed(result.elapsed_ms)}{result.truncated ? ` · ${t.truncated}` : ""}</p>
{result.warnings.map((warning, i) => <p key={i} className="tw-label text-muted-foreground">{t.partial}: {errorText(warning)}</p>)}
{!result.sources.length && <p className="tw-body">{t.noResults}</p>}
{result.sources.map((source, i) => <article key={`${source.url}-${i}`} className="rounded-md border border-border p-3"><a className="tw-body font-medium break-all underline" href={source.url} target="_blank" rel="noopener noreferrer">{source.title || source.url}</a><p className="tw-label text-muted-foreground break-all">{source.url}{source.engine ? ` · ${engineName(source.engine, view.available_engines)}` : ""}</p><p className="mt-2 max-h-56 overflow-auto whitespace-pre-wrap break-words tw-body">{source.text}</p></article>)}
</div>}
<DialogFooter><Button disabled={busy || !input.trim() || (action === "find_in_page" && !pattern.trim())} onClick={() => void run()}>{busy ? t.testing : t.run}</Button></DialogFooter>
<DialogFooter><Button disabled={!canRun} onClick={() => void run()}>{busy ? t.testing : t.run}</Button></DialogFooter>
</>;
}
Loading