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.17",
"version": "2026.11.18",
"type": "module",
"packageManager": "[email protected]",
"scripts": {
Expand Down
6 changes: 6 additions & 0 deletions release-notes/2026.11.18.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This release improves the auxiliary request and web-tool controls under **Routing → Auxiliary**.

- Handling controls align at the right edge of the table. Web-tool Configure and Test buttons sit beside the tool name and wrap when space is limited.
- Limits and cache settings have a full-width expandable heading with a direction indicator and keyboard support.

This release retains Core 0.98.0 and the Google (Docs), DuckDuckGo and Bing search support introduced in 2026.11.17.
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

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

2 changes: 1 addition & 1 deletion 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.17"
version = "2026.11.18"
edition = "2024"
# **这个数决定依赖能升到哪一版。**edition 2024 的解析器只挑声明的 Rust
# 版本编得动的依赖:写 1.85 的时候,`cargo update` 一直停在旧的 time 和
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.17",
"version": "2026.11.18",
"identifier": "app.thinkwatch.lite",
"build": {
"beforeDevCommand": "pnpm dev",
Expand Down
4 changes: 2 additions & 2 deletions src/routing/ProbesTab.i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const probesTabText = messages(
{
intro:
"配置客户端辅助请求及联网工具的执行方式。设为转发的请求继续按路由规则选择上游。",
kind: "请求/工具", mode: "处理方式", actions: "操作",
kind: "请求/工具", mode: "处理方式",
intercept: "本地应答",
interceptWhat: "由网关直接应答,不发送到上游,不产生费用。",
forward: "转发",
Expand All @@ -14,7 +14,7 @@ export const probesTabText = messages(
{
intro:
"Choose how client auxiliary requests and web tools are handled. Forwarded requests continue through routing rules.",
kind: "Request / tool", mode: "Handling", actions: "Actions",
kind: "Request / tool", mode: "Handling",
intercept: "Answer locally",
interceptWhat: "The gateway answers directly. Nothing is sent upstream and no cost is incurred.",
forward: "Forward",
Expand Down
18 changes: 8 additions & 10 deletions src/routing/ProbesTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function ProbesTab({ ov }: { ov: Overview }) {
<div className="flex flex-col gap-3">
<p className="tw-body text-muted-foreground">{t.intro}</p>
<div className="overflow-hidden rounded-lg border border-border"><Table>
<TableHeader><TableRow><TableHead className="px-3.5">{t.kind}</TableHead><TableHead className="w-1">{t.mode}</TableHead><TableHead className="w-1 pr-3.5 text-right">{t.actions}</TableHead></TableRow></TableHeader>
<TableHeader><TableRow><TableHead className="px-3.5">{t.kind}</TableHead><TableHead className="w-1 pr-3.5 text-right">{t.mode}</TableHead></TableRow></TableHeader>
<TableBody>
{ov.client_probes.map((p) => {
const kind = PROBES.find((x) => x.id === p.id);
Expand All @@ -78,23 +78,21 @@ export function ProbesTab({ ov }: { ov: Overview }) {
{modes.find((m) => m.id === mode)?.what}
</p>
</TableCell>
<TableCell className="align-top py-3"><div className="flex items-center gap-2">
<TableCell className="align-top py-3 pr-3.5"><div className="flex items-center justify-end gap-2">
{/* 转圈的位置一直留着:出现、消失时分段控件不左右挪 */}
{busy ? (
<Spinner aria-hidden className="size-3.5 shrink-0 text-muted-foreground motion-fade" />
) : (
<span aria-hidden className="size-3.5 shrink-0" />
)}
<Segmented<ProbeMode>
label={label}
value={mode}
disabled={busy}
options={modes.map((m) => ({ id: m.id, label: m.label }))}
onChange={(v) => v !== mode && void set(p.id, v)}
/>
{/* 转圈的位置一直留着:出现、消失时分段控件不左右挪 */}
{busy ? (
<Spinner aria-hidden className="size-3.5 text-muted-foreground motion-fade" />
) : (
<span aria-hidden className="size-3.5" />
)}

</div></TableCell>
<TableCell />
</TableRow>
);
})}
Expand Down
16 changes: 10 additions & 6 deletions src/routing/WebTools.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Label } from "@/ui/label";
import { ChevronRightIcon } from "lucide-react";
import { useId, useRef, useEffect, useState } from "react";
import { call } from "@/control";
import { useResource } from "@/lib/resource";
Expand Down Expand Up @@ -47,17 +48,17 @@ export function WebTools({ overview }: { overview: Overview }) {
return <>
<TableRow>
<TableCell className="whitespace-normal align-top px-3.5 py-3">
<div className="tw-body font-medium">{t.title}</div>
<div className="flex flex-wrap items-center gap-x-2 gap-y-1">
<div className="tw-body font-medium">{t.title}</div>
{view && <div className="flex gap-1"><Button variant="ghost" size="sm" onClick={() => { setError(null); setDialog("config"); }}>{t.configure}</Button><Button variant="ghost" size="sm" onClick={() => { setError(null); setDialog("test"); }}>{t.test}</Button></div>}
</div>
<p className="mt-1 tw-label text-muted-foreground">{view?.config.mode === "core" ? t.coreHelp : t.upstreamHelp}</p>
{view?.config.mode === "core" && <p className="mt-1 tw-label text-muted-foreground">{remote ? t.remote(remote.name) : t.local}</p>}
{!view && <p className="mt-1 tw-label text-muted-foreground">{resource.error ? <>{t.unavailable} <Button variant="ghost" size="sm" onClick={() => void resource.reload()}>{t.retry}</Button></> : t.loading}</p>}
<DialogError error={dialog ? null : error} />
</TableCell>
<TableCell className="align-top py-3">
{view && <Segmented label={t.title} value={view.config.mode} disabled={busy} options={[{ id: "core", label: t.core }, { id: "upstream", label: t.upstream }]} onChange={(mode) => void save({ ...view.config, mode })} />}
</TableCell>
<TableCell className="align-top py-3 pr-3.5">
{view && <div className="flex justify-end gap-1"><Button variant="ghost" size="sm" onClick={() => { setError(null); setDialog("config"); }}>{t.configure}</Button><Button variant="ghost" size="sm" onClick={() => { setError(null); setDialog("test"); }}>{t.test}</Button></div>}
{view && <div className="flex justify-end"><Segmented label={t.title} value={view.config.mode} disabled={busy} options={[{ id: "core", label: t.core }, { id: "upstream", label: t.upstream }]} onChange={(mode) => void save({ ...view.config, mode })} /></div>}
</TableCell>
</TableRow>
<Dialog open={dialog !== null && !!view} onOpenChange={(open) => { if (!open && !busy) setDialog(null); }}>
Expand Down Expand Up @@ -99,7 +100,10 @@ function Configuration({ view, overview, busy, error, save, close }: { view: Web
<p className="tw-label text-muted-foreground sm:col-span-2">{t.domainsHelp}</p>
{draft.allowed_domains.some((domain) => draft.blocked_domains.includes(domain)) && <p className="tw-label text-warning sm:col-span-2">{t.domainConflict(draft.allowed_domains.filter((domain) => draft.blocked_domains.includes(domain)).join(", "))}</p>}
{numeric.slice(0, 2).map(([key, label]) => <FormItem key={key} label={label} htmlFor={`${id}-${key}`}><Input id={`${id}-${key}`} type="number" min={WEB_LIMITS[key][0]} max={WEB_LIMITS[key][1]} step={1} value={config[key]} onChange={(e) => set(key, Number(e.target.value))} /></FormItem>)}
<Collapsible className="sm:col-span-2"><CollapsibleTrigger asChild><Button type="button" variant="ghost" size="sm">{t.advanced}</Button></CollapsibleTrigger><CollapsibleContent className="mt-3 grid gap-4 sm:grid-cols-2">
<Collapsible className="border-t border-border sm:col-span-2"><CollapsibleTrigger asChild><Button type="button" variant="ghost" className="group h-9 w-full justify-start gap-2 rounded-none px-0 font-normal hover:bg-transparent aria-expanded:bg-transparent">
<ChevronRightIcon aria-hidden className="size-3.5 text-muted-foreground transition-transform duration-(--motion-fast) ease-(--motion-ease) group-aria-expanded:rotate-90 motion-reduce:transition-none" />
<span className="font-medium">{t.advanced}</span>
</Button></CollapsibleTrigger><CollapsibleContent className="mt-3 grid gap-4 sm:grid-cols-2">
{numeric.slice(2).map(([key, label]) => <FormItem key={key} label={label} htmlFor={`${id}-${key}`}><Input id={`${id}-${key}`} type="number" min={WEB_LIMITS[key][0]} max={WEB_LIMITS[key][1]} step={1} value={config[key]} onChange={(e) => set(key, Number(e.target.value))} /></FormItem>)}
</CollapsibleContent></Collapsible>
<p className="tw-label text-muted-foreground sm:col-span-2">{t.readHelp}</p>
Expand Down
Loading