zcode-pro 1.4.1 → 1.5.1
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.en.md +8 -7
- package/README.md +11 -10
- package/dist/inject.js +443 -100
- package/package.json +1 -1
- package/src/host/helper.mjs +40 -7
- package/src/host/taskIndex.mjs +11 -7
- package/src/inject/core.js +56 -48
- package/src/inject/features/composer-provider.js +112 -0
- package/src/inject/features/newtab-panels.js +3 -1
- package/src/inject/features/session-switch.js +92 -30
- package/src/inject/features/settings-dialog.js +37 -16
- package/src/inject/features/table-copy.js +148 -0
- package/src/inject/features/title-gen.js +3 -2
- package/src/inject/features/title-lock.js +3 -2
- package/src/inject/features/ws-running.js +55 -8
- package/src/inject/index.js +4 -0
- package/src/inject/ui.js +12 -1
package/dist/inject.js
CHANGED
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
agentsSave: "\u4FDD\u5B58",
|
|
115
115
|
agentsSaved: "\u5168\u5C40\u63D0\u793A\u8BCD\u5DF2\u4FDD\u5B58",
|
|
116
116
|
agentsLoadFailed: "\u8BFB\u53D6\u5168\u5C40\u63D0\u793A\u8BCD\u5931\u8D25",
|
|
117
|
-
proxyDesc: "\u4E3A ZCode Pro \u672C\u5730\u52A9\u624B\u53D1\u8D77\u7684\u7F51\u7EDC\u8BBF\u95EE\u8BBE\u7F6E HTTP \u4EE3\u7406\uFF1A\u63D2\u4EF6\u5E02\u573A\u7684\u66F4\u65B0\u4E0E\u5B89\u88C5\u3001\u63D2\u4EF6\u4F9D\u8D56\u8F6F\u4EF6\u7684\u5B89\u88C5\u4E0E\u5347\u7EA7\u3001WebDAV \u540C\u6B65\u90FD\u53EF\u8D70\u8BE5\u4EE3\u7406\uFF0C\u7528\u4E0B\u65B9\u5F00\u5173\u9009\u62E9\u751F\u6548\u8303\u56F4\u3002\u4E0D\u5F71\u54CD ZCode \u5E94\u7528\u672C\u8EAB\u4E0E\u6A21\u578B\u8BF7\u6C42\
|
|
117
|
+
proxyDesc: "\u4E3A ZCode Pro \u672C\u5730\u52A9\u624B\u53D1\u8D77\u7684\u7F51\u7EDC\u8BBF\u95EE\u8BBE\u7F6E HTTP \u4EE3\u7406\uFF1A\u63D2\u4EF6\u5E02\u573A\u7684\u66F4\u65B0\u4E0E\u5B89\u88C5\u3001\u63D2\u4EF6\u4F9D\u8D56\u8F6F\u4EF6\u7684\u5B89\u88C5\u4E0E\u5347\u7EA7\u3001WebDAV \u540C\u6B65\u90FD\u53EF\u8D70\u8BE5\u4EE3\u7406\uFF0C\u7528\u4E0B\u65B9\u5F00\u5173\u9009\u62E9\u751F\u6548\u8303\u56F4\u3002\u4E0D\u5F71\u54CD ZCode \u5E94\u7528\u672C\u8EAB\u4E0E\u6A21\u578B\u8BF7\u6C42\u3002",
|
|
118
118
|
proxyPlaceholder: "http://127.0.0.1:7890",
|
|
119
119
|
proxySave: "\u4FDD\u5B58",
|
|
120
120
|
proxySaved: "\u4EE3\u7406\u8BBE\u7F6E\u5DF2\u4FDD\u5B58",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
proxyScopeDeps: "\u63D2\u4EF6\u4F9D\u8D56\u8F6F\u4EF6",
|
|
129
129
|
proxyScopeDepsDesc: "headroom \u4E0E rtk \u7684\u5B89\u88C5\u3001\u68C0\u67E5\u66F4\u65B0\u4E0E\u5347\u7EA7\uFF08pip \u4E0E GitHub \u4E0B\u8F7D\uFF09\u8D70\u4EE3\u7406\u3002",
|
|
130
130
|
proxyScopeSync: "\u540C\u6B65",
|
|
131
|
-
proxyScopeSyncDesc: "WebDAV \u4E0A\u4F20\u4E0E\u4E0B\u8F7D\u8D70\u4EE3\u7406\u3002
|
|
131
|
+
proxyScopeSyncDesc: "WebDAV \u4E0A\u4F20\u4E0E\u4E0B\u8F7D\u8D70\u4EE3\u7406\u3002",
|
|
132
132
|
tabSync: "\u540C\u6B65",
|
|
133
133
|
tabDebug: "\u8C03\u8BD5",
|
|
134
134
|
testNoSessionHint: "\u9009\u62E9\u201C\u8DDF\u968F\u5F53\u524D\u4F1A\u8BDD[\u5F53\u524D\u6A21\u578B]\u201D\u65F6\uFF0C\u9009\u62E9\u4E0A\u6B21\u4F1A\u8BDD\u4E2D\u4F7F\u7528\u7684\u4F9B\u5E94\u5546[\u6A21\u578B]",
|
|
@@ -215,13 +215,13 @@
|
|
|
215
215
|
defaultValue: "\u9ED8\u8BA4",
|
|
216
216
|
resetDefault: "\u6062\u590D\u9ED8\u8BA4",
|
|
217
217
|
featureProjectMenu: "\u9879\u76EE\u83DC\u5355\u589E\u5F3A",
|
|
218
|
-
featureProjectMenuDesc: "\u9879\u76EE\
|
|
218
|
+
featureProjectMenuDesc: "\u9879\u76EE\u66F4\u591A\u83DC\u5355\uFF1A\u6253\u5F00\u6587\u4EF6\u5939\u4E0E\u590D\u5236\u8DEF\u5F84\uFF08\u522B\u540D\u4E0E\u5207\u6362\u6587\u4EF6\u5939\u5DF2\u505C\u7528\uFF09\u3002",
|
|
219
219
|
featureTaskOrder: "\u4FA7\u8FB9\u680F\u4F1A\u8BDD\u62D6\u52A8\u6392\u5E8F",
|
|
220
|
-
featureTaskOrderDesc: "\
|
|
220
|
+
featureTaskOrderDesc: "\u62D6\u52A8\u8C03\u6574\u7F6E\u9876\u3001\u9879\u76EE\u4E0E\u5206\u7EC4\u4E2D\u7684\u4F1A\u8BDD\u987A\u5E8F\uFF0C\u91CD\u542F\u540E\u4E0D\u53D8\u3002",
|
|
221
221
|
featureSessionSwitch: "\u4F1A\u8BDD\u5FEB\u6377\u5207\u6362",
|
|
222
|
-
featureSessionSwitchDesc: "{last} \
|
|
222
|
+
featureSessionSwitchDesc: "{last} \u6765\u56DE\u4E0A\u6B21\u4F1A\u8BDD\uFF1Balt+\u65B9\u5411\u952E/\u5FEB\u6377\u952E\u9009\u6700\u8FD1\u4F1A\u8BDD\uFF1B\u952E\u4F4D\u53EF\u6539",
|
|
223
223
|
featureTitleLock: "\u91CD\u547D\u540D\u4F1A\u8BDD\u540D\u9501\u5B9A",
|
|
224
|
-
featureTitleLockDesc: "\u624B\u52A8\u91CD\u547D\u540D\u8FC7\u7684\u4F1A\u8BDD\u4E0D\
|
|
224
|
+
featureTitleLockDesc: "\u624B\u52A8\u91CD\u547D\u540D\u8FC7\u7684\u4F1A\u8BDD\u4E0D\u88AB\u81EA\u52A8\u6807\u9898\u8986\u76D6\uFF0C\u4FA7\u680F\u59CB\u7EC8\u663E\u793A\u91CD\u547D\u540D\u540E\u7684\u540D\u5B57\u3002",
|
|
225
225
|
tabTitleGen: "\u4EFB\u52A1\u540D\u63D0\u793A\u8BCD",
|
|
226
226
|
titleGenShortDesc: "\u65B0\u4F1A\u8BDD\u5F00\u59CB\u4F5C\u7B54\u65F6\uFF0C\u6309\u6240\u9009\u4F9B\u5E94\u5546\u4E0E\u63D0\u793A\u8BCD\u751F\u6210\u4EFB\u52A1\u540D\u5E76\u6309\u624B\u52A8\u91CD\u547D\u540D\u4FDD\u5B58\uFF0C\u5B98\u65B9\u81EA\u52A8\u6807\u9898\u4E0D\u518D\u8986\u76D6\u3002",
|
|
227
227
|
titleGenEnabled: "\u542F\u7528",
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
titleGenTestOk: "\u751F\u6210\u7ED3\u679C\uFF1A",
|
|
248
248
|
titleGenTestFailed: "\u751F\u6210\u5931\u8D25",
|
|
249
249
|
featureWsRunning: "\u6298\u53E0\u65F6\u4EFB\u52A1\u8FD0\u884C\u4E2D\u63D0\u793A",
|
|
250
|
-
featureWsRunningDesc: "\u6709\u4F1A\u8BDD\
|
|
250
|
+
featureWsRunningDesc: "\u6709\u4F1A\u8BDD\u8FD0\u884C\u65F6\uFF0C\u6298\u53E0\u7684\u9879\u76EE\u4E0E\u4EFB\u52A1\u5206\u533A\u5934\u663E\u793A\u52A0\u8F7D\u56FE\u6807\uFF0C\u5168\u90E8\u7ED3\u675F\u6D88\u5931\u3002",
|
|
251
251
|
tabPerformance: "\u6027\u80FD",
|
|
252
252
|
perfDesc: "ZCode \u4E3A\u6BCF\u4E2A\u6253\u5F00\u8FC7\u7684\u9879\u76EE\u5E38\u9A7B\u4E00\u4E2A\u4F1A\u8BDD\u8FDB\u7A0B\uFF0C\u5E94\u7528\u81EA\u8EAB\u4E0D\u4F1A\u56DE\u6536\uFF0C\u9879\u76EE\u591A\u4E86\u5185\u5B58\u5360\u7528\u5C31\u9AD8\u3002\u5F00\u542F\u540E\uFF0C\u957F\u65F6\u95F4\u672A\u4F7F\u7528\u4E14\u6CA1\u6709\u4EFB\u52A1\u5728\u8DD1\u7684\u9879\u76EE\u4F1A\u88AB\u81EA\u52A8\u91CA\u653E\uFF1A\u4F1A\u8BDD\u8BB0\u5F55\u4E0D\u53D7\u5F71\u54CD\uFF0C\u518D\u6B21\u6253\u5F00\u65F6\u81EA\u52A8\u6062\u590D\uFF0C\u4EC5\u9996\u6B21\u56DE\u590D\u6709\u51E0\u79D2\u7B49\u5F85\u3002\u6B63\u5728\u4F7F\u7528\u7684\u9879\u76EE\u3001\u8FD0\u884C\u4E2D\u7684\u4F1A\u8BDD\u4E0E\u540E\u53F0\u547D\u4EE4\u3001\u5B9A\u65F6\u4EFB\u52A1\u90FD\u4E0D\u4F1A\u88AB\u56DE\u6536\u3002\u540E\u53F0\u547D\u4EE4\u68C0\u6D4B\u4F9D\u8D56\u7CFB\u7EDF\u8FDB\u7A0B\u4FE1\u606F\uFF08Linux / macOS / Windows \u5404\u8D70\u7CFB\u7EDF\u81EA\u5E26\u5DE5\u5177\uFF09\uFF0C\u68C0\u6D4B\u4E0D\u53EF\u7528\u65F6\u529F\u80FD\u81EA\u52A8\u505C\u7528\u3002",
|
|
253
253
|
featureIdleReclaim: "\u7A7A\u95F2\u9879\u76EE\u5185\u5B58\u56DE\u6536",
|
|
@@ -257,17 +257,17 @@
|
|
|
257
257
|
idleReclaimStartupHint: "\u5E94\u7528\u542F\u52A8\u4F1A\u4E3A\u6BCF\u4E2A\u6062\u590D\u7684\u9879\u76EE\u9884\u70ED\u8FDB\u7A0B\uFF0C\u5230\u70B9\u628A\u672A\u4F7F\u7528\u7684\u9879\u76EE\u4E00\u6B21\u6536\u6389\uFF1B0 = \u542F\u52A8\u540E\u7ACB\u5373\u56DE\u6536\uFF0C\u8BE5\u6B21\u4E0D\u53D7\u4E0A\u4E00\u9879\u7A7A\u95F2\u65F6\u957F\u9650\u5236",
|
|
258
258
|
idleReclaimUnit: "\u5206\u949F",
|
|
259
259
|
featureToolbarIcons: "\u4FA7\u680F\u83DC\u5355\u5E76\u5165\u9876\u680F",
|
|
260
|
-
featureToolbarIconsDesc: "\
|
|
260
|
+
featureToolbarIconsDesc: "\u65B0\u5EFA\u4EFB\u52A1/\u641C\u7D22/\u81EA\u52A8\u5316/\u63D2\u4EF6\u5E02\u573A\u6536\u6210\u9876\u680F\u56FE\u6807\u6309\u94AE\u3002",
|
|
261
261
|
tbNewTask: "\u65B0\u5EFA\u4EFB\u52A1",
|
|
262
262
|
tbSearch: "\u641C\u7D22",
|
|
263
263
|
tbAutomations: "\u81EA\u52A8\u5316",
|
|
264
264
|
tbPluginStore: "\u63D2\u4EF6\u5E02\u573A",
|
|
265
265
|
featurePinnedCollapse: "\u5DF2\u7F6E\u9876\u5206\u533A\u53EF\u6298\u53E0",
|
|
266
|
-
featurePinnedCollapseDesc: "\u4FA7\u8FB9\u680F\
|
|
266
|
+
featurePinnedCollapseDesc: "\u4FA7\u8FB9\u680F\u5DF2\u7F6E\u9876\u6807\u9898\u53EF\u70B9\u51FB\u6298\u53E0/\u5C55\u5F00\u5176\u4EFB\u52A1\u5217\u8868\u3002",
|
|
267
267
|
featureSandboxReclaim: "\u63D2\u4EF6\u754C\u9762\u6C99\u7BB1\u56DE\u6536",
|
|
268
|
-
featureSandboxReclaimDesc: "\
|
|
268
|
+
featureSandboxReclaimDesc: "\u6C99\u7BB1\u6EE1 64 \u4E2A\u65F6\u81EA\u52A8\u91CA\u653E\u6700\u65E9\u7684\uFF0C\u65B0\u5361\u7247\u4E0D\u518D\u6253\u4E0D\u5F00\uFF1B\u65E7\u5361\u91CD\u65B0\u6253\u5F00\u6240\u5728\u4F1A\u8BDD\u5373\u53EF\u6062\u590D\u3002",
|
|
269
269
|
featurePluginCardRetry: "\u63D2\u4EF6\u5361\u7247\u81EA\u52A8\u91CD\u8BD5",
|
|
270
|
-
featurePluginCardRetryDesc: "\u56E0\u540D\u989D\u4E0A\u9650\u52A0\u8F7D\u5931\u8D25\u7684\u63D2\u4EF6\u5361\u7247\u81EA\u52A8\u70B9\u51FB\
|
|
270
|
+
featurePluginCardRetryDesc: "\u56E0\u540D\u989D\u4E0A\u9650\u52A0\u8F7D\u5931\u8D25\u7684\u63D2\u4EF6\u5361\u7247\u81EA\u52A8\u70B9\u51FB\u91CD\u65B0\u52A0\u8F7D\uFF0C\u540D\u989D\u7A7A\u51FA\u540E\u81EA\u52A8\u6062\u590D\u3002",
|
|
271
271
|
visionCardUi: "\u601D\u8003\u8FC7\u7A0B\u663E\u793A\u8BC6\u56FE\u5361\u7247",
|
|
272
272
|
pinnedToggleAria: "\u6298\u53E0/\u5C55\u5F00\u5DF2\u7F6E\u9876",
|
|
273
273
|
sidebarProjectSpacingName: "\u9879\u76EE\u95F4\u8DDD",
|
|
@@ -280,17 +280,17 @@
|
|
|
280
280
|
userFontDesc: "\u4F1A\u8BDD\u4E2D\u63D0\u95EE\u5185\u5BB9\u7684\u5B57\u4F53\uFF1B\u9009\u201C\u9ED8\u8BA4\u201D\u65F6\u8DDF\u968F\u754C\u9762\u5B57\u4F53\u3002",
|
|
281
281
|
assistantFontName: "\u56DE\u7B54\u5B57\u4F53",
|
|
282
282
|
assistantFontDesc: "\u4F1A\u8BDD\u4E2D\u56DE\u7B54\u6B63\u6587\u7684\u5B57\u4F53\uFF08\u4EE3\u7801\u5757\u4ECD\u7528\u7B49\u5BBD\u5B57\u4F53\uFF09\uFF1B\u9009\u201C\u9ED8\u8BA4\u201D\u65F6\u8DDF\u968F\u754C\u9762\u5B57\u4F53\u3002",
|
|
283
|
-
switcherHint: "{prev} / {next} \u6216 \u2191 / \u2193 \u9009\u62E9\uFF0CEnter \u6216\
|
|
283
|
+
switcherHint: "{prev} / {next} \u6216 \u2191 / \u2193 \u9009\u62E9\uFF0CEnter \u6216\u70B9\u51FB\u884C\u5207\u6362\uFF0CEsc \u53D6\u6D88",
|
|
284
284
|
switcherCurrent: "\u5F53\u524D",
|
|
285
285
|
switcherEmpty: "\u6682\u65E0\u4E0A\u6B21\u4F1A\u8BDD\uFF08\u5207\u6362\u8FC7\u4F1A\u8BDD\u540E\u53EF\u7528\uFF09",
|
|
286
286
|
switcherFailed: "\u672A\u80FD\u5207\u6362\u5230\u8BE5\u4F1A\u8BDD\uFF08\u53EF\u80FD\u5DF2\u5220\u9664\uFF09",
|
|
287
287
|
switcherMore: "\u8FD8\u6709 {n} \u6761 \xB7 \u6309 c \u52A0\u8F7D",
|
|
288
288
|
switcherRunning: "\u8FD0\u884C\u4E2D",
|
|
289
289
|
switcherUnseen: "\u672A\u67E5\u770B",
|
|
290
|
-
switcherAttentionHint: "\u8FD0\u884C\u4E2D / \u8FD0\u884C\u5B8C\u672A\u67E5\u770B\u7684\u4EFB\u52A1 \xB7 {prev} / {next} \u6216 \u2191 / \u2193 \u9009\u62E9\uFF0CEnter \u6216\
|
|
290
|
+
switcherAttentionHint: "\u8FD0\u884C\u4E2D / \u8FD0\u884C\u5B8C\u672A\u67E5\u770B\u7684\u4EFB\u52A1 \xB7 {prev} / {next} \u6216 \u2191 / \u2193 \u9009\u62E9\uFF0CEnter \u6216\u70B9\u51FB\u884C\u5207\u6362",
|
|
291
291
|
switcherAttentionEmpty: "\u6682\u65E0\u8FD0\u884C\u4E2D\u6216\u672A\u67E5\u770B\u7684\u4EFB\u52A1",
|
|
292
292
|
featureNewtabPanels: "\u65B0\u6807\u7B7E\u9875\u63D2\u4EF6\u9762\u677F\u5165\u53E3",
|
|
293
|
-
featureNewtabPanelsDesc: "\
|
|
293
|
+
featureNewtabPanelsDesc: "\u65B0\u6807\u7B7E\u9875\u52A0\u5165\u7B2C\u4E09\u65B9\u63D2\u4EF6\uFF08headroom\u3001rtk \u7B49\uFF09\u7684\u9762\u677F\u5361\u7247\uFF0C\u70B9\u51FB\u5728\u4FA7\u8FB9\u9762\u677F\u6253\u5F00\u3002",
|
|
294
294
|
ntpDescSuffix: "\u63D2\u4EF6\u9762\u677F",
|
|
295
295
|
ntpNeedSession: "\u5148\u6253\u5F00\u4E00\u4E2A\u4EFB\u52A1\u4F1A\u8BDD\uFF0C\u518D\u4ECE\u65B0\u6807\u7B7E\u9875\u6253\u5F00\u63D2\u4EF6\u9762\u677F",
|
|
296
296
|
featureStatusBarDesc: "\u63D0\u95EE\u8F93\u5165\u6846\u53F3\u4E0B\u89D2\u548C\u6BCF\u8F6E\u56DE\u7B54\u6700\u540E\u663E\u793A\u7EDF\u8BA1\u9879\u3002",
|
|
@@ -348,6 +348,8 @@
|
|
|
348
348
|
themeBgPanel: "\u9762\u677F\u4E0D\u900F\u660E\u5EA6",
|
|
349
349
|
themeBgPanelHint: "\u4FA7\u680F\u3001\u9762\u677F\u4E0E\u6807\u7B7E\u680F\u7684\u4E0D\u900F\u660E\u7A0B\u5EA6\u3002\u8D8A\u4F4E\uFF0C\u900F\u51FA\u7684\u56FE\u7247\u8D8A\u591A\u3002",
|
|
350
350
|
themeBgDeletedActive: "\u5F53\u524D\u80CC\u666F\u5DF2\u5220\u9664\uFF0C\u5DF2\u81EA\u52A8\u505C\u7528\u80CC\u666F",
|
|
351
|
+
tableCopyBtn: "\u590D\u5236\u8868\u683C",
|
|
352
|
+
tableCopied: "\u8868\u683C\u5DF2\u590D\u5236",
|
|
351
353
|
sbItemCtx: "\u4E0A\u4E0B\u6587\u5360\u7528",
|
|
352
354
|
sbItemQuestions: "\u63D0\u95EE\u6B21\u6570",
|
|
353
355
|
sbMaster: "\u542F\u7528\u7EDF\u8BA1",
|
|
@@ -382,8 +384,6 @@
|
|
|
382
384
|
hkArrow: "\u5F39\u7A97\u6253\u5F00\u65F6\u79FB\u52A8\u9AD8\u4EAE\uFF08\u4E0E alt + {prev} / alt + {next} \u540C\u89C4\u5219\uFF09",
|
|
383
385
|
hkEnter: "\u786E\u8BA4\u5207\u6362\u5230\u9AD8\u4EAE\u7684\u4F1A\u8BDD",
|
|
384
386
|
hkEsc: "\u53D6\u6D88\u5E76\u5173\u95ED\u5F39\u7A97",
|
|
385
|
-
hkRelease: "\u79FB\u52A8\u8FC7\u9AD8\u4EAE\u65F6\u677E\u5F00\u5373\u5207\u6362\uFF1B\u4ECE\u672A\u79FB\u52A8\u5219\u5F39\u7A97\u4FDD\u6301\u6253\u5F00\uFF0C\u7EE7\u7EED\u9009\u62E9",
|
|
386
|
-
hkReleaseKey: "\u677E\u5F00 alt",
|
|
387
387
|
hkModify: "\u4FEE\u6539",
|
|
388
388
|
hkRecording: "\u6309\u4E0B\u65B0\u952E\u2026",
|
|
389
389
|
hkInvalid: "\u5FEB\u6377\u952E\u53EA\u652F\u6301\u5355\u4E2A\u5B57\u6BCD\u6216\u6570\u5B57",
|
|
@@ -400,7 +400,11 @@
|
|
|
400
400
|
featureFileActions: "\u6587\u4EF6\u83DC\u5355\u589E\u5F3A",
|
|
401
401
|
featureFileActionsDesc: "\u5728\u4F1A\u8BDD\u4E2D\u6587\u4EF6\u94FE\u63A5\u7684\u53F3\u952E\u83DC\u5355\u91CC\u65B0\u589E\u201C\u9ED8\u8BA4\u5E94\u7528\u6253\u5F00\u201D\u4E0E\u201C\u6253\u5F00\u6240\u5728\u76EE\u5F55\u201D\u3002",
|
|
402
402
|
featureImageCopy: "\u56FE\u7247\u53F3\u952E\u590D\u5236",
|
|
403
|
+
featureTableCopy: "\u590D\u5236\u8868\u683C",
|
|
404
|
+
featureComposerProvider: "\u6A21\u578B\u540D\u663E\u793A\u4F9B\u5E94\u5546",
|
|
403
405
|
featureImageCopyDesc: "\u53F3\u952E\u4F1A\u8BDD\u4E2D\u7684\u56FE\u7247\u6216\u70B9\u51FB\u653E\u5927\u7684\u9884\u89C8\u56FE\uFF0C\u53EF\u5C06\u56FE\u7247\u590D\u5236\u5230\u526A\u8D34\u677F\u3002",
|
|
406
|
+
featureTableCopyDesc: "\u8868\u683C\u5DE5\u5177\u6761\u65B0\u589E\u590D\u5236\u8868\u683C\uFF0C\u7C98\u8D34\u8FDB Excel / \u5BCC\u6587\u672C\u7F16\u8F91\u5668\u5373\u4E3A\u5E72\u51C0\u8868\u683C\u3002",
|
|
407
|
+
featureComposerProviderDesc: "\u6A21\u578B\u540D\u524D\u663E\u793A\u4F9B\u5E94\u5546\u540D\uFF08\u5982 BigModel-Max1 / glm-5.3\uFF09\uFF0C\u533A\u5206\u540C\u540D\u6A21\u578B\u3002",
|
|
404
408
|
imageCopy: "\u590D\u5236\u56FE\u7247",
|
|
405
409
|
imageCopied: "\u56FE\u7247\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F",
|
|
406
410
|
imageCopyFailed: "\u590D\u5236\u56FE\u7247\u5931\u8D25",
|
|
@@ -423,7 +427,7 @@
|
|
|
423
427
|
pluginsUpdatesAvailable: "zcode-plugins \u6709 {n} \u4E2A\u63D2\u4EF6\u53EF\u66F4\u65B0\uFF08ZCode Pro \u8BBE\u7F6E \u2192 \u529F\u80FD\uFF09",
|
|
424
428
|
pluginsAutoUpdated: "zcode-plugins \u63D2\u4EF6\u5DF2\u66F4\u65B0",
|
|
425
429
|
tabVision: "Vision",
|
|
426
|
-
visionDesc: "\u4E3B\u6A21\u578B\u4E0D\u652F\u6301\u56FE\u7247\u8F93\u5165\u65F6\uFF08\u5982 glm-5.3\uFF09\uFF0C\u81EA\u52A8\u628A\u6D88\u606F\u91CC\u7684\u56FE\u7247\u4EA4\u7ED9\u4E0B\u9762\u7684\u89C6\u89C9\u6A21\u578B\u8BC6\u522B\uFF0C\u628A\u63CF\u8FF0\u5E26\u7ED9\u4E3B\u6A21\u578B\uFF08zcode-vision \u63D2\u4EF6\uFF1B/vision-* \u547D\u4EE4\u7F16\u8F91\u540C\u4E00\u914D\u7F6E\uFF09\u3002
|
|
430
|
+
visionDesc: "\u4E3B\u6A21\u578B\u4E0D\u652F\u6301\u56FE\u7247\u8F93\u5165\u65F6\uFF08\u5982 glm-5.3\uFF09\uFF0C\u81EA\u52A8\u628A\u6D88\u606F\u91CC\u7684\u56FE\u7247\u4EA4\u7ED9\u4E0B\u9762\u7684\u89C6\u89C9\u6A21\u578B\u8BC6\u522B\uFF0C\u628A\u63CF\u8FF0\u5E26\u7ED9\u4E3B\u6A21\u578B\uFF08zcode-vision \u63D2\u4EF6\uFF1B/vision-* \u547D\u4EE4\u7F16\u8F91\u540C\u4E00\u914D\u7F6E\uFF09\u3002",
|
|
427
431
|
visionEnabled: "\u542F\u7528",
|
|
428
432
|
visionForceIntercept: "\u4E3B\u6A21\u578B\u80FD\u770B\u56FE\u4E5F\u62E6\u622A",
|
|
429
433
|
visionMode: "\u94FE\u6A21\u5F0F",
|
|
@@ -454,14 +458,14 @@
|
|
|
454
458
|
visionCompressKBHint: "\u8D85\u8FC7\u8BE5\u5927\u5C0F\u7684\u56FE\u5148\u538B\u7F29\u518D\u8BC6\u522B\uFF08\u6700\u957F\u8FB9 2000\u3001JPEG\uFF09\uFF1B0 = \u4E0D\u538B\u7F29",
|
|
455
459
|
visionLoadFailed: "\u8BFB\u53D6\u89C6\u89C9\u4EE3\u7406\u914D\u7F6E\u5931\u8D25",
|
|
456
460
|
tabRtk: "rtk",
|
|
457
|
-
rtkDesc: "rtk \u63D2\u4EF6\uFF1A\u628A\u5E38\u89C1\u5F00\u53D1\u547D\u4EE4\u7684\u8F93\u51FA\u538B\u7F29 60-90% \u518D\u8FDB\u5165\u4E0A\u4E0B\u6587\uFF08/rtk-* \u547D\u4EE4\u7F16\u8F91\u540C\u4E00\u914D\u7F6E\uFF09\u3002
|
|
461
|
+
rtkDesc: "rtk \u63D2\u4EF6\uFF1A\u628A\u5E38\u89C1\u5F00\u53D1\u547D\u4EE4\u7684\u8F93\u51FA\u538B\u7F29 60-90% \u518D\u8FDB\u5165\u4E0A\u4E0B\u6587\uFF08/rtk-* \u547D\u4EE4\u7F16\u8F91\u540C\u4E00\u914D\u7F6E\uFF09\u3002",
|
|
458
462
|
rtkEnabled: "\u542F\u7528",
|
|
459
463
|
rtkNotInstalled: "\u672A\u5B89\u88C5 rtk \u672C\u4F53\uFF1B\u5B89\u88C5\u540E\u4EE5\u4E0B\u8BBE\u7F6E\u751F\u6548\uFF08\u4F1A\u8BDD\u91CC\u6267\u884C /rtk-setup \u4E5F\u53EF\u4EE5\uFF09",
|
|
460
464
|
rtkInstallBin: "\u5B89\u88C5 rtk \u672C\u4F53",
|
|
461
465
|
rtkBinInstalled: "rtk \u672C\u4F53\u5DF2\u5B89\u88C5\uFF1BPATH \u9700\u6CE8\u9500\u91CD\u767B\u540E\u5BF9\u4F1A\u8BDD\u751F\u6548\uFF0C\u63D2\u4EF6\u94A9\u5B50\u5373\u65F6\u751F\u6548",
|
|
462
466
|
rtkWhitelistTitle: "\u767D\u540D\u5355\uFF08\u4E0D\u538B\u7F29\u76F4\u63A5\u653E\u884C\uFF09",
|
|
463
467
|
rtkBuiltinLabel: "\u5185\u7F6E\u653E\u884C\uFF08\u53EA\u8BFB\uFF0C\u968F\u63D2\u4EF6\u66F4\u65B0\uFF09\uFF1A",
|
|
464
|
-
rtkWhitelistDesc: "\u6BCF\u6761 name\uFF08\u5982 docker\uFF09\u6216 git:name\uFF08\u5982 git:clone\uFF09\
|
|
468
|
+
rtkWhitelistDesc: "\u6BCF\u6761 name\uFF08\u5982 docker\uFF09\u6216 git:name\uFF08\u5982 git:clone\uFF09\uFF0C\u52A0\u5165\u540E\u4E0D\u518D\u538B\u7F29\uFF1B\u5185\u7F6E\u7684 git add/commit/push\u3001mkdir/cp \u7B49\u4E0D\u53EF\u79FB\u9664\u3002",
|
|
465
469
|
rtkWhitelistPlaceholder: "name \u6216 git:name\uFF0C\u56DE\u8F66\u6DFB\u52A0",
|
|
466
470
|
rtkWhitelistAdd: "\u6DFB\u52A0",
|
|
467
471
|
rtkWhitelistClear: "\u6E05\u7A7A",
|
|
@@ -469,18 +473,18 @@
|
|
|
469
473
|
rtkWhitelistInvalid: "\u6761\u76EE\u683C\u5F0F\u5E94\u4E3A name \u6216 git:name",
|
|
470
474
|
rtkLoadFailed: "\u8BFB\u53D6 rtk \u914D\u7F6E\u5931\u8D25",
|
|
471
475
|
tabHeadroom: "Headroom",
|
|
472
|
-
headroomDesc: "Headroom \u63D2\u4EF6\uFF1A\u672C\u5730\u538B\u7F29\u4EE3\u7406\u9A7B\u7559 127.0.0.1\uFF08\u9ED8\u8BA4 8787 \u7AEF\u53E3\uFF09\uFF0C\u538B\u7F29\u53D1\u5F80\u6A21\u578B\u7684\u4E0A\u4E0B\u6587\u4EE5\u7701 token\uFF08/hr-* \u547D\u4EE4\u7F16\u8F91\u540C\u4E00\u914D\u7F6E\uFF09\u3002\
|
|
476
|
+
headroomDesc: "Headroom \u63D2\u4EF6\uFF1A\u672C\u5730\u538B\u7F29\u4EE3\u7406\u9A7B\u7559 127.0.0.1\uFF08\u9ED8\u8BA4 8787 \u7AEF\u53E3\uFF09\uFF0C\u538B\u7F29\u53D1\u5F80\u6A21\u578B\u7684\u4E0A\u4E0B\u6587\u4EE5\u7701 token\uFF08/hr-* \u547D\u4EE4\u7F16\u8F91\u540C\u4E00\u914D\u7F6E\uFF09\u3002\u5207\u6362\u8BBE\u5907\u4F1A\u91CD\u542F\u4EE3\u7406\uFF0C\u6B63\u5728\u5904\u7406\u7684\u8BF7\u6C42\u53EF\u80FD\u4E2D\u65AD\u4E00\u6B21\u3002",
|
|
473
477
|
headroomBinMissing: "\u672A\u627E\u5230 headroom \u7A0B\u5E8F\uFF0C\u4EE3\u7406\u65E0\u6CD5\u542F\u52A8\uFF1B\u5B89\u88C5 headroom \u540E\u4EE5\u4E0B\u8BBE\u7F6E\u81EA\u52A8\u751F\u6548",
|
|
474
478
|
hrInstallBin: "\u5B89\u88C5 headroom \u672C\u4F53",
|
|
475
|
-
hrBinInstalled: "headroom \u672C\u4F53\u5DF2\u5B89\u88C5\uFF1B\u91CD\u65B0\u6253\u5F00\u4F1A\u8BDD\u540E\u4EE3\u7406\u53EF\u7528\uFF08SessionStart \u94A9\u5B50\u81EA\u52A8\u62C9\u8D77\uFF09",
|
|
479
|
+
hrBinInstalled: "headroom \u672C\u4F53\u5DF2\u5B89\u88C5\uFF1B\u91CD\u65B0\u6253\u5F00\u5E94\u7528\u6216\u4F1A\u8BDD\u540E\u4EE3\u7406\u53EF\u7528\uFF08SessionStart \u94A9\u5B50\u81EA\u52A8\u62C9\u8D77\uFF09",
|
|
476
480
|
headroomInstallTitle: "\u672A\u5B89\u88C5 headroom \u63D2\u4EF6",
|
|
477
|
-
headroomInstallDesc: "\u4ECE zcode-plugins \u5E02\u573A\u5B89\u88C5\u540E\u5373\u53EF\u5728\u6B64\u7BA1\u7406\u538B\u7F29\u4EE3\u7406\uFF1B\
|
|
481
|
+
headroomInstallDesc: "\u4ECE zcode-plugins \u5E02\u573A\u5B89\u88C5\u540E\u5373\u53EF\u5728\u6B64\u7BA1\u7406\u538B\u7F29\u4EE3\u7406\uFF1B\u91CD\u542F\u4F1A\u8BDD\u540E\u751F\u6548\u3002",
|
|
478
482
|
headroomInstall: "\u5B89\u88C5",
|
|
479
483
|
headroomInstalling: "\u5B89\u88C5\u4E2D\u2026",
|
|
480
484
|
headroomInstalled: "\u5DF2\u5B89\u88C5 headroom \u63D2\u4EF6",
|
|
481
485
|
headroomInstallRetry: "\u5B89\u88C5\u672A\u751F\u6548\uFF0C\u8BF7\u91CD\u8BD5\u6216\u624B\u52A8\u5728\u63D2\u4EF6\u5E02\u573A\u5B89\u88C5",
|
|
482
486
|
pluginInstallCardTitle: "\u672A\u5B89\u88C5 {name} \u63D2\u4EF6",
|
|
483
|
-
pluginInstallCardDesc: "\u4ECE zcode-plugins \u5E02\u573A\u5B89\u88C5\u540E\u5373\u53EF\u5728\u6B64\u7BA1\u7406\uFF1B\
|
|
487
|
+
pluginInstallCardDesc: "\u4ECE zcode-plugins \u5E02\u573A\u5B89\u88C5\u540E\u5373\u53EF\u5728\u6B64\u7BA1\u7406\uFF1B\u91CD\u542F\u4F1A\u8BDD\u540E\u751F\u6548\u3002",
|
|
484
488
|
pluginInstallDone: "\u5DF2\u5B89\u88C5 {name} \u63D2\u4EF6",
|
|
485
489
|
pluginEnable: "\u542F\u7528",
|
|
486
490
|
hrStarting: "\u6B63\u5728\u542F\u52A8\u538B\u7F29\u4EE3\u7406\u2026",
|
|
@@ -523,7 +527,7 @@
|
|
|
523
527
|
headroomBackendAuto: "\u81EA\u52A8 \xB7 \u663E\u5361\u4F18\u5148",
|
|
524
528
|
headroomBackendCpu: "\u7701\u7535 \xB7 CPU \u4F18\u5148",
|
|
525
529
|
headroomBackendNative: "\uFF08\u539F\u751F\u503C\uFF09",
|
|
526
|
-
headroomBackendDesc: "\u81EA\u52A8\uFF1Aheadroom \u9009\u6700\u5FEB\u8BBE\u5907\uFF08CUDA/MPS \u663E\u5361\u4F18\u5148\uFF09\uFF1BCPU\uFF1A\u5F3A\u5236 CPU \u538B\u7F29\uFF0C\u7701\u7535\u4E14\u4E0D\u5360\u663E\u5B58\u3002\u4E5F\u652F\u6301 headroom \u539F\u751F\u503C\uFF08onnx\u3001pytorch_mps \u7B49\uFF09\u3002
|
|
530
|
+
headroomBackendDesc: "\u81EA\u52A8\uFF1Aheadroom \u9009\u6700\u5FEB\u8BBE\u5907\uFF08CUDA/MPS \u663E\u5361\u4F18\u5148\uFF09\uFF1BCPU\uFF1A\u5F3A\u5236 CPU \u538B\u7F29\uFF0C\u7701\u7535\u4E14\u4E0D\u5360\u663E\u5B58\u3002\u4E5F\u652F\u6301 headroom \u539F\u751F\u503C\uFF08onnx\u3001pytorch_mps \u7B49\uFF09\u3002",
|
|
527
531
|
headroomPower: "\u7701\u7535\u81EA\u52A8\u5207\u6362",
|
|
528
532
|
headroomPowerOff: "\u5173\u95ED",
|
|
529
533
|
headroomPowerOffDesc: "\u4E0D\u81EA\u52A8\u5207\u6362\uFF0C\u59CB\u7EC8\u6309\u201C\u538B\u7F29\u8BBE\u5907\u201D\u8FD0\u884C\u3002",
|
|
@@ -533,7 +537,7 @@
|
|
|
533
537
|
headroomPowerSaverDesc: "\u4EC5\u7CFB\u7EDF\u8FDB\u5165\u7701\u7535\u6A21\u5F0F \u2192 CPU \u538B\u7F29\uFF0C\u9000\u51FA\u5207\u56DE\u3002",
|
|
534
538
|
hrCpuPinnedHint: "\u538B\u7F29\u8BBE\u5907\u5DF2\u56FA\u5B9A\u4E3A CPU\uFF0C\u7701\u7535\u81EA\u52A8\u5207\u6362\u4E0D\u4F1A\u518D\u6539\u53D8\u5B83\u3002",
|
|
535
539
|
headroomInterval: "\u76D1\u89C6\u95F4\u9694",
|
|
536
|
-
headroomIntervalDesc: "\u7701\u7535\u76D1\u89C6\u5668\u8F6E\u8BE2\u7535\u6E90\u72B6\u6001\u7684\u95F4\u9694\uFF0810\u20133600 \u79D2\uFF0C\u9ED8\u8BA4 60\uFF09\uFF1B\u4FDD\u5B58\u540E\u4ECE\u4E0B\u4E00\u8F6E\u5DE1\u68C0\u8D77\u751F\u6548\
|
|
540
|
+
headroomIntervalDesc: "\u7701\u7535\u76D1\u89C6\u5668\u8F6E\u8BE2\u7535\u6E90\u72B6\u6001\u7684\u95F4\u9694\uFF0810\u20133600 \u79D2\uFF0C\u9ED8\u8BA4 60\uFF09\uFF1B\u4FDD\u5B58\u540E\u4ECE\u4E0B\u4E00\u8F6E\u5DE1\u68C0\u8D77\u751F\u6548\u3002",
|
|
537
541
|
headroomSecUnit: "\u79D2",
|
|
538
542
|
upgradeCheck: "\u68C0\u67E5\u66F4\u65B0",
|
|
539
543
|
upgradeChecking: "\u68C0\u67E5\u4E2D\u2026",
|
|
@@ -620,7 +624,7 @@
|
|
|
620
624
|
agentsSave: "Save",
|
|
621
625
|
agentsSaved: "Global prompt saved.",
|
|
622
626
|
agentsLoadFailed: "Failed to load the global prompt",
|
|
623
|
-
proxyDesc: "Set an HTTP proxy for network access made by the local helper: plugin marketplace updates and installs, plugin dependency installs and upgrades, and WebDAV sync can all use it \u2014 pick the scopes with the toggles below. Does not affect the ZCode app itself or model requests.
|
|
627
|
+
proxyDesc: "Set an HTTP proxy for network access made by the local helper: plugin marketplace updates and installs, plugin dependency installs and upgrades, and WebDAV sync can all use it \u2014 pick the scopes with the toggles below. Does not affect the ZCode app itself or model requests.",
|
|
624
628
|
proxyPlaceholder: "http://127.0.0.1:7890",
|
|
625
629
|
proxySave: "Save",
|
|
626
630
|
proxySaved: "Proxy settings saved.",
|
|
@@ -634,7 +638,7 @@
|
|
|
634
638
|
proxyScopeDeps: "Plugin dependencies",
|
|
635
639
|
proxyScopeDepsDesc: "headroom and rtk installs, update checks and upgrades (pip and GitHub downloads) go through the proxy.",
|
|
636
640
|
proxyScopeSync: "Sync",
|
|
637
|
-
proxyScopeSyncDesc: "WebDAV upload and download go through the proxy.
|
|
641
|
+
proxyScopeSyncDesc: "WebDAV upload and download go through the proxy.",
|
|
638
642
|
tabSync: "Sync",
|
|
639
643
|
tabDebug: "Debug",
|
|
640
644
|
testNoSessionHint: "With \u201Cfollow current session [current model]\u201D selected, the provider [model] of the last session is used.",
|
|
@@ -721,13 +725,13 @@
|
|
|
721
725
|
defaultValue: "default",
|
|
722
726
|
resetDefault: "Reset to default",
|
|
723
727
|
featureProjectMenu: "Project menu actions",
|
|
724
|
-
featureProjectMenuDesc:
|
|
728
|
+
featureProjectMenuDesc: "Open folder and copy path in the project More menu (alias and folder switch retired).",
|
|
725
729
|
featureTaskOrder: "Sidebar session drag ordering",
|
|
726
|
-
featureTaskOrderDesc: "
|
|
730
|
+
featureTaskOrderDesc: "Drag to reorder sessions in Pinned, Projects and Groups; survives restarts.",
|
|
727
731
|
featureSessionSwitch: "Session quick switch",
|
|
728
|
-
featureSessionSwitchDesc: "{last} toggles
|
|
732
|
+
featureSessionSwitchDesc: "{last} toggles to the last session; alt + arrows pick recent sessions; keys remappable",
|
|
729
733
|
featureTitleLock: "Keep renamed session titles",
|
|
730
|
-
featureTitleLockDesc: "Sessions you renamed keep their custom title
|
|
734
|
+
featureTitleLockDesc: "Sessions you renamed keep their custom title in the sidebar.",
|
|
731
735
|
tabTitleGen: "Task name prompt",
|
|
732
736
|
titleGenShortDesc: "When a new session starts answering, generates the task name with the chosen provider and prompt and saves it as a manual rename the built-in title never overrides.",
|
|
733
737
|
titleGenEnabled: "Enable",
|
|
@@ -753,7 +757,7 @@
|
|
|
753
757
|
titleGenTestOk: "Result: ",
|
|
754
758
|
titleGenTestFailed: "Generation failed",
|
|
755
759
|
featureWsRunning: "Running indicator when collapsed",
|
|
756
|
-
featureWsRunningDesc: "
|
|
760
|
+
featureWsRunningDesc: "Collapsed project and task headers show a loader while sessions run.",
|
|
757
761
|
tabPerformance: "Performance",
|
|
758
762
|
perfDesc: "ZCode keeps a session process resident for every project you have opened and never reclaims it, so memory grows with projects. When enabled, projects unused for a while with nothing running release their memory automatically: sessions are untouched and reload when reopened, with a few seconds wait on the first reply. The project in use, running sessions, background commands and scheduled tasks are never reclaimed. Background-command detection reads system process info via built-in tools (Linux / macOS / Windows); when unavailable, the feature disables itself.",
|
|
759
763
|
featureIdleReclaim: "Idle project memory reclaim",
|
|
@@ -763,15 +767,15 @@
|
|
|
763
767
|
idleReclaimStartupHint: "Startup pre-spawns a process per restored project; this pass collects the unused ones once. 0 = reclaim right after startup, ignoring the idle minutes above",
|
|
764
768
|
idleReclaimUnit: "min",
|
|
765
769
|
featureToolbarIcons: "Sidebar menu in the top bar",
|
|
766
|
-
featureToolbarIconsDesc: "
|
|
770
|
+
featureToolbarIconsDesc: "New task / search / automations / plugin store become top-bar icon buttons.",
|
|
767
771
|
tbNewTask: "New task",
|
|
768
772
|
tbSearch: "Search",
|
|
769
773
|
tbAutomations: "Automations",
|
|
770
774
|
tbPluginStore: "Plugin store",
|
|
771
775
|
featurePinnedCollapse: "Collapsible Pinned section",
|
|
772
|
-
featurePinnedCollapseDesc:
|
|
776
|
+
featurePinnedCollapseDesc: "The Pinned header collapses/expands its task list.",
|
|
773
777
|
featureSandboxReclaim: "Plugin card sandbox reclaim",
|
|
774
|
-
featureSandboxReclaimDesc: "
|
|
778
|
+
featureSandboxReclaimDesc: "Reclaims the oldest sandboxes at the 64 cap so new cards keep opening; released cards come back when their session is reopened.",
|
|
775
779
|
featurePluginCardRetry: "Plugin card auto-retry",
|
|
776
780
|
featurePluginCardRetryDesc: 'Auto-clicks "Reload" on cards that failed the slot cap; they recover as soon as a slot frees up.',
|
|
777
781
|
visionCardUi: "Vision cards",
|
|
@@ -786,17 +790,17 @@
|
|
|
786
790
|
userFontDesc: 'Font of question text in conversations; "default" follows the UI font.',
|
|
787
791
|
assistantFontName: "Answer font",
|
|
788
792
|
assistantFontDesc: 'Font of answer text in conversations (code blocks stay monospaced); "default" follows the UI font.',
|
|
789
|
-
switcherHint: "{prev} / {next} or \u2191 / \u2193 to choose, Enter or
|
|
793
|
+
switcherHint: "{prev} / {next} or \u2191 / \u2193 to choose, Enter or click a row to switch, Esc to cancel",
|
|
790
794
|
switcherCurrent: "current",
|
|
791
795
|
switcherEmpty: "No previous session yet (available after you switch sessions)",
|
|
792
796
|
switcherFailed: "Failed to switch to that session (it may have been deleted)",
|
|
793
797
|
switcherMore: "{n} more \xB7 press c to load",
|
|
794
798
|
switcherRunning: "running",
|
|
795
799
|
switcherUnseen: "unseen",
|
|
796
|
-
switcherAttentionHint: "Running / finished but unseen tasks \xB7 {prev} / {next} or \u2191 / \u2193 to choose, Enter or
|
|
800
|
+
switcherAttentionHint: "Running / finished but unseen tasks \xB7 {prev} / {next} or \u2191 / \u2193 to choose, Enter or click a row to switch",
|
|
797
801
|
switcherAttentionEmpty: "No running or unseen tasks",
|
|
798
802
|
featureNewtabPanels: "Plugin panels on the new tab page",
|
|
799
|
-
featureNewtabPanelsDesc:
|
|
803
|
+
featureNewtabPanelsDesc: "Adds third-party plugin panels (headroom, rtk, ...) to the new tab page; click to open in the side pane.",
|
|
800
804
|
ntpDescSuffix: "plugin panel",
|
|
801
805
|
ntpNeedSession: "Open a task session first, then open plugin panels from the new tab page",
|
|
802
806
|
featureStatusBarDesc: "Shows statistics at the bottom-right of the input box and at the end of each answer.",
|
|
@@ -854,6 +858,8 @@
|
|
|
854
858
|
themeBgPanel: "Panel opacity",
|
|
855
859
|
themeBgPanelHint: "Opacity of sidebar, panels and tab bar. Lower reveals more of the image.",
|
|
856
860
|
themeBgDeletedActive: "Active background was deleted; background disabled",
|
|
861
|
+
tableCopyBtn: "Copy table",
|
|
862
|
+
tableCopied: "Table copied",
|
|
857
863
|
sbItemCtx: "Context usage",
|
|
858
864
|
sbItemQuestions: "Questions asked",
|
|
859
865
|
sbMaster: "Enable statistics",
|
|
@@ -888,8 +894,6 @@
|
|
|
888
894
|
hkArrow: "Move the highlight while the popup is open (same rules as alt + {prev} / alt + {next})",
|
|
889
895
|
hkEnter: "Switch to the highlighted session",
|
|
890
896
|
hkEsc: "Cancel and close the popup",
|
|
891
|
-
hkRelease: "Releasing alt switches once the highlight has moved; otherwise the popup stays open for further selection",
|
|
892
|
-
hkReleaseKey: "release alt",
|
|
893
897
|
hkModify: "Change",
|
|
894
898
|
hkRecording: "press a key\u2026",
|
|
895
899
|
hkInvalid: "Shortcuts accept a single letter or digit only",
|
|
@@ -906,7 +910,11 @@
|
|
|
906
910
|
featureFileActions: "File menu actions",
|
|
907
911
|
featureFileActionsDesc: 'Adds "Open with default app" and "Reveal in file manager" to the right-click menu of file links in chat.',
|
|
908
912
|
featureImageCopy: "Image right-click copy",
|
|
913
|
+
featureTableCopy: "Copy table",
|
|
914
|
+
featureComposerProvider: "Provider in model name",
|
|
909
915
|
featureImageCopyDesc: "Right-click an image in chat or the enlarged preview to copy it to the clipboard.",
|
|
916
|
+
featureTableCopyDesc: "Copy-table button on the table toolbar; pastes into Excel / editors as a clean table.",
|
|
917
|
+
featureComposerProviderDesc: "Shows the provider before the model name (e.g. BigModel-Max1 / glm-5.3).",
|
|
910
918
|
imageCopy: "Copy image",
|
|
911
919
|
imageCopied: "Image copied to the clipboard.",
|
|
912
920
|
imageCopyFailed: "Failed to copy the image.",
|
|
@@ -929,7 +937,7 @@
|
|
|
929
937
|
pluginsUpdatesAvailable: "{n} zcode-plugins update(s) available (ZCode Pro settings \u2192 Features)",
|
|
930
938
|
pluginsAutoUpdated: "zcode-plugins updated",
|
|
931
939
|
tabVision: "Vision",
|
|
932
|
-
visionDesc: "When the main model cannot see images (e.g. glm-5.3), images in messages are recognized by the vision models below and passed to the main model as text (zcode-vision plugin; /vision-* commands edit the same file).
|
|
940
|
+
visionDesc: "When the main model cannot see images (e.g. glm-5.3), images in messages are recognized by the vision models below and passed to the main model as text (zcode-vision plugin; /vision-* commands edit the same file).",
|
|
933
941
|
visionEnabled: "Enable",
|
|
934
942
|
visionForceIntercept: "Intercept even if the main model sees images",
|
|
935
943
|
visionMode: "Chain mode",
|
|
@@ -960,14 +968,14 @@
|
|
|
960
968
|
visionCompressKBHint: "Images above this size are compressed first (max edge 2000, JPEG); 0 = never",
|
|
961
969
|
visionLoadFailed: "Failed to load the vision config",
|
|
962
970
|
tabRtk: "rtk",
|
|
963
|
-
rtkDesc: "rtk plugin: compresses common dev command output by 60-90% before it reaches the context (/rtk-* commands edit the same files).
|
|
971
|
+
rtkDesc: "rtk plugin: compresses common dev command output by 60-90% before it reaches the context (/rtk-* commands edit the same files).",
|
|
964
972
|
rtkEnabled: "Enable",
|
|
965
973
|
rtkNotInstalled: "rtk is not installed. The settings below take effect after installation (/rtk-setup in a session).",
|
|
966
974
|
rtkInstallBin: "Install rtk binary",
|
|
967
975
|
rtkBinInstalled: "rtk installed; PATH takes effect for sessions after signing out and back in \u2014 the plugin hook works immediately",
|
|
968
976
|
rtkWhitelistTitle: "Whitelist (pass through without compression)",
|
|
969
977
|
rtkBuiltinLabel: "Built-in exemptions (read-only, follow plugin updates):",
|
|
970
|
-
rtkWhitelistDesc: "Each entry is name (e.g. docker) or git:name (e.g. git:clone)
|
|
978
|
+
rtkWhitelistDesc: "Each entry is name (e.g. docker) or git:name (e.g. git:clone); added commands skip compression. Built-ins (git add/commit/push, mkdir/cp, \u2026) cannot be removed.",
|
|
971
979
|
rtkWhitelistPlaceholder: "name or git:name, press Enter to add",
|
|
972
980
|
rtkWhitelistAdd: "Add",
|
|
973
981
|
rtkWhitelistClear: "Clear",
|
|
@@ -975,18 +983,18 @@
|
|
|
975
983
|
rtkWhitelistInvalid: "Entry must be name or git:name",
|
|
976
984
|
rtkLoadFailed: "Failed to load the rtk config",
|
|
977
985
|
tabHeadroom: "Headroom",
|
|
978
|
-
headroomDesc: "Headroom plugin: a local compression proxy on 127.0.0.1 (port 8787 by default) that compresses context sent to the model to save tokens (/hr-* commands edit the same file).
|
|
986
|
+
headroomDesc: "Headroom plugin: a local compression proxy on 127.0.0.1 (port 8787 by default) that compresses context sent to the model to save tokens (/hr-* commands edit the same file). Switching the device restarts the proxy, so requests in progress may be interrupted once.",
|
|
979
987
|
headroomBinMissing: "The headroom program was not found, so the proxy cannot start. The settings below take effect once it is installed.",
|
|
980
988
|
hrInstallBin: "Install headroom binary",
|
|
981
|
-
hrBinInstalled: "headroom installed; reopen a session and the
|
|
989
|
+
hrBinInstalled: "headroom installed; reopen the app or a session and the proxy will start automatically",
|
|
982
990
|
headroomInstallTitle: "headroom plugin not installed",
|
|
983
|
-
headroomInstallDesc: "Install it from the zcode-plugins marketplace to manage the compression proxy here;
|
|
991
|
+
headroomInstallDesc: "Install it from the zcode-plugins marketplace to manage the compression proxy here; takes effect after a session restart.",
|
|
984
992
|
headroomInstall: "Install",
|
|
985
993
|
headroomInstalling: "Installing\u2026",
|
|
986
994
|
headroomInstalled: "headroom plugin installed",
|
|
987
995
|
headroomInstallRetry: "Installation did not take effect; retry or install it from the marketplace manually",
|
|
988
996
|
pluginInstallCardTitle: "{name} plugin not installed",
|
|
989
|
-
pluginInstallCardDesc: "Install it from the zcode-plugins marketplace to manage it here;
|
|
997
|
+
pluginInstallCardDesc: "Install it from the zcode-plugins marketplace to manage it here; takes effect after a session restart.",
|
|
990
998
|
pluginInstallDone: "{name} plugin installed",
|
|
991
999
|
pluginEnable: "Enable",
|
|
992
1000
|
hrStarting: "Starting compression proxy\u2026",
|
|
@@ -1039,7 +1047,7 @@
|
|
|
1039
1047
|
headroomPowerSaverDesc: "Only the system power-saver mode \u2192 CPU; back when it exits.",
|
|
1040
1048
|
hrCpuPinnedHint: "The compression device is pinned to CPU, so power-save switching no longer changes anything.",
|
|
1041
1049
|
headroomInterval: "Watch interval",
|
|
1042
|
-
headroomIntervalDesc: "Seconds between power checks (10\u20133600, default 60); applies from the next round
|
|
1050
|
+
headroomIntervalDesc: "Seconds between power checks (10\u20133600, default 60); applies from the next round.",
|
|
1043
1051
|
headroomSecUnit: "s",
|
|
1044
1052
|
upgradeCheck: "Check update",
|
|
1045
1053
|
upgradeChecking: "Checking\u2026",
|
|
@@ -1619,7 +1627,7 @@
|
|
|
1619
1627
|
"div",
|
|
1620
1628
|
{ class: "min-w-0 flex-1" },
|
|
1621
1629
|
h("div", { class: "text-ui-sm font-medium text-foreground" }, name),
|
|
1622
|
-
h("div", { class: "mt-0.5 text-ui-xs/relaxed text-foreground-subtle", "data-zcodepro-row-desc": "" }, desc ?? "")
|
|
1630
|
+
h("div", { class: "mt-0.5 text-ui-xs/relaxed text-foreground-subtle zcodepro-row-desc", "data-zcodepro-row-desc": "", title: desc ?? "" }, desc ?? "")
|
|
1623
1631
|
),
|
|
1624
1632
|
...extraEl ? [extraEl] : [],
|
|
1625
1633
|
h("button", {
|
|
@@ -1661,6 +1669,14 @@
|
|
|
1661
1669
|
/* \u6EDA\u5230\u5E95\u4E0D\u518D\u628A\u6EDA\u52A8\u4F20\u7ED9\u5F39\u7A97\u540E\u9762\u7684\u9875\u9762 */
|
|
1662
1670
|
overscroll-behavior: contain;
|
|
1663
1671
|
}
|
|
1672
|
+
/* \u53CC\u5217\u7F51\u683C\uFF08\u529F\u80FD\u9875\uFF09\u91CC\u7684\u884C\u63CF\u8FF0\u6700\u591A\u4E24\u884C\u7701\u7565\uFF1A\u957F\u63CF\u8FF0\u6491\u51FA\u7684\u53C2\u5DEE\u884C\u9AD8\u662F
|
|
1673
|
+
\u7F51\u683C\u89C2\u611F\u5DEE\u7684\u6839\u6E90\uFF1B\u5355\u5217\u573A\u666F\uFF08\u5176\u4ED6\u9762\u677F\uFF09\u4E0D\u53D7\u5F71\u54CD */
|
|
1674
|
+
.grid.grid-cols-2 > div > div > .zcodepro-row-desc {
|
|
1675
|
+
display: -webkit-box;
|
|
1676
|
+
-webkit-line-clamp: 2;
|
|
1677
|
+
-webkit-box-orient: vertical;
|
|
1678
|
+
overflow: hidden;
|
|
1679
|
+
}
|
|
1664
1680
|
/* \u5F00\u5173\uFF08\u8BBE\u7F6E\u5F39\u7A97\uFF09\uFF1A\u51E0\u4F55\u56FA\u5B9A\u5199\u5165\uFF0C\u989C\u8272\u968F\u4E3B\u9898\u53D8\u91CF */
|
|
1665
1681
|
[data-zcodepro-switch] {
|
|
1666
1682
|
position: relative;
|
|
@@ -1957,6 +1973,9 @@
|
|
|
1957
1973
|
height: 12px;
|
|
1958
1974
|
flex-shrink: 0;
|
|
1959
1975
|
opacity: 0.6;
|
|
1976
|
+
/* 11px \u5B57\u4F53\u7684\u89C6\u89C9\u4E2D\u5FC3\uFF08x-height \u4E2D\u70B9\uFF09\u9AD8\u4E8E\u884C\u76D2\u51E0\u4F55\u4E2D\u5FC3\u7EA6 1px\uFF08\u4E0B\u4F38\u90E8
|
|
1977
|
+
\u9884\u7559\uFF09\uFF0C\u51E0\u4F55\u5C45\u4E2D\u7684\u56FE\u6807\u770B\u8D77\u6765\u504F\u4E0B\u2014\u2014\u6574\u4F53\u4E0A\u79FB 1px \u5BF9\u9F50\u89C6\u89C9\u4E2D\u5FC3 */
|
|
1978
|
+
transform: translateY(-1px);
|
|
1960
1979
|
}
|
|
1961
1980
|
.zcodepro-statusbar b { font-weight: 600; color: var(--color-foreground-subtle, #666); }
|
|
1962
1981
|
.zcodepro-statusbar i {
|
|
@@ -3124,10 +3143,10 @@
|
|
|
3124
3143
|
function startImageMenu() {
|
|
3125
3144
|
if (typeof window === "undefined") return;
|
|
3126
3145
|
if (typeof navigator.clipboard?.write !== "function" || typeof window.ClipboardItem === "undefined") return;
|
|
3127
|
-
let
|
|
3146
|
+
let enabled11 = true;
|
|
3128
3147
|
const refresh = () => {
|
|
3129
3148
|
void getConfig().then((c) => {
|
|
3130
|
-
|
|
3149
|
+
enabled11 = !(c.features && c.features.imageCopy === false);
|
|
3131
3150
|
});
|
|
3132
3151
|
};
|
|
3133
3152
|
refresh();
|
|
@@ -3136,7 +3155,7 @@
|
|
|
3136
3155
|
const img = copyTargetOf(e.target, e.clientX, e.clientY);
|
|
3137
3156
|
if (!img) return;
|
|
3138
3157
|
e.preventDefault();
|
|
3139
|
-
if (
|
|
3158
|
+
if (enabled11) showMenu(e.clientX, e.clientY, img);
|
|
3140
3159
|
refresh();
|
|
3141
3160
|
}, true);
|
|
3142
3161
|
}
|
|
@@ -4651,8 +4670,12 @@
|
|
|
4651
4670
|
h("span", { class: "inline-block size-2 rounded-full bg-emerald-500" }),
|
|
4652
4671
|
h("span", { class: "text-foreground-subtle/70" }, `${health.version} \xB7 ${HELPER_URL}`)
|
|
4653
4672
|
);
|
|
4654
|
-
const rows = h("div", { class: "
|
|
4673
|
+
const rows = h("div", { class: "grid grid-cols-2 gap-x-0 gap-y-1 rounded-xl border border-border p-2 divide-x divide-border" });
|
|
4655
4674
|
const pluginsStatusLine = h("span", { class: "max-w-40 truncate text-ui-xs/relaxed text-foreground-subtle" }, "\u2026");
|
|
4675
|
+
const setPluginsStatus = (text) => {
|
|
4676
|
+
setPluginsStatus(text);
|
|
4677
|
+
pluginsStatusLine.setAttribute("title", text);
|
|
4678
|
+
};
|
|
4656
4679
|
const pluginsBtn = btnSmall(L.pluginsCheckNow, () => {
|
|
4657
4680
|
void runPluginsUpdate();
|
|
4658
4681
|
});
|
|
@@ -4661,23 +4684,23 @@
|
|
|
4661
4684
|
if (pluginsUpdating) return;
|
|
4662
4685
|
pluginsUpdating = true;
|
|
4663
4686
|
pluginsBtn.disabled = true;
|
|
4664
|
-
|
|
4687
|
+
setPluginsStatus(L.pluginsUpdating);
|
|
4665
4688
|
const res = await rpc("/plugins/update", { method: "POST", body: {} });
|
|
4666
4689
|
pluginsUpdating = false;
|
|
4667
4690
|
pluginsBtn.disabled = false;
|
|
4668
4691
|
if (!res.ok) {
|
|
4669
|
-
|
|
4692
|
+
setPluginsStatus("");
|
|
4670
4693
|
showToast(L.pluginsUpdateFailed + ": " + errText(res), "error");
|
|
4671
4694
|
return;
|
|
4672
4695
|
}
|
|
4673
|
-
|
|
4696
|
+
setPluginsStatus(res.updated > 0 ? L.pluginsUpdatedDone.replaceAll("{n}", String(res.updated)) : L.pluginsUpToDate);
|
|
4674
4697
|
showToast(pluginsStatusLine.textContent, "success");
|
|
4675
4698
|
};
|
|
4676
4699
|
void (async () => {
|
|
4677
4700
|
const cfg = await getConfig(true).catch(() => null);
|
|
4678
4701
|
const res = await rpc("/plugins/status");
|
|
4679
4702
|
if (!res.ok) {
|
|
4680
|
-
|
|
4703
|
+
setPluginsStatus("");
|
|
4681
4704
|
return;
|
|
4682
4705
|
}
|
|
4683
4706
|
const n = (res.updates || []).length;
|
|
@@ -4685,7 +4708,7 @@
|
|
|
4685
4708
|
void runPluginsUpdate();
|
|
4686
4709
|
return;
|
|
4687
4710
|
}
|
|
4688
|
-
|
|
4711
|
+
setPluginsStatus(n > 0 ? L.pluginsUpdatesFound.replaceAll("{n}", String(n)) : L.pluginsUpToDate);
|
|
4689
4712
|
})();
|
|
4690
4713
|
const HK_ACTIONS = [
|
|
4691
4714
|
["switchLast", "hkAltZ"],
|
|
@@ -4753,6 +4776,16 @@
|
|
|
4753
4776
|
if (await setFeature("imageCopy", next)) f.imageCopy = next;
|
|
4754
4777
|
refreshRows();
|
|
4755
4778
|
}),
|
|
4779
|
+
settingRow(L.featureTableCopy, L.featureTableCopyDesc, f.tableCopy !== false, async () => {
|
|
4780
|
+
const next = !(f.tableCopy !== false);
|
|
4781
|
+
if (await setFeature("tableCopy", next)) f.tableCopy = next;
|
|
4782
|
+
refreshRows();
|
|
4783
|
+
}),
|
|
4784
|
+
settingRow(L.featureComposerProvider, L.featureComposerProviderDesc, f.composerProvider !== false, async () => {
|
|
4785
|
+
const next = !(f.composerProvider !== false);
|
|
4786
|
+
if (await setFeature("composerProvider", next)) f.composerProvider = next;
|
|
4787
|
+
refreshRows();
|
|
4788
|
+
}),
|
|
4756
4789
|
settingRow(L.featureSandboxReclaim, L.featureSandboxReclaimDesc, f.sandboxReclaim !== false, async () => {
|
|
4757
4790
|
const next = !(f.sandboxReclaim !== false);
|
|
4758
4791
|
if (await setFeature("sandboxReclaim", next)) f.sandboxReclaim = next;
|
|
@@ -4791,12 +4824,14 @@
|
|
|
4791
4824
|
if (nameEl) {
|
|
4792
4825
|
nameEl.replaceChildren(
|
|
4793
4826
|
document.createTextNode(L.featureAutoUpdatePlugins + " "),
|
|
4794
|
-
repoLink
|
|
4795
|
-
document.createTextNode(" \u63D2\u4EF6")
|
|
4827
|
+
repoLink
|
|
4796
4828
|
);
|
|
4797
4829
|
}
|
|
4798
4830
|
const descEl = row.querySelector("[data-zcodepro-row-desc]");
|
|
4799
|
-
if (descEl)
|
|
4831
|
+
if (descEl) {
|
|
4832
|
+
descEl.replaceChildren(pluginsStatusLine);
|
|
4833
|
+
descEl.setAttribute("title", descEl.textContent.trim());
|
|
4834
|
+
}
|
|
4800
4835
|
return row;
|
|
4801
4836
|
})()
|
|
4802
4837
|
);
|
|
@@ -4884,8 +4919,7 @@
|
|
|
4884
4919
|
}),
|
|
4885
4920
|
hkCell("\u2191 / \u2193", L.hkArrow.replaceAll("{prev}", keys.switchPrev).replaceAll("{next}", keys.switchNext)),
|
|
4886
4921
|
hkCell("Enter", L.hkEnter),
|
|
4887
|
-
hkCell("Esc", L.hkEsc)
|
|
4888
|
-
hkCell(L.hkReleaseKey, L.hkRelease)
|
|
4922
|
+
hkCell("Esc", L.hkEsc)
|
|
4889
4923
|
);
|
|
4890
4924
|
};
|
|
4891
4925
|
const stopHkRecording = () => {
|
|
@@ -4989,10 +5023,10 @@
|
|
|
4989
5023
|
const panes = { features: paneFeatures, shortcuts: paneShortcuts, styles: paneStyles, perf: panePerf, agents: paneAgents, proxy: paneProxy, sync: paneSync, vision: paneVision, headroom: paneHeadroom, rtk: paneRtk, debug: paneDebug };
|
|
4990
5024
|
const tabDefs = [
|
|
4991
5025
|
["features", L.tabFeatures],
|
|
4992
|
-
["shortcuts", L.tabShortcuts],
|
|
4993
|
-
["agents", L.tabBehavior],
|
|
4994
5026
|
["styles", L.tabStyles],
|
|
5027
|
+
["agents", L.tabBehavior],
|
|
4995
5028
|
["perf", L.tabPerformance],
|
|
5029
|
+
["shortcuts", L.tabShortcuts],
|
|
4996
5030
|
["proxy", L.tabProxy],
|
|
4997
5031
|
["sync", L.tabSync],
|
|
4998
5032
|
["vision", L.tabVision],
|
|
@@ -8005,7 +8039,7 @@
|
|
|
8005
8039
|
}
|
|
8006
8040
|
}
|
|
8007
8041
|
function workspaceOf(key) {
|
|
8008
|
-
const i = key.
|
|
8042
|
+
const i = key.lastIndexOf(":");
|
|
8009
8043
|
return i > 0 ? key.slice(0, i) : key;
|
|
8010
8044
|
}
|
|
8011
8045
|
function wsHead(row) {
|
|
@@ -8143,6 +8177,7 @@
|
|
|
8143
8177
|
var anyActiveCache = { at: 0, value: null, busy: false };
|
|
8144
8178
|
var sectionActive = { task: false, project: false, pinned: false };
|
|
8145
8179
|
var activeProjectPaths = /* @__PURE__ */ new Set();
|
|
8180
|
+
var authActiveByWs = /* @__PURE__ */ new Map();
|
|
8146
8181
|
setInterval(() => {
|
|
8147
8182
|
if (!anyActiveCache.busy && Date.now() - anyActiveCache.at >= 1e4) globalAnyActive();
|
|
8148
8183
|
}, 1e4);
|
|
@@ -8154,6 +8189,7 @@
|
|
|
8154
8189
|
sectionActive.project = false;
|
|
8155
8190
|
sectionActive.pinned = false;
|
|
8156
8191
|
activeProjectPaths = /* @__PURE__ */ new Set();
|
|
8192
|
+
authActiveByWs = /* @__PURE__ */ new Map();
|
|
8157
8193
|
void (async () => {
|
|
8158
8194
|
let hit = null;
|
|
8159
8195
|
try {
|
|
@@ -8205,12 +8241,24 @@
|
|
|
8205
8241
|
const allIds = [...byKind.task, ...byKind.project];
|
|
8206
8242
|
const st = allIds.length ? await rpc("/task-statuses?ids=" + encodeURIComponent(allIds.join(","))).catch(() => null) : null;
|
|
8207
8243
|
const TERMINAL = /* @__PURE__ */ new Set(["completed", "error", "interrupted"]);
|
|
8244
|
+
const recOf = (id) => st && st.ok && st.available ? st.statuses[id] : void 0;
|
|
8208
8245
|
const live = (id) => {
|
|
8209
|
-
const rec =
|
|
8246
|
+
const rec = recOf(id);
|
|
8210
8247
|
if (rec === void 0) return true;
|
|
8211
8248
|
if (!TERMINAL.has(rec.status)) return true;
|
|
8212
8249
|
return Date.now() - rec.updatedAt < 3e5;
|
|
8213
8250
|
};
|
|
8251
|
+
const liveSession = (id) => {
|
|
8252
|
+
const rec = recOf(id);
|
|
8253
|
+
if (rec === void 0) return !!domRowKeyOf(id);
|
|
8254
|
+
if (!TERMINAL.has(rec.status)) return true;
|
|
8255
|
+
return Date.now() - rec.updatedAt < 3e5;
|
|
8256
|
+
};
|
|
8257
|
+
authActiveByWs = /* @__PURE__ */ new Map();
|
|
8258
|
+
for (const [base, ids] of byKindByPath) {
|
|
8259
|
+
const liveIds = ids.filter(liveSession);
|
|
8260
|
+
if (liveIds.length) authActiveByWs.set(base, liveIds);
|
|
8261
|
+
}
|
|
8214
8262
|
activeProjectPaths = /* @__PURE__ */ new Set();
|
|
8215
8263
|
for (const [base, ids] of byKindByPath) {
|
|
8216
8264
|
if (!projPaths.has(base)) continue;
|
|
@@ -8233,7 +8281,7 @@
|
|
|
8233
8281
|
for (const el of list.querySelectorAll("[data-task-item-key]")) {
|
|
8234
8282
|
if (el.closest("section[data-project-id]")) continue;
|
|
8235
8283
|
const k = el.getAttribute("data-task-item-key") || "";
|
|
8236
|
-
const id = k.slice(k.
|
|
8284
|
+
const id = k.slice(k.lastIndexOf(":") + 1);
|
|
8237
8285
|
const base = k.slice(0, k.lastIndexOf(":")).replace(/[\/]+$/, "");
|
|
8238
8286
|
const ids = byKindByPath.get(base) || [];
|
|
8239
8287
|
if (ids.map(String).includes(id) && ids.some(live)) {
|
|
@@ -8384,9 +8432,23 @@
|
|
|
8384
8432
|
current: curKey ? workspaceOf(curKey) || null : null
|
|
8385
8433
|
};
|
|
8386
8434
|
}
|
|
8435
|
+
function domRowKeyOf(id) {
|
|
8436
|
+
if (!id) return "";
|
|
8437
|
+
try {
|
|
8438
|
+
const el = document.querySelector(`[data-task-item-key$=":${CSS.escape(id)}"]`);
|
|
8439
|
+
return el && el.getAttribute("data-task-item-key") || "";
|
|
8440
|
+
} catch {
|
|
8441
|
+
return "";
|
|
8442
|
+
}
|
|
8443
|
+
}
|
|
8387
8444
|
function wsRunningKeys() {
|
|
8388
8445
|
const keys = /* @__PURE__ */ new Set();
|
|
8389
|
-
for (const set of runningByWs.values())
|
|
8446
|
+
for (const set of runningByWs.values()) {
|
|
8447
|
+
for (const k of set) if (!k.endsWith(":active")) keys.add(k);
|
|
8448
|
+
}
|
|
8449
|
+
for (const [base, ids] of authActiveByWs) {
|
|
8450
|
+
for (const id of ids) keys.add(domRowKeyOf(id) || `${base}:${id}`);
|
|
8451
|
+
}
|
|
8390
8452
|
return keys;
|
|
8391
8453
|
}
|
|
8392
8454
|
async function verifyWorkspaceNotRunning(ws) {
|
|
@@ -8564,7 +8626,6 @@
|
|
|
8564
8626
|
var visibleCount = INITIAL_COUNT;
|
|
8565
8627
|
var unseen = /* @__PURE__ */ new Set();
|
|
8566
8628
|
var lastRunKeys = null;
|
|
8567
|
-
var movedSinceOpen = false;
|
|
8568
8629
|
var hotkeys = { ...DEFAULT_SHORTCUTS };
|
|
8569
8630
|
function loadHotkeys() {
|
|
8570
8631
|
return getConfig(true).then((cfg) => {
|
|
@@ -8582,7 +8643,7 @@
|
|
|
8582
8643
|
return (tEl ? tEl.textContent : (item.innerText || "").split("\n")[0])?.trim() || "";
|
|
8583
8644
|
}
|
|
8584
8645
|
function workspaceOf2(key) {
|
|
8585
|
-
const i = key.
|
|
8646
|
+
const i = key.lastIndexOf(":");
|
|
8586
8647
|
return i > 0 ? key.slice(0, i) : key;
|
|
8587
8648
|
}
|
|
8588
8649
|
function findCurrent() {
|
|
@@ -8633,7 +8694,8 @@
|
|
|
8633
8694
|
}, SCAN_DEBOUNCE_MS2);
|
|
8634
8695
|
}
|
|
8635
8696
|
async function switchTo(key) {
|
|
8636
|
-
const
|
|
8697
|
+
const id = key.slice(key.lastIndexOf(":") + 1);
|
|
8698
|
+
const find = () => document.querySelector(`[data-task-item-key="${CSS.escape(key)}"]`) || (id ? document.querySelector(`[data-task-item-key$=":${CSS.escape(id)}"]`) : null);
|
|
8637
8699
|
let item = find();
|
|
8638
8700
|
if (!item) {
|
|
8639
8701
|
const ws = workspaceOf2(key);
|
|
@@ -8651,23 +8713,28 @@
|
|
|
8651
8713
|
}
|
|
8652
8714
|
function attentionList() {
|
|
8653
8715
|
const run = wsRunningKeys();
|
|
8716
|
+
const idOf = (k) => k.slice(k.lastIndexOf(":") + 1);
|
|
8717
|
+
const runKeyById = new Map([...run].map((k) => [idOf(k), k]));
|
|
8654
8718
|
const listed = /* @__PURE__ */ new Set();
|
|
8655
8719
|
const head = [];
|
|
8656
8720
|
for (const k of mru) {
|
|
8657
|
-
|
|
8658
|
-
|
|
8659
|
-
|
|
8721
|
+
const id = idOf(k);
|
|
8722
|
+
if (listed.has(id)) continue;
|
|
8723
|
+
const runForm = runKeyById.get(id);
|
|
8724
|
+
if (run.has(k) || unseen.has(k) || runForm) {
|
|
8725
|
+
head.push(runForm || k);
|
|
8726
|
+
listed.add(id);
|
|
8660
8727
|
}
|
|
8661
8728
|
}
|
|
8662
8729
|
const tail = [];
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
listed.
|
|
8666
|
-
|
|
8667
|
-
for (const k of unseen) if (!listed.has(k)) {
|
|
8730
|
+
const push = (k) => {
|
|
8731
|
+
const id = idOf(k);
|
|
8732
|
+
if (listed.has(id)) return;
|
|
8733
|
+
listed.add(id);
|
|
8668
8734
|
tail.push(k);
|
|
8669
|
-
|
|
8670
|
-
|
|
8735
|
+
};
|
|
8736
|
+
for (const k of run) push(k);
|
|
8737
|
+
for (const k of unseen) push(k);
|
|
8671
8738
|
return [...head, ...tail];
|
|
8672
8739
|
}
|
|
8673
8740
|
function activeList() {
|
|
@@ -8688,9 +8755,23 @@
|
|
|
8688
8755
|
function findTitle(key) {
|
|
8689
8756
|
const item = document.querySelector(`[data-task-item-key="${CSS.escape(key)}"]`);
|
|
8690
8757
|
if (item) titles.set(key, firstLineOf(item));
|
|
8691
|
-
const id = key.slice(key.
|
|
8758
|
+
const id = key.slice(key.lastIndexOf(":") + 1);
|
|
8692
8759
|
return titles.get(key) || `sess ${id.slice(0, 8)}`;
|
|
8693
8760
|
}
|
|
8761
|
+
async function fetchMissingTitles(keys) {
|
|
8762
|
+
const sessIdOf3 = (k) => k.slice(k.lastIndexOf(":") + 1);
|
|
8763
|
+
const missing = keys.filter((k) => {
|
|
8764
|
+
const id = sessIdOf3(k);
|
|
8765
|
+
return id && !titles.get(k) && !document.querySelector(`[data-task-item-key$=":${CSS.escape(id)}"]`);
|
|
8766
|
+
});
|
|
8767
|
+
if (!missing.length) return;
|
|
8768
|
+
const st = await rpc("/task-statuses?ids=" + encodeURIComponent(missing.map(sessIdOf3).join(","))).catch(() => null);
|
|
8769
|
+
if (!st || !st.ok || !st.available || !st.statuses) return;
|
|
8770
|
+
for (const k of missing) {
|
|
8771
|
+
const rec = st.statuses[sessIdOf3(k)];
|
|
8772
|
+
if (rec && rec.title) titles.set(k, String(rec.title));
|
|
8773
|
+
}
|
|
8774
|
+
}
|
|
8694
8775
|
function projLabelOf(key, aliases2) {
|
|
8695
8776
|
const ws = workspaceOf2(key);
|
|
8696
8777
|
if (!ws) return "";
|
|
@@ -8736,14 +8817,23 @@
|
|
|
8736
8817
|
));
|
|
8737
8818
|
}
|
|
8738
8819
|
}
|
|
8739
|
-
|
|
8820
|
+
var openPopupInflight = null;
|
|
8821
|
+
function openPopup(mode = "mru") {
|
|
8740
8822
|
if (popupEl) return;
|
|
8823
|
+
if (openPopupInflight) return openPopupInflight;
|
|
8824
|
+
openPopupInflight = openPopupInner(mode).finally(() => {
|
|
8825
|
+
openPopupInflight = null;
|
|
8826
|
+
});
|
|
8827
|
+
return openPopupInflight;
|
|
8828
|
+
}
|
|
8829
|
+
async function openPopupInner(mode) {
|
|
8741
8830
|
popupMode = mode;
|
|
8742
8831
|
visibleCount = INITIAL_COUNT;
|
|
8743
8832
|
highlight = 0;
|
|
8744
|
-
movedSinceOpen = false;
|
|
8745
8833
|
const cfg = await getConfig().catch(() => null);
|
|
8746
8834
|
aliasesCache = cfg && cfg.aliases && typeof cfg.aliases === "object" ? cfg.aliases : {};
|
|
8835
|
+
if (mode === "attention") await fetchMissingTitles(attentionList()).catch(() => {
|
|
8836
|
+
});
|
|
8747
8837
|
ensureStyle();
|
|
8748
8838
|
const L = t();
|
|
8749
8839
|
popupEl = h(
|
|
@@ -8778,7 +8868,6 @@
|
|
|
8778
8868
|
const len = Math.min(activeList().length, visibleCount);
|
|
8779
8869
|
if (len < 2) return;
|
|
8780
8870
|
highlight = highlight > 0 ? highlight - 1 : len - 1;
|
|
8781
|
-
movedSinceOpen = true;
|
|
8782
8871
|
renderPopup();
|
|
8783
8872
|
scrollHighlight();
|
|
8784
8873
|
}
|
|
@@ -8794,7 +8883,6 @@
|
|
|
8794
8883
|
} else {
|
|
8795
8884
|
highlight = 0;
|
|
8796
8885
|
}
|
|
8797
|
-
movedSinceOpen = true;
|
|
8798
8886
|
renderPopup();
|
|
8799
8887
|
scrollHighlight();
|
|
8800
8888
|
}
|
|
@@ -8817,8 +8905,10 @@
|
|
|
8817
8905
|
if (document.hidden) return;
|
|
8818
8906
|
const now = wsRunningKeys();
|
|
8819
8907
|
if (lastRunKeys) {
|
|
8908
|
+
const idOf = (k) => k.slice(k.lastIndexOf(":") + 1);
|
|
8909
|
+
const nowIds = new Set([...now].map(idOf));
|
|
8820
8910
|
for (const k of lastRunKeys) {
|
|
8821
|
-
if (!
|
|
8911
|
+
if (!nowIds.has(idOf(k)) && k !== current) unseen.add(k);
|
|
8822
8912
|
}
|
|
8823
8913
|
}
|
|
8824
8914
|
lastRunKeys = now;
|
|
@@ -8835,6 +8925,14 @@
|
|
|
8835
8925
|
closePopup(false);
|
|
8836
8926
|
return;
|
|
8837
8927
|
}
|
|
8928
|
+
const bareK = e.key.toLowerCase();
|
|
8929
|
+
if (popupEl && !e.altKey && !e.ctrlKey && !e.metaKey && !e.isComposing && (bareK === hotkeys.switchPrev || bareK === hotkeys.switchNext)) {
|
|
8930
|
+
e.preventDefault();
|
|
8931
|
+
e.stopImmediatePropagation();
|
|
8932
|
+
if (bareK === hotkeys.switchPrev) moveUp();
|
|
8933
|
+
else moveDown();
|
|
8934
|
+
return;
|
|
8935
|
+
}
|
|
8838
8936
|
if (popupEl && (e.key === "ArrowUp" || e.key === "ArrowDown" || e.key === "Enter")) {
|
|
8839
8937
|
e.preventDefault();
|
|
8840
8938
|
e.stopImmediatePropagation();
|
|
@@ -8878,22 +8976,29 @@
|
|
|
8878
8976
|
await openPopup("attention");
|
|
8879
8977
|
return;
|
|
8880
8978
|
}
|
|
8881
|
-
if (mru.length < 2) {
|
|
8882
|
-
showToast(t().switcherEmpty);
|
|
8883
|
-
return;
|
|
8884
|
-
}
|
|
8885
8979
|
if (k === hotkeys.switchRecent) {
|
|
8886
|
-
if (!e.repeat && !popupEl
|
|
8980
|
+
if (!e.repeat && !popupEl && !openPopupInflight) {
|
|
8981
|
+
if (!mru.length) {
|
|
8982
|
+
showToast(t().switcherEmpty);
|
|
8983
|
+
return;
|
|
8984
|
+
}
|
|
8985
|
+
await openPopup("mru");
|
|
8986
|
+
}
|
|
8887
8987
|
return;
|
|
8888
8988
|
}
|
|
8889
|
-
if (
|
|
8989
|
+
if (openPopupInflight) {
|
|
8990
|
+
await openPopupInflight;
|
|
8991
|
+
} else if (!popupEl) {
|
|
8992
|
+
if (!mru.length) {
|
|
8993
|
+
showToast(t().switcherEmpty);
|
|
8994
|
+
return;
|
|
8995
|
+
}
|
|
8996
|
+
await openPopup("mru");
|
|
8997
|
+
}
|
|
8890
8998
|
if (k === hotkeys.switchPrev) moveUp();
|
|
8891
8999
|
else moveDown();
|
|
8892
9000
|
})();
|
|
8893
9001
|
}, true);
|
|
8894
|
-
document.addEventListener("keyup", (e) => {
|
|
8895
|
-
if (e.key === "Alt" && popupEl && movedSinceOpen) closePopup(true);
|
|
8896
|
-
}, true);
|
|
8897
9002
|
window.addEventListener("blur", () => closePopup(false));
|
|
8898
9003
|
}
|
|
8899
9004
|
|
|
@@ -8958,7 +9063,7 @@
|
|
|
8958
9063
|
const cur = rows.find((e) => (e.className + "").includes("bg-selected")) || rows[rows.length - 1];
|
|
8959
9064
|
const key = cur ? cur.getAttribute("data-task-item-key") : "";
|
|
8960
9065
|
if (!key) return null;
|
|
8961
|
-
const i = key.
|
|
9066
|
+
const i = key.lastIndexOf(":");
|
|
8962
9067
|
return i > 0 ? { workspacePath: key.slice(0, i), sessionId: key.slice(i + 1) } : null;
|
|
8963
9068
|
}
|
|
8964
9069
|
async function thirdPartySurfaces(bridge, workspacePath) {
|
|
@@ -9523,7 +9628,7 @@
|
|
|
9523
9628
|
var fetching = null;
|
|
9524
9629
|
var pendingKeys = /* @__PURE__ */ new Set();
|
|
9525
9630
|
function sessIdOf(key) {
|
|
9526
|
-
const i = key.
|
|
9631
|
+
const i = key.lastIndexOf(":");
|
|
9527
9632
|
return i > 0 ? key.slice(i + 1) : key;
|
|
9528
9633
|
}
|
|
9529
9634
|
function titleElsOf(item) {
|
|
@@ -9784,7 +9889,7 @@
|
|
|
9784
9889
|
var attempted = /* @__PURE__ */ new Set();
|
|
9785
9890
|
var sleep2 = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
9786
9891
|
function sessIdOf2(key) {
|
|
9787
|
-
const i = key.
|
|
9892
|
+
const i = key.lastIndexOf(":");
|
|
9788
9893
|
return i > 0 ? key.slice(i + 1) : "";
|
|
9789
9894
|
}
|
|
9790
9895
|
function currentKey() {
|
|
@@ -10578,6 +10683,236 @@
|
|
|
10578
10683
|
});
|
|
10579
10684
|
}
|
|
10580
10685
|
|
|
10686
|
+
// src/inject/features/table-copy.js
|
|
10687
|
+
var installed5 = false;
|
|
10688
|
+
var enabled9 = true;
|
|
10689
|
+
function cleanTable(table) {
|
|
10690
|
+
const clone = table.cloneNode(false);
|
|
10691
|
+
const walk = (src, dst) => {
|
|
10692
|
+
for (const node of src.childNodes) {
|
|
10693
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
10694
|
+
if (node.textContent.trim()) dst.append(document.createTextNode(node.textContent));
|
|
10695
|
+
continue;
|
|
10696
|
+
}
|
|
10697
|
+
if (node.nodeType !== Node.ELEMENT_NODE) continue;
|
|
10698
|
+
const tag = node.tagName;
|
|
10699
|
+
const el = document.createElement(tag.toLowerCase());
|
|
10700
|
+
if (tag === "TD" || tag === "TH") {
|
|
10701
|
+
for (const a of ["colspan", "rowspan"]) {
|
|
10702
|
+
const v = node.getAttribute(a);
|
|
10703
|
+
if (v && v !== "1") el.setAttribute(a, v);
|
|
10704
|
+
}
|
|
10705
|
+
}
|
|
10706
|
+
dst.append(el);
|
|
10707
|
+
walk(node, el);
|
|
10708
|
+
}
|
|
10709
|
+
};
|
|
10710
|
+
walk(table, clone);
|
|
10711
|
+
return clone;
|
|
10712
|
+
}
|
|
10713
|
+
function tableToTsv(table) {
|
|
10714
|
+
const rows = [];
|
|
10715
|
+
for (const tr of table.rows) {
|
|
10716
|
+
const cells = [];
|
|
10717
|
+
for (const cell of tr.cells) {
|
|
10718
|
+
cells.push((cell.textContent || "").replace(/[\t\r\n]+/g, " ").trim());
|
|
10719
|
+
}
|
|
10720
|
+
rows.push(cells.join(" "));
|
|
10721
|
+
}
|
|
10722
|
+
return rows.join("\n");
|
|
10723
|
+
}
|
|
10724
|
+
async function copyTable(table) {
|
|
10725
|
+
const L = t();
|
|
10726
|
+
const clean = cleanTable(table);
|
|
10727
|
+
const html = '<meta charset="utf-8"><table>' + clean.innerHTML + "</table>";
|
|
10728
|
+
const tsv = tableToTsv(table);
|
|
10729
|
+
try {
|
|
10730
|
+
if (typeof ClipboardItem !== "undefined" && navigator.clipboard && navigator.clipboard.write) {
|
|
10731
|
+
await navigator.clipboard.write([
|
|
10732
|
+
new ClipboardItem({
|
|
10733
|
+
"text/html": new Blob([html], { type: "text/html" }),
|
|
10734
|
+
"text/plain": new Blob([tsv], { type: "text/plain" })
|
|
10735
|
+
})
|
|
10736
|
+
]);
|
|
10737
|
+
showToast(L.tableCopied, "success");
|
|
10738
|
+
return;
|
|
10739
|
+
}
|
|
10740
|
+
} catch {
|
|
10741
|
+
}
|
|
10742
|
+
try {
|
|
10743
|
+
const holder = document.createElement("div");
|
|
10744
|
+
holder.contentEditable = "true";
|
|
10745
|
+
holder.style.cssText = "position:fixed;left:-9999px;top:0;";
|
|
10746
|
+
holder.append(clean);
|
|
10747
|
+
document.body.append(holder);
|
|
10748
|
+
const range = document.createRange();
|
|
10749
|
+
range.selectNodeContents(holder);
|
|
10750
|
+
const sel = window.getSelection();
|
|
10751
|
+
sel.removeAllRanges();
|
|
10752
|
+
sel.addRange(range);
|
|
10753
|
+
const ok = document.execCommand("copy");
|
|
10754
|
+
sel.removeAllRanges();
|
|
10755
|
+
holder.remove();
|
|
10756
|
+
if (ok) {
|
|
10757
|
+
showToast(L.tableCopied, "success");
|
|
10758
|
+
return;
|
|
10759
|
+
}
|
|
10760
|
+
} catch {
|
|
10761
|
+
}
|
|
10762
|
+
showToast(L.failed, "error");
|
|
10763
|
+
}
|
|
10764
|
+
function makeButton(onClick) {
|
|
10765
|
+
const L = t();
|
|
10766
|
+
const btn = document.createElement("button");
|
|
10767
|
+
btn.type = "button";
|
|
10768
|
+
btn.setAttribute("aria-label", L.tableCopyBtn);
|
|
10769
|
+
btn.title = L.tableCopyBtn;
|
|
10770
|
+
btn.className = "group/button inline-flex items-center justify-center border border-transparent bg-clip-padding whitespace-nowrap transition-colors outline-none select-none text-foreground hover:bg-hover hover:text-foreground size-7 rounded-lg [&_svg:not([class*='size-'])]:size-4 shrink-0";
|
|
10771
|
+
btn.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-table size-3.5" aria-hidden="true"><path d="M12 3v18"></path><path d="M3 9h18"></path><path d="M3 15h18"></path><path d="M5 21h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"></path></svg>';
|
|
10772
|
+
btn.addEventListener("click", (e) => {
|
|
10773
|
+
e.stopPropagation();
|
|
10774
|
+
onClick();
|
|
10775
|
+
});
|
|
10776
|
+
return btn;
|
|
10777
|
+
}
|
|
10778
|
+
function startTableCopy() {
|
|
10779
|
+
if (installed5 || typeof document === "undefined") return;
|
|
10780
|
+
installed5 = true;
|
|
10781
|
+
ensureStyle();
|
|
10782
|
+
const tableOf = (bar) => {
|
|
10783
|
+
let scope = bar.parentElement;
|
|
10784
|
+
for (let i = 0; i < 3 && scope; i++) {
|
|
10785
|
+
const table = scope.querySelector("table");
|
|
10786
|
+
if (table) return table;
|
|
10787
|
+
scope = scope.parentElement;
|
|
10788
|
+
}
|
|
10789
|
+
return null;
|
|
10790
|
+
};
|
|
10791
|
+
const enhance = (bar) => {
|
|
10792
|
+
if (bar.dataset.zcodeproTableCopy) return;
|
|
10793
|
+
bar.dataset.zcodeproTableCopy = "1";
|
|
10794
|
+
const table = tableOf(bar);
|
|
10795
|
+
if (!table) return;
|
|
10796
|
+
bar.append(makeButton(() => {
|
|
10797
|
+
void copyTable(table);
|
|
10798
|
+
}));
|
|
10799
|
+
};
|
|
10800
|
+
const scan5 = () => {
|
|
10801
|
+
for (const bar of document.querySelectorAll("[data-markdown-table-toolbar]")) enhance(bar);
|
|
10802
|
+
};
|
|
10803
|
+
scan5();
|
|
10804
|
+
void getConfig().then((cfg) => {
|
|
10805
|
+
enabled9 = cfg.features ? cfg.features.tableCopy !== false : true;
|
|
10806
|
+
}).catch(() => {
|
|
10807
|
+
});
|
|
10808
|
+
window.addEventListener("zcodepro:config-changed", () => {
|
|
10809
|
+
void getConfig(true).then((cfg) => {
|
|
10810
|
+
enabled9 = cfg.features ? cfg.features.tableCopy !== false : true;
|
|
10811
|
+
}).catch(() => {
|
|
10812
|
+
});
|
|
10813
|
+
});
|
|
10814
|
+
const observer2 = new MutationObserver(() => {
|
|
10815
|
+
if (enabled9) scan5();
|
|
10816
|
+
});
|
|
10817
|
+
observer2.observe(document.body, { childList: true, subtree: true });
|
|
10818
|
+
}
|
|
10819
|
+
|
|
10820
|
+
// src/inject/features/composer-provider.js
|
|
10821
|
+
var installed6 = false;
|
|
10822
|
+
var enabled10 = true;
|
|
10823
|
+
function labelToDisplay(label) {
|
|
10824
|
+
const i = label.indexOf("/");
|
|
10825
|
+
if (i <= 0) return null;
|
|
10826
|
+
const provider = label.slice(0, i).trim();
|
|
10827
|
+
const rest = label.slice(i + 1);
|
|
10828
|
+
const model = rest.trim().split(/\s+/)[0];
|
|
10829
|
+
if (!provider || !model) return null;
|
|
10830
|
+
return `${provider} / ${model}`;
|
|
10831
|
+
}
|
|
10832
|
+
function apply3() {
|
|
10833
|
+
if (!enabled10) {
|
|
10834
|
+
for (const btn of document.querySelectorAll('[data-testid="chat-model-select-trigger"]')) {
|
|
10835
|
+
if (!btn.dataset.zcodeproProviderShown) continue;
|
|
10836
|
+
const label = btn.getAttribute("aria-label") || "";
|
|
10837
|
+
const i = label.indexOf("/");
|
|
10838
|
+
if (i <= 0) continue;
|
|
10839
|
+
const model = label.slice(i + 1).trim().split(/\s+/)[0];
|
|
10840
|
+
if (!model) continue;
|
|
10841
|
+
for (const sp of btn.querySelectorAll("span[title]")) sp.setAttribute("title", model);
|
|
10842
|
+
for (const el of btn.querySelectorAll("span[title] span:not([title])")) {
|
|
10843
|
+
if (!el.querySelector("span") && el.textContent.includes("/")) el.textContent = model;
|
|
10844
|
+
}
|
|
10845
|
+
delete btn.dataset.zcodeproProviderShown;
|
|
10846
|
+
}
|
|
10847
|
+
return;
|
|
10848
|
+
}
|
|
10849
|
+
for (const btn of document.querySelectorAll('[data-testid="chat-model-select-trigger"]')) {
|
|
10850
|
+
const label = btn.getAttribute("aria-label") || "";
|
|
10851
|
+
const display = labelToDisplay(label);
|
|
10852
|
+
if (!display) continue;
|
|
10853
|
+
const titleSpans = [...btn.querySelectorAll("span[title]")];
|
|
10854
|
+
if (!titleSpans.length) continue;
|
|
10855
|
+
const innermost = titleSpans.filter((sp) => !sp.querySelector("span[title]"));
|
|
10856
|
+
if (!innermost.length) continue;
|
|
10857
|
+
const holders = [];
|
|
10858
|
+
for (const sp of innermost) {
|
|
10859
|
+
sp.querySelectorAll("span:not([title])").forEach((el) => {
|
|
10860
|
+
if (!el.querySelector("span") && el.textContent.trim() && !el.textContent.includes("/")) holders.push(el);
|
|
10861
|
+
});
|
|
10862
|
+
}
|
|
10863
|
+
if (!holders.length) continue;
|
|
10864
|
+
for (const sp of titleSpans) {
|
|
10865
|
+
if (sp.getAttribute("title") !== display) sp.setAttribute("title", display);
|
|
10866
|
+
}
|
|
10867
|
+
for (const el of holders) el.textContent = display;
|
|
10868
|
+
btn.dataset.zcodeproProviderShown = "1";
|
|
10869
|
+
}
|
|
10870
|
+
}
|
|
10871
|
+
function startComposerProvider() {
|
|
10872
|
+
if (installed6 || typeof document === "undefined") return;
|
|
10873
|
+
installed6 = true;
|
|
10874
|
+
const COMPOSER_SEL = '[data-composer-layout], [data-composer-leading-content], [data-testid="chat-model-select-trigger"]';
|
|
10875
|
+
const relevant2 = (muts) => {
|
|
10876
|
+
for (const m of muts) {
|
|
10877
|
+
if (m.type === "childList") {
|
|
10878
|
+
for (const n of [...m.addedNodes, ...m.removedNodes]) {
|
|
10879
|
+
if (n instanceof Element && (n.matches?.(COMPOSER_SEL) || n.querySelector?.(COMPOSER_SEL))) return true;
|
|
10880
|
+
}
|
|
10881
|
+
} else if (m.type === "characterData") {
|
|
10882
|
+
let el = m.target.parentElement;
|
|
10883
|
+
while (el && el !== document.body) {
|
|
10884
|
+
if (el.matches?.("[data-composer-layout], [data-composer-leading-actions], [data-composer-leading-content]")) return true;
|
|
10885
|
+
el = el.parentElement;
|
|
10886
|
+
}
|
|
10887
|
+
}
|
|
10888
|
+
}
|
|
10889
|
+
return false;
|
|
10890
|
+
};
|
|
10891
|
+
const schedule = () => {
|
|
10892
|
+
clearTimeout(schedule.t);
|
|
10893
|
+
schedule.t = setTimeout(apply3, 120);
|
|
10894
|
+
};
|
|
10895
|
+
void getConfig().then((cfg) => {
|
|
10896
|
+
enabled10 = cfg.features ? cfg.features.composerProvider !== false : true;
|
|
10897
|
+
}).catch(() => {
|
|
10898
|
+
});
|
|
10899
|
+
window.addEventListener("zcodepro:config-changed", () => {
|
|
10900
|
+
void getConfig(true).then((cfg) => {
|
|
10901
|
+
const next = cfg.features ? cfg.features.composerProvider !== false : true;
|
|
10902
|
+
if (next !== enabled10) {
|
|
10903
|
+
enabled10 = next;
|
|
10904
|
+
apply3();
|
|
10905
|
+
}
|
|
10906
|
+
}).catch(() => {
|
|
10907
|
+
});
|
|
10908
|
+
});
|
|
10909
|
+
const observer2 = new MutationObserver((muts) => {
|
|
10910
|
+
if (enabled10 && relevant2(muts)) schedule();
|
|
10911
|
+
});
|
|
10912
|
+
observer2.observe(document.body, { childList: true, subtree: true, characterData: true });
|
|
10913
|
+
apply3();
|
|
10914
|
+
}
|
|
10915
|
+
|
|
10581
10916
|
// src/inject/features/plugin-updates.js
|
|
10582
10917
|
var NOTIFIED_KEY = "zcodepro-plugin-updates-notified";
|
|
10583
10918
|
async function startPluginUpdateCheck() {
|
|
@@ -10709,6 +11044,14 @@
|
|
|
10709
11044
|
startTheme();
|
|
10710
11045
|
} catch {
|
|
10711
11046
|
}
|
|
11047
|
+
try {
|
|
11048
|
+
startTableCopy();
|
|
11049
|
+
} catch {
|
|
11050
|
+
}
|
|
11051
|
+
try {
|
|
11052
|
+
startComposerProvider();
|
|
11053
|
+
} catch {
|
|
11054
|
+
}
|
|
10712
11055
|
try {
|
|
10713
11056
|
startSettingsEntry();
|
|
10714
11057
|
} catch {
|