codex-copilot-dx 1.2.9 → 1.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/docs/ARCHITECTURE.md +60 -4
- package/docs/REFERENCE.md +63 -2
- package/package.json +1 -1
- package/src/adapter.mjs +2 -1
- package/src/claude-gateway.mjs +2 -1
- package/src/cli-m365.mjs +5 -0
- package/src/dashboard/animation.js +186 -0
- package/src/dashboard/console.js +35 -14
- package/src/dashboard/flow.js +171 -0
- package/src/dashboard/index.html +68 -54
- package/src/dashboard/language.js +88 -43
- package/src/dashboard/status.js +27 -14
- package/src/dashboard/time.js +16 -0
- package/src/dashboard/tools.js +7 -3
- package/src/dashboard/ui.css +80 -16
- package/src/dashboard/ui.js +66 -208
- package/src/dashboard/updates.js +3 -3
- package/src/dashboard/usage.js +2 -2
- package/src/dashboard-api.mjs +4 -2
- package/src/dashboard.mjs +3 -0
- package/src/optional-routes.mjs +1 -1
- package/src/provider-descriptors.mjs +24 -0
- package/src/provider-runtime.mjs +10 -22
- package/src/providers/m365-catalog-diagnostic.mjs +38 -0
- package/src/providers/m365.mjs +8 -3
- package/src/request-application.mjs +15 -0
- package/src/stream-performance.mjs +33 -2
|
@@ -1,13 +1,58 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
const translations = {
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
3
|
+
"prediction_first_setup": ["Quit Codex before first setup: ccdx prediction on", "首次配置前请退出 Codex:ccdx prediction on"],
|
|
4
|
+
"image_first_setup": ["First setup: ccdx enable-image", "首次配置:ccdx enable-image"],
|
|
5
|
+
"record_scope": ["Record scope", "记录范围"],
|
|
6
|
+
"estimated_percentiles": ["Approx. first-output P50 / P95", "首个输出 P50 / P95(约)"],
|
|
7
|
+
"percentile_values": ["{p50} / {p95} ms · {samples} samples", "{p50} / {p95} ms · {samples} 次样本"],
|
|
8
|
+
"percentile_basis": ["Estimated from histogram buckets since startup; includes partial-output failures.", "按本次运行的耗时分布估算,包含已有输出的失败请求。"],
|
|
9
|
+
"source_initial_review_saved": ["Source and initial review settings saved. Applies to new requests.", "来源及初始审查设置已保存,用于新的请求。"],
|
|
10
|
+
|
|
11
|
+
"request_flow": ["REQUEST FLOW", "请求流向"],
|
|
12
|
+
"flow_sources_models": ["Sources / models", "来源 / 模型"],
|
|
13
|
+
"flow_show_all": ["Show all", "显示全部"],
|
|
14
|
+
"flow_status_unknown": ["Waiting for a fresh status", "状态待更新"],
|
|
15
|
+
"flow_total": ["{count} active requests", "{count} 个请求进行中"],
|
|
16
|
+
"flow_idle": ["Idle", "空闲"],
|
|
17
|
+
"flow_no_active": ["Waiting for the next request", "等待下一次请求"],
|
|
18
|
+
"flow_last_observed": ["Last observed", "上次记录"],
|
|
19
|
+
"flow_active_requests": ["Active requests", "进行中的请求"],
|
|
20
|
+
"flow_active_count": ["Active requests · {count}", "进行中 · {count}"],
|
|
21
|
+
"flow_last_count": ["Last observed · {count}", "上次记录 · {count}"],
|
|
22
|
+
"flow_related_count": ["{count} related requests", "{count} 个相关请求"],
|
|
23
|
+
"flow_group_scope": ["{apps} apps · {models} models", "{apps} 个应用 · {models} 个模型"],
|
|
24
|
+
"flow_omitted": ["Showing {count} requests; {omitted} more have no detail", "显示 {count} 个请求,另有 {omitted} 个暂无详情"],
|
|
25
|
+
"flow_more_models": ["Show {count} more models", "显示其余 {count} 个模型"],
|
|
26
|
+
"flow_fewer_models": ["Show fewer models", "收起模型"],
|
|
27
|
+
"flow_app_codex_app": ["Codex App", "Codex App"],
|
|
28
|
+
"flow_app_codex_cli": ["Codex CLI", "Codex CLI"],
|
|
29
|
+
"flow_app_claude_app": ["Claude App", "Claude App"],
|
|
30
|
+
"flow_app_claude_code": ["Claude Code", "Claude Code"],
|
|
31
|
+
"flow_app_claude": ["Claude (app unspecified)", "Claude(未区分应用)"],
|
|
32
|
+
"flow_app_api": ["API client", "API 客户端"],
|
|
33
|
+
"flow_source_unknown": ["Source unknown", "来源未知"],
|
|
34
|
+
"flow_model_unknown": ["Model not identified", "未识别模型"],
|
|
35
|
+
"flow_responding": ["Responding", "响应中"],
|
|
36
|
+
"flow_group_response": ["{count} responding", "{count} 个响应中"],
|
|
37
|
+
"flow_waiting": ["Waiting for response", "等待响应"],
|
|
38
|
+
"flow_preparing": ["Preparing", "准备中"],
|
|
39
|
+
"flow_retrying": ["Retrying", "正在重试"],
|
|
40
|
+
"flow_finishing": ["Finishing delivery", "正在完成交付"],
|
|
41
|
+
"flow_elapsed": ["Elapsed", "已持续"],
|
|
42
|
+
"sign_in_status": ["Sign-in", "登录状态"],
|
|
43
|
+
"account_details": ["Account details", "账号详情"],
|
|
44
|
+
"preference_effect": ["{saved} · {state}", "{saved} · {state}"],
|
|
45
|
+
"model_details": ["Model details", "模型详情"],
|
|
46
|
+
"model_outcome": ["Model result", "模型结果"],
|
|
47
|
+
"attempts": ["Attempts", "尝试次数"],
|
|
48
|
+
"last_success": ["Last success", "最后成功"],
|
|
49
|
+
"request_http_failure": ["HTTP {status} · Failed", "请求失败 · HTTP {status}"],
|
|
50
|
+
"catalog_cause_sign_in_rejected": ["Microsoft 365 rejected the sign-in. Check account access.", "Microsoft 365 拒绝了登录,请检查账号权限。"],
|
|
51
|
+
"catalog_cause_entra_access_disabled": ["Copilot CLI Entra access is not enabled for this account.", "此账号尚未开通 Copilot CLI Entra 访问。"],
|
|
52
|
+
"catalog_cause_access_denied": ["Microsoft 365 denied access to the model list.", "Microsoft 365 拒绝访问模型列表。"],
|
|
53
|
+
"catalog_cause_rate_limited": ["Model-list checks are limited. Try again later.", "模型列表检查过于频繁,请稍后再试。"],
|
|
54
|
+
"catalog_cause_service_unavailable": ["Microsoft 365 could not serve the model list.", "Microsoft 365 暂时无法提供模型列表。"],
|
|
55
|
+
"catalog_cause_catalog_rejected": ["Microsoft 365 rejected the model-list request.", "Microsoft 365 拒绝了模型列表请求。"],
|
|
11
56
|
"current_source": ["Current source", "当前来源"],
|
|
12
57
|
"connection_setup": ["Setup", "接入配置"],
|
|
13
58
|
"configured_not_successful": ["Configured does not mean a request succeeded.", "已配置,不代表请求已成功。"],
|
|
@@ -16,13 +61,13 @@
|
|
|
16
61
|
"request_performance": ["REQUEST PERFORMANCE", "请求表现"],
|
|
17
62
|
"status_and_repair": ["Status and repair", "状态与修复"],
|
|
18
63
|
"local_service_not_app": ["Local service status does not confirm the app is open.", "本地服务运行,不代表应用已打开。"],
|
|
19
|
-
"claude_shared_source": ["
|
|
64
|
+
"claude_shared_source": ["Shared by Claude Code and Claude App.", "Claude Code 与 Claude App 共用此来源。"],
|
|
20
65
|
"manage_source_account": ["Manage source and account", "管理来源与账号"],
|
|
21
66
|
"connection_details": ["Connection details", "连接详情"],
|
|
22
|
-
"messages_combined_since_start": ["
|
|
23
|
-
"claude_metrics_combined": ["
|
|
67
|
+
"messages_combined_since_start": ["Both Claude apps · This service run", "两款应用合计 · 本次运行"],
|
|
68
|
+
"claude_metrics_combined": ["Both Claude apps", "两款应用合计"],
|
|
24
69
|
"source_access_details": ["SOURCE ACCESS DETAILS", "来源访问详情"],
|
|
25
|
-
"account_access": ["
|
|
70
|
+
"account_access": ["Account & access", "账号与访问"],
|
|
26
71
|
"account_management_location": ["Manage sign-in, accounts and models under Model sources.", "登录、账号和模型在来源页管理。"],
|
|
27
72
|
"check_github_connection": ["Check GitHub connection", "检查 GitHub 连接"],
|
|
28
73
|
"view_m365_account": ["View M365 account", "查看 M365 账号"],
|
|
@@ -30,7 +75,7 @@
|
|
|
30
75
|
"diagnostic_report": ["Diagnostic report", "诊断报告"],
|
|
31
76
|
"runtime_details": ["RUNTIME DETAILS", "运行详情"],
|
|
32
77
|
"startup_preferences": ["STARTUP", "启动行为"],
|
|
33
|
-
"source_entire_page": ["Source
|
|
78
|
+
"source_entire_page": ["Source", "来源"],
|
|
34
79
|
"refresh_usage": ["Refresh usage", "刷新用量"],
|
|
35
80
|
"usage_totals": ["USAGE TOTALS", "用量汇总"],
|
|
36
81
|
"model_both_charts": ["Model / both charts", "模型 / 作用于两张图"],
|
|
@@ -39,7 +84,7 @@
|
|
|
39
84
|
"request_metadata": ["Request metadata", "请求技术信息"],
|
|
40
85
|
"cancel": ["Cancel", "取消"],
|
|
41
86
|
"tools_checks_title": ["Checks & repairs", "检查与修复"],
|
|
42
|
-
"tools_source_browse": ["
|
|
87
|
+
"tools_source_browse": ["Browse source", "查看来源"],
|
|
43
88
|
"tools_saved_account": ["Saved GitHub sign-in", "已保存 GitHub 登录"],
|
|
44
89
|
"tools_not_signed_in": ["Not signed in", "尚未登录"],
|
|
45
90
|
"tools_signin_invalid": ["Sign-in invalid", "登录已失效"],
|
|
@@ -49,7 +94,7 @@
|
|
|
49
94
|
"tools_login_hint": ["Sign in to check Copilot access and models.", "登录后检查 Copilot 权限和模型。"],
|
|
50
95
|
"tools_saved_not_valid": ["A saved sign-in does not confirm current access.", "保存过登录,不代表当前仍可用。"],
|
|
51
96
|
"tools_access_hint": ["Check access or network settings before changing sign-in.", "先检查权限或网络,再决定是否重新登录。"],
|
|
52
|
-
"tools_account_hint": ["
|
|
97
|
+
"tools_account_hint": ["Check connection to verify access.", "检查连接可确认访问权限。"],
|
|
53
98
|
"tools_saved_signin": ["Saved sign-in", "本地登录"],
|
|
54
99
|
"tools_github_identity": ["GitHub identity", "GitHub 身份"],
|
|
55
100
|
"tools_copilot_access": ["Copilot access", "Copilot 权限"],
|
|
@@ -60,7 +105,7 @@
|
|
|
60
105
|
"tools_logout": ["Sign out of CCDX", "退出 CCDX 登录"],
|
|
61
106
|
"tools_logout_scope": ["Other apps stay signed in.", "不会退出其他应用的登录。"],
|
|
62
107
|
"tools_logout_confirm": ["Sign out of CCDX? New requests will need a sign-in. Other apps stay signed in.", "退出 CCDX 登录?新请求需要重新登录。其他应用不受影响。"],
|
|
63
|
-
"tools_no_inference": ["
|
|
108
|
+
"tools_no_inference": ["No model calls", "不调用模型"],
|
|
64
109
|
"tools_waiting": ["Waiting for GitHub", "等待 GitHub 授权"],
|
|
65
110
|
"tools_verifying": ["Verifying account and models", "正在检查账号和模型"],
|
|
66
111
|
"tools_device_instructions": ["Open GitHub, enter this code, and authorize CCDX.", "打开 GitHub,输入代码并授权。"],
|
|
@@ -77,10 +122,10 @@
|
|
|
77
122
|
"tools_reauth_hint": ["GitHub rejected this sign-in. Sign in again.", "GitHub 拒绝了当前登录,请重新登录。"],
|
|
78
123
|
"tools_access_denied": ["GitHub sign-in is valid. Check your Copilot access or company policy.", "GitHub 登录有效。请检查 Copilot 权限或公司策略。"],
|
|
79
124
|
"tools_network_hint": ["Connection could not be verified. Check network settings; saved sign-in is kept.", "连接未能验证。请检查网络,原登录已保留。"],
|
|
80
|
-
"tools_local_scope": ["Local checks
|
|
125
|
+
"tools_local_scope": ["Local checks only", "仅检查本机"],
|
|
81
126
|
"tools_check_local": ["Check this computer", "本机检查"],
|
|
82
127
|
"tools_export_report": ["Export report", "导出报告"],
|
|
83
|
-
"tools_checks_empty": ["Run a check to see
|
|
128
|
+
"tools_checks_empty": ["Run a local check to see results.", "运行本机检查后查看结果。"],
|
|
84
129
|
"tools_checks_completed": ["Local checks completed at {time}.", "本机检查完成于 {time}。"],
|
|
85
130
|
"tools_check_item": ["Check", "检查项"],
|
|
86
131
|
"tools_github_signin": ["GitHub sign-in", "GitHub 登录"],
|
|
@@ -90,7 +135,7 @@
|
|
|
90
135
|
"tools_needs_attention": ["Needs attention", "需要处理"],
|
|
91
136
|
"tools_observed": ["Recorded", "已记录"],
|
|
92
137
|
"tools_codex_connection": ["Codex connection", "Codex 连接"],
|
|
93
|
-
"tools_config_scope": ["Review
|
|
138
|
+
"tools_config_scope": ["Review changes before repairing.", "先预览改动,再决定是否修复。"],
|
|
94
139
|
"tools_review_repair": ["Review repair", "查看修复"],
|
|
95
140
|
"tools_repair_preview": ["Repair preview", "修复预览"],
|
|
96
141
|
"tools_managed_fields": ["Managed fields", "管理字段"],
|
|
@@ -102,8 +147,8 @@
|
|
|
102
147
|
"tools_network_check": ["Network settings", "网络设置"],
|
|
103
148
|
"tools_network_read_only": ["Network settings read. Proxy and certificate policies are unchanged.", "已读取网络设置,代理和证书策略保持不变。"],
|
|
104
149
|
"tools_compatibility": ["Model compatibility", "模型兼容性"],
|
|
105
|
-
"tools_compatibility_scope": ["
|
|
106
|
-
"tools_report_scope": ["
|
|
150
|
+
"tools_compatibility_scope": ["Sends model requests and uses quota. Run in your terminal.", "会调用模型并消耗额度,请在终端执行。"],
|
|
151
|
+
"tools_report_scope": ["Excludes credentials, account details and chat content.", "不含凭据、账号详情和对话内容。"],
|
|
107
152
|
"tools_report_saved": ["Report exported. Share it only with people you trust.", "报告已导出,请仅分享给可信的人。"],
|
|
108
153
|
"tools_read_failed": ["Could not read tool status. Restart the updated CCDX service.", "无法读取工具状态,请重启新版 CCDX。"],
|
|
109
154
|
"tools_action_failed": ["Could not complete the action. Existing settings were preserved where possible.", "操作未完成,请查看当前状态。"],
|
|
@@ -147,15 +192,15 @@
|
|
|
147
192
|
"update_attempted_time": ["Last attempt: {time}", "最近尝试:{time}"],
|
|
148
193
|
"update_install_help": ["Update failed? View full installation commands", "更新遇到问题?查看完整安装指令"],
|
|
149
194
|
"installation_platform": ["Installation platform", "安装平台"],
|
|
150
|
-
"update_install_hint": ["
|
|
151
|
-
"update_install_policy": ["
|
|
152
|
-
"update_windows_policy": ["If scripts are blocked, use your company
|
|
195
|
+
"update_install_hint": ["Full installation commands · No Git required", "完整安装指令 · 无需 Git"],
|
|
196
|
+
"update_install_policy": ["Installs a private runtime if Node/npm is missing. Keeps registry, proxy, certificates and script policy.", "缺少 Node/npm 时安装专用运行环境。\n保留镜像、代理、证书和脚本策略。"],
|
|
197
|
+
"update_windows_policy": ["If scripts are blocked, use your company-approved installation method.", "脚本受限时,请使用公司批准的安装方式。"],
|
|
153
198
|
"update_copy_unavailable": ["Clipboard unavailable. Select the command and copy it.", "无法自动复制,请选中指令复制。"],
|
|
154
199
|
"company_account": ["Company account", "公司账号"],
|
|
155
200
|
"check_accounts": ["Check accounts", "检查账号"],
|
|
156
201
|
"choose_company_account": ["Choose a company account", "选择公司账号"],
|
|
157
202
|
"use_this_account": ["Use this account", "使用此账号"],
|
|
158
|
-
"company_account_scope": ["
|
|
203
|
+
"company_account_scope": ["Shared by Codex and Claude. Start a new conversation after switching.", "供 Codex 和 Claude 共用。切换后请新建对话。"],
|
|
159
204
|
"company_account_current": ["{login} · Tenant {tenant} · {source}", "{login}\n租户:{tenant} · {source}"],
|
|
160
205
|
"account_source_windows": ["Windows sign-in", "Windows 登录账号"],
|
|
161
206
|
"account_source_single": ["Only company account", "唯一公司账号"],
|
|
@@ -190,7 +235,7 @@
|
|
|
190
235
|
"appearance_terminal_scope": ["Independent of the webpage theme.", "与网页主题分别设置。"],
|
|
191
236
|
"appearance_terminal_effect": ["Table updates now. Startup logo changes next launch.", "表格即时换色,启动 Logo 下次生效。"],
|
|
192
237
|
"appearance_sample": ["Sample data", "示例数据"],
|
|
193
|
-
"theme_saved_browser": ["
|
|
238
|
+
"theme_saved_browser": ["This browser only. Applies immediately.", "仅当前浏览器,立即生效。"],
|
|
194
239
|
"theme_tab_only": ["This tab only. Browser storage is unavailable.", "本次有效,浏览器未能保存。"],
|
|
195
240
|
"terminal_theme_applied": ["Table updated. Startup logo changes next launch.", "表格已换色,启动 Logo 下次生效。"],
|
|
196
241
|
"terminal_theme_unavailable": ["Saved. Colored output is unavailable in this terminal mode.", "已保存,当前终端模式不显示配色。"],
|
|
@@ -222,11 +267,11 @@
|
|
|
222
267
|
"prediction_integration_setup": ["Suggestion setup", "建议设置"],
|
|
223
268
|
"visible_status_updates_every_2_seconds_catalogs_and_retained_usa": ["Visible status updates every 2 seconds. Catalogs and retained usage refresh on demand or every 30 minutes while open.", "可见状态每2秒更新。\n列表和留存用量按需更新,\n展开时每30分钟刷新。"],
|
|
224
269
|
"request_records": ["Requests", "请求记录"],
|
|
225
|
-
"source_changes_new_requests": ["
|
|
270
|
+
"source_changes_new_requests": ["Applies to new requests after saving.", "保存后用于新的请求。"],
|
|
226
271
|
"conversation_model": ["Conversation model", "对话模型"],
|
|
227
272
|
"github_model_in_codex": ["Choose your conversation model in Codex.", "在 Codex 中选择对话模型。"],
|
|
228
273
|
"auto_review_settings": ["AUTO REVIEW", "自动审查"],
|
|
229
|
-
"review_uses_selected_source": ["
|
|
274
|
+
"review_uses_selected_source": ["Uses the selected source above.", "使用上方选定的来源。"],
|
|
230
275
|
"thinking_level": ["Thinking level", "思考强度"],
|
|
231
276
|
"follow_client": ["Follow Codex (low if omitted)", "跟随 Codex(未指定时用 low)"],
|
|
232
277
|
"save_review": ["Save review settings", "保存审查设置"],
|
|
@@ -252,12 +297,12 @@
|
|
|
252
297
|
"allow_new_image_calls": ["Allow image requests", "图片生成"],
|
|
253
298
|
"allow_prediction_configuration": ["Allow suggestion updates", "建议更新"],
|
|
254
299
|
"check_and_repair": ["Check and repair", "检查修复"],
|
|
255
|
-
"temporary_local_data_for_responses_continuation_not_a_conversati": ["
|
|
300
|
+
"temporary_local_data_for_responses_continuation_not_a_conversati": ["Temporary reply continuation, not a chat archive.", "用于续接回复,不是聊天归档。"],
|
|
256
301
|
"buffer_limit_mib": ["Buffer limit (MiB)", "暂存上限 MiB"],
|
|
257
302
|
"apply_limit": ["Save limit", "保存上限"],
|
|
258
303
|
"clear_inactive_buffer": ["Clear conversation buffer", "清空暂存"],
|
|
259
|
-
"pause_keeps_the_provider_configuration_running_calls_can_finish_": ["
|
|
260
|
-
"pause_keeps_the_existing_trust_and_route_codex_may_retain_cached": ["
|
|
304
|
+
"pause_keeps_the_provider_configuration_running_calls_can_finish_": ["Existing image requests can finish after pausing.", "关闭后,已开始的生成仍会完成。"],
|
|
305
|
+
"pause_keeps_the_existing_trust_and_route_codex_may_retain_cached": ["Pausing keeps setup; cached suggestions may remain.", "暂停保留设置;已有建议仍可能显示。"],
|
|
261
306
|
"service_settings": ["SERVICE SETTINGS", "服务设置"],
|
|
262
307
|
"saved_preference_and_effective_state_are_separate_environment_ov": ["Saved choices and current behavior are shown separately. Startup overrides and required restarts are listed.", "已保存与已生效分别显示。\n启动限制与重启要求会注明。"],
|
|
263
308
|
"terminal_animation": ["Terminal animation", "终端动效"],
|
|
@@ -273,10 +318,10 @@
|
|
|
273
318
|
"process_listener": ["LOCAL SERVICE", "本机服务"],
|
|
274
319
|
"http_traffic": ["SERVICE REQUESTS", "服务请求"],
|
|
275
320
|
"this_run_usage": ["THIS RUN", "本次用量"],
|
|
276
|
-
"updated_from_returned_usage_not_a_live_bill_pending_usage_is_not": ["
|
|
321
|
+
"updated_from_returned_usage_not_a_live_bill_pending_usage_is_not": ["Returned usage only.", "仅统计已返回用量。"],
|
|
277
322
|
"applies_to_the_running_terminal": ["Updates the running terminal.", "保存后更新当前终端。"],
|
|
278
323
|
"recent_inference_http_failures": ["RECENT REQUEST ISSUES", "近期异常"],
|
|
279
|
-
"codex_responses_timing_since_startup_output_speed_is_estimated": ["
|
|
324
|
+
"codex_responses_timing_since_startup_output_speed_is_estimated": ["This service run · Estimated output speed", "本次运行 · 输出速度为估算"],
|
|
280
325
|
"service_reachable": ["CONNECTED LOCALLY", "已连本机"],
|
|
281
326
|
"saved_choice_applies_to_the_running_terminal": ["Saving updates the running terminal.", "保存后更新当前终端。"],
|
|
282
327
|
"effective_now": ["Active now", "已生效"],
|
|
@@ -339,7 +384,7 @@
|
|
|
339
384
|
"local_bridge": ["Local service", "本机服务"],
|
|
340
385
|
"client_route": ["App settings requests", "应用请求"],
|
|
341
386
|
"visible_candidate": ["Suggestion displayed", "建议显示"],
|
|
342
|
-
"configured_does_not_mean_displayed_use_ccdx_prediction_status_fo": ["
|
|
387
|
+
"configured_does_not_mean_displayed_use_ccdx_prediction_status_fo": ["Check suggestion status: ccdx prediction status", "检查建议状态:ccdx prediction status"],
|
|
343
388
|
"enabled": ["Enabled", "已开启"],
|
|
344
389
|
"disabled": ["Disabled", "已关闭"],
|
|
345
390
|
"running_f4cca": ["Running", "运行中"],
|
|
@@ -392,8 +437,8 @@
|
|
|
392
437
|
"outcome": ["RESULT", "结果"],
|
|
393
438
|
"unknown": ["Unknown", "未知状态"],
|
|
394
439
|
"no_observed_request_metadata": ["No request records yet.", "暂未收到请求记录。"],
|
|
395
|
-
"20_latest_finished_requests_compactions_completed_completed_inco": ["Last 20 finished requests
|
|
396
|
-
"recent_upstream_request_metadata_not_exact_live_session_occupanc": ["
|
|
440
|
+
"20_latest_finished_requests_compactions_completed_completed_inco": ["Last 20 finished requests · Compaction: {completed} completed · {incomplete} incomplete · {failed} failed", "最近 20 次已结束请求 · 上下文压缩:完成 {completed} · 未完成 {incomplete} · 失败 {failed}"],
|
|
441
|
+
"recent_upstream_request_metadata_not_exact_live_session_occupanc": ["No prompts or images are stored. — means unavailable data.", "不保存提问或图片。— 表示数据未知。"],
|
|
397
442
|
"runtime_details": ["Runtime details", "运行详情"],
|
|
398
443
|
"adapter": ["SERVICE", "服务状态"],
|
|
399
444
|
"known_models": ["MODEL COUNT", "模型数量"],
|
|
@@ -404,7 +449,7 @@
|
|
|
404
449
|
"incomplete": ["Incomplete", "未完成"],
|
|
405
450
|
"failed": ["Failed", "失败"],
|
|
406
451
|
"cancelled": ["Cancelled", "已取消"],
|
|
407
|
-
"http_2xx_model_completed": ["HTTP
|
|
452
|
+
"http_2xx_model_completed": ["HTTP status and model outcome are recorded separately.", "HTTP 状态与模型结果分别记录。"],
|
|
408
453
|
"local_history": ["LOCAL HISTORY", "对话暂存"],
|
|
409
454
|
"active_limit": ["STORAGE LIMIT", "暂存上限"],
|
|
410
455
|
"history_cache_usage": ["Local history usage", "对话暂存"],
|
|
@@ -445,7 +490,7 @@
|
|
|
445
490
|
"api": ["CONNECTION TYPE", "连接方式"],
|
|
446
491
|
"flag": ["STAGE", "阶段"],
|
|
447
492
|
"loading": ["Loading…", "加载中"],
|
|
448
|
-
"catalog_listing_does_not_guarantee_inference_access": ["
|
|
493
|
+
"catalog_listing_does_not_guarantee_inference_access": ["Models listed; inference access not verified.", "模型已列出,推理权限尚未验证。"],
|
|
449
494
|
"usage_by_model": ["Model usage", "模型用量"],
|
|
450
495
|
"usage": ["MODEL USAGE", "模型用量"],
|
|
451
496
|
"reading_log": ["COUNTING", "统计中"],
|
|
@@ -457,7 +502,7 @@
|
|
|
457
502
|
"output": ["OUTPUT USAGE", "输出用量"],
|
|
458
503
|
"total": ["TOTAL", "总用量"],
|
|
459
504
|
"cache_hit": ["REUSE RATE", "复用比例"],
|
|
460
|
-
"cache_hit_recorded_cached_input_tokens_incomplete_history_unavai": ["Unit: Token.
|
|
505
|
+
"cache_hit_recorded_cached_input_tokens_incomplete_history_unavai": ["Unit: Token. Reuse is included in input. ~ Partial; — Unknown.", "单位 Token;复用已计入输入。~ 为部分记录,— 为未知。"],
|
|
461
506
|
"usage_analytics": ["USAGE TRENDS", "用量趋势"],
|
|
462
507
|
"model_5e2c6": ["Model", "模型"],
|
|
463
508
|
"all_models": ["All models", "全部模型"],
|
|
@@ -468,7 +513,7 @@
|
|
|
468
513
|
"activity": ["Measure", "统计内容"],
|
|
469
514
|
"calls_b73a5": ["Requests", "请求次数"],
|
|
470
515
|
"tokens": ["Usage (Token)", "处理用量"],
|
|
471
|
-
"open_to_read_retained_usage_history": ["
|
|
516
|
+
"open_to_read_retained_usage_history": ["Loading usage trends…", "读取用量趋势中…"],
|
|
472
517
|
"daily_tokens": ["DAILY USAGE", "每日用量"],
|
|
473
518
|
"input_output_cache_included_in_input": ["INPUT + OUTPUT / REUSED INPUT IS PART OF INPUT", "输入与输出合计。\n复用部分已计入输入。"],
|
|
474
519
|
"daily_token_usage": ["Daily usage in Token", "每日用量"],
|
|
@@ -476,12 +521,12 @@
|
|
|
476
521
|
"output_b2439": ["Output usage", "输出用量"],
|
|
477
522
|
"request_activity_365_days": ["ACTIVITY · LAST 365 DAYS", "活跃日历"],
|
|
478
523
|
"daily_recorded_request_activity": ["Daily recorded activity over 365 days", "每日活跃"],
|
|
479
|
-
"select_a_day_to_inspect_its_model_totals_no_history_is_distinct_": ["Select a day for
|
|
524
|
+
"select_a_day_to_inspect_its_model_totals_no_history_is_distinct_": ["Select a day for usage. Blank means no records.", "点击日期查看当天用量。空白表示无记录。"],
|
|
480
525
|
"recent_failures": ["Recent issues", "异常记录"],
|
|
481
526
|
"recent_response_failures": ["RECENT ISSUES", "异常记录"],
|
|
482
527
|
"reading_874bf": ["Reading…", "读取中"],
|
|
483
528
|
"reading_status": ["Reading status…", "读取中"],
|
|
484
|
-
"upstream_messages_may_contain_sensitive_text": ["
|
|
529
|
+
"upstream_messages_may_contain_sensitive_text": ["Review private information before sharing error details.", "分享错误详情前,请检查其中的隐私信息。"],
|
|
485
530
|
"terminal_animation_9edf6": ["TERMINAL ANIMATION", "终端动效"],
|
|
486
531
|
"animation_theme": ["Animation style", "动效样式"],
|
|
487
532
|
"save_selection": ["Save animation", "保存动效"],
|
|
@@ -627,7 +672,7 @@
|
|
|
627
672
|
"no_requests_observed": ["No requests observed.", "尚未收到请求。"],
|
|
628
673
|
"protocol": ["Protocol", "请求接口"],
|
|
629
674
|
"active": ["Active", "进行中"],
|
|
630
|
-
"results_since_startup_partial_usage_is_marked_separately": ["
|
|
675
|
+
"results_since_startup_partial_usage_is_marked_separately": ["This service run", "本次运行"],
|
|
631
676
|
"claude_code_code_claude_app_app": ["Claude Code: {code} / Claude App: {app}", "Claude Code:{code}\nClaude App:{app}"],
|
|
632
677
|
};
|
|
633
678
|
// Compatibility for runtime state names and server diagnostic messages.
|
package/src/dashboard/status.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(() => {
|
|
2
|
-
function create({ element, phrase, localize, text, finite, number, mib, tableRow, emptyTable, document, navigator }) {
|
|
2
|
+
function create({ time, element, phrase, localize, text, finite, number, mib, tableRow, emptyTable, document, navigator }) {
|
|
3
3
|
let contextRequests = [];
|
|
4
4
|
let contextCompactions = {};
|
|
5
5
|
let failureSignature;
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
sourceNames.set(provider.id, provider.name);
|
|
20
20
|
const identity = provider.auth || {};
|
|
21
21
|
const authRow = tableRow([provider.name, identity.account || "—", states[identity.state] || "unknown",
|
|
22
|
-
states[provider.state] || "unknown", identity.checked_at
|
|
22
|
+
states[provider.state] || "unknown", time(identity.checked_at, { date: true }), duration(identity.expires_in_ms)], { labels: [2, 3] });
|
|
23
23
|
authRow.setAttribute("data-provider", provider.id);
|
|
24
24
|
if (provider.reason) {
|
|
25
|
-
const network = provider.network_diagnostic;
|
|
25
|
+
const network = provider.network_diagnostic, catalog = provider.catalog_diagnostic;
|
|
26
26
|
localize(authRow.children[3], "state_reason", { state: phrase(states[provider.state] || "unknown"),
|
|
27
|
-
reason: network ? phrase(`network_cause_${network.cause_code}`) : provider.reason });
|
|
27
|
+
reason: catalog ? phrase(`catalog_cause_${catalog.cause_code}`) : network ? phrase(`network_cause_${network.cause_code}`) : provider.reason });
|
|
28
28
|
if (network) localize(authRow.children[3], "network_detail", { source: phrase(`network_source_${network.source}`),
|
|
29
29
|
stage: phrase(`network_stage_${network.stage}`), code: network.cause_code, category: provider.reason }, "title");
|
|
30
30
|
}
|
|
31
31
|
if (globalThis.ccdxIcons) {
|
|
32
32
|
globalThis.ccdxIcons.set(authRow.children[2], states[identity.state] || "unknown", globalThis.ccdxIcons.kind(identity.state));
|
|
33
33
|
globalThis.ccdxIcons.set(authRow.children[3], provider.reason ? "state_reason" : states[provider.state] || "unknown", globalThis.ccdxIcons.kind(provider.state),
|
|
34
|
-
provider.reason ? { state: phrase(states[provider.state] || "unknown"), reason: provider.network_diagnostic ? phrase(`network_cause_${provider.network_diagnostic.cause_code}`) : provider.reason } : {});
|
|
34
|
+
provider.reason ? { state: phrase(states[provider.state] || "unknown"), reason: provider.catalog_diagnostic ? phrase(`catalog_cause_${provider.catalog_diagnostic.cause_code}`) : provider.network_diagnostic ? phrase(`network_cause_${provider.network_diagnostic.cause_code}`) : provider.reason } : {});
|
|
35
35
|
}
|
|
36
36
|
auth.append(authRow);
|
|
37
37
|
for (const client of provider.clients || []) {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
const selected = entries.find(entry => entry.client.selected === true) || (entries.length === 1 ? entries[0] : null);
|
|
51
51
|
const client = selected?.client || { name: entries[0].client.name, state: "unknown" };
|
|
52
52
|
const row = tableRow([client.name, selected?.provider.name || "—", states[client.state] || "unknown",
|
|
53
|
-
client.gateway || "—", client.last_request_at
|
|
53
|
+
client.gateway || "—", time(client.last_request_at)], { labels: [2, 3] });
|
|
54
54
|
if (client.reason) localize(row.children[2], "state_reason", { state: phrase(states[client.state] || "unknown"), reason: client.reason });
|
|
55
55
|
if (globalThis.ccdxIcons) {
|
|
56
56
|
globalThis.ccdxIcons.set(row.children[2], client.reason ? "state_reason" : states[client.state] || "unknown", globalThis.ccdxIcons.kind(client.state), client.reason ? { state: phrase(states[client.state] || "unknown"), reason: client.reason } : {});
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
}
|
|
59
59
|
clients.append(row);
|
|
60
60
|
if (String(client.id || "").startsWith("claude_")) {
|
|
61
|
-
const detail = tableRow([client.name, states[client.state] || "unknown", client.gateway || "—", client.last_request_at
|
|
61
|
+
const detail = tableRow([client.name, states[client.state] || "unknown", client.gateway || "—", time(client.last_request_at)], { labels: [1, 2] });
|
|
62
62
|
if (client.reason) localize(detail.children[1], "state_reason", { state: phrase(states[client.state] || "unknown"), reason: client.reason });
|
|
63
63
|
if (globalThis.ccdxIcons) {
|
|
64
64
|
globalThis.ccdxIcons.set(detail.children[1], client.reason ? "state_reason" : states[client.state] || "unknown", globalThis.ccdxIcons.kind(client.state), client.reason ? { state: phrase(states[client.state] || "unknown"), reason: client.reason } : {});
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
const title = document.createElement("summary");
|
|
120
120
|
const summary = {
|
|
121
121
|
detail: phrase("time_model_code", {
|
|
122
|
-
time: failure.at ?
|
|
122
|
+
time: failure.at ? time(failure.at, { date: true }) : phrase("unknown_time"),
|
|
123
123
|
model: failure.model ? String(failure.model).slice(0, 80) : phrase("unknown_model"),
|
|
124
124
|
code: failure.code ? String(failure.code).slice(0, 80) : phrase("unknown_error"),
|
|
125
125
|
}),
|
|
@@ -173,7 +173,9 @@
|
|
|
173
173
|
localize(copy, "copied");
|
|
174
174
|
} catch { localize(copy, "copy_unavailable"); }
|
|
175
175
|
});
|
|
176
|
-
|
|
176
|
+
const privacy = document.createElement("p");privacy.className = "hint";
|
|
177
|
+
localize(privacy, "upstream_messages_may_contain_sensitive_text");
|
|
178
|
+
details.append(title, diagnostic, privacy, copy);
|
|
177
179
|
item.append(details);
|
|
178
180
|
list.append(item);
|
|
179
181
|
}
|
|
@@ -181,6 +183,7 @@
|
|
|
181
183
|
|
|
182
184
|
function render(data) {
|
|
183
185
|
globalThis.ccdxDashboardActivity?.update(data.model_activity);
|
|
186
|
+
globalThis.ccdxDashboardFlow?.update(data);
|
|
184
187
|
text("version", `v${data.version || "?"}`);
|
|
185
188
|
text("uptime", "pid_pid_uptime_duration", { pid: number(data.pid), duration: duration(data.uptime_ms) });
|
|
186
189
|
|
|
@@ -199,6 +202,11 @@
|
|
|
199
202
|
const outcomes = data.stream_performance?.by_route?.responses?.terminal_outcomes?.totals || {};
|
|
200
203
|
for (const key of ["completed", "incomplete", "failed", "cancelled"]) text(key, number(outcomes[key]));
|
|
201
204
|
const timing = data.stream_performance?.by_route?.responses || {};
|
|
205
|
+
function percentiles(id, metric) {
|
|
206
|
+
const valid = metric?.samples > 0 && metric.percentiles_estimated === true && finite(metric.p50) && finite(metric.p95);
|
|
207
|
+
text(id, valid ? "percentile_values" : "—", valid ? { p50: Number(metric.p50).toFixed(0), p95: Number(metric.p95).toFixed(0), samples: number(metric.samples) } : {});
|
|
208
|
+
}
|
|
209
|
+
percentiles("ttft-percentiles", timing.ttft_ms);
|
|
202
210
|
for (const [id, metric, scale, unit] of [["ttft", timing.ttft_ms, 1, "ms"], ["tpot", timing.output_tokens_per_second, 1, "token/s"]]) {
|
|
203
211
|
const value = metric?.samples > 0 && finite(metric.avg) ? `${(Number(metric.avg) / scale).toFixed(1)} ${unit}` : "—";
|
|
204
212
|
text(id, "value_samples_samples", { value, samples: number(metric?.samples) });
|
|
@@ -218,13 +226,14 @@
|
|
|
218
226
|
: "setup_state_unknown_ccdx_image_status", { active: number(image?.active), failed: number(image?.failed), delivery: number(image?.delivery_failures) });
|
|
219
227
|
|
|
220
228
|
const claude = data.providers?.m365?.claude, claudeMetrics = claude?.requests?.performance;
|
|
229
|
+
percentiles("claude-ttft-percentiles", claudeMetrics?.by_route?.messages?.ttft_ms);
|
|
221
230
|
const sourceBody = element("source-requests-body");
|
|
222
231
|
if (sourceBody) {
|
|
223
232
|
sourceBody.replaceChildren();
|
|
224
233
|
const routes = { ...data.stream_performance?.by_route, ...claudeMetrics?.by_route };
|
|
225
234
|
for (const [protocol, route] of Object.entries(routes)) for (const [source, stats] of Object.entries(route.by_provider || {})) {
|
|
226
235
|
const totals = stats.terminal_outcomes.totals;
|
|
227
|
-
sourceBody.append(tableRow([source, protocol, number(stats.active), ...["completed", "incomplete", "failed", "cancelled", "unknown"].map(outcome => number(totals[outcome]))]));
|
|
236
|
+
sourceBody.append(tableRow([sourceNames.get(source) || source, protocol, number(stats.active), ...["completed", "incomplete", "failed", "cancelled", "unknown"].map(outcome => number(totals[outcome]))]));
|
|
228
237
|
}
|
|
229
238
|
if (!sourceBody.children.length) emptyTable("source-requests-body", 8, "no_requests_observed");
|
|
230
239
|
}
|
|
@@ -264,7 +273,7 @@
|
|
|
264
273
|
const note = element("prediction-note");
|
|
265
274
|
if (note) note.textContent = prediction?.reason || "";
|
|
266
275
|
}
|
|
267
|
-
text("updated", "snapshot_time", { time:
|
|
276
|
+
text("updated", "snapshot_time", { time: time(Date.now()) });
|
|
268
277
|
}
|
|
269
278
|
|
|
270
279
|
function renderContext(performance) {
|
|
@@ -290,16 +299,20 @@
|
|
|
290
299
|
const ratio = finite(context.input_tokens) && finite(context.context_window_tokens) && Number(context.context_window_tokens) > 0
|
|
291
300
|
? `${(100 * Number(context.input_tokens) / Number(context.context_window_tokens)).toFixed(1)}%` : "—";
|
|
292
301
|
const at = Date.parse(request.at);
|
|
293
|
-
const row = tableRow([Number.isFinite(at) ?
|
|
302
|
+
const row = tableRow([Number.isFinite(at) ? time(at) : "—",
|
|
294
303
|
String(sourceNames.get(request.provider) || request.provider || "—").slice(0, 80),
|
|
295
304
|
String(request.model || "unknown").slice(0, 80), outcome, number(context.input_tokens), ""], { labels: [3] });
|
|
296
|
-
|
|
305
|
+
const wireFailure = Number.isInteger(request.http_status) && request.http_status >= 400;
|
|
306
|
+
if (globalThis.ccdxIcons) globalThis.ccdxIcons.set(row.children[3], wireFailure ? "request_http_failure" : outcome.toLowerCase(),
|
|
307
|
+
wireFailure ? "warning" : globalThis.ccdxIcons.kind(outcome.toLowerCase()), wireFailure ? { status: request.http_status } : {});
|
|
308
|
+
else if (wireFailure) localize(row.children[3], "request_http_failure", { status: request.http_status });
|
|
297
309
|
const details = document.createElement("details"), summary = document.createElement("summary"), fields = document.createElement("dl");
|
|
298
310
|
const key = String(request.request_id || `${request.at || ""}/${request.provider || ""}/${request.model || ""}`).slice(0, 256);
|
|
299
311
|
details.setAttribute?.("data-request-key", key);details.open = expanded.has(key);
|
|
300
312
|
details.className = "request-details";fields.className = "failure-detail";
|
|
301
313
|
localize(summary, "request_metadata");details.append(summary, fields);
|
|
302
|
-
for (const [key, value] of [["
|
|
314
|
+
for (const [key, value] of [["request_id", request.request_id || "—"], ["http_status", number(request.http_status)], ["attempts", number(request.upstream_attempts)], ["model_outcome", globalThis.ccdxLanguage?.format(outcome.toLowerCase()) || outcome],
|
|
315
|
+
["time", Number.isFinite(at) ? time(at, { date: true }) : "—"],
|
|
303
316
|
["wire_mib", finite(context.payload_bytes) ? `${(Number(context.payload_bytes) / 1048576).toFixed(2)} MiB` : "—"],
|
|
304
317
|
["images", number(context.images)], ["model_window", number(context.context_window_tokens)], ["input_window", ratio]]) {
|
|
305
318
|
const term = document.createElement("dt"), detail = document.createElement("dd");localize(term, key);detail.textContent = value;fields.append(term, detail);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
(() => {
|
|
2
|
+
const formats = new Map();
|
|
3
|
+
function format(value, { date = false } = {}) {
|
|
4
|
+
if (value === null || value === undefined || value === "") return "—";
|
|
5
|
+
const instant = new Date(value);
|
|
6
|
+
if (!Number.isFinite(instant.getTime())) return "—";
|
|
7
|
+
const locale = document.documentElement.lang?.startsWith("zh") ? "zh-CN" : "en-US";
|
|
8
|
+
const key = `${locale}/${date}`;
|
|
9
|
+
if (!formats.has(key)) formats.set(key, new Intl.DateTimeFormat(locale, {
|
|
10
|
+
...(date ? { year: "numeric", month: "2-digit", day: "2-digit" } : {}),
|
|
11
|
+
hour: "2-digit", minute: "2-digit", second: "2-digit", hourCycle: "h23",
|
|
12
|
+
}));
|
|
13
|
+
return formats.get(key).format(instant);
|
|
14
|
+
}
|
|
15
|
+
globalThis.ccdxTime = { format };
|
|
16
|
+
})();
|
package/src/dashboard/tools.js
CHANGED
|
@@ -34,14 +34,18 @@
|
|
|
34
34
|
text("github-account-hint", !data.saved ? "tools_login_hint" : invalid ? "tools_saved_not_valid" : failed ? "tools_access_hint" : "tools_account_hint");
|
|
35
35
|
const fields = el("github-account-fields");fields.replaceChildren();
|
|
36
36
|
field(fields, "tools_saved_signin", data.saved ? "saved_locally" : "tools_not_signed_in", data.saved ? "ok" : "unavailable");
|
|
37
|
-
for (const [id, key] of [["
|
|
37
|
+
for (const [id, key] of [["access", "tools_copilot_access"], ["models", "tools_catalog_read"]]) {
|
|
38
38
|
const result = online?.stages?.[id] || "not_checked";
|
|
39
39
|
field(fields, key, result === "passed" ? "tools_verified" : result === "invalid" ? "tools_signin_invalid" : result === "unavailable" ? "tools_unavailable" : "tools_not_checked",
|
|
40
40
|
result === "passed" ? "ok" : result === "invalid" ? "warning" : result === "unavailable" ? "unavailable" : "unknown");
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
status("github-identity-detail", online?.stages?.identity === "passed" ? "tools_verified" : invalid ? "tools_signin_invalid" : "tools_not_checked",
|
|
43
|
+
online?.stages?.identity === "passed" ? "ok" : invalid ? "warning" : "unknown");
|
|
44
|
+
el("github-checked-at").textContent = data.checked_at ? time(data.checked_at, { date: true }) : "—";
|
|
43
45
|
label(el("github-signin"), data.saved ? "tools_reauth" : "tools_login");
|
|
44
46
|
el("github-signin").hidden = data.saved && !invalid;
|
|
47
|
+
el("github-force-reauth").hidden = !data.saved || invalid;
|
|
48
|
+
if (data.saved && !invalid && !failed) el("github-account-hint").textContent = "";
|
|
45
49
|
el("github-signin").disabled = pending || activeFlow();el("github-check").disabled = pending || activeFlow() || !data.saved;
|
|
46
50
|
el("github-logout").disabled = pending || activeFlow() || !data.saved;
|
|
47
51
|
el("github-force-reauth").disabled = pending || activeFlow();
|
|
@@ -102,7 +106,7 @@
|
|
|
102
106
|
details.append(disclosure);row.append(name, result, details);body.append(row);
|
|
103
107
|
}
|
|
104
108
|
if (!groups.size) text("checks-note", "tools_checks_empty");
|
|
105
|
-
else text("checks-note", "tools_checks_completed", { time:
|
|
109
|
+
else text("checks-note", "tools_checks_completed", { time: time(data.checked_at) });
|
|
106
110
|
}
|
|
107
111
|
async function localAction(action, button) {
|
|
108
112
|
button.disabled = true;text("checks-note", "checking");
|