Compare commits

...
11 Commits
Author SHA1 Message Date
ZyyandCodex 964e22eb91 chore: bump version to 3.60.2
Co-authored-by: Codex <noreply@openai.com>
2026-11-30 11:37:29 +08:00
ZyyandCodex 5a5d07d1c7 fix(openai): reset WebSocket upload timeout after each flushed fragment
Co-authored-by: Codex <noreply@openai.com>
2026-11-30 11:24:10 +08:00
ZyyandCodex a41a0498d1 fix(frontend): remove native title tooltips
Co-authored-by: Codex <noreply@openai.com>
2026-11-30 10:43:31 +08:00
dependabot[bot] 9aea228fa8 chore(deps): bump the minor-and-patch group with 2 updates (#797)
Bumps the minor-and-patch group with 2 updates: [taiki-e/install-action](https://github.com/taiki-e/install-action) and [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer).


Updates `taiki-e/install-action` from 2.90.6 to 2.90.11
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/75a7c0f87bd666af3cdb75c5b9e9d03ab6044e6f...073e1fd0bc889c9aee68dbaaa927cde1b5653a83)

Updates `sigstore/cosign-installer` from 4.1.3 to 4.1.4
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/756fe2d284c7292c4e9b62c8a28f1e5629c59532...881c63bd87e38389154debd8331404ce7ca8a3ab)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.90.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: sigstore/cosign-installer
  dependency-version: 4.1.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-30 10:23:49 +08:00
