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
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.24.0" }
tw-api = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.24.1" }

anyhow = "1"
libc = "0.2"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ mod tests {
let mut got = Vec::new();
for chunk in [
"data: {\"kind\":\"request_",
"started\",\"id\":1,\"client\":\"c\",\"provider\":\"p\",\"model\":\"m\",\"method\":\"POST\",\"path\":\"/x\",\"at_ms\":0}\n\n",
"started\",\"id\":1,\"client\":\"c\",\"provider\":\"p\",\"billing\":\"per-token\",\"model\":\"m\",\"method\":\"POST\",\"path\":\"/x\",\"at_ms\":0}\n\n",
] {
buf.push_str(chunk);
while let Some(idx) = buf.find("\n\n") {
Expand Down
4 changes: 2 additions & 2 deletions src/RequestDrawer.i18n.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const requestDrawerText = messages(
failover: (failed: number) =>
`已发生故障转移:前 ${failed} 个上游失败,已自动切换至下一个上游。`,
noRouting: "此请求没有路由信息",
noRoutingTip: "网关本地应答的请求、被路由规则拒绝的请求,以及 WebSocket 连接,不记录路由信息。",
noRoutingTip: "网关本地应答的请求、被路由规则拒绝的请求,以及上游应答之前客户端就断开的请求,不记录路由信息。",
possibleCauses: "可能原因",

// 内容
Expand Down Expand Up @@ -152,7 +152,7 @@ export const requestDrawerText = messages(
: `Failover occurred: the first ${failed} upstreams failed, and the request was switched to the next upstream automatically.`,
noRouting: "No routing information for this request",
noRoutingTip:
"Requests answered locally by the gateway, requests refused by a routing rule, and WebSocket connections carry no routing information.",
"Requests answered locally by the gateway, requests refused by a routing rule, and requests whose client disconnected before any upstream answered carry no routing information.",
possibleCauses: "Possible causes",

request: "Request",
Expand Down
1 change: 1 addition & 0 deletions src/events.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function started(over: Partial<Extract<CoreEvent, { kind: "request_started" }>>
id: 1,
client: "claude-code",
provider: "relay",
billing: "per-token",
model: "claude-sonnet-4-5",
method: "POST",
path: "/v1/messages",
Expand Down
6 changes: 3 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type CoreEvent =
* 长出一批对不上任何会话的影子组。界面因此不读它:归组只认落库之后
* 的 `session`。
*/
| { kind: "request_started"; id: number; client: string; client_hint?: string | null; peer?: string | null; key_masked?: string | null; provider: string; model: string; method: string; path: string; at_ms: number; session_fp?: string | null }
| { kind: "request_started"; id: number; client: string; client_hint?: string | null; peer?: string | null; key_masked?: string | null; provider: string; billing: string; model: string; method: string; path: string; at_ms: number; session_fp?: string | null }
| { kind: "request_headers"; id: number; status: number; ttfb_ms: number }
/**
* 三种结局(结束、失败、取消)都带着 `model`,和开始事件里的是同一个。
Expand Down Expand Up @@ -673,9 +673,9 @@ export interface HistoryRow {
local: boolean;
/** 客户端没等到响应结束就断开了。**不是失败**,`error` 为空 */
cancelled: boolean;
/** 路由决策与尝试链。没经过路由的(WebSocket、本地应答、被规则拒绝的)没有 */
/** 路由决策与尝试链。本地应答的、被规则拒绝的、上游应答之前客户端就断开的没有 */
routing?: RoutingView;
/** 服务它的那家怎么收钱:`per-token` / `subscription` / `unknown` */
/** 服务它的那家怎么收钱:`per-token` / `subscription` / `free` / `unknown`。本地应答是 `free` */
billing: string;
/** 缓存命中省下了多少微分。没有 = 算不出来 */
cache_saved_micros?: number;
Expand Down
Loading