feat: add model connectivity tests and harden cursor heartbeats

This commit is contained in:
leookun committed 2026-08-24 09:57:28 +08:00
1 parent 6170778de9
commit 81a1afdae9
24 files changed
+790 -111

No files matched your search

+244 -55
View File
@@ -92,6 +92,21 @@
}
]
},
"05468af47054d488": {
"source": "模型 {model} 连通性测试成功({duration} ms)",
"kind": "template",
"placeholders": [
"model",
"duration"
],
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 99,
"column": 27
}
]
},
"0580e0a99a6f1afc": {
"source": "工件数",
"kind": "text",
@@ -175,7 +190,7 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 180,
"line": 256,
"column": 89
}
]
@@ -334,6 +349,28 @@
}
]
},
"105a9082c346f958": {
"source": "测试中…",
"kind": "text",
"placeholders": [],
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 159,
"column": 242
},
{
"file": "pages/CursorSettingsPage.tsx",
"line": 199,
"column": 205
},
{
"file": "pages/CursorSettingsPage.tsx",
"line": 205,
"column": 349
}
]
},
"124be3f86f197802": {
"source": "Token 消耗",
"kind": "text",
@@ -353,7 +390,7 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 179,
"line": 255,
"column": 36
},
{
@@ -375,6 +412,18 @@
}
]
},
"133340e53175128a": {
"source": "一键测试",
"kind": "text",
"placeholders": [],
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 199,
"column": 217
}
]
},
"13a9ac7a68c5fd96": {
"source": "CA 仅保存在本机,用于安全解析 Cursor 的 HTTPS 请求。",
"kind": "text",
@@ -440,17 +489,17 @@
},
{
"file": "pages/CursorSettingsPage.tsx",
"line": 144,
"line": 202,
"column": 40
},
{
"file": "pages/CursorSettingsPage.tsx",
"line": 144,
"line": 202,
"column": 119
},
{
"file": "pages/CursorSettingsPage.tsx",
"line": 147,
"line": 205,
"column": 63
}
]
@@ -515,8 +564,8 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 87,
"column": 86
"line": 237,
"column": 82
}
]
},
@@ -573,17 +622,17 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 106,
"line": 161,
"column": 32
},
{
"file": "pages/CursorSettingsPage.tsx",
"line": 106,
"line": 161,
"column": 119
},
{
"file": "pages/CursorSettingsPage.tsx",
"line": 157,
"line": 218,
"column": 44
}
]
@@ -766,7 +815,7 @@
"refs": [
{
"file": "layouts/AppLayout.tsx",
"line": 223,
"line": 224,
"column": 14
}
]
@@ -801,16 +850,16 @@
{
"file": "components/ui/Modal.tsx",
"line": 7,
"column": 96
"column": 113
},
{
"file": "layouts/AppLayout.tsx",
"line": 224,
"line": 225,
"column": 19
},
{
"file": "pages/CursorSettingsPage.tsx",
"line": 157,
"line": 218,
"column": 67
},
{
@@ -877,7 +926,7 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 165,
"line": 226,
"column": 70
},
{
@@ -894,7 +943,7 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 128,
"line": 183,
"column": 15
}
]
@@ -944,7 +993,7 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 157,
"line": 218,
"column": 89
}
]
@@ -956,7 +1005,7 @@
"refs": [
{
"file": "layouts/AppLayout.tsx",
"line": 225,
"line": 226,
"column": 20
}
]
@@ -1168,7 +1217,7 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 150,
"line": 211,
"column": 71
}
]
@@ -1243,6 +1292,20 @@
}
]
},
"461d6a57900c2ed7": {
"source": "连通性测试失败:{error}",
"kind": "template",
"placeholders": [
"error"
],
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 104,
"column": 27
}
]
},
"470049252e54de6a": {
"source": "成功占比:{rate}",
"kind": "template",
@@ -1316,7 +1379,7 @@
"refs": [
{
"file": "layouts/AppLayout.tsx",
"line": 73,
"line": 74,
"column": 48
}
]
@@ -1350,7 +1413,7 @@
},
{
"file": "layouts/AppLayout.tsx",
"line": 196,
"line": 197,
"column": 67
}
]
@@ -1394,6 +1457,20 @@
}
]
},
"51de3bcec137ab1b": {
"source": "全部 {count} 个模型连通性测试成功",
"kind": "template",
"placeholders": [
"count"
],
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 147,
"column": 11
}
]
},
"5228358a6db59fe7": {
"source": "如:现在、2026-08-23 18:00",
"kind": "text",
@@ -1478,7 +1555,7 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 144,
"line": 202,
"column": 52
}
]
@@ -1529,6 +1606,20 @@
}
]
},
"5b17f59d33bde39e": {
"source": "错误:{error}",
"kind": "template",
"placeholders": [
"error"
],
"refs": [
{
"file": "components/cursor/CursorModelTestResult.tsx",
"line": 15,
"column": 7
}
]
},
"5c55a67935af8f45": {
"source": "全部",
"kind": "text",
@@ -1574,7 +1665,7 @@
"refs": [
{
"file": "layouts/AppLayout.tsx",
"line": 229,
"line": 230,
"column": 11
}
]
@@ -1686,7 +1777,7 @@
"refs": [
{
"file": "api.ts",
"line": 272,
"line": 289,
"column": 43
}
]
@@ -1703,6 +1794,25 @@
}
]
},
"652ec5d40c29fd6a": {
"source": "速度 {speed} tokens/s · 首字 {firstText} ms · 总耗时 {duration} ms · 输出 {tokens} tokens{estimated} · 返回:{output}",
"kind": "template",
"placeholders": [
"speed",
"firstText",
"duration",
"tokens",
"estimated",
"output"
],
"refs": [
{
"file": "components/cursor/CursorModelTestResult.tsx",
"line": 17,
"column": 7
}
]
},
"653b123c956d3bcb": {
"source": "调用",
"kind": "text",
@@ -1777,7 +1887,7 @@
"refs": [
{
"file": "layouts/AppLayout.tsx",
"line": 76,
"line": 77,
"column": 47
}
]
@@ -1794,6 +1904,18 @@
}
]
},
"6aa8f49cc992dfd7": {
"source": "测试",
"kind": "text",
"placeholders": [],
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 159,
"column": 254
}
]
},
"6ae80538c2b2572d": {
"source": "最小化窗口",
"kind": "text",
@@ -1948,7 +2070,7 @@
"refs": [
{
"file": "api.ts",
"line": 267,
"line": 284,
"column": 43
}
]
@@ -1998,7 +2120,7 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 125,
"line": 180,
"column": 83
}
]
@@ -2087,7 +2209,7 @@
"refs": [
{
"file": "api.ts",
"line": 221,
"line": 230,
"column": 21
}
]
@@ -2133,7 +2255,7 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 174,
"line": 250,
"column": 21
}
]
@@ -2242,7 +2364,7 @@
"refs": [
{
"file": "layouts/AppLayout.tsx",
"line": 231,
"line": 232,
"column": 16
}
]
@@ -2268,7 +2390,7 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 166,
"line": 227,
"column": 87
},
{
@@ -2297,7 +2419,7 @@
"refs": [
{
"file": "layouts/AppLayout.tsx",
"line": 71,
"line": 72,
"column": 39
}
]
@@ -2333,7 +2455,7 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 158,
"line": 219,
"column": 11
}
]
@@ -2560,7 +2682,7 @@
{
"file": "components/ui/Modal.tsx",
"line": 7,
"column": 119
"column": 136
},
{
"file": "pages/SettingsPage.tsx",
@@ -2622,6 +2744,18 @@
}
]
},
"a693d69af48bfe48": {
"source": "保存并测试",
"kind": "text",
"placeholders": [],
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 205,
"column": 361
}
]
},
"a748cc074f78de00": {
"source": "查看详情",
"kind": "text",
@@ -2798,12 +2932,12 @@
},
{
"file": "layouts/AppLayout.tsx",
"line": 244,
"line": 246,
"column": 64
},
{
"file": "layouts/AppLayout.tsx",
"line": 244,
"line": 246,
"column": 125
}
]
@@ -2911,6 +3045,18 @@
}
]
},
"b86967982067d295": {
"source": "(估算)",
"kind": "text",
"placeholders": [],
"refs": [
{
"file": "components/cursor/CursorModelTestResult.tsx",
"line": 22,
"column": 50
}
]
},
"b89a0e4584f27ab5": {
"source": "打开终端",
"kind": "text",
@@ -2918,7 +3064,7 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 150,
"line": 211,
"column": 93
}
]
@@ -2986,6 +3132,21 @@
}
]
},
"baff6c144180b185": {
"source": "连通性测试完成:成功 {successful},失败 {failed}",
"kind": "template",
"placeholders": [
"successful",
"failed"
],
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 148,
"column": 11
}
]
},
"bb2b7736433ae867": {
"source": "Cursor 追踪",
"kind": "text",
@@ -3022,7 +3183,7 @@
"refs": [
{
"file": "layouts/AppLayout.tsx",
"line": 236,
"line": 237,
"column": 24
}
]
@@ -3130,17 +3291,17 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 105,
"line": 160,
"column": 32
},
{
"file": "pages/CursorSettingsPage.tsx",
"line": 105,
"line": 160,
"column": 95
},
{
"file": "pages/CursorSettingsPage.tsx",
"line": 147,
"line": 205,
"column": 51
}
]
@@ -3328,8 +3489,8 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 85,
"column": 45
"line": 235,
"column": 41
}
]
},
@@ -3352,7 +3513,7 @@
"refs": [
{
"file": "components/ui/Modal.tsx",
"line": 32,
"line": 33,
"column": 116
}
]
@@ -3410,7 +3571,7 @@
"refs": [
{
"file": "layouts/AppLayout.tsx",
"line": 182,
"line": 183,
"column": 54
}
]
@@ -3422,7 +3583,7 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 152,
"line": 213,
"column": 18
}
]
@@ -3540,6 +3701,20 @@
}
]
},
"e0fae77446a389a3": {
"source": "速度:{speed} tokens/s",
"kind": "template",
"placeholders": [
"speed"
],
"refs": [
{
"file": "components/cursor/CursorModelTestResult.tsx",
"line": 14,
"column": 7
}
]
},
"e1295adecbb77755": {
"source": "关闭广告",
"kind": "text",
@@ -3600,6 +3775,20 @@
}
]
},
"e24ebe4a866d69bf": {
"source": "测试失败:{error}",
"kind": "template",
"placeholders": [
"error"
],
"refs": [
{
"file": "components/cursor/CursorModelTestResult.tsx",
"line": 25,
"column": 7
}
]
},
"e25bf3f419bb68f0": {
"source": "调用详细",
"kind": "text",
@@ -3607,7 +3796,7 @@
"refs": [
{
"file": "layouts/AppLayout.tsx",
"line": 72,
"line": 73,
"column": 44
}
]
@@ -3672,8 +3861,8 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 86,
"column": 72
"line": 236,
"column": 68
}
]
},
@@ -3749,7 +3938,7 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 153,
"line": 214,
"column": 16
}
]
@@ -3778,7 +3967,7 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 150,
"line": 211,
"column": 45
}
]
@@ -3790,12 +3979,12 @@
"refs": [
{
"file": "layouts/AppLayout.tsx",
"line": 77,
"line": 78,
"column": 53
},
{
"file": "pages/CursorSettingsPage.tsx",
"line": 146,
"line": 204,
"column": 25
}
]
@@ -3831,7 +4020,7 @@
"refs": [
{
"file": "pages/CursorSettingsPage.tsx",
"line": 62,
"line": 67,
"column": 187
},
{
@@ -4115,7 +4304,7 @@
"refs": [
{
"file": "layouts/AppLayout.tsx",
"line": 74,
"line": 75,
"column": 48
}
]
+13
View File
@@ -5,6 +5,7 @@
"028a4de61bff743d": "Regular input: {tokens} × ${price}/1M = {cost}",
"03ff62ab4b818492": "Cache write: {tokens} × ${price}/1M = {cost}",
"051836569928a9f9": "Edit",
"05468af47054d488": "Connectivity test for {model} succeeded ({duration} ms)",
"0580e0a99a6f1afc": "Artifacts",
"05912a17829faacc": "All call records and detailed traces will be deleted. Providers, models, CA, and application settings are unaffected. This action cannot be undone.",
"076832c1b2de22c3": "Cache write: {tokens}",
@@ -22,9 +23,11 @@
"0d5e2bdb15579fc4": "Messages",
"0e41f8e3d59ec47b": "Storage management",
"0ec1e85b0c3cfa65": "Call details",
"105a9082c346f958": "Testing…",
"124be3f86f197802": "Token usage",
"12ae77e6202d063e": "Custom Headers",
"12b86e89701b0241": "Enter a model name and press Enter to add it",
"133340e53175128a": "Test all",
"13a9ac7a68c5fd96": "The CA is stored only on this device and is used to securely inspect Cursor HTTPS requests.",
"13b61c5f697b6700": "Cache hit rate",
"146da2e2a991493e": "Fetching…",
@@ -83,6 +86,7 @@
"42a1d9e5b037c210": "Bytes",
"42aa8e01e98c0d8c": "Total duration",
"43cb41d62de2d179": "Proxy requires authentication",
"461d6a57900c2ed7": "Connectivity test failed: {error}",
"470049252e54de6a": "Success rate: {rate}",
"48b970b568a7f8f9": "Proxy settings",
"48d8db17bae06246": "{count} total",
@@ -93,6 +97,7 @@
"4d0680f9efaef147": "Unread",
"4eafa9e925b30bcd": "Custom",
"51d04bc3d286f018": "Last calendar day",
"51de3bcec137ab1b": "Connectivity tests succeeded for all {count} models",
"5228358a6db59fe7": "For example: now, 2026-08-23 18:00",
"5401344227e49e2f": "TAB settings",
"54644705e9c61009": "Port settings",
@@ -103,6 +108,7 @@
"59346e82b3dd2998": "TAB service address",
"5a3bd99fa69a40c1": "Use public service",
"5ae715656ffbc35d": "Merge into the request body for every model from this provider.",
"5b17f59d33bde39e": "Error: {error}",
"5c55a67935af8f45": "All",
"5d59857bf039cac9": "Cursor Assistant v{version}",
"5f8d556a9c47da3c": "Launch at login disabled",
@@ -116,6 +122,7 @@
"63c73c4730f4473e": "Apply",
"6478a5f1218c484e": "Use the desktop app to copy to the system clipboard",
"651f274470153a05": "Software updates",
"652ec5d40c29fd6a": "Speed {speed} tokens/s · first token {firstText} ms · total {duration} ms · output {tokens} tokens{estimated} · response: {output}",
"653b123c956d3bcb": "Calls",
"656ab25e264cc4e4": "No models are available to Cursor yet",
"65a6318e07ec1e07": "Tools",
@@ -123,6 +130,7 @@
"68152165b3348852": "Select the request protocol used by this provider.",
"68ea5dd4d7af20e6": "System settings",
"6a9906c79f26c0ba": "Start time",
"6aa8f49cc992dfd7": "Test",
"6ae80538c2b2572d": "Minimize window",
"6d1876364ac6457d": "Proxy mode",
"6e86570183c3cdd0": "You're up to date",
@@ -183,6 +191,7 @@
"a3ab741ceb188e9e": "Request content was not recorded. Enable detailed records and try again.",
"a49ffd73bc85333d": "Average",
"a621ab606db2a11f": "Password",
"a693d69af48bfe48": "Save and test",
"a748cc074f78de00": "View details",
"a98585871c5313ff": "Display name",
"a9ab292ea9feecdc": "Provider",
@@ -201,11 +210,13 @@
"b710ec36ad312918": "The model service API root URL, for example https://api.openai.com/v1.",
"b75a46aad3e7c132": "Non-cached input: {tokens}",
"b79354009c614ae9": "Statistics",
"b86967982067d295": " (estimated)",
"b89a0e4584f27ab5": "Open terminal",
"b8c9b486c83b5778": "Hide ad",
"b9670c85a4ab939e": "Route",
"b97ad406809572e1": "Enable reasoning",
"b9af2de88d903be7": "Proxy address",
"baff6c144180b185": "Connectivity tests completed: {successful} succeeded, {failed} failed",
"bb2b7736433ae867": "Cursor tracing",
"bb7efdcb6af6e805": "Default dark",
"bda62ce1d5e4ace9": "Tell us why",
@@ -245,11 +256,13 @@
"df8b71c74d9b8478": "Response stream",
"dfb802238b38fbd4": "Enabled",
"e025f1ff71996425": "Set",
"e0fae77446a389a3": "Speed: {speed} tokens/s",
"e1295adecbb77755": "Close ad",
"e14115de7f7c5795": "Token usage over the past year",
"e14a5eee9b0b0f9f": "Whether the model declares reasoning support.",
"e14f20d572c02611": "Provider call sequence",
"e18516550b9a5105": "No usage",
"e24ebe4a866d69bf": "Test failed: {error}",
"e25bf3f419bb68f0": "Call history",
"e3fee05f688708b4": "LLM calls",
"e5043c7a2b408271": "Last 10 minutes",
+13
View File
@@ -5,6 +5,7 @@
"028a4de61bff743d": "普通输入:{tokens} × ${price}/1M = {cost}",
"03ff62ab4b818492": "缓存写入:{tokens} × ${price}/1M = {cost}",
"051836569928a9f9": "编辑",
"05468af47054d488": "模型 {model} 连通性测试成功({duration} ms)",
"0580e0a99a6f1afc": "工件数",
"05912a17829faacc": "所有调用记录和详细追踪数据都会被删除。供应商、模型、CA 和应用设置不会受到影响,此操作无法撤销。",
"076832c1b2de22c3": "缓存写入:{tokens}",
@@ -22,9 +23,11 @@
"0d5e2bdb15579fc4": "消息数",
"0e41f8e3d59ec47b": "存储管理",
"0ec1e85b0c3cfa65": "调用详情",
"105a9082c346f958": "测试中…",
"124be3f86f197802": "Token 消耗",
"12ae77e6202d063e": "自定义 Headers",
"12b86e89701b0241": "输入模型名称后按 Enter 添加",
"133340e53175128a": "一键测试",
"13a9ac7a68c5fd96": "CA 仅保存在本机,用于安全解析 Cursor 的 HTTPS 请求。",
"13b61c5f697b6700": "缓存命中率",
"146da2e2a991493e": "获取中…",
@@ -83,6 +86,7 @@
"42a1d9e5b037c210": "字节数",
"42aa8e01e98c0d8c": "总耗时",
"43cb41d62de2d179": "代理需要认证",
"461d6a57900c2ed7": "连通性测试失败:{error}",
"470049252e54de6a": "成功占比:{rate}",
"48b970b568a7f8f9": "代理设置",
"48d8db17bae06246": "共 {count} 条",
@@ -93,6 +97,7 @@
"4d0680f9efaef147": "未读",
"4eafa9e925b30bcd": "自定义",
"51d04bc3d286f018": "近1自然日",
"51de3bcec137ab1b": "全部 {count} 个模型连通性测试成功",
"5228358a6db59fe7": "如:现在、2026-08-23 18:00",
"5401344227e49e2f": "TAB 设置",
"54644705e9c61009": "端口设置",
@@ -103,6 +108,7 @@
"59346e82b3dd2998": "TAB 服务地址",
"5a3bd99fa69a40c1": "使用公益服务",
"5ae715656ffbc35d": "合并到该上游所有模型的请求体。",
"5b17f59d33bde39e": "错误:{error}",
"5c55a67935af8f45": "全部",
"5d59857bf039cac9": "Cursor 助手 v{version}",
"5f8d556a9c47da3c": "已关闭开机启动",
@@ -116,6 +122,7 @@
"63c73c4730f4473e": "应用",
"6478a5f1218c484e": "请在桌面应用中复制到系统剪贴板",
"651f274470153a05": "软件更新",
"652ec5d40c29fd6a": "速度 {speed} tokens/s · 首字 {firstText} ms · 总耗时 {duration} ms · 输出 {tokens} tokens{estimated} · 返回:{output}",
"653b123c956d3bcb": "调用",
"656ab25e264cc4e4": "还没有可供 Cursor 使用的模型",
"65a6318e07ec1e07": "工具数",
@@ -123,6 +130,7 @@
"68152165b3348852": "选择上游服务使用的请求协议。",
"68ea5dd4d7af20e6": "系统设置",
"6a9906c79f26c0ba": "开始时间",
"6aa8f49cc992dfd7": "测试",
"6ae80538c2b2572d": "最小化窗口",
"6d1876364ac6457d": "代理方式",
"6e86570183c3cdd0": "当前已是最新版本",
@@ -183,6 +191,7 @@
"a3ab741ceb188e9e": "未记录请求内容,请开启详细记录后重试。",
"a49ffd73bc85333d": "平均",
"a621ab606db2a11f": "密码",
"a693d69af48bfe48": "保存并测试",
"a748cc074f78de00": "查看详情",
"a98585871c5313ff": "显示名称",
"a9ab292ea9feecdc": "上游",
@@ -201,11 +210,13 @@
"b710ec36ad312918": "模型服务的 API 根地址,例如 https://api.openai.com/v1。",
"b75a46aad3e7c132": "非缓存输入:{tokens}",
"b79354009c614ae9": "统计数据",
"b86967982067d295": "(估算)",
"b89a0e4584f27ab5": "打开终端",
"b8c9b486c83b5778": "不再显示广告",
"b9670c85a4ab939e": "路由",
"b97ad406809572e1": "启用推理",
"b9af2de88d903be7": "代理地址",
"baff6c144180b185": "连通性测试完成:成功 {successful},失败 {failed}",
"bb2b7736433ae867": "Cursor 追踪",
"bb7efdcb6af6e805": "默认暗色",
"bda62ce1d5e4ace9": "可以告诉我们原因",
@@ -245,11 +256,13 @@
"df8b71c74d9b8478": "响应流",
"dfb802238b38fbd4": "已启用",
"e025f1ff71996425": "已设置",
"e0fae77446a389a3": "速度:{speed} tokens/s",
"e1295adecbb77755": "关闭广告",
"e14115de7f7c5795": "过去一年的 Token 用量",
"e14a5eee9b0b0f9f": "是否声明模型支持推理能力。",
"e14f20d572c02611": "上游调用序号",
"e18516550b9a5105": "无用量",
"e24ebe4a866d69bf": "测试失败:{error}",
"e25bf3f419bb68f0": "调用详细",
"e3fee05f688708b4": "LLM 调用",
"e5043c7a2b408271": "近10分钟",