dependabot[bot] 25965cbfb3 chore(deps): bump node from 5df7998 to 0042e17 in /deploy (#803)
Bumps node from `5df7998` to `0042e17`.

---
updated-dependencies:
- dependency-name: node
  dependency-version: 26.13.1-bookworm-slim
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-30 10:23:44 +08:00
dependabot[bot] fa0bedd28b chore(deps): bump debian from 734a72b to e67eeea in /deploy (#802)
Bumps debian from `734a72b` to `e67eeea`.

---
updated-dependencies:
- dependency-name: debian
  dependency-version: bookworm-slim
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-30 10:23:40 +08:00
dependabot[bot] 1bd27ef6c8 chore(deps): bump the minor-and-patch group in /frontend with 8 updates (#800)
Bumps the minor-and-patch group in /frontend with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [@lucide/vue](https://github.com/lucide-icons/lucide/tree/HEAD/packages/vue) | `1.77.0` | `1.83.0` |
| [@vueuse/core](https://github.com/vueuse/vueuse/tree/HEAD/packages/core) | `15.0.0` | `15.1.0` |
| [@vueuse/integrations](https://github.com/vueuse/vueuse/tree/HEAD/packages/integrations) | `15.0.0` | `15.1.0` |
| [vue-i18n](https://github.com/intlify/vue-i18n/tree/HEAD/packages/vue-i18n) | `11.4.23` | `11.4.24` |
| [vue-router](https://github.com/vuejs/router) | `5.5.1` | `5.5.3` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `26.6.6` | `26.6.11` |
| [eslint](https://github.com/eslint/eslint) | `10.15.0` | `10.16.0` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `8.3.8` | `8.4.0` |


Updates `@lucide/vue` from 1.77.0 to 1.83.0
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/1.83.0/packages/vue)

Updates `@vueuse/core` from 15.0.0 to 15.1.0
- [Release notes](https://github.com/vueuse/vueuse/releases)
- [Commits](https://github.com/vueuse/vueuse/commits/v15.1.0/packages/core)

Updates `@vueuse/integrations` from 15.0.0 to 15.1.0
- [Release notes](https://github.com/vueuse/vueuse/releases)
- [Commits](https://github.com/vueuse/vueuse/commits/v15.1.0/packages/integrations)

Updates `vue-i18n` from 11.4.23 to 11.4.24
- [Release notes](https://github.com/intlify/vue-i18n/releases)
- [Changelog](https://github.com/intlify/vue-i18n/blob/v11.4.24/CHANGELOG.md)
- [Commits](https://github.com/intlify/vue-i18n/commits/v11.4.24/packages/vue-i18n)

Updates `vue-router` from 5.5.1 to 5.5.3
- [Release notes](https://github.com/vuejs/router/releases)
- [Commits](https://github.com/vuejs/router/compare/v5.5.1...v5.5.3)

Updates `@types/node` from 26.6.6 to 26.6.11
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint` from 10.15.0 to 10.16.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.15.0...v10.16.0)

Updates `vite` from 8.3.8 to 8.4.0
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v8.4.0/packages/vite)

---
updated-dependencies:
- dependency-name: "@lucide/vue"
  dependency-version: 1.83.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: "@vueuse/core"
  dependency-version: 15.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: "@vueuse/integrations"
  dependency-version: 15.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: vue-i18n
  dependency-version: 11.4.24
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: vue-router
  dependency-version: 5.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: "@types/node"
  dependency-version: 26.6.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: eslint
  dependency-version: 10.16.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: vite
  dependency-version: 8.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-30 10:23:36 +08:00
dependabot[bot] 0981996ef3 chore(deps): bump jsonschema from 0.61.2 to 0.63.2 in /backend (#799)
Bumps [jsonschema](https://github.com/Stranger6667/jsonschema) from 0.61.2 to 0.63.2.
- [Release notes](https://github.com/Stranger6667/jsonschema/releases)
- [Changelog](https://github.com/Stranger6667/jsonschema/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stranger6667/jsonschema/compare/ruby-v0.61.2...ruby-v0.63.2)

---
updated-dependencies:
- dependency-name: jsonschema
  dependency-version: 0.63.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-30 10:23:31 +08:00
dependabot[bot] 783e4578ba chore(deps): bump the minor-and-patch group in /backend with 12 updates (#798)
Bumps the minor-and-patch group in /backend with 12 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.6.8` | `4.6.10` |
| [sha2](https://github.com/RustCrypto/hashes) | `0.11.1` | `0.11.2` |
| [zip](https://github.com/zip-rs/zip2) | `9.8.0` | `9.8.2` |
| [yaml-rust2](https://github.com/Ethiraric/yaml-rust2) | `0.13.0` | `0.13.2` |
| [async-compression](https://github.com/Nullus157/async-compression) | `0.4.52` | `0.4.54` |
| [aws-sdk-s3](https://github.com/awslabs/aws-sdk-rust) | `1.161.0` | `1.162.0` |
| [aws-smithy-runtime-api](https://github.com/smithy-lang/smithy-rs) | `1.22.0` | `1.22.1` |
| [aws-smithy-types](https://github.com/smithy-lang/smithy-rs) | `1.9.4` | `1.9.5` |
| [redis](https://github.com/redis-rs/redis-rs) | `1.8.2` | `1.8.3` |
| [crc32fast](https://github.com/srijs/rust-crc32fast) | `1.5.5` | `1.5.6` |
| [lru](https://github.com/jeromefroe/lru-rs) | `0.19.0` | `0.19.2` |
| [h2](https://github.com/hyperium/h2) | `0.4.20` | `0.4.21` |


Updates `clap` from 4.6.8 to 4.6.10
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/main/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.6.8...clap_complete-v4.6.10)

Updates `sha2` from 0.11.1 to 0.11.2
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.11.1...sha2-v0.11.2)

Updates `zip` from 9.8.0 to 9.8.2
- [Release notes](https://github.com/zip-rs/zip2/releases)
- [Changelog](https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zip-rs/zip2/compare/v9.8.0...v9.8.2)

Updates `yaml-rust2` from 0.13.0 to 0.13.2
- [Release notes](https://github.com/Ethiraric/yaml-rust2/releases)
- [Changelog](https://github.com/Ethiraric/yaml-rust2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Ethiraric/yaml-rust2/compare/v0.13.0...v0.13.2)

Updates `async-compression` from 0.4.52 to 0.4.54
- [Release notes](https://github.com/Nullus157/async-compression/releases)
- [Commits](https://github.com/Nullus157/async-compression/compare/async-compression-v0.4.52...async-compression-v0.4.54)

Updates `aws-sdk-s3` from 1.161.0 to 1.162.0
- [Release notes](https://github.com/awslabs/aws-sdk-rust/releases)
- [Commits](https://github.com/awslabs/aws-sdk-rust/commits)

Updates `aws-smithy-runtime-api` from 1.22.0 to 1.22.1
- [Release notes](https://github.com/smithy-lang/smithy-rs/releases)
- [Changelog](https://github.com/smithy-lang/smithy-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/smithy-lang/smithy-rs/commits)

Updates `aws-smithy-types` from 1.9.4 to 1.9.5
- [Release notes](https://github.com/smithy-lang/smithy-rs/releases)
- [Changelog](https://github.com/smithy-lang/smithy-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/smithy-lang/smithy-rs/commits)

Updates `redis` from 1.8.2 to 1.8.3
- [Release notes](https://github.com/redis-rs/redis-rs/releases)
- [Commits](https://github.com/redis-rs/redis-rs/compare/redis-1.8.2...redis-1.8.3)

Updates `crc32fast` from 1.5.5 to 1.5.6
- [Commits](https://github.com/srijs/rust-crc32fast/compare/v1.5.5...v1.5.6)

Updates `lru` from 0.19.0 to 0.19.2
- [Changelog](https://github.com/jeromefroe/lru-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jeromefroe/lru-rs/compare/0.19.0...0.19.2)

Updates `h2` from 0.4.20 to 0.4.21
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.4.20...v0.4.21)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.6.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: sha2
  dependency-version: 0.11.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: zip
  dependency-version: 9.8.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: yaml-rust2
  dependency-version: 0.13.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: async-compression
  dependency-version: 0.4.54
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: aws-sdk-s3
  dependency-version: 1.162.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: aws-smithy-runtime-api
  dependency-version: 1.22.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: aws-smithy-types
  dependency-version: 1.9.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: redis
  dependency-version: 1.8.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: crc32fast
  dependency-version: 1.5.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: lru
  dependency-version: 0.19.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: h2
  dependency-version: 0.4.21
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-30 10:23:27 +08:00
ZyyandCodex 0db3c6a215 fix(ui): unify provider icon sizes and balance diagnostic table columns
Co-authored-by: Codex <noreply@openai.com>
2026-11-29 20:28:27 +08:00
github-actions[bot] fe1c38aeb7 chore(release): update release channels to 3.60.1 2026-11-29 11:59:57 +00:00
119 changed files with 680 additions and 1005 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ jobs:
run: cargo clippy --all-targets --all-features --locked -- -D warnings
- name: Setup nextest
uses: taiki-e/install-action@75a7c0f87bd666af3cdb75c5b9e9d03ab6044e6f # v2.90.6
uses: taiki-e/install-action@073e1fd0bc889c9aee68dbaaa927cde1b5653a83 # v2.90.11
with:
tool: cargo-nextest@0.9.143
fallback: none
+2 -2
View File
@@ -115,7 +115,7 @@ jobs:
cache-bin: false
save-if: ${{ github.event_name != 'pull_request' }}
- name: Setup nextest
uses: taiki-e/install-action@75a7c0f87bd666af3cdb75c5b9e9d03ab6044e6f # v2.90.6
uses: taiki-e/install-action@073e1fd0bc889c9aee68dbaaa927cde1b5653a83 # v2.90.11
with:
tool: cargo-nextest@0.9.143
fallback: none
@@ -434,7 +434,7 @@ jobs:
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
- name: Install Cosign
uses: sigstore/cosign-installer@756fe2d284c7292c4e9b62c8a28f1e5629c59532 # v4.1.3
uses: sigstore/cosign-installer@881c63bd87e38389154debd8331404ce7ca8a3ab # v4.1.4
- name: Login to GHCR
uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0
+1 -1
View File
@@ -34,7 +34,7 @@ jobs:
ref: ${{ inputs.ref || github.event.pull_request.head.sha || github.sha }}
- name: Install cargo-audit
uses: taiki-e/install-action@75a7c0f87bd666af3cdb75c5b9e9d03ab6044e6f # v2.90.6
uses: taiki-e/install-action@073e1fd0bc889c9aee68dbaaa927cde1b5653a83 # v2.90.11
with:
tool: cargo-audit@0.22.2
fallback: none
+40 -40
View File
@@ -153,9 +153,9 @@ dependencies = [
[[package]]
name = "async-compression"
version = "0.4.52"
version = "0.4.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ad47a740fb906fffdd891e8b6d5fde2511600f7bfaebd68939fa08a14999459"
checksum = "0c31224bd2c09447484a1143f2fc1d871eb405789859c8e5470a3e7f95f40a18"
dependencies = [
"compression-codecs",
"compression-core",
@@ -292,9 +292,9 @@ dependencies = [
[[package]]
name = "aws-sdk-s3"
version = "1.161.0"
version = "1.162.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9c63e3ca6e56670513469e992759f4a51041603fde329471b29c5c1f5eaeefe"
checksum = "4ffd93a622eaef65d9dee213b1c8afb8b5d999aa2020fe1c9ba6a94ec5e973e4"
dependencies = [
"arc-swap",
"aws-credential-types",
@@ -483,9 +483,9 @@ dependencies = [
[[package]]
name = "aws-smithy-runtime-api"
version = "1.22.0"
version = "1.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0b79dbb5331ccd297686df811d50ab3f39db171f5c765372a69272a0990b014"
checksum = "20b0ce5fd8f8ec576f6737cf9a3a02172fddad2b90b8874577a4647fab11425c"
dependencies = [
"aws-smithy-async",
"aws-smithy-runtime-api-macros",
@@ -522,9 +522,9 @@ dependencies = [
[[package]]
name = "aws-smithy-types"
version = "1.9.4"
version = "1.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aff4bf014c512840b2bba80a20417b723cbd6a0a65c02e2d81f50b4268aedfc7"
checksum = "2085f9721fb3755821f8db7611a67ed15f4d6fdba6785b4db8ed7cd18eebee0f"
dependencies = [
"base64-simd",
"bytes",
@@ -842,9 +842,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.6.8"
version = "4.6.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac230478587d0269d8d6998b82ae69ea51509d55df66d9e92edd1f986904cd4a"
checksum = "50066ca966813ca8957ee15361752f19424a8ff620dbe9c8993d9f99d99b04b3"
dependencies = [
"clap_builder",
"clap_derive",
@@ -852,9 +852,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.6.7"
version = "4.6.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d"
checksum = "a0ed97c96ef4efb3cc84e09fa388df4463e7cc3224ec38d7b1d9e45749333590"
dependencies = [
"anstream",
"anstyle",
@@ -864,9 +864,9 @@ dependencies = [
[[package]]
name = "clap_derive"
version = "4.6.8"
version = "4.6.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "895c9d8d2ac2dd8b8a29f3724a14e72aaaa6debcf8c38c82f97305c6a172767a"
checksum = "b4c174f11f949b9ca8c60580925e282b9cbd5454750e506f08648b2038080cd7"
dependencies = [
"heck",
"proc-macro2",
@@ -961,9 +961,9 @@ dependencies = [
[[package]]
name = "compression-codecs"
version = "0.4.47"
version = "0.4.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "84f840cff84d10085260e460023934d0af699e71212b09b2a41452e8bd9cda43"
checksum = "f938fc0d88fbe2c8d6f0e1ba96ba1165d89ff698e98468cd019d92cff2ecd367"
dependencies = [
"compression-core",
"flate2",
@@ -1109,9 +1109,9 @@ dependencies = [
[[package]]
name = "crc32fast"
version = "1.5.5"
version = "1.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b929dd2a135771f40afabd1073f85eed59c800b7c61901e5c254270497dad64"
checksum = "fd9ae8fcb3ea71b0b26338b4ffb13006bb175de8fd07921089a906ce7e5e6945"
dependencies = [
"cfg-if",
]
@@ -1888,7 +1888,7 @@ dependencies = [
"tracing-appender",
"tracing-subscriber",
"wiremock",
"yaml-rust2 0.13.0",
"yaml-rust2 0.13.2",
]
[[package]]
@@ -2073,9 +2073,9 @@ dependencies = [
[[package]]
name = "h2"
version = "0.4.20"
version = "0.4.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d29020232d6aa3fb1daca64c1127cf662cf97f254ae16c18c05b8ab635fc118"
checksum = "b634322c4924093fe6a6e05ecbe5717cd3c6014934455f4ae8e5cf14ba3264a8"
dependencies = [
"atomic-waker",
"bytes",
@@ -2551,9 +2551,9 @@ dependencies = [
[[package]]
name = "jsonschema"
version = "0.61.2"
version = "0.63.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e37f27df77c7887edbc5f5a59ecd8e5ec4a669319266ec1b61068667a603183"
checksum = "b0802aebc749a4ef12e76aee083622b100249be0dc6d2103d84bbb2f7936a1ae"
dependencies = [
"ahash",
"bytecount",
@@ -2579,18 +2579,18 @@ dependencies = [
[[package]]
name = "jsonschema-regex"
version = "0.61.2"
version = "0.63.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e41151614b6c927e21982be8bef5a26741ae5a0ae6a781eedee2aa930a980e6"
checksum = "ba1527289dfcb1400df61b5c591218e8e30031376671f611faecb5b9a1ff4987"
dependencies = [
"regex-syntax",
]
[[package]]
name = "jsonschema-value"
version = "0.61.2"
version = "0.63.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1515b9a91134ef67d7bac95c2d76fbc7e383c4c55ee544204ceec8088f881fef"
checksum = "a95285ab129d630f01cf2f1345c28662116340fac1a35eb0795e5dbbf0ef990d"
dependencies = [
"ahash",
"bytecount",
@@ -2694,9 +2694,9 @@ dependencies = [
[[package]]
name = "lru"
version = "0.19.0"
version = "0.19.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a9f71e3591c7ec44d3e563e87bf14ddc2bada8519dca046e5b0e560cd004e2d"
checksum = "d4e2a1b977b42ee8b53a2a4adbd1183431c493f1d1960b7ccd893e2f0b9407ba"
dependencies = [
"hashbrown 0.17.1",
]
@@ -3444,7 +3444,7 @@ dependencies = [
"hyper",
"hyper-rustls",
"hyper-util",
"lru 0.19.0",
"lru 0.19.2",
"native-tls",
"openssl",
"openssl-sys",
@@ -3692,9 +3692,9 @@ dependencies = [
[[package]]
name = "redis"
version = "1.8.2"
version = "1.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4bef8fa589dd53a8a379a7856de1365d0a1be50c6b8aebb5c01c1ec441a2c509"
checksum = "c85db9332bbc47e826283f0a6058d747c478ed2278976279cefd22154d541b98"
dependencies = [
"arc-swap",
"arcstr",
@@ -3748,9 +3748,9 @@ dependencies = [
[[package]]
name = "referencing"
version = "0.61.2"
version = "0.63.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a028057ef852c58a42d75e09da87b5e733f4030f4c7411728955e4f87203a577"
checksum = "858eb92e3a3c1d120695a04d5c6e8861915ee4394b8f77c90adbf686d6ddbf6e"
dependencies = [
"ahash",
"fluent-uri",
@@ -4213,9 +4213,9 @@ checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d"
[[package]]
name = "sha2"
version = "0.11.1"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47d7069beb7d6ac7b9acd1039986e73443f24234f41074da099d6f994ac9ad19"
checksum = "5b0e5c7d67bc53f435386b2130fdc900488c5703770f6d8a4633060e34288a27"
dependencies = [
"cfg-if",
"cpufeatures 0.3.0",
@@ -5649,9 +5649,9 @@ dependencies = [
[[package]]
name = "yaml-rust2"
version = "0.13.0"
version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57e5b818a27a4cd30884ea380857a5e56f7ec3ba24a3990a3cc0b95af3238e18"
checksum = "4a8af4469040402b7fe43c26575bab9a3069f0717c4a2931ecf4fb8728ee4cec"
dependencies = [
"arraydeque",
"encoding_rs",
@@ -5777,9 +5777,9 @@ dependencies = [
[[package]]
name = "zip"
version = "9.8.0"
version = "9.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "721c8158b9503b2660291ad3056a20f722deaeed21bb908a9a363d7e17b34f0e"
checksum = "2d8dbe089cf6b0448b78f5fc50139ab5aaa40d08ac07cdc1baf2c13add35fcce"
dependencies = [
"constant_time_eq",
"crc32fast",
@@ -24,7 +24,7 @@ gateway-plugin-sdk = { path = "../sdk", features = ["io"] }
gateway-protocol = { path = "../../gateway-protocol" }
hex = "0.4.3"
image = { version = "0.25.8", default-features = false, features = ["bmp", "gif", "ico", "jpeg", "png", "webp"] }
jsonschema = { version = "0.61.2", default-features = false }
jsonschema = { version = "0.63.2", default-features = false }
roxmltree = "0.21.1"
semver = "1.0.27"
secrecy = "0.10.3"
+1 -1
View File
@@ -30,7 +30,7 @@ lru = "0.19.0"
# hyper-util 固定到包含 SOCKS IPv6 修复的正式版
# 升级前须重复采样 ClientHello,核对算法、扩展集合及排序约束、key_share 与 ALPN。
aws-lc-rs = "=1.18.1"
h2 = "=0.4.20"
h2 = "=0.4.21"
hyper = { version = "=1.11.1", default-features = false }
hyper-rustls = "=0.27.7"
hyper-util = { version = "=0.1.21", features = ["client-legacy", "http1", "tokio"] }
@@ -17,7 +17,7 @@ pub(super) const WEBSOCKET_SEND_TIMEOUT: Duration = Duration::from_secs(5 * 60);
pub(super) enum PumpCommand {
Upload {
text: tungstenite::Utf8Bytes,
deadline: tokio::time::Instant,
admission_deadline: tokio::time::Instant,
accepted:
oneshot::Sender<oneshot::Receiver<Result<UploadOutcome, CodexWebSocketExchangeError>>>,
},
@@ -340,13 +340,13 @@ impl PumpedWebSocket {
&self,
text: tungstenite::Utf8Bytes,
) -> Result<UploadOutcome, CodexWebSocketExchangeError> {
let deadline = Instant::now() + WEBSOCKET_SEND_TIMEOUT;
let admission_deadline = Instant::now() + WEBSOCKET_SEND_TIMEOUT;
let (accepted, admission) = tokio::sync::oneshot::channel();
let result = tokio::time::timeout_at(deadline, async {
let result = tokio::time::timeout_at(admission_deadline, async {
self.tx_command
.send(PumpCommand::Upload {
text,
deadline,
admission_deadline,
accepted,
})
.await
@@ -359,7 +359,7 @@ impl PumpedWebSocket {
.map_err(|_| CodexWebSocketExchangeError::SendTimeout {
timeout: WEBSOCKET_SEND_TIMEOUT,
})??;
// 接单后由 pump 执行同一截止时间,调用方不能先超时并丢弃已经读到的上游回复
// 接单后由 pump 监测分片写入,调用方等待最终发送结果或已读到的上游回复
result
.await
.unwrap_or_else(|_| Err(tungstenite::Error::ConnectionClosed.into()))
@@ -648,36 +648,45 @@ async fn handle_command(
PumpCommand::Send { message, ack } => (message, ack),
PumpCommand::Upload {
text,
deadline,
admission_deadline,
accepted,
} => {
let (ack, result) = tokio::sync::oneshot::channel();
if closed.load(Ordering::Acquire)
|| Instant::now() >= deadline
|| Instant::now() >= admission_deadline
|| accepted.send(result).is_err()
{
return None;
}
let mut upload = super::upload::Upload::new(messages, pending.is_some());
let write = tokio::time::timeout_at(deadline, upload.send(inner, text)).await;
if let Some(activity) = upload.last_activity {
record_activity(lifecycle, activity);
}
let (error, metric_reason) = match write {
Ok(Ok(())) => {
let mut frames = super::upload::text_frames(text);
let (error, metric_reason) = loop {
let Some(frame) = frames.next() else {
let _ = ack.send(Ok(UploadOutcome::Flushed));
return None;
};
// 只有正文分片写出并刷新后才开始下一个窗口,入站心跳不会延长写入等待
let write =
tokio::time::timeout(WEBSOCKET_SEND_TIMEOUT, upload.send_frame(inner, frame))
.await;
if let Some(activity) = upload.last_activity.take() {
record_activity(lifecycle, activity);
}
Ok(Err(error)) => {
let reason = transport_metric_reason(&error);
(CodexWebSocketExchangeError::Transport(error), reason)
match write {
Ok(Ok(())) => {}
Ok(Err(error)) => {
let reason = transport_metric_reason(&error);
break (CodexWebSocketExchangeError::Transport(error), reason);
}
Err(_) => {
break (
CodexWebSocketExchangeError::SendTimeout {
timeout: WEBSOCKET_SEND_TIMEOUT,
},
"send_timeout",
);
}
}
Err(_) => (
CodexWebSocketExchangeError::SendTimeout {
timeout: WEBSOCKET_SEND_TIMEOUT,
},
"send_timeout",
),
};
let reason = upload
.close
@@ -127,44 +127,42 @@ impl<'a> Upload<'a> {
Poll::Pending
}
pub(super) async fn send(
pub(super) async fn send_frame(
&mut self,
socket: &mut RawWsStream,
text: Utf8Bytes,
frame: Message,
) -> Result<(), Error> {
for frame in text_frames(text) {
let mut frame = Some(frame);
let mut first_poll = true;
let result = poll_fn(|cx| {
let read_first = std::mem::take(&mut first_poll);
if read_first {
let _ = self.poll_incoming(socket, cx, false)?;
}
let write = (|| {
if frame.is_some() {
ready!(socket.poll_ready_unpin(cx))?;
}
if let Some(frame) = frame.take() {
let result = socket.start_send_unpin(frame);
// I/O 错误可能发生在首帧头已部分写出之后
self.started |= matches!(result, Ok(()) | Err(Error::Io(_)));
result?;
}
socket.poll_flush_unpin(cx)
})();
if !read_first && write.is_pending() {
let _ = self.poll_incoming(socket, cx, false)?;
}
write
})
.await;
if let Err(error) = result {
if self.started && !matches!(error, Error::ConnectionClosed) {
// 只取已就绪的回复,不能为了等待假设的 Close 延长写入期限
let _ = poll_fn(|cx| self.poll_incoming(socket, cx, true)).await;
}
return Err(error);
let mut frame = Some(frame);
let mut first_poll = true;
let result = poll_fn(|cx| {
let read_first = std::mem::take(&mut first_poll);
if read_first {
let _ = self.poll_incoming(socket, cx, false)?;
}
let write = (|| {
if frame.is_some() {
ready!(socket.poll_ready_unpin(cx))?;
}
if let Some(frame) = frame.take() {
let result = socket.start_send_unpin(frame);
// I/O 错误可能发生在首帧头已部分写出之后
self.started |= matches!(result, Ok(()) | Err(Error::Io(_)));
result?;
}
socket.poll_flush_unpin(cx)
})();
if !read_first && write.is_pending() {
let _ = self.poll_incoming(socket, cx, false)?;
}
write
})
.await;
if let Err(error) = result {
if self.started && !matches!(error, Error::ConnectionClosed) {
// 只取已就绪的回复,不能为了等待假设的 Close 延长写入期限
let _ = poll_fn(|cx| self.poll_incoming(socket, cx, true)).await;
}
return Err(error);
}
Ok(())
}
@@ -364,6 +364,49 @@ fn large_upload_client(addr: std::net::SocketAddr) -> (CodexBackendClient, Codex
(client, request)
}
#[tokio::test]
async fn fragmented_upload_can_outlast_five_minutes_with_write_progress() {
let socket = tokio::net::TcpSocket::new_v4().unwrap();
socket.set_recv_buffer_size(65536).unwrap();
socket.bind("127.0.0.1:0".parse().unwrap()).unwrap();
let listener = socket.listen(1).unwrap();
let (client, request) = large_upload_client(listener.local_addr().unwrap());
let (completed, received) = tokio::sync::oneshot::channel();
let server = tokio::spawn(async move {
let (mut socket, _) = listener.accept().await.unwrap();
upgrade_raw_socket(&mut socket, false).await;
let mut frames = 0;
loop {
let frame = read_client_frame(&mut socket).await;
frames += 1;
if frames == 1 || frames == 8 {
// 两次推进之间排空多个正文分片,让总耗时超过发送时限
tokio::time::pause();
tokio::time::sleep(Duration::from_secs(170)).await;
tokio::time::resume();
}
if frame.first_byte == 0x80 {
break;
}
assert!(matches!(frame.first_byte, 0x00 | 0x01));
}
assert!(frames > 8);
write_server_text_frame(
&mut socket,
&completed_websocket_response("resp_slow_upload", 1, 1),
)
.await;
received.await.unwrap();
});
let response = client
.create_response(&request, request_context("slow-upload", None))
.await
.unwrap();
assert!(response.body.contains("resp_slow_upload"));
completed.send(()).unwrap();
server.await.unwrap();
}
#[tokio::test]
async fn fragmented_upload_sends_pong_before_final_continuation() {
let listener = TcpListener::bind("127.0.0.1:0").await.unwrap();
@@ -517,12 +560,12 @@ async fn upload_timeout_delivers_buffered_upstream_error() {
.expect("peer error and following Ping should be read during upload");
// Pong 证明此前的业务错误已经入队,保留连接直到写超时和错误交付均已完成
tokio::time::pause();
tokio::time::advance(Duration::from_secs(301)).await;
tokio::time::resume();
timeout(Duration::from_secs(5), released)
// 已进入内核的分片仍可刷新时限,让时钟在停读后随实际等待自动推进
timeout(Duration::from_secs(610), released)
.await
.unwrap()
.expect("stalled upload must deliver the buffered error")
.unwrap();
tokio::time::resume();
});
let mut response = client
.create_response_stream(&request, request_context("upload_timeout_reply", None))
+2 -2
View File
@@ -4,7 +4,7 @@
# 版本严格一致。升级数据库版本时只需同步修改这里与 deploy/compose.yaml。
ARG POSTGRES_IMAGE=postgres:18-bookworm@sha256:194e55feb2597b1465dbee81cc9fd8d204566cd2eb42c8d22fd6c931a38781b1
FROM node:26.13.1-bookworm-slim@sha256:5df79989ed685e09f0a98019db4cebfb22fb9df1a53c0161664a011f7ff6b0f1 AS frontend-builder
FROM node:26.13.1-bookworm-slim@sha256:0042e17d232a87a2cd485be1da7900fca4d10a4ad11b29e9285da1d2e54798c9 AS frontend-builder
WORKDIR /app/frontend
COPY frontend/package.json frontend/pnpm-lock.yaml frontend/pnpm-workspace.yaml ./
@@ -41,7 +41,7 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
# 备份客户端来源:与 compose 服务端同一固定镜像,版本一致。
FROM ${POSTGRES_IMAGE} AS pg-client
FROM debian:bookworm-slim@sha256:734a72b3d6142a71993b4bc580ca01d8ca687f77a2c422d96a961d3376b179bc AS runtime-base
FROM debian:bookworm-slim@sha256:e67eeead736ff7bbe258ef088bff683635c561b1fcfefad0806c1df4ab49ce0e AS runtime-base
ENV TZ=UTC
+2 -1
View File
@@ -705,7 +705,8 @@ OpenAI Responses 上游 WS 按握手响应头 `x-codex-websocket-max-message-byt
该上限只属于当前上游连接;响应头缺失或无效时不预判超限。显式 warmup 保持 WS 合同,超限时
返回 `websocket_message_too_large`,不重复发送或改用 HTTP
上传期间网关持续读取上游帧并回复 Ping。上游在本次请求开始发送后、首条响应文本前返回关闭码
每次正文分片写入并刷新后重新计时,连续 300 秒未完成一个分片会触发 `send_timeout`。
上传期间网关持续读取上游帧并回复 Ping,心跳不会重置上传计时。上游在本次请求开始发送后、首条响应文本前返回关闭码
1009 时,采用与握手超限相同的传输选择。显式 warmup 保留上游关闭错误。收到响应文本(含元数据)后
再收到 1009,网关保留原错误,避免重复执行。单独的断管或 TCP 重置按传输失败处理
+8 -8
View File
@@ -20,9 +20,9 @@
"@fontsource-variable/inter": "^5.3.0",
"@fontsource-variable/jetbrains-mono": "^5.3.0",
"@lobehub/icons-vue": "1.2.0",
"@lucide/vue": "^1.77.0",
"@vueuse/core": "^15.0.0",
"@vueuse/integrations": "^15.0.0",
"@lucide/vue": "^1.83.0",
"@vueuse/core": "^15.1.0",
"@vueuse/integrations": "^15.1.0",
"axios": "^1.21.1",
"circle-flags": "2.8.3",
"css-tree": "^3.2.1",
@@ -34,8 +34,8 @@
"semver": "^7.8.6",
"sortablejs": "^1.15.7",
"vue": "^3.5.46",
"vue-i18n": "11.4.23",
"vue-router": "^5.5.1"
"vue-i18n": "11.4.24",
"vue-router": "^5.5.3"
},
"devDependencies": {
"@antfu/eslint-config": "^10.0.0",
@@ -43,17 +43,17 @@
"@intlify/unplugin-vue-i18n": "11.2.8",
"@tailwindcss/vite": "^4.3.5",
"@types/css-tree": "^3.2.0",
"@types/node": "^26.6.6",
"@types/node": "^26.6.11",
"@types/semver": "^7.8.0",
"@types/sortablejs": "^1.15.9",
"@vitejs/plugin-vue": "^6.0.11",
"@vue/tsconfig": "^0.9.1",
"eslint": "^10.15.0",
"eslint": "^10.16.0",
"eslint-plugin-format": "^2.0.1",
"eslint-plugin-vuejs-accessibility": "^2.6.3",
"tailwindcss": "^4.3.5",
"typescript": "^6.0.3",
"vite": "^8.3.8",
"vite": "^8.4.0",
"vue-tsc": "3.3.14"
}
}
+380 -456
View File
File diff suppressed because it is too large Load Diff
@@ -1,16 +1,10 @@
<script setup lang="ts">
import type { AccountRequestBar } from './account-usage-window/presenter'
withDefaults(
defineProps<{
bars: AccountRequestBar[]
label: string
showNativeTooltip?: boolean
}>(),
{
showNativeTooltip: true,
},
)
defineProps<{
bars: AccountRequestBar[]
label: string
}>()
</script>
<template>
@@ -18,13 +12,11 @@ withDefaults(
class="flex items-stretch gap-px overflow-hidden rounded-full"
role="img"
:aria-label="label"
:title="showNativeTooltip ? label : undefined"
>
<span
v-for="bar in bars"
:key="bar.key"
class="relative min-w-0 flex-1 bg-z-border-secondary"
:title="showNativeTooltip ? bar.title : undefined"
>
<span
class="absolute inset-x-0 bottom-0 bg-z-green-solid"
+2 -2
View File
@@ -2,7 +2,7 @@
import { useTimeAgoIntl } from '@vueuse/core'
import { useI18n } from 'vue-i18n'
const props = defineProps<{ value: string | null, fullDisplay: string | null }>()
const props = defineProps<{ value: string | null }>()
const { locale } = useI18n({ useScope: 'global' })
const shortTimeUnits: Record<string, string> = {
sec: 's',
@@ -26,5 +26,5 @@ const display = useTimeAgoIntl(() => props.value ?? 0, {
</script>
<template>
<span v-if="value" class="whitespace-nowrap" :title="fullDisplay ?? undefined">{{ display }}</span>
<span v-if="value" class="whitespace-nowrap">{{ display }}</span>
</template>
@@ -15,7 +15,6 @@ const provider = defineModel<string>({ required: true })
<div class="min-w-0 overflow-x-auto">
<ProviderSelect
v-model="provider"
class="[&_svg]:size-3.25"
:aria-label="t('common.providers.filter')"
:leading-option="{ label: t('common.providers.all'), value: '', icon: LayoutGrid }"
:disabled="disabled"
@@ -22,7 +22,7 @@ const showAuthenticationKind = computed(() => props.authenticationKind !== undef
const sizeClasses = {
xs: { gap: 'gap-0.75', container: 'size-4.5 rounded-md', icon: 'size-2.5' },
sm: { gap: 'gap-1', container: 'size-5 rounded-md', icon: 'size-3' },
md: { gap: 'gap-2', container: 'size-7 rounded-lg', icon: 'size-3.5' },
md: { gap: 'gap-2', container: 'size-7 rounded-lg', icon: 'size-3.25' },
}
const classes = computed(() => sizeClasses[props.size])
@@ -34,7 +34,6 @@ const authenticationLabel = computed(() => formatAuthenticationLabel(props.authe
<span
class="inline-flex shrink-0 items-center justify-center bg-z-fill-secondary/80 text-z-text"
:class="classes.container"
:title="platform.label"
>
<component :is="platform.icon" v-if="platform.icon" :class="classes.icon" />
<span v-else class="text-[10px] font-heavy text-z-text-quaternary">?</span>
@@ -46,7 +45,6 @@ const authenticationLabel = computed(() => formatAuthenticationLabel(props.authe
v-if="showAuthenticationKind"
class="inline-flex shrink-0 items-center justify-center bg-z-fill-secondary/80 text-z-text"
:class="classes.container"
:title="authenticationLabel"
>
<component :is="authenticationIconComponent" v-if="authenticationIconComponent" :class="classes.icon" />
<span v-else class="text-[10px] font-heavy text-z-text-quaternary">?</span>
@@ -38,6 +38,7 @@ function selectProvider(value: string) {
<template>
<ZSegmented
:class="{ '[&_svg]:size-3.25': display === 'icon' }"
:model-value="provider"
:options="options"
:display="display"
@@ -102,7 +102,6 @@ function focusSelection() {
:key="id"
:model-value="selected.includes(id)"
:label="id"
:title="id"
class="min-w-0"
@update:model-value="select(id, $event)"
>
@@ -317,7 +317,6 @@ watch(search, () => {
v-if="mode === 'allowlist' && imageModelPresets.length"
variant="plain"
:aria-label="t('accounts.modelAccess.addImageModels')"
:title="t('accounts.modelAccess.addImageModels')"
:disabled="disabled || allImageModelsSelected"
@click="addModels(imageModelPresets)"
>
@@ -12,7 +12,6 @@ const { t } = useI18n({ useScope: 'global' })
class="peer-badge relative isolate inline-flex max-w-full shrink-0 cursor-default items-center gap-0.5 overflow-hidden rounded-md bg-z-cyan-container-strong py-0.5 pr-1.25 pl-0.75 align-middle text-z-cyan-on-container"
:class="size === 'xs' ? 'h-4.5' : 'h-5'"
:aria-label="t('accounts.upstream.link')"
:title="t('accounts.upstream.link')"
>
<AppBrandMark variant="glyph" class="relative size-4 shrink-0" aria-hidden="true" />
<span class="font-mono text-[10px] leading-none font-heavy tracking-wider [text-box:trim-both_cap_alphabetic]">CPR</span>
@@ -79,7 +79,6 @@ const paletteClass = computed(() => {
v-else-if="wrap"
class="line-clamp-3 max-w-full py-0.75 text-center leading-4 text-balance wrap-anywhere whitespace-normal"
:class="sizes[size].text"
:title="displayText || undefined"
>
<span class="box-decoration-clone rounded-md px-1.25 py-0.75" :class="paletteClass">
{{ displayText }}
@@ -90,7 +89,6 @@ const paletteClass = computed(() => {
v-else
class="inline-flex min-w-0 max-w-full items-center justify-center gap-1 rounded-full whitespace-nowrap leading-none shadow-z-tertiary"
:class="[sizes[size].text, sizes[size].singleLine, paletteClass]"
:title="displayText || undefined"
>
<span class="truncate">{{ displayText }}</span>
<span v-if="count !== undefined" class="shrink-0 tabular-nums">{{ count }}</span>
@@ -13,13 +13,11 @@ const props = withDefaults(
variant?: AccountUsageWindowVariant
showLocalValue?: boolean
showPercentage?: boolean
showNativeTooltip?: boolean
}>(),
{
variant: 'detail',
showLocalValue: true,
showPercentage: true,
showNativeTooltip: true,
},
)
@@ -39,7 +37,6 @@ const view = computed(() => resolveAccountUsageWindowPresentation({
<span
class="min-w-0"
:class="view.classes.label"
:title="showNativeTooltip ? view.labelTooltip : undefined"
>
{{ view.label }}
</span>
@@ -51,7 +48,6 @@ const view = computed(() => resolveAccountUsageWindowPresentation({
v-if="view.quota.localUsageVisible"
class="text-right text-z-text-quaternary"
:class="view.classes.value"
:title="showNativeTooltip ? t('accounts.quota.usageInThisWindow', { localUsageDisplay: view.quota.localUsageDisplay }) : undefined"
>
{{ view.quota.localUsageDisplay }}
</span>
@@ -59,7 +55,6 @@ const view = computed(() => resolveAccountUsageWindowPresentation({
v-if="showPercentage && view.quota.valueVisible"
class="text-right"
:class="[view.classes.value, view.quota.percentTextClass]"
:title="showNativeTooltip ? t('accounts.quota.quotaUsed', { rate: window.usedPercentDisplay }) : undefined"
>
{{ window.usedPercentDisplay }}
</span>
@@ -123,7 +118,6 @@ const view = computed(() => resolveAccountUsageWindowPresentation({
class="col-span-full"
:bars="view.local.requestBars"
:label="view.local.timelineTitle"
:show-native-tooltip="showNativeTooltip"
:class="[view.classes.trackShape, view.classes.trackOffset]"
/>
</template>
@@ -10,7 +10,6 @@ type AccountUsageWindowMode = 'quota' | 'local' | 'unknown'
interface AccountRequestBucket {
bucketStart: string
label: string
requestCount: number
}
@@ -18,7 +17,6 @@ export interface AccountRequestBar {
key: string
requestCount: number
height: string
title: string
}
interface AccountLocalUsage {
@@ -38,7 +36,6 @@ interface AccountUsageWindowVariantDefinition {
trackShapeClass: string
minimumBarWidth: string
compactValues: boolean
labelTooltip: boolean
showResetTime: boolean
}
@@ -63,7 +60,6 @@ const variantDefinitions: Record<
trackShapeClass: 'h-1.5 w-full overflow-hidden rounded-full',
minimumBarWidth: '6px',
compactValues: false,
labelTooltip: true,
showResetTime: false,
},
compact: {
@@ -75,7 +71,6 @@ const variantDefinitions: Record<
trackShapeClass: 'h-1 w-full overflow-hidden rounded-full',
minimumBarWidth: '3px',
compactValues: true,
labelTooltip: true,
showResetTime: false,
},
detail: {
@@ -87,7 +82,6 @@ const variantDefinitions: Record<
trackShapeClass: 'h-2 overflow-hidden rounded-full',
minimumBarWidth: '8px',
compactValues: false,
labelTooltip: false,
showResetTime: true,
},
}
@@ -141,7 +135,6 @@ export function resolveAccountUsageWindowPresentation(
? quotaWindowLabel(input.window, false)
: fullLabel,
ariaLabel: fullLabel,
labelTooltip: definition.labelTooltip ? fullLabel : undefined,
classes: {
root: definition.rootClass,
header: definition.headerClass,
@@ -213,7 +206,6 @@ function requestBuckets(value: unknown) {
return [
{
bucketStart: item.bucketStart,
label: item.label,
requestCount: item.requestCount,
},
]
@@ -437,6 +429,5 @@ function requestTimeline(buckets: NonNullable<AccountLocalUsage['requestBuckets'
height: bucket.requestCount === 0
? '0'
: `${Math.max(25, Math.round(bucket.requestCount / maximum * 100))}%`,
title: bucket.label,
}))
}
@@ -34,7 +34,7 @@ const { t } = useI18n({ useScope: 'global' })
<template v-else-if="preview">
<code class="break-all text-z-sm text-z-text">{{ preview.userAgent }}</code>
<div class="flex flex-wrap items-end gap-x-3 gap-y-1">
<p v-if="preview.error && preview.versionSource !== 'custom'" :title="preview.error" class="m-0 text-z-sm text-z-warning">
<p v-if="preview.error && preview.versionSource !== 'custom'" class="m-0 text-z-sm text-z-warning">
{{ t('settings.clientProfile.updateFailedUseLastVersion') }}
</p>
<p class="m-0 ms-auto text-end text-z-xs text-z-text-tertiary">
@@ -151,7 +151,6 @@ function itemValueClass(tone?: string, accent?: boolean) {
<span
v-if="speedMode"
class="inline-flex h-4 items-center rounded-full bg-z-warning-container px-0.5 text-z-warning-on-container"
:title="speedModeLabel"
role="img"
:aria-label="speedModeLabel"
>
@@ -12,7 +12,6 @@ const clientIp = computed(() => usageClientIp(props.record))
<template>
<span
class="inline-flex h-6 max-w-full items-center rounded-full bg-z-blue-container px-2.5 font-mono text-z-sm leading-none font-bold text-z-blue-on-container"
:title="clientIp"
>
<span class="min-w-0 truncate">
{{ clientIp }}
@@ -31,20 +31,19 @@ const summary = computed(() => usageErrorSummary(props.record))
:class="origin.className"
role="img"
:aria-label="origin.label"
:title="origin.hint ? `${origin.label} · ${origin.hint}` : origin.label"
>
<component :is="originIcons[origin.kind]" class="size-3.5" aria-hidden="true" />
</span>
<span class="truncate">
<span class="font-emphasis">{{ outcome }}</span>
<span v-if="record.upstreamStatusCode != null" class="ms-1.5 font-mono" :title="t('usage.error.upstreamStatusCode')">
<span v-if="record.upstreamStatusCode != null" class="ms-1.5 font-mono">
{{ t('usage.error.upstreamHttpStatus', { status: record.upstreamStatusCode }) }}
</span>
<span v-if="record.clientStatusCode != null && record.clientStatusCode !== record.upstreamStatusCode" class="ms-1.5 font-mono" :title="t('usage.error.clientStatusCode')">
<span v-if="record.clientStatusCode != null && record.clientStatusCode !== record.upstreamStatusCode" class="ms-1.5 font-mono">
{{ t('usage.error.clientHttpStatus', { status: record.clientStatusCode }) }}
</span>
</span>
<span v-if="record.recovered" class="inline-flex shrink-0 text-z-success-text" role="img" :aria-label="t('usage.error.recovered')" :title="t('usage.error.recovered')">
<span v-if="record.recovered" class="inline-flex shrink-0 text-z-success-text" role="img" :aria-label="t('usage.error.recovered')">
<CheckCheck class="size-4" :stroke-width="2.25" aria-hidden="true" />
</span>
</div>
@@ -4,7 +4,6 @@ import type { UsageModelRecord } from './presenter'
import { CornerDownRight } from '@lucide/vue'
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { usageModelDisplay } from './presenter'
const props = defineProps<{
@@ -12,21 +11,18 @@ const props = defineProps<{
}>()
const modelDisplay = computed(() => usageModelDisplay(props.record))
const { t } = useI18n({ useScope: 'global' })
</script>
<template>
<div class="inline-grid max-w-full gap-1">
<code
class="block max-w-full truncate font-mono text-z-sm leading-none font-heavy text-z-text"
:title="t('usage.status.requestedModel', { model: modelDisplay.primary })"
>
{{ modelDisplay.primary }}
</code>
<div
v-if="modelDisplay.secondary"
class="flex min-w-0 max-w-full items-center gap-1.25 text-z-text-secondary"
:title="t('usage.status.mappedModel', { secondary: modelDisplay.secondary })"
>
<CornerDownRight
class="size-3.25 shrink-0 text-z-blue-text"
@@ -3,15 +3,12 @@ import type { UsagePerformanceRecord } from './presenter'
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { usagePerformanceDetails } from './presenter'
const props = defineProps<{
record: UsagePerformanceRecord
}>()
const { t } = useI18n({ useScope: 'global' })
const performance = computed(() => usagePerformanceDetails(props.record))
</script>
@@ -19,7 +16,7 @@ const performance = computed(() => usagePerformanceDetails(props.record))
<div class="grid justify-items-end gap-y-1.5 whitespace-nowrap font-mono text-z-sm leading-none font-heavy tabular-nums">
<span class="text-z-text">{{ performance.throughputDisplay }}</span>
<span class="text-z-xs text-z-text-secondary">
<span :title="t('usage.performance.ttftHelp')" class="text-z-text-quaternary">TTFT</span>
<span class="text-z-text-quaternary">TTFT</span>
{{ performance.firstTokenDisplay }}
</span>
</div>
@@ -24,7 +24,6 @@ const { t } = useI18n({ useScope: 'global' })
<span
v-if="record.subagentKind"
class="inline-flex shrink-0 text-z-purple-text"
:title="t('usage.reasoning.subagentRequest')"
:aria-label="t('usage.reasoning.subagentRequest')"
>
<Bot class="size-3.5" stroke-width="2.2" />
@@ -32,7 +31,6 @@ const { t } = useI18n({ useScope: 'global' })
<span
v-if="record.subagentKind === 'review'"
class="inline-flex shrink-0 text-z-purple-text"
:title="t('usage.reasoning.reviewSubagentRequest')"
:aria-label="t('usage.reasoning.reviewSubagentRequest')"
>
<SquareDashedBottomCode class="size-3.25" stroke-width="2.2" />
@@ -17,11 +17,10 @@ const routeLabel = computed(() => {
<template>
<div class="inline-flex max-w-full items-center gap-1.5 whitespace-nowrap">
<code class="min-w-0 truncate font-mono text-z-sm font-emphasis" :title="record.route ?? undefined">{{ routeLabel }}</code>
<code class="min-w-0 truncate font-mono text-z-sm font-emphasis">{{ routeLabel }}</code>
<span
v-if="record.compact"
class="inline-flex shrink-0 text-z-orange-text"
:title="t('usage.route.compressionRequest')"
:aria-label="t('usage.route.compressionRequest')"
>
<Minimize2 class="size-3.5" stroke-width="2.4" />
@@ -6,11 +6,11 @@ const parts = computed(() => props.value?.split(' '))
</script>
<template>
<time v-if="parts?.length === 2" :datetime="datetime" :title="value" class="grid gap-1 font-mono tabular-nums">
<time v-if="parts?.length === 2" :datetime="datetime" class="grid gap-1 font-mono tabular-nums">
<span class="text-z-sm font-bold text-z-text">{{ parts[1] }}</span>
<span class="text-z-xs text-z-text-tertiary">{{ parts[0] }}</span>
</time>
<span v-else class="block truncate font-mono text-z-sm leading-none font-bold text-z-text-secondary" :title="value">
<span v-else class="block truncate font-mono text-z-sm leading-none font-bold text-z-text-secondary">
{{ value || '—' }}
</span>
</template>
@@ -18,7 +18,7 @@ const description = computed(() => t('usage.transportDirection', {
</script>
<template>
<span class="inline-flex items-center overflow-hidden rounded-full" tabindex="0" :aria-label="description" :title="description">
<span class="inline-flex items-center overflow-hidden rounded-full" tabindex="0" :aria-label="description">
<UsageTransportBadge :transport="upstream" joined />
<UsageTransportBadge v-if="upstreamLabel !== clientLabel" :transport="client" joined />
</span>
@@ -50,7 +50,6 @@ const { t } = useI18n({ useScope: 'global' })
<template #clientApiKeyName="{ displayValue }">
<span
class="block max-w-full truncate font-mono text-z-sm leading-none font-bold text-z-text"
:title="String(displayValue)"
>
{{ displayValue }}
</span>
@@ -66,14 +65,12 @@ const { t } = useI18n({ useScope: 'global' })
<template #accountEmail="{ row }">
<span
class="block max-w-full truncate font-mono text-z-sm leading-none font-bold text-z-text"
:title="usageAccountText(row)"
>
{{ usageAccountText(row) }}
</span>
<span
v-if="row.accountNotes?.trim()"
class="mt-1 block max-w-full truncate text-z-xs font-emphasis text-z-text-quaternary"
:title="row.accountNotes"
>
{{ row.accountNotes }}
</span>
+1 -14
View File
@@ -28,8 +28,6 @@
"geminiModels": "Gemini models",
"claudeGptModels": "Claude and GPT models"
},
"usageInThisWindow": "Usage in this window: {localUsageDisplay}",
"quotaUsed": "Quota used: {rate}",
"resets": "Resets: {resetAtDisplay}",
"unobserved": "Awaiting quota data",
"dailyRequests": "Daily requests",
@@ -43,7 +41,6 @@
"autoUsePointsHelp": "Use available credits when the subscription limit is reached",
"quotaPoints": "Credits",
"point": "credits",
"requestsInThisWindow": "Requests in this window: {requestDisplay}",
"requestCount": "Requests: {requestDisplay}",
"statisticalRange": "Statistical range",
"rolling": "Rolling {duration}",
@@ -65,11 +62,7 @@
"rollingWindow": "Rolling window",
"windowConsumption": "Window consumption",
"resetTime": "Reset time",
"localTokens": "Locally accumulated tokens",
"totalTokensFor": "Total tokens for {windowLabelDisplay}",
"usageRateHelp": "Current usage percentage for the most recently used quota",
"usageRate": "Usage rate",
"moreGroups": "{count} more quota groups, expand the account to view them",
"windows": {
"fiveHour": "5h limit",
"daily": "Daily limit",
@@ -149,14 +142,11 @@
},
"credentials": {
"accountName": "Account name",
"baseUrlHelp": "Enter the API base URL, endpoint paths are appended automatically",
"apiPrefix": "API prefix",
"apiKeyPlaceholder": "Leave blank to keep the current key",
"enterUpstreamKey": "Enter the upstream key",
"protocolLabel": "Upstream protocol",
"transportLabel": "Transport",
"webSocketHelp": "WS requires upstream support for Responses WebSocket",
"messagesTransportHelp": "Messages upstreams use HTTP/SSE",
"validation": {
"urlLength": "Upstream API URL must not exceed 2,048 characters",
"urlFormat": "Enter an HTTP or HTTPS URL without credentials, query parameters, or a fragment",
@@ -333,7 +323,6 @@
"reasoning": "Reasoning",
"modelUsageRanking": "Model usage",
"totalTokens": "Total tokens",
"totalCharge": "Total cost",
"totalCharges": "Total cost",
"noModelUsageYet": "No model usage yet",
"windows": {
@@ -466,9 +455,7 @@
"tokenActivityStatisticsMethod": "Token activity statistics method",
"noTokenActivityYet": "No token activity yet",
"noDailyActivity": "Daily token activity was not available for this request",
"tokenActivityHeatmap": "Token activity heatmap, {rangeLabel}",
"weekOfTokens": "Week of {dateDisplay}: {value} tokens",
"throughTokens": "Through {dateDisplay}: {value} tokens"
"tokenActivityHeatmap": "Token activity heatmap, {rangeLabel}"
},
"metrics": {
"cumulativeNumberOfTokens": "Total tokens",
@@ -63,7 +63,6 @@
"totalCacheHits": "Total cache hits",
"totalCache": "Total cache"
},
"comparedWithYesterday": "vs. yesterday",
"trends": {
"title": "Trends",
"metric": "Trend indicator",
@@ -80,19 +79,13 @@
"clientIdentity": {
"clientMode": "Client mode",
"versionPolicy": "Version policy",
"notChecked": "Not checked yet",
"customVersion": "Custom version",
"active": "Active",
"activeDescription": "New requests using the global settings use this identity",
"upToDate": "Up to date",
"versionUpToDate": "Version matches",
"upToDateDescription": "The active version matches the latest official release",
"updateAvailable": "Update available",
"latestRelease": "Latest official version: {releaseLabel}",
"checkFailed": "Check failed",
"checkFailedDescription": "Official version check failed",
"pending": "Pending check",
"pendingDescription": "Official releases have not been checked yet",
"verifiedAt": "Profile verified: {verifiedAt}",
"checkedAt": "Release checked: {checkedAt}",
"clientId": "Client ID",
-2
View File
@@ -56,11 +56,9 @@
"model": "Model",
"other": "Other models ({count})",
"unknownModel": "Unspecified model",
"knownCost": "Known USD costs only",
"costShare": "Cost share",
"peakRequests": "Peak daily requests",
"activeDays": "Active days",
"includesEstimate": "Includes estimated costs",
"empty": "No usage in this period",
"missing": "No known values for this metric"
},
@@ -131,10 +131,6 @@
"regionalConflict": "Regional conflict",
"parsingFailed": "Parsing failed",
"exitNotRecognized": "Exit not recognized",
"ipv4AndIpv6EgressTimeZonesAre": "IPv4 and IPv6 egress time zones are inconsistent",
"exitLocation": "Exit location: {label} · {timezone}",
"detectHelp": "Resolve the exit location when testing proxies",
"customLocation": "Custom location: {customLabel} · {timezone}",
"custom": "Custom: {customLabel}"
},
"fields": {
@@ -154,7 +150,6 @@
"selectProxy": "Select proxy {name}",
"credentialsSaved": "Proxy credentials saved",
"underTest": "Under test",
"ms": "{message} ({latencyMs} ms)",
"notTested": "Not tested",
"viewAccountsAssociatedWith": "View the {count} accounts associated with {name}",
"disable": "Disable “{name}”?",
@@ -472,8 +472,6 @@
},
"storage": {
"s3StorageConfiguration": "S3 storage configuration",
"connectionTestPassed": "Connection test passed",
"connectionTestHasNotPassed": "Connection test has not passed",
"testing": "Testing",
"endpointAddress": "Endpoint address",
"endpointHelp": "HTTPS endpoint for the S3-compatible service",
+3 -13
View File
@@ -60,7 +60,6 @@
"total": "Total"
},
"performance": {
"ttftHelp": "TTFT: time to first token",
"upstreamRateHelp": "Output tokens ÷ upstream response time, including reasoning tokens",
"localRateHelp": "≈ indicates the local average rate: output tokens ÷ total request time, including waits, retries, and network time",
"concurrency": "Concurrency",
@@ -129,7 +128,6 @@
"stable": "Stable",
"future": "Future",
"status": {
"mappedModel": "Model sent upstream after gateway mapping: {secondary}",
"firstOutputWaiting": "First output",
"reasoningToText": "Reasoning → Text",
"firstOneIsOutputToText": "First output → Text",
@@ -148,8 +146,7 @@
"upstreamPerformance": "Upstream performance",
"requestObservation": "Request observation",
"transport": "Transport",
"cancelled": "Cancelled",
"requestedModel": "Requested model: {model}"
"cancelled": "Cancelled"
},
"balanceUnavailable": "Balance unavailable",
"quota": "Quota",
@@ -234,14 +231,11 @@
"groupBy": "By {resultDimensionLabel}",
"diagnosticDimension": "Diagnostic dimension",
"noDiagnosticDataYet": "No diagnostic data yet",
"successful": "Successful: {count}",
"retryRate": "Retry rate: {rate}",
"retries": "Retries: {count}",
"loading": "Loading diagnostics",
"empty": "No diagnostics in this range",
"download": "Download",
"errors": "Errors: {count}",
"errorRate": "Error rate: {rate}"
"errors": "Errors: {count}"
},
"cost": {
"savings": "Savings",
@@ -254,14 +248,11 @@
"costEfficiency": "Costs",
"description": "Costs, cache savings, tier premiums",
"costView": "Cost view",
"tierPremium": "Tier premium",
"perSuccessfulRequest": "Cost/success",
"costCoverage": "Cost coverage",
"loading": "Loading costs",
"empty": "No cost or cache savings data in this range",
"premium": "Premium",
"coverage": "Coverage",
"perSuccessfulRequestHelp": "Cost per successful request"
"coverage": "Coverage"
},
"error": {
"noDetails": "No detailed error message was recorded",
@@ -276,7 +267,6 @@
"upstreamModel": "Upstream model",
"clientTransfer": "Client transfer",
"upstreamTransport": "Upstream transport",
"clientStatusCode": "Client status code",
"upstreamStatusCode": "Upstream status code",
"requestId": "Request ID",
"upstreamRequestId": "Upstream request ID",
@@ -28,8 +28,6 @@
"geminiModels": "Gemini 模型",
"claudeGptModels": "Claude 和 GPT 模型"
},
"usageInThisWindow": "窗口消耗:{localUsageDisplay}",
"quotaUsed": "额度已使用:{rate}",
"resets": "重置时间: {resetAtDisplay}",
"unobserved": "额度待观测",
"dailyRequests": "日请求",
@@ -43,7 +41,6 @@
"autoUsePointsHelp": "订阅额度耗尽后,使用可用点数继续请求",
"quotaPoints": "额度点数",
"point": "点",
"requestsInThisWindow": "窗口请求:{requestDisplay} 次",
"requestCount": "{requestDisplay} 次",
"statisticalRange": "统计范围",
"rolling": "滚动 {duration}",
@@ -65,11 +62,7 @@
"rollingWindow": "滚动窗口",
"windowConsumption": "窗口消耗",
"resetTime": "重置时间",
"localTokens": "本地累计总 Token",
"totalTokensFor": "{windowLabelDisplay}总 Token",
"usageRateHelp": "最近使用额度的当前已用比例",
"usageRate": "使用率",
"moreGroups": "另有 {count} 个额度组,可展开账号查看",
"windows": {
"fiveHour": "5小时额度",
"daily": "日额度",
@@ -149,14 +142,11 @@
},
"credentials": {
"accountName": "账号名称",
"baseUrlHelp": "填写 API 前缀,接口路径会自动追加",
"apiPrefix": "API 前缀",
"apiKeyPlaceholder": "留空保留当前密钥",
"enterUpstreamKey": "输入上游密钥",
"protocolLabel": "上游协议",
"transportLabel": "传输方式",
"webSocketHelp": "WS 需要上游支持 Responses WebSocket",
"messagesTransportHelp": "Messages 上游使用 HTTP/SSE",
"validation": {
"urlLength": "上游 API 地址不能超过 2048 个字符",
"urlFormat": "请输入不含认证、查询参数或片段的 HTTP 或 HTTPS 地址",
@@ -333,7 +323,6 @@
"reasoning": "推理",
"modelUsageRanking": "模型用量",
"totalTokens": "总 Token",
"totalCharge": "总计费",
"totalCharges": "总计费:",
"noModelUsageYet": "暂无模型用量",
"windows": {
@@ -466,9 +455,7 @@
"tokenActivityStatisticsMethod": "Token 活动统计方式",
"noTokenActivityYet": "暂无 Token 活动",
"noDailyActivity": "本次未获取到每日 Token 活动",
"tokenActivityHeatmap": "Token 活动热力图,{rangeLabel}",
"weekOfTokens": "{dateDisplay}所在周:{value} Tokens",
"throughTokens": "截至{dateDisplay}:{value} Tokens"
"tokenActivityHeatmap": "Token 活动热力图,{rangeLabel}"
},
"metrics": {
"cumulativeNumberOfTokens": "累计 Token 数",
@@ -63,7 +63,6 @@
"totalCacheHits": "总缓存命中",
"totalCache": "总缓存"
},
"comparedWithYesterday": "较昨日",
"trends": {
"title": "使用趋势",
"metric": "趋势指标",
@@ -80,19 +79,13 @@
"clientIdentity": {
"clientMode": "运行模式",
"versionPolicy": "版本策略",
"notChecked": "尚未检查",
"customVersion": "固定自定义",
"active": "当前生效",
"activeDescription": "跟随通用设置的新请求使用此身份",
"upToDate": "制品一致",
"versionUpToDate": "版本一致",
"upToDateDescription": "当前生效版本与官方最新发布一致",
"updateAvailable": "发现新版",
"latestRelease": "官方最新版本 {releaseLabel}",
"checkFailed": "检查失败",
"checkFailedDescription": "官方版本检查失败",
"pending": "待检查",
"pendingDescription": "尚未检查官方发布渠道",
"verifiedAt": "画像核验 {verifiedAt}",
"checkedAt": "发布检查 {checkedAt}",
"clientId": "客户端 ID",
@@ -56,11 +56,9 @@
"model": "模型",
"other": "其他 {count} 个模型",
"unknownModel": "未记录模型",
"knownCost": "仅含已知美元费用",
"costShare": "费用占比",
"peakRequests": "单日最高请求数",
"activeDays": "活跃天数",
"includesEstimate": "含本地估算",
"empty": "此期间没有用量记录",
"missing": "此指标暂无已知数值"
},
@@ -131,10 +131,6 @@
"regionalConflict": "地区冲突",
"parsingFailed": "解析失败",
"exitNotRecognized": "出口未识别",
"ipv4AndIpv6EgressTimeZonesAre": "IPv4 与 IPv6 出口时区不一致",
"exitLocation": "出口地区:{label} · {timezone}",
"detectHelp": "测试代理时解析出口地区",
"customLocation": "自定义位置:{customLabel} · {timezone}",
"custom": "自定义:{customLabel}"
},
"fields": {
@@ -154,7 +150,6 @@
"selectProxy": "选择代理 {name}",
"credentialsSaved": "代理凭据已保存",
"underTest": "测试中",
"ms": "{message}(耗时 {latencyMs} ms)",
"notTested": "未测试",
"viewAccountsAssociatedWith": "查看 {name} 的 {count} 个关联账号",
"disable": "确定禁用“{name}”吗?",
@@ -472,8 +472,6 @@
},
"storage": {
"s3StorageConfiguration": "S3 存储配置",
"connectionTestPassed": "已通过连接测试",
"connectionTestHasNotPassed": "尚未通过连接测试",
"testing": "测试中",
"endpointAddress": "端点地址",
"endpointHelp": "S3 兼容服务的 HTTPS 地址",
+3 -13
View File
@@ -60,7 +60,6 @@
"total": "总耗时"
},
"performance": {
"ttftHelp": "TTFT:首个 Token 耗时",
"upstreamRateHelp": "输出 Token ÷ 上游响应耗时,输出包含推理 Token",
"localRateHelp": "≈ 为本地平均速率:输出 Token ÷ 请求总耗时,包含等待、重试和网络耗时",
"concurrency": "并发",
@@ -129,7 +128,6 @@
"stable": "稳定",
"future": "未来",
"status": {
"mappedModel": "网关映射后发送给上游的模型:{secondary}",
"firstOutputWaiting": "首个输出等待",
"reasoningToText": "推理到正文",
"firstOneIsOutputToText": "首个输出到正文",
@@ -148,8 +146,7 @@
"upstreamPerformance": "上游性能",
"requestObservation": "请求观测",
"transport": "传输观测",
"cancelled": "已取消",
"requestedModel": "请求模型:{model}"
"cancelled": "已取消"
},
"balanceUnavailable": "未提供余额",
"quota": "额度",
@@ -234,14 +231,11 @@
"groupBy": "按{resultDimensionLabel}聚合",
"diagnosticDimension": "诊断维度",
"noDiagnosticDataYet": "暂无诊断数据",
"successful": "成功 {count}",
"retryRate": "重试率 {rate}",
"retries": "重试 {count}",
"loading": "正在加载诊断数据",
"empty": "当前范围暂无诊断数据",
"download": "下载",
"errors": "错误 {count} 次",
"errorRate": "错误率 {rate}"
"errors": "错误 {count} 次"
},
"cost": {
"savings": "节省",
@@ -254,14 +248,11 @@
"costEfficiency": "成本效率",
"description": "费用、缓存节省与服务层溢价",
"costView": "成本视图",
"tierPremium": "层级溢价",
"perSuccessfulRequest": "每次成功请求",
"costCoverage": "费用覆盖",
"loading": "正在加载费用数据",
"empty": "当前范围暂无费用或缓存节省数据",
"premium": "溢价",
"coverage": "覆盖率",
"perSuccessfulRequestHelp": "每次成功请求的费用"
"coverage": "覆盖率"
},
"error": {
"noDetails": "未记录具体错误消息",
@@ -276,7 +267,6 @@
"upstreamModel": "上游模型",
"clientTransfer": "客户端传输",
"upstreamTransport": "上游传输",
"clientStatusCode": "客户端状态码",
"upstreamStatusCode": "上游状态码",
"requestId": "请求 ID",
"upstreamRequestId": "上游请求 ID",
@@ -28,8 +28,6 @@
"geminiModels": "Gemini 模型",
"claudeGptModels": "Claude 和 GPT 模型"
},
"usageInThisWindow": "窗口消耗:{localUsageDisplay}",
"quotaUsed": "額度已使用:{rate}",
"resets": "重置時間: {resetAtDisplay}",
"unobserved": "額度待觀測",
"dailyRequests": "日請求",
@@ -43,7 +41,6 @@
"autoUsePointsHelp": "訂閱額度耗盡後,使用可用點數繼續請求",
"quotaPoints": "額度點數",
"point": "點",
"requestsInThisWindow": "窗口請求:{requestDisplay} 次",
"requestCount": "{requestDisplay} 次",
"statisticalRange": "統計範圍",
"rolling": "滾動 {duration}",
@@ -65,11 +62,7 @@
"rollingWindow": "滾動窗口",
"windowConsumption": "窗口消耗",
"resetTime": "重置時間",
"localTokens": "本地累計總 Token",
"totalTokensFor": "{windowLabelDisplay}總 Token",
"usageRateHelp": "最近使用額度的當前已用比例",
"usageRate": "使用率",
"moreGroups": "另有 {count} 個額度組,可展開賬號查看",
"windows": {
"fiveHour": "5小時額度",
"daily": "日額度",
@@ -149,14 +142,11 @@
},
"credentials": {
"accountName": "賬號名稱",
"baseUrlHelp": "填寫 API 前綴,接口路徑會自動追加",
"apiPrefix": "API 前綴",
"apiKeyPlaceholder": "留空保留當前密鑰",
"enterUpstreamKey": "輸入上游密鑰",
"protocolLabel": "上游協議",
"transportLabel": "傳輸方式",
"webSocketHelp": "WS 需要上游支持 Responses WebSocket",
"messagesTransportHelp": "Messages 上游使用 HTTP/SSE",
"validation": {
"urlLength": "上游 API 地址不能超過 2048 個字符",
"urlFormat": "請輸入不含認證、查詢參數或片段的 HTTP 或 HTTPS 地址",
@@ -333,7 +323,6 @@
"reasoning": "推理",
"modelUsageRanking": "模型用量",
"totalTokens": "總 Token",
"totalCharge": "總計費",
"totalCharges": "總計費:",
"noModelUsageYet": "暫無模型用量",
"windows": {
@@ -466,9 +455,7 @@
"tokenActivityStatisticsMethod": "Token 活動統計方式",
"noTokenActivityYet": "暫無 Token 活動",
"noDailyActivity": "本次未獲取到每日 Token 活動",
"tokenActivityHeatmap": "Token 活動熱力圖,{rangeLabel}",
"weekOfTokens": "{dateDisplay}所在周:{value} Tokens",
"throughTokens": "截至{dateDisplay}:{value} Tokens"
"tokenActivityHeatmap": "Token 活動熱力圖,{rangeLabel}"
},
"metrics": {
"cumulativeNumberOfTokens": "累計 Token 數",
@@ -63,7 +63,6 @@
"totalCacheHits": "總緩存命中",
"totalCache": "總緩存"
},
"comparedWithYesterday": "較昨日",
"trends": {
"title": "使用趨勢",
"metric": "趨勢指標",
@@ -80,19 +79,13 @@
"clientIdentity": {
"clientMode": "運行模式",
"versionPolicy": "版本策略",
"notChecked": "尚未檢查",
"customVersion": "固定自定義",
"active": "當前生效",
"activeDescription": "跟隨通用設置的新請求使用此身份",
"upToDate": "製品一致",
"versionUpToDate": "版本一致",
"upToDateDescription": "當前生效版本與官方最新發布一致",
"updateAvailable": "發現新版",
"latestRelease": "官方最新版本 {releaseLabel}",
"checkFailed": "檢查失敗",
"checkFailedDescription": "官方版本檢查失敗",
"pending": "待檢查",
"pendingDescription": "尚未檢查官方發佈渠道",
"verifiedAt": "畫像覈驗 {verifiedAt}",
"checkedAt": "發佈檢查 {checkedAt}",
"clientId": "客戶端 ID",
@@ -56,11 +56,9 @@
"model": "模型",
"other": "其他 {count} 個模型",
"unknownModel": "未記錄模型",
"knownCost": "僅含已知美元費用",
"costShare": "費用佔比",
"peakRequests": "單日最高請求數",
"activeDays": "活躍天數",
"includesEstimate": "含本機估算",
"empty": "此期間沒有用量記錄",
"missing": "此指標暫無已知數值"
},
@@ -131,10 +131,6 @@
"regionalConflict": "地區衝突",
"parsingFailed": "解析失敗",
"exitNotRecognized": "出口未識別",
"ipv4AndIpv6EgressTimeZonesAre": "IPv4 與 IPv6 出口時區不一致",
"exitLocation": "出口地區:{label} · {timezone}",
"detectHelp": "測試代理時解析出口地區",
"customLocation": "自定義位置:{customLabel} · {timezone}",
"custom": "自定義:{customLabel}"
},
"fields": {
@@ -154,7 +150,6 @@
"selectProxy": "選擇代理 {name}",
"credentialsSaved": "代理憑據已保存",
"underTest": "測試中",
"ms": "{message}(耗時 {latencyMs} ms)",
"notTested": "未測試",
"viewAccountsAssociatedWith": "查看 {name} 的 {count} 個關聯賬號",
"disable": "確定禁用“{name}”嗎?",
@@ -472,8 +472,6 @@
},
"storage": {
"s3StorageConfiguration": "S3 存儲配置",
"connectionTestPassed": "已通過連接測試",
"connectionTestHasNotPassed": "尚未通過連接測試",
"testing": "測試中",
"endpointAddress": "端點地址",
"endpointHelp": "S3 兼容服務的 HTTPS 地址",
+3 -13
View File
@@ -60,7 +60,6 @@
"total": "總耗時"
},
"performance": {
"ttftHelp": "TTFT:首個 Token 耗時",
"upstreamRateHelp": "輸出 Token ÷ 上游響應耗時,輸出包含推理 Token",
"localRateHelp": "≈ 為本地平均速率:輸出 Token ÷ 請求總耗時,包含等待、重試和網絡耗時",
"concurrency": "並發",
@@ -129,7 +128,6 @@
"stable": "穩定",
"future": "未來",
"status": {
"mappedModel": "網關映射後發送給上游的模型:{secondary}",
"firstOutputWaiting": "首個輸出等待",
"reasoningToText": "推理到正文",
"firstOneIsOutputToText": "首個輸出到正文",
@@ -148,8 +146,7 @@
"upstreamPerformance": "上游性能",
"requestObservation": "請求觀測",
"transport": "傳輸觀測",
"cancelled": "已取消",
"requestedModel": "請求模型:{model}"
"cancelled": "已取消"
},
"balanceUnavailable": "未提供餘額",
"quota": "額度",
@@ -234,14 +231,11 @@
"groupBy": "按{resultDimensionLabel}聚合",
"diagnosticDimension": "診斷維度",
"noDiagnosticDataYet": "暫無診斷數據",
"successful": "成功 {count}",
"retryRate": "重試率 {rate}",
"retries": "重試 {count}",
"loading": "正在加載診斷數據",
"empty": "當前範圍暫無診斷數據",
"download": "下載",
"errors": "錯誤 {count} 次",
"errorRate": "錯誤率 {rate}"
"errors": "錯誤 {count} 次"
},
"cost": {
"savings": "節省",
@@ -254,14 +248,11 @@
"costEfficiency": "成本效率",
"description": "費用、緩存節省與服務層溢價",
"costView": "成本視圖",
"tierPremium": "層級溢價",
"perSuccessfulRequest": "每次成功請求",
"costCoverage": "費用覆蓋",
"loading": "正在加載費用數據",
"empty": "當前範圍暫無費用或緩存節省數據",
"premium": "溢價",
"coverage": "覆蓋率",
"perSuccessfulRequestHelp": "每次成功請求的費用"
"coverage": "覆蓋率"
},
"error": {
"noDetails": "未記錄具體錯誤消息",
@@ -276,7 +267,6 @@
"upstreamModel": "上游模型",
"clientTransfer": "客戶端傳輸",
"upstreamTransport": "上游傳輸",
"clientStatusCode": "客戶端狀態碼",
"upstreamStatusCode": "上游狀態碼",
"requestId": "請求 ID",
"upstreamRequestId": "上游請求 ID",
@@ -288,7 +288,6 @@ watch(
</div>
<p
class="mt-2 mb-0 h-[1em] truncate font-mono text-z leading-none font-bold text-z-text"
:title="item.title || item.value"
>
<ZSkeleton
v-if="loading || ((checking || changingChannel) && item.key === 'latest')"
@@ -393,7 +392,6 @@ watch(
</div>
<span
class="inline-flex h-6 items-center gap-1.5 rounded-full bg-z-fill-quaternary px-2 text-z-xs leading-none font-bold text-z-text-secondary"
:title="updateStreamError || undefined"
>
<i
class="size-1.5 rounded-full"
@@ -102,7 +102,6 @@ function resolveSummaryItems(input: SystemUpdatePresentationInput) {
value: input.loading
? '...'
: versionLabel(input.updateInfo?.currentVersion ?? input.version?.version),
title: input.updateInfo?.currentVersion ?? input.version?.version,
},
{
key: 'latest',
@@ -110,20 +109,17 @@ function resolveSummaryItems(input: SystemUpdatePresentationInput) {
value: input.updateInfo?.warning
? t('systemUpdate.status.unconfirmedVersion')
: versionLabel(input.updateInfo?.latestVersion),
title: input.updateInfo?.warning ? undefined : input.updateInfo?.latestVersion,
releaseUrl: input.updateInfo?.releaseUrl,
},
{
key: 'build',
label: t('systemUpdate.build'),
value: buildTypeLabel(input.updateInfo?.buildType),
title: input.updateInfo?.buildType,
},
{
key: 'deployment',
label: t('systemUpdate.deployment'),
value: deploymentModeLabel(input.version?.deploymentMode),
title: input.version?.deploymentMode,
},
]
}
@@ -39,7 +39,7 @@ function updateProtocol(protocol: string) {
<template>
<ZFormItem class="col-span-full" prop="connection.base_url" :rules="rules.base_url" :show-message="Boolean(form.base_url.trim())" :label="t('common.fields.baseUrl')" required>
<template #extra>
<span class="text-z-xs text-z-text-quaternary" :title="t('accounts.credentials.baseUrlHelp')">{{ t('accounts.credentials.apiPrefix') }}</span>
<span class="text-z-xs text-z-text-quaternary">{{ t('accounts.credentials.apiPrefix') }}</span>
</template>
<ZInput v-model="form.base_url" type="url" placeholder="https://api.example.com/v1" :disabled="disabled" autocomplete="off" />
</ZFormItem>
@@ -51,7 +51,7 @@ function updateProtocol(protocol: string) {
<ZSegmented class="w-full" :model-value="form.protocol" :aria-label="t('accounts.credentials.protocolLabel')" :options="protocolOptions" :disabled="disabled" @update:model-value="updateProtocol" />
</ZFormItem>
<ZFormItem prop="connection.transport" :rules="rules.transport" :show-message="false" :label="t('accounts.credentials.transportLabel')">
<ZSegmented v-model="form.transport" class="w-full" :aria-label="t('accounts.credentials.transportLabel')" :options="transportOptions" :disabled="disabled" :title="form.protocol === 'messages' ? t('accounts.credentials.messagesTransportHelp') : t('accounts.credentials.webSocketHelp')" />
<ZSegmented v-model="form.transport" class="w-full" :aria-label="t('accounts.credentials.transportLabel')" :options="transportOptions" :disabled="disabled" />
</ZFormItem>
</div>
</template>
@@ -162,7 +162,6 @@ function connectionLogClass(tone: string) {
</p>
<p
class="mt-1.5 mb-0 truncate font-mono text-z-sm font-emphasis text-z-text"
:title="model || '-'"
>
{{ model || '-' }}
</p>
@@ -119,7 +119,6 @@ const groupOptions = computed(() => [
<ZMenuItem
:loading="exportingAccounts"
:disabled="Boolean(exportDisabledReason)"
:title="exportDisabledReason || undefined"
:aria-description="exportDisabledReason || undefined"
@click="(close(), emit('exportSelected'))"
>
@@ -37,13 +37,6 @@ const displayTitle = computed(() => {
const visibleNotes = computed(() => props.showNotes ? props.account.notes : undefined)
const identityTitle = computed(() => {
const email = emailText.value
return email && email !== displayTitle.value
? `${displayTitle.value}\n${email}`
: displayTitle.value
})
const secondaryText = computed(() => {
if (visibleNotes.value)
return visibleNotes.value
@@ -80,7 +73,7 @@ const avatarToneClass = computed(() => {
</span>
<div class="min-w-0 flex-1">
<div class="flex min-w-0 items-center gap-2">
<span class="min-w-0 truncate text-z font-heavy text-z-text" :title="identityTitle">
<span class="min-w-0 truncate text-z font-heavy text-z-text">
{{ displayTitle }}
</span>
<AccountPlanBadge v-if="showPlan" class="shrink-0" :upstream="account.upstream" :authentication-kind="account.authenticationKind" :plan-type="account.planType" :plan-type-display="account.planTypeDisplay" size="sm" />
@@ -133,14 +133,14 @@ const modelUsageColumns = computed(() => (defineTableColumns<AccountModelUsage>(
<div class="ml-auto flex items-baseline gap-4">
<div v-if="hasUsageSummary" class="flex items-baseline gap-1.5 whitespace-nowrap">
<Sigma class="size-3.5 self-center text-z-text-tertiary" :stroke-width="1.75" />
<span :title="t('accounts.usage.totalTokens')">
<span>
<span class="sr-only">{{ t('accounts.usage.totalTokens') }}</span>
<span class="font-mono text-z-sm font-emphasis tabular-nums text-z-text">
{{ account.usage.totalTokensDisplay }}
</span>
</span>
<span class="mx-0.5 text-[10px] leading-none font-emphasis text-z-text-quaternary"> / </span>
<span :title="t('accounts.usage.totalCharge')">
<span>
<span class="sr-only">{{ t('accounts.usage.totalCharges') }}</span>
<span class="font-mono text-z-sm font-heavy tabular-nums text-z-green-text">
{{ totalBillingDisplay }}
@@ -165,7 +165,7 @@ const modelUsageColumns = computed(() => (defineTableColumns<AccountModelUsage>(
</span>
</template>
<template #lastUsedAt="{ row }">
<LastUsedAtCell :value="row.lastUsedAt" :full-display="row.lastUsedAtFullDisplay" />
<LastUsedAtCell :value="row.lastUsedAt" />
</template>
</ZTable>
</div>
@@ -60,13 +60,12 @@ const columns = computed(() => (defineTableColumns<AccountConcurrencyEntry>([
<template #key="{ row }">
<span
class="block truncate font-emphasis text-z-text"
:title="[row.clientKeyName, row.clientKeyId].filter(Boolean).join('\n') || undefined"
>
{{ row.clientKeyName ?? row.clientKeyId ?? '—' }}
</span>
</template>
<template #model="{ displayValue }">
<span class="text-z font-normal text-z-text-secondary" :title="String(displayValue)">{{ displayValue }}</span>
<span class="text-z font-normal text-z-text-secondary">{{ displayValue }}</span>
</template>
<template #startedAtDisplay="{ displayValue }">
<span class="text-z">{{ displayValue }}</span>
@@ -124,7 +124,7 @@ watch(hasAttention, (value) => {
<p class="col-span-2 col-start-2 row-start-2 min-w-0 text-xs leading-relaxed wrap-anywhere text-z-text-secondary sm:col-span-1 sm:col-start-3 sm:row-start-1">
{{ itemDescription(item) }}
</p>
<span class="col-start-3 row-start-1 inline-flex items-center justify-self-end sm:col-start-4" :title="itemStates[item.status].label">
<span class="col-start-3 row-start-1 inline-flex items-center justify-self-end sm:col-start-4">
<template v-if="item.status === 'succeeded' || item.status === 'failed'">
<Check v-if="item.status === 'succeeded'" class="size-4 text-z-success-text" aria-hidden="true" />
<X v-else class="size-4 text-z-error-text" aria-hidden="true" />
@@ -17,12 +17,10 @@ const metrics = computed(() => [
{
label: t('accounts.profile.metrics.cumulativeNumberOfTokens'),
value: formatMetric(props.profile?.summary.totalTextTokens),
title: formatExact(props.profile?.summary.totalTextTokens),
},
{
label: t('accounts.profile.metrics.peakNumberOfTokens'),
value: formatMetric(props.profile?.summary.peakTokens),
title: formatExact(props.profile?.summary.peakTokens),
},
{
label: t('accounts.profile.metrics.maximumChatDuration'),
@@ -44,12 +42,6 @@ function formatMetric(value: number | null | undefined) {
: formatCompactNumber(value)
}
function formatExact(value: number | null | undefined) {
return value == null
? undefined
: `${formatInteger(value)} Tokens`
}
function formatDays(value: number | null | undefined) {
return value == null
? '—'
@@ -87,7 +79,7 @@ function formatDuration(value: number | null | undefined) {
<section class="@container min-w-0 py-1" :aria-label="t('accounts.profile.metrics.cumulativeActivitySummary')" :aria-busy="loading">
<dl class="grid grid-cols-2 gap-y-4 @sm:grid-cols-3 @[34rem]:grid-cols-5">
<div v-for="metric in metrics" :key="metric.label" class="min-w-0 px-2 text-center sm:px-3">
<dd class="m-0 font-mono text-z-lg leading-tight font-heavy whitespace-nowrap tabular-nums text-z-text" :title="metric.title">
<dd class="m-0 font-mono text-z-lg leading-tight font-heavy whitespace-nowrap tabular-nums text-z-text">
<ZSkeleton v-if="loading && !profile" shape="text" class="mx-auto h-4 w-14" />
<template v-else>
{{ metric.value }}
@@ -77,7 +77,7 @@ watch(
class="mt-1.5 grid min-w-0 gap-0.5 text-z-xs font-semibold text-z-text-secondary"
>
<span v-if="username" class="truncate">{{ username }}</span>
<span v-if="accountIdentity" class="truncate" :title="accountIdentity">{{ accountIdentity }}</span>
<span v-if="accountIdentity" class="truncate">{{ accountIdentity }}</span>
</div>
</div>
</div>
@@ -6,7 +6,7 @@ import { ZEmpty, ZSegmented } from '@codex-proxy/ui'
import { computed, shallowRef } from 'vue'
import { useI18n } from 'vue-i18n'
import { buildProfileActivityGrid, profileActivityCellLabel } from './activity'
import { buildProfileActivityGrid } from './activity'
const props = defineProps<{
calendar: ProfileActivityCalendar | null
@@ -91,7 +91,6 @@ const monthLabels = computed(() =>
:key="cell.date"
class="aspect-square rounded-[3px] transition-colors motion-reduce:transition-none"
:class="cell.isFuture ? 'invisible' : levelClasses[cell.level]"
:title="profileActivityCellLabel(cell, mode)"
/>
</div>
</div>
@@ -1,6 +1,4 @@
import type { ProfileActivityCalendar } from '@/api'
import { t } from '@/i18n'
import { formatCompactNumber } from '@/utils/format'
export type ProfileActivityMode = 'daily' | 'weekly' | 'cumulative'
export type ProfileActivityLevel = 0 | 1 | 2 | 3 | 4
@@ -33,12 +31,3 @@ export function buildProfileActivityGrid(calendar: ProfileActivityCalendar | nul
}
return { weeks, rangeLabel: calendar?.rangeLabel ?? '' }
}
export function profileActivityCellLabel(cell: { dateDisplay: string, value: number }, mode: ProfileActivityMode) {
const value = formatCompactNumber(cell.value)
if (mode === 'weekly')
return t('accounts.profile.activity.weekOfTokens', { dateDisplay: cell.dateDisplay, value })
if (mode === 'cumulative')
return t('accounts.profile.activity.throughTokens', { dateDisplay: cell.dateDisplay, value })
return `${cell.dateDisplay}:${value} Tokens`
}
@@ -119,7 +119,7 @@ const testHint = computed(() => selectedProxy.value?.enabled === false
<ZSelect v-model="selection" class="w-full" :class="{ '**:[[role=combobox]]:pr-28': selectedTest?.success }" :options="options" :disabled="disabled || loading" :aria-label="t('accounts.proxy.outboundTunnel')">
<template #option="{ option, selected }">
<span class="min-w-0 truncate" :class="option.description ? 'max-w-1/2 shrink-0' : 'flex-1'">{{ option.label }}</span>
<span v-if="option.description" class="min-w-0 flex-1 truncate font-normal" :class="option.disabled ? 'text-z-text-disabled' : 'text-z-text-tertiary'" :title="option.description">
<span v-if="option.description" class="min-w-0 flex-1 truncate font-normal" :class="option.disabled ? 'text-z-text-disabled' : 'text-z-text-tertiary'">
{{ option.description }}
</span>
<AccountProxyTestBadge class="ml-auto" :result="optionTests[option.value]" in-option />
@@ -20,13 +20,6 @@ const emit = defineEmits<{ accountUpdated: [account: Account] }>()
const { t } = useI18n({ useScope: 'global' })
const accountLabel = computed(() => accountIdentityLabel(props.account))
const accountTitle = computed(() => {
const email = props.account.email?.trim()
return email && email !== accountLabel.value
? `${accountLabel.value}\n${email}`
: accountLabel.value
})
const open = defineModel<boolean>({ default: false })
const period = ref('weekly')
const explanationOpen = ref(false)
@@ -95,7 +88,7 @@ function handleExplanationKeydown(event: KeyboardEvent) {
<div class="flex flex-wrap items-center gap-x-4 gap-y-2.5">
<div class="flex min-w-0 flex-[1_1_12rem] items-center gap-2">
<ProviderIconGroup :platform-icon="account.platformIcon" :provider="account.provider" class="shrink-0" />
<strong class="min-w-0 truncate text-z font-emphasis text-z-text" :title="accountTitle">{{ accountLabel }}</strong>
<strong class="min-w-0 truncate text-z font-emphasis text-z-text">{{ accountLabel }}</strong>
<AccountPlanBadge :upstream="account.upstream" :authentication-kind="account.authenticationKind" :plan-type="account.planType" :plan-type-display="account.planTypeDisplay" size="sm" class="max-w-1/2 shrink-0" />
</div>
<ZSegmented v-model="period" :aria-label="t('accounts.quotaForecast.forecastPeriod')" :options="options" size="small" class="basis-36 grow sm:grow-0" />
@@ -54,7 +54,6 @@ const items = computed(() => props.windows.map((window) => {
<h4
v-if="grouped && label && windows[0]?.limitId !== 'codex'"
class="m-0 truncate text-z-xs leading-4 font-heavy text-z-text-secondary"
:title="label"
>
{{ label }}
</h4>
@@ -71,7 +70,6 @@ const items = computed(() => props.windows.map((window) => {
</span>
<strong
class="shrink-0 font-mono font-heavy tabular-nums text-z-text"
:title="t('accounts.quota.requestsInThisWindow', { requestDisplay: item.requestDisplay })"
>
{{ t('accounts.quota.requestCount', { requestDisplay: item.requestDisplay }) }}
</strong>
@@ -87,7 +85,6 @@ const items = computed(() => props.windows.map((window) => {
<span class="shrink-0 font-emphasis">{{ t('accounts.quota.statisticalRange') }}</span>
<span
class="min-w-0 truncate font-mono font-emphasis tabular-nums"
:title="t('accounts.quota.rolling', { duration: item.durationDisplay })"
>
{{ t('accounts.quota.rolling', { duration: item.durationDisplay }) }}
</span>
@@ -95,7 +92,7 @@ const items = computed(() => props.windows.map((window) => {
</template>
<template v-else>
<div class="flex min-w-0 items-baseline justify-between gap-2 text-z-xs leading-3.5">
<span class="min-w-0 truncate font-bold text-z-text-quaternary" :title="item.observationDisplay || undefined">
<span class="min-w-0 truncate font-bold text-z-text-quaternary">
{{ item.label }}
</span>
<span class="flex shrink-0 items-baseline gap-1.5 font-mono font-heavy tabular-nums">
@@ -108,14 +105,12 @@ const items = computed(() => props.windows.map((window) => {
<strong
v-if="item.localUsageDisplay"
class="text-z-text-quaternary"
:title="t('accounts.quota.usageInThisWindow', { localUsageDisplay: item.localUsageDisplay })"
>
{{ item.localUsageDisplay }}
</strong>
<strong
v-if="!item.amountUsedDisplay || item.usedPercent !== null"
:class="item.percentTextClass"
:title="item.usedPercent === null ? undefined : t('accounts.quota.quotaUsed', { rate: item.quotaValueDisplay })"
>
{{ item.quotaValueDisplay }}
</strong>
@@ -140,7 +135,7 @@ const items = computed(() => props.windows.map((window) => {
<p class="m-0 flex min-w-0 items-center justify-between gap-2 text-[10px] leading-3.5 text-z-text-tertiary">
<span class="shrink-0 font-emphasis">{{ t('common.actions.reset') }}</span>
<span class="min-w-0 truncate font-mono font-emphasis tabular-nums" :title="item.resetAtDisplay">
<span class="min-w-0 truncate font-mono font-emphasis tabular-nums">
{{ item.resetAtDisplay }}
</span>
</p>
@@ -26,17 +26,17 @@ const plans = computed(() => {
<PoolChart v-if="nodes.length" :nodes="nodes" />
<div v-if="pool || upstream?.maxConcurrency != null || upstream?.requestsPerMinute != null" class="flex min-h-5 min-w-0 flex-wrap items-end justify-between gap-x-3 gap-y-1.5">
<div class="flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-z-xs leading-none tabular-nums text-z-text-secondary">
<span v-if="pool" class="inline-flex items-center gap-1 whitespace-nowrap" :title="t('accounts.upstream.readyAccounts')">
<span v-if="pool" class="inline-flex items-center gap-1 whitespace-nowrap">
<Users aria-hidden="true" :stroke-width="1.75" class="size-2.75 text-z-text-tertiary" />
<span class="sr-only">{{ t('accounts.upstream.readyAccounts') }}</span>
<strong class="font-heavy" :class="pool.states.ready > 0 ? 'text-z-success-text' : 'text-z-text'">{{ pool.states.ready }}</strong>
<span class="text-z-text-quaternary">/ {{ pool.accountCount }}</span>
</span>
<span v-if="upstream?.maxConcurrency != null" class="inline-flex items-center gap-1" :title="t('accounts.upstream.keyConcurrency')">
<span v-if="upstream?.maxConcurrency != null" class="inline-flex items-center gap-1">
<Network aria-hidden="true" :stroke-width="1.75" class="size-2.25 text-z-text-tertiary" />
<span class="sr-only">{{ t('accounts.upstream.keyConcurrency') }}</span>{{ upstream.maxConcurrency || '∞' }}
</span>
<span v-if="upstream?.requestsPerMinute != null" class="inline-flex items-center gap-1" :title="t('accounts.upstream.keyRpm')">
<span v-if="upstream?.requestsPerMinute != null" class="inline-flex items-center gap-1">
<Gauge aria-hidden="true" :stroke-width="1.75" class="size-2.75 text-z-text-tertiary" />
<span class="sr-only">{{ t('accounts.upstream.keyRpm') }}</span>{{ upstream.requestsPerMinute || '∞' }}
</span>
@@ -69,9 +69,6 @@ const lastRefreshed = computed(() => {
})
: undefined
})
const refreshTitle = computed(() => props.account.upstream?.observedAt
? props.account.upstream.observedAtDisplay
: lastRefreshed.value)
watch(hasPersonalInfo, (available) => {
if (!available)
profileOpen.value = false
@@ -89,7 +86,7 @@ watch(hasPersonalInfo, (available) => {
class="col-span-2 row-start-2 m-0 flex min-w-0 items-center gap-1.5 text-z-xs font-emphasis text-z-text-secondary"
>
<AccountPlanBadge v-if="hasPlanBadge" :upstream="account.upstream" :authentication-kind="account.authenticationKind" :plan-type="account.planType" :plan-type-display="account.planTypeDisplay" size="sm" class="shrink-0" />
<span v-if="lastRefreshed" class="min-w-0 truncate" :title="refreshTitle">{{ lastRefreshed }}</span>
<span v-if="lastRefreshed" class="min-w-0 truncate">{{ lastRefreshed }}</span>
</p>
<div v-if="hasActions" class="col-start-2 row-start-1 flex items-center gap-0.5 [&_svg]:size-3.5 [&_svg]:stroke-2">
<QuotaActionButton
@@ -54,7 +54,6 @@ const hasQuotaWindow = computed(() => props.windows.some(window => typeof window
variant="compact"
:show-local-value="false"
:show-percentage="false"
:show-native-tooltip="false"
/>
</button>
</template>
@@ -41,15 +41,6 @@ const recentUsageEntry = computed(() => recentlyUsedQuotaEntry(
))
const currentUsageWindow = computed(() => representativeQuotaWindow(recentUsageEntry.value))
const currentUsageDisplay = computed(() => currentUsageWindow.value?.usedPercentDisplay ?? '—')
const summaryValue = computed(() => {
return {
value: props.account.usage.totalTokensDisplay,
label: t('common.units.tokens'),
title: props.account.authenticationKind === 'api_key'
? t('accounts.quota.localTokens')
: t('accounts.quota.totalTokensFor', { windowLabelDisplay: usageWindowLabels.value[props.account.usage.windowKind] }),
}
})
const currentUsageTextClass = computed(() => currentUsageWindow.value
? quotaWindowPresentation(currentUsageWindow.value, '2px').percentTextClass
: 'text-z-text-quaternary')
@@ -65,19 +56,17 @@ const additionalEntryCount = computed(() => Math.max(summaryEntries.value.length
<span
v-if="localUsageOnly || hasTokenUsage"
class="flex min-w-0 items-baseline gap-1 font-mono tabular-nums"
:title="summaryValue.title"
>
<strong class="truncate text-z-xs font-heavy text-z-text">
{{ summaryValue.value }}
{{ account.usage.totalTokensDisplay }}
</strong>
<span class="shrink-0 text-[9px] font-emphasis tracking-[0.02em] text-z-text-quaternary">
{{ summaryValue.label }}
{{ t('common.units.tokens') }}
</span>
</span>
<span
v-if="currentUsageWindow"
class="ml-auto flex shrink-0 items-baseline gap-1 text-[9px] font-emphasis text-z-text-quaternary"
:title="t('accounts.quota.usageRateHelp')"
>
<span>{{ t('accounts.quota.usageRate') }}</span>
<strong class="font-mono font-heavy tabular-nums" :class="currentUsageTextClass">
@@ -110,7 +99,6 @@ const additionalEntryCount = computed(() => Math.max(summaryEntries.value.length
<span
v-if="additionalEntryCount > 0"
class="grid h-5 min-w-5 shrink-0 place-items-center rounded-z bg-current/10 px-1 font-mono text-[9px] font-heavy tabular-nums text-z-text-tertiary"
:title="t('accounts.quota.moreGroups', { count: additionalEntryCount })"
>
+{{ additionalEntryCount }}
</span>
+1 -2
View File
@@ -304,7 +304,6 @@ const {
<template #provider="{ row }">
<ProviderIconGroup
class="[&_svg]:size-3.25"
:platform-icon="row.platformIcon" :provider="row.provider"
:authentication-kind="row.authenticationKind"
/>
@@ -342,7 +341,7 @@ const {
</template>
<template #lastUsedAt="{ row }">
<LastUsedAtCell :value="row.usage.lastUsedAt" :full-display="row.usage.lastUsedAtFullDisplay" />
<LastUsedAtCell :value="row.usage.lastUsedAt" />
</template>
<template #actions="{ row }">
@@ -72,7 +72,7 @@ onBeforeUnmount(() => {
</script>
<template>
<span class="inline-flex items-center gap-1.75" :aria-label="statusLabel" :title="statusLabel">
<span class="inline-flex items-center gap-1.75" :aria-label="statusLabel">
<span class="relative inline-flex size-2 shrink-0 items-center justify-center">
<span ref="heartbeatRing" class="absolute size-2 rounded-full bg-z-success opacity-0" />
<span ref="heartbeatDot" class="relative size-1.5 rounded-full bg-z-success" />
@@ -32,7 +32,6 @@ const avatarToneClass = computed(() =>
<span
class="inline-flex size-9 items-center justify-center rounded-lg shadow-z-tertiary"
:class="avatarToneClass"
:title="platform.label"
>
<component :is="platform.icon" v-if="platform.icon" class="size-3.5" />
<span v-else class="text-z-xs font-heavy">?</span>
@@ -41,7 +40,6 @@ const avatarToneClass = computed(() =>
<span
class="absolute -right-1 -bottom-1 inline-flex size-4 items-center justify-center rounded-[5px] bg-z-bg-container text-z-text shadow-z-tertiary"
:title="authenticationLabel"
>
<component :is="authenticationIconComponent" v-if="authenticationIconComponent" class="size-2.5" />
<span v-else class="text-[8px] font-heavy text-z-text-quaternary">?</span>
@@ -59,7 +57,6 @@ const avatarToneClass = computed(() =>
<span
v-if="secondaryText"
class="mt-0.5 block min-w-0 truncate font-mono text-z-xs font-emphasis text-z-text-quaternary"
:title="secondaryText"
>
{{ secondaryText }}
</span>
@@ -6,7 +6,6 @@ import type { MetricCardView } from './cards'
import { ZCard, ZMotionIcon } from '@codex-proxy/ui'
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
import AnimatedMetricValue from '@/components/AnimatedMetricValue.vue'
import BaseChart from '@/components/base-chart/index.vue'
@@ -17,8 +16,6 @@ const props = defineProps<{
metric: MetricCardView
}>()
const { t } = useI18n({ useScope: 'global' })
const trendToneClasses: Record<MetricTone, string> = {
normal: 'bg-z-text-tertiary',
info: 'bg-z-info-text',
@@ -102,7 +99,6 @@ const sparklineOption = computed<EChartsOption | null>(() => {
</strong>
<i
v-if="metric.trend && metric.trend.direction !== 'flat'"
:title="t('dashboard.comparedWithYesterday')"
class="mb-1.25 block size-3"
:class="[
trendToneClasses[metric.trend.tone],
@@ -86,7 +86,6 @@ function selectKind(value: string) {
</span>
<strong
class="truncate font-mono text-z-xl leading-none font-heavy tabular-nums text-z-text"
:title="item.value"
>
{{ item.value }}
</strong>
@@ -50,15 +50,6 @@ const versionParts = computed(() => {
}
})
const releaseLabel = computed(() => {
const release = profile.value?.release
if (!release?.latestVersion)
return t('dashboard.clientIdentity.notChecked')
return release.latestBuild
? `${release.latestVersion} · Build ${release.latestBuild}`
: release.latestVersion
})
const releaseStatus = computed(() => {
const current = profile.value
if (!current?.release) {
@@ -66,7 +57,6 @@ const releaseStatus = computed(() => {
label: current?.attributes.some(item => item.key === 'version_policy' && item.value === 'fixed')
? t('dashboard.clientIdentity.customVersion')
: t('dashboard.clientIdentity.active'),
title: t('dashboard.clientIdentity.activeDescription'),
tone: 'bg-z-info-container text-z-info-on-container',
icon: ShieldCheck,
}
@@ -76,7 +66,6 @@ const releaseStatus = computed(() => {
if (status === 'aligned') {
return {
label: identity.value?.alignedLabel,
title: t('dashboard.clientIdentity.upToDateDescription'),
tone: 'bg-z-success-container text-z-success-on-container',
icon: CheckCircle2,
}
@@ -84,7 +73,6 @@ const releaseStatus = computed(() => {
if (status === 'review_required') {
return {
label: t('dashboard.clientIdentity.updateAvailable'),
title: t('dashboard.clientIdentity.latestRelease', { releaseLabel: releaseLabel.value }),
tone: 'bg-z-warning-container text-z-warning-on-container',
icon: TriangleAlert,
}
@@ -92,14 +80,12 @@ const releaseStatus = computed(() => {
if (status === 'check_failed') {
return {
label: t('dashboard.clientIdentity.checkFailed'),
title: current.release.error || t('dashboard.clientIdentity.checkFailedDescription'),
tone: 'bg-z-error-container text-z-error-on-container',
icon: TriangleAlert,
}
}
return {
label: t('dashboard.clientIdentity.pending'),
title: t('dashboard.clientIdentity.pendingDescription'),
tone: 'bg-z-cyan-container text-z-cyan-on-container',
icon: RefreshCw,
}
@@ -172,12 +158,11 @@ const runtimeEnvironment = computed(() => {
<span class="inline-flex size-7 shrink-0 items-center justify-center rounded-lg bg-z-fill-tertiary">
<Box class="size-3.75 text-z-text-secondary" />
</span>
<span class="truncate text-z-xs leading-none font-heavy" :title="profile.product">{{ profile.product }}</span>
<span class="truncate text-z-xs leading-none font-heavy">{{ profile.product }}</span>
</div>
<span
class="inline-flex h-7 shrink-0 items-center gap-1.5 rounded-lg px-2.5 text-z-sm leading-none font-bold"
:class="releaseStatus.tone"
:title="releaseStatus.title"
>
<component :is="releaseStatus.icon" class="size-3.5" />
{{ releaseStatus.label }}
@@ -245,7 +230,7 @@ const runtimeEnvironment = computed(() => {
v-if="verifiedLabel || checkedLabel"
class="flex min-w-0 flex-wrap items-center justify-between gap-x-4 gap-y-1 text-[10px] leading-none font-emphasis text-z-text-quaternary"
>
<span v-if="verifiedLabel" :title="profile.userAgent">{{ verifiedLabel }}</span>
<span v-if="verifiedLabel">{{ verifiedLabel }}</span>
<span v-if="checkedLabel">{{ checkedLabel }}</span>
</footer>
</section>
@@ -99,7 +99,7 @@ const metrics = computed<MetricItem[]>(() => {
<dl v-else class="m-0 flex items-center gap-2.5 whitespace-nowrap text-xs leading-none">
<div v-for="metric in metrics" :key="metric.label" class="inline-flex min-w-0 items-center gap-1">
<dt class="flex items-center" :class="toneClasses[metric.tone]" :title="metric.label">
<dt class="flex items-center" :class="toneClasses[metric.tone]">
<component :is="metric.icon" v-if="metric.icon" class="size-3 shrink-0" />
<span class="sr-only">{{ metric.label }}</span>
</dt>
-3
View File
@@ -116,7 +116,6 @@ const { allSelected, indeterminate, selectedRowKeys, toggleSelection, toggleAll
:class="row.fastMode !== 'disabled'
? 'bg-z-warning-container text-z-warning-on-container'
: 'bg-z-fill-tertiary text-z-text-tertiary'"
:title="fastModeLabel(row.fastMode)"
role="img"
:aria-label="fastModeLabel(row.fastMode)"
>
@@ -127,7 +126,6 @@ const { allSelected, indeterminate, selectedRowKeys, toggleSelection, toggleAll
<span
v-if="!row.allowImageGeneration"
class="inline-flex size-4 shrink-0 items-center justify-center rounded-full bg-z-fill-tertiary text-z-text-tertiary"
:title="t('groups.page.imageGenerationDisabled')"
role="img"
:aria-label="t('groups.page.imageGenerationDisabled')"
>
@@ -144,7 +142,6 @@ const { allSelected, indeterminate, selectedRowKeys, toggleSelection, toggleAll
<span
class="mx-auto block size-4 rounded-sm"
:style="{ backgroundColor: row.color }"
:title="row.color"
:aria-label="t('groups.page.colorLabel', { color: row.color })"
/>
</template>
@@ -42,7 +42,7 @@ async function logout() {
<ZPageHeader :title="t('usage.header.title')">
<template #description>
<span class="flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1.5">
<span class="min-w-0 truncate text-z font-semibold text-z-text" :title="name">
<span class="min-w-0 truncate text-z font-semibold text-z-text">
{{ name || t('usage.header.currentKey') }}
</span>
<span v-if="prefix" class="inline-flex shrink-0 items-center gap-1.5 rounded-z-sm bg-z-fill-tertiary px-2 py-0.5 text-z-text-secondary" :aria-label="t('usage.header.keyPrefix')">
@@ -36,11 +36,6 @@ const metrics = computed(() => [
: item.percentage
? `${item.value.toFixed(1)}%`
: formatCompactNumber(item.value),
exact: item.value === null
? '—'
: item.percentage
? `${item.value.toFixed(1)}%`
: formatInteger(item.value),
})))
</script>
@@ -85,7 +80,7 @@ const metrics = computed(() => [
<component :is="item.icon" class="size-4.5 shrink-0" :class="item.tone" aria-hidden="true" />
{{ item.label }}
</dt>
<dd class="mx-0 mt-5 mb-0 truncate font-mono text-2xl leading-[1.05] font-heavy tabular-nums text-z-text" :title="item.exact">
<dd class="mx-0 mt-5 mb-0 truncate font-mono text-2xl leading-[1.05] font-heavy tabular-nums text-z-text">
{{ item.display }}
</dd>
</div>
@@ -8,10 +8,10 @@ defineProps<{
<template>
<div class="grid min-w-0 gap-1">
<strong class="truncate text-z text-z-text" :title="apiKey.name">
<strong class="truncate text-z text-z-text">
{{ apiKey.name }}
</strong>
<span v-if="apiKey.label" class="truncate text-z-xs font-emphasis text-z-text-quaternary" :title="apiKey.label">
<span v-if="apiKey.label" class="truncate text-z-xs font-emphasis text-z-text-quaternary">
{{ apiKey.label }}
</span>
</div>
@@ -127,9 +127,6 @@ const columns = computed(() => defineTableColumns<KeyModelRow>([
<template #empty>
<span v-if="!error && result" class="text-z-sm text-z-text-secondary">{{ t('keys.statistics.empty') }}</span>
</template>
<template #costUsd="{ row, displayValue }">
<span :title="[row.totals.hasEstimatedCost && t('keys.statistics.includesEstimate'), row.totals.hasMissingCost && t('keys.statistics.knownCost')].filter(Boolean).join(' · ') || undefined">{{ displayValue }}</span>
</template>
</ZTable>
</div>
</template>
@@ -116,8 +116,8 @@ function loadMore(direction: string) {
>
<template #option="{ option }">
<ProviderIconGroup :platform-icon="(option as ReferenceAccountOption).platformIcon" :provider="(option as ReferenceAccountOption).provider" size="sm" class="shrink-0" />
<span class="min-w-0 truncate" :class="{ 'max-w-1/2 shrink-0': option.description }" :title="option.label">{{ option.label }}</span>
<span v-if="option.description" class="min-w-0 flex-1 truncate font-normal text-z-text-tertiary" :title="option.description">{{ option.description }}</span>
<span class="min-w-0 truncate" :class="{ 'max-w-1/2 shrink-0': option.description }">{{ option.label }}</span>
<span v-if="option.description" class="min-w-0 flex-1 truncate font-normal text-z-text-tertiary">{{ option.description }}</span>
</template>
<template v-if="error" #empty>
<div role="status" class="flex items-center justify-between gap-2 p-2 text-z-sm text-z-text-secondary">
+1 -1
View File
@@ -235,7 +235,7 @@ watch([showFormModal, showBatchEdit], ([editor, batch]) => {
<ApiKeyStatusBadge :api-key="row" />
</template>
<template #lastUsedAt="{ row }">
<LastUsedAtCell :value="row.lastUsedAt" :full-display="row.lastUsedAtFullDisplay" />
<LastUsedAtCell :value="row.lastUsedAt" />
</template>
<template #actions="{ row }">
<ApiKeyActions
@@ -82,7 +82,6 @@ watch(() => props.disabled, (value) => {
ref="trigger"
type="button"
:disabled="disabled"
:title="selectedAsset?.name"
:aria-label="selectedAsset ? t('plugins.assets.pluginPackage', { name: selectedAsset.name }) : t('plugins.assets.selectPluginPackage')"
aria-haspopup="listbox"
:aria-expanded="open"
@@ -112,7 +111,6 @@ watch(() => props.disabled, (value) => {
type="button"
role="option"
tabindex="-1"
:title="asset.name"
:aria-selected="selected === asset.name"
:disabled="disabled"
class="flex w-full min-w-0 items-center gap-3 rounded-z-sm border-0 px-3 py-2.5 text-left outline-none transition-colors focus-visible:ring-2 focus-visible:ring-z-control-outline focus-visible:ring-inset"
@@ -74,7 +74,7 @@ watch(() => hidden.value.length, (count) => {
</div>
</div>
<ZTag v-for="entry in visible" :key="entry.capability" size="small" :type="primary ? 'primary' : 'default'" class="shrink-0">
<span :title="`${entry.label} · ${entry.id}`">{{ entry.label }}</span>
<span>{{ entry.label }}</span>
</ZTag>
<ZPopover v-if="hidden.length" v-model="open" trigger="hover-click" placement="top" class="shrink-0">
<template #reference>
@@ -92,7 +92,7 @@ watch(() => hidden.value.length, (count) => {
</template>
<div :id="contentId" role="tooltip" class="flex max-w-72 flex-wrap gap-1.5 p-3">
<ZTag v-for="entry in hidden" :key="entry.capability" size="small" :type="primary ? 'primary' : 'default'">
<span :title="entry.id">{{ entry.label }}</span>
<span>{{ entry.label }}</span>
</ZTag>
</div>
</ZPopover>
@@ -136,7 +136,7 @@ const columns = computed(() => (defineTableColumns<(typeof rows.value)[number]>(
<div class="grid min-w-0 flex-1 gap-1">
<div class="flex min-w-0 items-center gap-2">
<strong class="truncate text-z-sm">{{ plugin.artifact.metadata.displayName }}</strong>
<ZTag size="small" class="shrink-0" :title="plugin.versionTitle" :aria-label="plugin.versionTitle">
<ZTag size="small" class="shrink-0" :aria-label="plugin.versionTitle">
<span class="block max-w-28 truncate">{{ plugin.versionLabel }}</span>
</ZTag>
</div>
@@ -168,7 +168,7 @@ const columns = computed(() => (defineTableColumns<(typeof rows.value)[number]>(
<div class="grid min-w-0 gap-1">
<div class="flex min-w-0 items-center gap-2">
<strong class="truncate">{{ row.artifact.metadata.displayName }}</strong>
<ZTag size="small" class="shrink-0" :title="row.versionTitle" :aria-label="row.versionTitle">
<ZTag size="small" class="shrink-0" :aria-label="row.versionTitle">
<span class="block max-w-28 truncate">{{ row.versionLabel }}</span>
</ZTag>
</div>
@@ -52,10 +52,10 @@ function openView(view: PluginManagementView) {
<Blocks class="size-4" />
</span>
<div class="min-w-0 flex-1">
<h2 class="m-0 truncate text-z-lg font-heavy text-z-text" :title="view.name">
<h2 class="m-0 truncate text-z-lg font-heavy text-z-text">
{{ view.name }}
</h2>
<p class="mt-1 mb-0 truncate font-mono text-z-xs text-z-text-quaternary" :title="view.target.instanceId">
<p class="mt-1 mb-0 truncate font-mono text-z-xs text-z-text-quaternary">
{{ t('plugins.extensions.configuration', { value: shortPluginInstanceId(view.target.instanceId) }) }}
</p>
</div>
@@ -620,7 +620,7 @@ watch(
{{ t('plugins.installation.parsingCompleted') }}
</span>
</div>
<p class="mt-1 mb-0 break-all font-mono text-z-xs text-z-text-secondary" :title="`SHA-256 ${verified.metadata.sha256}`">
<p class="mt-1 mb-0 break-all font-mono text-z-xs text-z-text-secondary">
{{ verified.metadata.pluginId }}
</p>
</div>
@@ -44,8 +44,8 @@ function toggle(id: string, checked: boolean) {
@update:model-value="toggle(credential.id, $event)"
/>
<span class="flex min-w-0 flex-1 items-center gap-3">
<strong class="max-w-[45%] shrink-0 truncate text-z-sm text-z-text" :title="credential.name">{{ credential.name }}</strong>
<span class="min-w-0 flex-1 truncate font-mono text-z-xs text-z-text-secondary" :title="`${credential.origin}${credential.pathPrefix}`">
<strong class="max-w-[45%] shrink-0 truncate text-z-sm text-z-text">{{ credential.name }}</strong>
<span class="min-w-0 flex-1 truncate font-mono text-z-xs text-z-text-secondary">
{{ credential.origin }}{{ credential.pathPrefix }}
</span>
</span>
@@ -60,12 +60,13 @@ onMounted(pushLayout)
<div v-if="!loadError && (loading || !frameReady)" class="absolute inset-0 z-10 flex bg-z-bg-layout">
<PluginPageLoading />
</div>
<!-- eslint-disable-next-line vue-a11y/iframe-has-title -- 嵌入页由 aria-label 命名,避免原生悬停提示 -->
<iframe
v-if="srcdoc && !loadError"
ref="iframe"
:key="frameKey"
:srcdoc="srcdoc"
:title="`${view.name}:${page.title}`"
:aria-label="`${view.name}:${page.title}`"
class="block w-full border-0 bg-transparent"
:style="{ height: `${Math.max(viewportHeight, contentHeight)}px` }"
:inert="!frameReady"
@@ -30,26 +30,14 @@ const label = computed(() => {
return t('proxies.region.parsingFailed')
return t('proxies.region.exitNotRecognized')
})
const description = computed(() => {
if (props.proxy.lastTest?.success === false)
return props.proxy.lastTest.message
const detection = props.proxy.lastTest?.location
if (detection?.status === 'failed')
return detection.message
if (detection?.status === 'conflict')
return t('proxies.region.ipv4AndIpv6EgressTimeZonesAre')
return location.value
? t('proxies.region.exitLocation', { label: label.value, timezone: location.value.timezone })
: t('proxies.region.detectHelp')
})
</script>
<template>
<span class="grid min-w-0 grid-cols-[1.125rem_minmax(0,1fr)] items-center gap-x-2 gap-y-1" :class="location ? 'text-z-text' : 'text-z-text-tertiary'" :title="description">
<span class="grid min-w-0 grid-cols-[1.125rem_minmax(0,1fr)] items-center gap-x-2 gap-y-1" :class="location ? 'text-z-text' : 'text-z-text-tertiary'">
<img v-if="flag" :src="flag" alt="" aria-hidden="true" class="size-4.5 shrink-0" loading="lazy" decoding="async">
<Globe v-else class="size-4 shrink-0 text-z-text-tertiary" aria-hidden="true" />
<span class="truncate">{{ label }}</span>
<span v-if="customLocation" class="col-start-2 truncate text-z-xs text-z-text-secondary" :title="t('proxies.region.customLocation', { customLabel, timezone: customLocation.timezone })">
<span v-if="customLocation" class="col-start-2 truncate text-z-xs text-z-text-secondary">
{{ t('proxies.region.custom', { customLabel }) }}
</span>
</span>
@@ -114,10 +114,10 @@ async function confirmAssignment() {
</template>
<template #identity="{ row }">
<div class="min-w-0">
<div class="truncate text-z font-heavy text-z-text" :title="row.name">
<div class="truncate text-z font-heavy text-z-text">
{{ row.name }}
</div>
<div v-if="row.email && row.email !== row.name" class="mt-0.5 truncate font-mono text-z-xs text-z-text-secondary" :title="row.email">
<div v-if="row.email && row.email !== row.name" class="mt-0.5 truncate font-mono text-z-xs text-z-text-secondary">
{{ row.email }}
</div>
</div>
@@ -135,7 +135,7 @@ async function confirmAssignment() {
</template>
<template #outboundProxy="{ row }">
<span v-if="row.outboundProxyId === proxy?.id" class="text-z-success-text">{{ t('proxies.assignment.alreadyAssigned') }}</span>
<span v-else class="block truncate text-z-xs text-z-text-secondary" :title="row.outboundProxyEndpoint ?? undefined">
<span v-else class="block truncate text-z-xs text-z-text-secondary">
{{ row.outboundProxyEndpoint || t('accounts.proxy.deploymentDefault') }}
</span>
</template>
@@ -141,10 +141,10 @@ watch([
{{ row.initial }}
</span>
<div class="min-w-0 flex-1">
<div class="truncate text-z font-heavy text-z-text" :title="row.name">
<div class="truncate text-z font-heavy text-z-text">
{{ row.displayName }}
</div>
<div v-if="row.email" class="mt-0.5 truncate font-mono text-z-xs font-emphasis text-z-text-quaternary" :title="row.email">
<div v-if="row.email" class="mt-0.5 truncate font-mono text-z-xs font-emphasis text-z-text-quaternary">
{{ row.email }}
</div>
</div>
@@ -74,13 +74,13 @@ const skipped = computed(() => additions.value.skipped + connections.value.skipp
<ZScrollbar max-height="min(26rem, 50dvh)" always-visible role="region" :aria-label="t('proxies.batchTest.scrollListOfProxyResults')">
<ol class="m-0 list-none space-y-1 p-0">
<li v-for="row in rows" :key="row.item.key" class="grid grid-cols-[minmax(0,1fr)_auto] gap-x-3 gap-y-1 rounded-z-sm px-3 py-2.5 odd:bg-z-fill-quaternary">
<span class="min-w-0 truncate font-mono text-z-xs text-z-text" :title="row.item.endpoint">{{ row.item.endpoint || t('proxies.batchTest.lineNumber', { key: row.item.key }) }}</span>
<span class="min-w-0 truncate font-mono text-z-xs text-z-text">{{ row.item.endpoint || t('proxies.batchTest.lineNumber', { key: row.item.key }) }}</span>
<span class="flex flex-wrap justify-end gap-x-2 text-z-xs" :class="row.tone">
<span v-if="row.test" class="text-z-text-secondary">{{ t('proxies.batchTest.addedStatus') }}</span>
<span>{{ row.label }}</span>
</span>
<div class="col-span-2 flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 text-z-xs text-z-text-secondary">
<span class="max-w-full truncate" :title="row.item.name">{{ row.item.name }}</span>
<span class="max-w-full truncate">{{ row.item.name }}</span>
<ProxyRegion v-if="row.test?.record" :proxy="row.test.record" class="max-w-full" />
<span v-if="row.test?.record?.lastTest" class="min-w-0 break-all font-mono">
<span class="whitespace-nowrap">{{ row.test.record.lastTest.latencyMs }} ms</span><span v-if="row.test.record.lastTest.exitIpv4"> · IPv4 {{ row.test.record.lastTest.exitIpv4 }}</span><span v-if="row.test.record.lastTest.exitIpv6"> · IPv6 {{ row.test.record.lastTest.exitIpv6 }}</span>
+8 -8
View File
@@ -115,12 +115,12 @@ watch(search, () => {
<ZCheckbox :model-value="selectedIds.has(row.id)" :disabled="batchTesting" :aria-label="t('proxies.page.selectProxy', { name: row.name })" @update:model-value="toggleSelection(row.id)" />
</template>
<template #name="{ row }">
<strong class="block truncate text-z text-z-text" :title="row.name">{{ row.name }}</strong>
<strong class="block truncate text-z text-z-text">{{ row.name }}</strong>
</template>
<template #address="{ row }">
<span class="flex min-w-0 items-center gap-1 text-z-xs font-emphasis text-z-text-quaternary">
<LockKeyhole v-if="row.hasAuthentication" class="size-3 shrink-0" :aria-label="t('proxies.page.credentialsSaved')" />
<span class="truncate font-mono" :title="row.endpoint">{{ row.endpoint }}</span>
<span class="truncate font-mono">{{ row.endpoint }}</span>
</span>
</template>
<template #status="{ row }">
@@ -130,20 +130,20 @@ watch(search, () => {
</template>
<template #exitIp="{ row }">
<div v-if="row.lastTest?.exitIpv4 && row.lastTest?.exitIpv6" class="flex flex-col gap-0.5 font-mono text-z-xs">
<span class="truncate" :title="`IPv4: ${row.lastTest.exitIpv4}`">
<span class="truncate">
{{ row.lastTest.exitIpv4 }}
</span>
<span class="truncate" :title="`IPv6: ${row.lastTest.exitIpv6}`">
<span class="truncate">
{{ row.lastTest.exitIpv6 }}
</span>
</div>
<div v-else-if="row.lastTest?.exitIpv4" class="truncate font-mono text-z-xs" :title="`IPv4: ${row.lastTest.exitIpv4}`">
<div v-else-if="row.lastTest?.exitIpv4" class="truncate font-mono text-z-xs">
{{ row.lastTest.exitIpv4 }}
</div>
<div v-else-if="row.lastTest?.exitIpv6" class="truncate font-mono text-z-xs" :title="`IPv6: ${row.lastTest.exitIpv6}`">
<div v-else-if="row.lastTest?.exitIpv6" class="truncate font-mono text-z-xs">
{{ row.lastTest.exitIpv6 }}
</div>
<span v-else-if="row.lastTest?.exitIp" class="block truncate font-mono text-z-xs" :title="row.lastTest.exitIp">{{ row.lastTest.exitIp }}</span>
<span v-else-if="row.lastTest?.exitIp" class="block truncate font-mono text-z-xs">{{ row.lastTest.exitIp }}</span>
<span v-else class="text-z-text-quaternary">-</span>
</template>
<template #region="{ row }">
@@ -154,7 +154,7 @@ watch(search, () => {
<span v-else-if="row.lastTest?.success" class="whitespace-nowrap tabular-nums text-z-success">
{{ row.lastTest.latencyMs }} ms
</span>
<span v-else-if="row.lastTest" class="text-z-error" :title="t('proxies.page.ms', { message: row.lastTest.message, latencyMs: row.lastTest.latencyMs })">{{ t('common.status.failed') }}</span>
<span v-else-if="row.lastTest" class="text-z-error">{{ t('common.status.failed') }}</span>
<span v-else class="text-z-text-quaternary">{{ t('proxies.page.notTested') }}</span>
</template>
<template #accounts="{ row }">

Some files were not shown because too many files have changed in this diff Show More