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.16",
"version": "2026.11.17",
"type": "module",
"packageManager": "[email protected]",
"scripts": {
Expand Down
8 changes: 8 additions & 0 deletions release-notes/2026.11.17.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
This release bundles ThinkWatch Core 0.98.0 with improved free web search. Core connects directly to Google (Docs), DuckDuckGo and Bing, without API keys or a browser runtime.

- Automatic search follows Core's recommended order: Google (Docs), DuckDuckGo, then Bing. Cached results, shared concurrent searches, per-engine pacing and cooldowns reduce repeated requests and allow another source to take over when one fails.
- The search engine picker reads the connected Core's capabilities. Google (Docs) can be selected and saved alongside other sources, with readable engine names in test results. Connections to older Core versions retain their existing choices.
- Google (Docs) searches public web pages through a legacy Google endpoint, with at least six seconds between requests and no regional preference support. It depends on the endpoint and eligible public document contexts remaining available.
- The native bridge preserves new search engine identifiers while Core continues to validate configuration and search requests. Other control-plane routes keep their existing validation.

Configure and test these sources under **Routing → Auxiliary → Web search and page reading**. Existing upstream execution settings remain unchanged until Core execution is enabled.
2 changes: 1 addition & 1 deletion scripts/shots/mock/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const CORE: { [N in WebviewEndpoint]: Handler<N> } = {
ConfigRepairPlan: () => ({ base_version: configVersion(), fixes: [] }),
RepairConfig: refuse,
SaveListen: refuse,
WebTools: () => ({ config_version: configVersion(), system_locale: { language: "zh-Hans", region: "CN" }, config: {
WebTools: () => ({ available_engines: [{ id: "google_docs", name: "Google (Docs)", min_interval_ms: 6000 }, { id: "duckduckgo", name: "DuckDuckGo", min_interval_ms: 0 }, { id: "bing", name: "Bing", min_interval_ms: 0 }], config_version: configVersion(), system_locale: { language: "zh-Hans", region: "CN" }, config: {
mode: "upstream", engines: [], proxy: "system", language: "", region: "", allowed_domains: [], blocked_domains: [],
max_results: 8, read_pages: 2, max_page_chars: 12000, timeout_secs: 30, max_concurrent: 4, interval_ms: 1000, cache_secs: 600, max_tool_calls: 8, fallback_to_upstream: false,
} }),
Expand Down
52 changes: 51 additions & 1 deletion scripts/ui/web-tools.pw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ test("locale menus scroll and select in the real config dialog; drafts survive S
await expect(region).toHaveValue("日本");
const engine = dialog.getByRole("combobox", { name: "搜索引擎", exact: true });
await engine.click();
await expect(page.getByRole("option")).toHaveCount(3);
await expect(page.getByRole("option")).toHaveCount(4);
await page.getByRole("option", { name: "Bing", exact: true }).click();
await expect(page.getByRole("listbox")).toBeVisible();
await page.keyboard.press("Escape");
Expand Down Expand Up @@ -143,6 +143,56 @@ test("engine choices support keyboard search and return to Automatic when the la
await expect.poll(() => page.evaluate(() => (window as unknown as { savedWebConfig?: unknown }).savedWebConfig)).toMatchObject({ engines: [] });
});

test("Core-advertised Google search survives saving and reopening", async ({ page }) => {
await open(page);
await acceptSaves(page);
const dialog = page.getByRole("dialog");
const engine = dialog.getByRole("combobox", { name: "搜索引擎", exact: true });
await expect(dialog).toContainText("请求间隔至少 6 秒");
await engine.click();
await page.getByRole("option", { name: "Google (Docs)", exact: true }).click();
await page.keyboard.press("Escape");
await dialog.getByRole("button", { name: "保存", exact: true }).click();
await expect(dialog).toBeHidden();
await expect.poll(() => page.evaluate(() => (window as unknown as { savedWebConfig?: unknown }).savedWebConfig)).toMatchObject({ engines: ["google_docs"] });
await page.getByRole("button", { name: "配置", exact: true }).click();
await expect(engine).toHaveText("Google (Docs)");
await engine.click();
await expect(page.getByRole("option", { name: "Google (Docs)", exact: true })).toHaveAttribute("aria-selected", "true");
});

test("older Core without capabilities retains its two engines", async ({ page }) => {
await page.addInitScript(() => {
type Invoke = (command: string, args?: Record<string, unknown>, options?: unknown) => Promise<unknown>;
const context = window as unknown as { __TAURI_INTERNALS__: Record<string, unknown> };
const internals: Record<string, unknown> = {};
let invoke: Invoke;
Object.defineProperty(internals, "invoke", {
configurable: true,
get: () => invoke,
set: (original: Invoke) => {
invoke = async (command, args, options) => {
const result = await original(command, args, options);
if (command === "call" && args?.endpoint === "WebTools") {
const view = { ...result as Record<string, unknown> };
delete view.available_engines;
return view;
}
return result;
};
},
});
context.__TAURI_INTERNALS__ = internals;
});
await open(page);
const dialog = page.getByRole("dialog");
await expect(dialog).not.toContainText("Google (Docs)");
await dialog.getByRole("combobox", { name: "搜索引擎", exact: true }).click();
await expect(page.getByRole("option")).toHaveCount(3);
await expect(page.getByRole("option", { name: "Bing", exact: true })).toBeVisible();
await expect(page.getByRole("option", { name: "DuckDuckGo", exact: true })).toBeVisible();
});

test("invalid domains block saving; failed save retains edits; Escape closes the menu first", async ({ page }) => {
await open(page);
const dialog = page.getByRole("dialog");
Expand Down
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.16"
version = "2026.11.17"
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.97.0" }
tw-types = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.97.0" }
tw-yaml = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.97.0" }
tw-guard = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.97.0" }
tw-watch = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.97.0" }
tw-link = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.97.0" }
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" }

[lib]
name = "thinkwatch_lite_lib"
Expand Down
Loading
Loading