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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
**[English](README.md) | [中文](README.zh-CN.md)**

ThinkWatch Lite is a macOS menu-bar app that runs a local AI API gateway.
Claude Code, Codex CLI and other clients of the Anthropic, OpenAI and Gemini
Claude Code, Codex and other clients of the Anthropic, OpenAI and Gemini
APIs send their requests to the gateway, and Lite shows what each request
cost, which upstream served it and why, and what was sent along with it.

Expand Down Expand Up @@ -121,15 +121,15 @@ commands.

### Client setup

Claude Code, Codex CLI, opencode, Zed and Aider can be pointed at the gateway
Claude Code, Codex, opencode, Zed and Aider can be pointed at the gateway
from the app. The change is shown as a diff before anything is written, the
original file is backed up, only the endpoint and key fields change, and the
change can be restored at any time. Cursor, Continue and Gemini CLI come with
step-by-step instructions.

<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/screenshots/clients-en-dark.png">
<img src="docs/screenshots/clients-en-light.png" alt="The clients page: Claude Code and Codex CLI pointed at the gateway and already serving requests, opencode not yet pointed at it, and the clients that have to be set up by hand">
<img src="docs/screenshots/clients-en-light.png" alt="The clients page: Claude Code and Codex pointed at the gateway and already serving requests, opencode not yet pointed at it, and the clients that have to be set up by hand">
</picture>

### Menu bar and notifications
Expand Down
4 changes: 2 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ MCP 页并排列出各客户端配置的 MCP server,可以把一个 server 复

### 客户端接管

Claude Code、Codex CLI、opencode、Zed 与 Aider 可以在应用内一键指向网关。写入
Claude Code、Codex、opencode、Zed 与 Aider 可以在应用内一键指向网关。写入
前先显示改动差异并完整备份原文件,只修改端点与密钥两个字段,随时可以还原。
Cursor、Continue 与 Gemini CLI 提供逐步的手动配置说明。

<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/screenshots/clients-dark.png">
<img src="docs/screenshots/clients-light.png" alt="客户端页:已接管并收到请求的 Claude Code 与 Codex CLI、尚未接管的 opencode,以及需手动配置的客户端">
<img src="docs/screenshots/clients-light.png" alt="客户端页:已接管并收到请求的 Claude Code 与 Codex、尚未接管的 opencode,以及需手动配置的客户端">
</picture>

### 菜单栏与系统通知
Expand Down
8 changes: 4 additions & 4 deletions 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
Expand Up @@ -31,7 +31,7 @@ tauri-plugin-deep-link = "2"
# 编出来的东西不一样;而更要紧的是,打进 `.app` 的那个 twcore 二进制
# 必须和这里编译进去的协议镜像来自同一个 core 版本 —— 打包脚本正是从
# 这个 tag 去取二进制的(见 scripts/fetch-core.sh)。
tw-api = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.28.0" }
tw-api = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.29.0" }

anyhow = "1"
libc = "0.2"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2283,7 +2283,7 @@ mod tests {
fn restore_addresses_a_client_by_id_and_reports_it_by_name() {
let list = clients_json(&[
(r#""claude-code""#, r#""Claude Code""#, "1700000000000"),
(r#""codex""#, r#""Codex CLI""#, "null"),
(r#""codex""#, r#""Codex""#, "null"),
(r#""opencode""#, r#""opencode""#, "1700000000001"),
(r#""zed""#, r#""Zed""#, "1700000000002"),
]);
Expand Down
4 changes: 2 additions & 2 deletions src-tauri/src/menubar/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ pub fn app_label(hint: &str) -> &str {
match hint {
"claude-code" => "Claude Code",
"claude-desktop" => "Claude Desktop",
"codex" => "Codex CLI",
"codex" => "Codex",
"cursor" => "Cursor",
"opencode" => "opencode",
"aider" => "Aider",
Expand Down Expand Up @@ -1114,7 +1114,7 @@ mod tests {
})
.collect();
assert_eq!(live.len(), MAX_LIVE);
assert_eq!(live[0], ("Codex CLI", "1:42"));
assert_eq!(live[0], ("Codex", "1:42"));
// 认不出应用的用密钥名
assert_eq!(live[1].0, "default");
assert_eq!(item(&rows, "live-more").unwrap().title, "另有 2 个");
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/core.i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,9 @@ const ZH: Record<string, Say> = {
"adopt.cost.claude_code.welcome_screen": () =>
"Claude Code 可能会显示一次欢迎页,关闭即可。",
"adopt.cost.codex.model_list": () =>
"Codex CLI 不从网关获取模型列表,自定义模型名无效,模型列表以本地的模型目录文件为准。",
"Codex 不从网关获取模型列表,自定义模型名无效,模型列表以本地的模型目录文件为准。",
"adopt.cost.codex.chatgpt_desktop": () =>
"ChatGPT 桌面版读取同一份配置文件,其本地 Codex 会话也会一并接管,重新启动该应用后生效。",
"adopt.cost.codex.reopen_terminal": () => "修改后需要重新打开终端。",
"adopt.cost.opencode.restart": () => "修改后需要重新启动 opencode。",
"adopt.cost.zed.key_store": () =>
Expand Down
2 changes: 1 addition & 1 deletion src/labels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ export function fieldsOnlyText(): string {
const APPS: Record<string, string> = {
"claude-code": "Claude Code",
"claude-desktop": "Claude Desktop",
codex: "Codex CLI",
codex: "Codex",
cursor: "Cursor",
opencode: "opencode",
aider: "Aider",
Expand Down
Loading