codexmate 0.1.16 → 0.1.18
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 +1 -0
- package/README.vi.md +1 -0
- package/README.zh.md +1 -0
- package/cli/skills.js +18 -1
- package/cli.js +176 -4
- package/package.json +1 -1
- package/plugins/prompt-templates/computed.mjs +5 -0
- package/web-ui/app.js +12 -10
- package/web-ui/index.html +1 -0
- package/web-ui/modules/app.computed.session.mjs +83 -12
- package/web-ui/modules/app.methods.navigation.mjs +1 -1
- package/web-ui/modules/app.methods.pi-config.mjs +288 -120
- package/web-ui/modules/app.methods.web-ui-preferences.mjs +3 -3
- package/web-ui/modules/i18n/locales/en.mjs +23 -0
- package/web-ui/modules/i18n/locales/ja.mjs +23 -0
- package/web-ui/modules/i18n/locales/vi.mjs +23 -0
- package/web-ui/modules/i18n/locales/zh-tw.mjs +23 -0
- package/web-ui/modules/i18n/locales/zh.mjs +23 -0
- package/web-ui/modules/pi-provider-templates.mjs +26 -0
- package/web-ui/modules/skills.computed.mjs +6 -2
- package/web-ui/modules/skills.methods.mjs +1 -1
- package/web-ui/partials/index/modal-skills.html +8 -0
- package/web-ui/partials/index/modals-pi-provider.html +96 -0
- package/web-ui/partials/index/panel-config-pi.html +44 -122
- package/web-ui/partials/index/panel-docs.html +8 -22
- package/web-ui/partials/index/panel-market.html +8 -0
- package/web-ui/partials/index/panel-plugins.html +14 -13
- package/web-ui/partials/index/panel-usage.html +27 -25
- package/web-ui/res/web-ui-render.precompiled.js +795 -619
- package/web-ui/styles/docs-panel.css +9 -56
- package/web-ui/styles/plugins-panel.css +18 -18
- package/web-ui/styles/sessions-usage.css +104 -91
- package/web-ui/styles/settings-panel.css +12 -0
|
@@ -3276,430 +3276,549 @@ return function render(_ctx, _cache) {
|
|
|
3276
3276
|
}, _toDisplayString(_ctx.t('pi.providers.empty')), 1 /* TEXT */))
|
|
3277
3277
|
: _createCommentVNode("v-if", true)
|
|
3278
3278
|
]),
|
|
3279
|
-
(
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3279
|
+
_createElementVNode("section", { class: "selector-section" }, [
|
|
3280
|
+
_createElementVNode("div", { class: "selector-header" }, [
|
|
3281
|
+
_createElementVNode("span", { class: "selector-title" }, _toDisplayString(_ctx.t('pi.files.title')), 1 /* TEXT */)
|
|
3282
|
+
]),
|
|
3283
|
+
_createElementVNode("div", { class: "config-template-hint" }, _toDisplayString(_ctx.t('pi.files.desc')), 1 /* TEXT */),
|
|
3284
|
+
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('pi.files.settingsTitle')), 1 /* TEXT */),
|
|
3285
|
+
_withDirectives(_createElementVNode("textarea", {
|
|
3286
|
+
class: "template-textarea config-json-editor",
|
|
3287
|
+
"onUpdate:modelValue": $event => ((_ctx.piSettingsJsonDraft) = $event),
|
|
3288
|
+
spellcheck: "false",
|
|
3289
|
+
autocomplete: "off",
|
|
3290
|
+
disabled: !_ctx.isToolConfigWriteAllowed('pi'),
|
|
3291
|
+
onInput: _ctx.piSettingsJsonInput,
|
|
3292
|
+
placeholder: "{}"
|
|
3293
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "disabled", "onInput"]), [
|
|
3294
|
+
[_vModelText, _ctx.piSettingsJsonDraft]
|
|
3295
|
+
]),
|
|
3296
|
+
(_ctx.piSettingsJsonError)
|
|
3297
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
3298
|
+
key: 0,
|
|
3299
|
+
class: "config-template-hint error-text"
|
|
3300
|
+
}, _toDisplayString(_ctx.piSettingsJsonError), 1 /* TEXT */))
|
|
3301
|
+
: _createCommentVNode("v-if", true),
|
|
3302
|
+
_createElementVNode("div", { class: "settings-tab-actions" }, [
|
|
3303
|
+
_createElementVNode("button", {
|
|
3304
|
+
type: "button",
|
|
3305
|
+
class: "btn-tool",
|
|
3306
|
+
onClick: _ctx.savePiSettingsJson,
|
|
3307
|
+
disabled: !_ctx.isToolConfigWriteAllowed('pi') || _ctx.piSaving || _ctx.piFileJsonSaving || !!_ctx.piSettingsJsonError
|
|
3308
|
+
}, _toDisplayString(_ctx.t('common.save')), 9 /* TEXT, PROPS */, ["onClick", "disabled"]),
|
|
3309
|
+
_createElementVNode("button", {
|
|
3310
|
+
type: "button",
|
|
3311
|
+
class: "btn-mini",
|
|
3312
|
+
onClick: $event => (_ctx.openPiConfigHistory('settings')),
|
|
3313
|
+
disabled: _ctx.piHistoryLoading
|
|
3314
|
+
}, _toDisplayString(_ctx.t('common.history')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
3315
|
+
]),
|
|
3316
|
+
(_ctx.piHistoryTarget === 'settings')
|
|
3317
|
+
? (_openBlock(), _createElementBlock("details", {
|
|
3318
|
+
key: 1,
|
|
3319
|
+
class: "prompt-history-panel",
|
|
3320
|
+
open: ""
|
|
3321
|
+
}, [
|
|
3322
|
+
_createElementVNode("summary", { class: "prompt-history-summary" }, [
|
|
3323
|
+
_createElementVNode("span", null, _toDisplayString(_ctx.t('common.history')), 1 /* TEXT */),
|
|
3287
3324
|
_createElementVNode("button", {
|
|
3288
3325
|
type: "button",
|
|
3289
|
-
class: "btn-
|
|
3290
|
-
onClick: _ctx.
|
|
3291
|
-
|
|
3292
|
-
},
|
|
3293
|
-
])
|
|
3294
|
-
]),
|
|
3295
|
-
_createElementVNode("div", { class: "codex-config-grid" }, [
|
|
3296
|
-
_createElementVNode("div", { class: "form-group codex-config-field" }, [
|
|
3297
|
-
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('pi.providers.fields.name')), 1 /* TEXT */),
|
|
3298
|
-
_createElementVNode("input", {
|
|
3299
|
-
class: "form-input",
|
|
3300
|
-
type: "text",
|
|
3301
|
-
value: _ctx.piProviderName(_ctx.editingPiProvider.id),
|
|
3302
|
-
readonly: ""
|
|
3303
|
-
}, null, 8 /* PROPS */, ["value"])
|
|
3326
|
+
class: "btn-mini prompt-history-close",
|
|
3327
|
+
onClick: _ctx.closePiConfigHistory,
|
|
3328
|
+
title: _ctx.t('common.close')
|
|
3329
|
+
}, "✕", 8 /* PROPS */, ["onClick", "title"])
|
|
3304
3330
|
]),
|
|
3305
|
-
_createElementVNode("div", { class: "
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
])
|
|
3317
|
-
]),
|
|
3318
|
-
_createElementVNode("div", { class: "form-group codex-config-field" }, [
|
|
3319
|
-
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('pi.providers.fields.api')), 1 /* TEXT */),
|
|
3320
|
-
_withDirectives(_createElementVNode("select", {
|
|
3321
|
-
class: "form-input",
|
|
3322
|
-
"onUpdate:modelValue": $event => ((_ctx.editingPiProvider.form.api) = $event),
|
|
3323
|
-
disabled: !_ctx.isToolConfigWriteAllowed('pi')
|
|
3324
|
-
}, [
|
|
3325
|
-
_createElementVNode("option", { value: "openai-completions" }, "openai-completions — " + _toDisplayString(_ctx.t('pi.providers.addModal.api.openaiCompletions')), 1 /* TEXT */),
|
|
3326
|
-
_createElementVNode("option", { value: "openai-responses" }, "openai-responses — " + _toDisplayString(_ctx.t('pi.providers.addModal.api.openaiResponses')), 1 /* TEXT */),
|
|
3327
|
-
_createElementVNode("option", { value: "anthropic-messages" }, "anthropic-messages — " + _toDisplayString(_ctx.t('pi.providers.addModal.api.anthropicMessages')), 1 /* TEXT */),
|
|
3328
|
-
_createElementVNode("option", { value: "google-generative-ai" }, "google-generative-ai — " + _toDisplayString(_ctx.t('pi.providers.addModal.api.googleGenerativeAi')), 1 /* TEXT */),
|
|
3329
|
-
(!['openai-completions', 'openai-responses', 'anthropic-messages', 'google-generative-ai'].includes(_ctx.editingPiProvider.form.api))
|
|
3330
|
-
? (_openBlock(), _createElementBlock("option", {
|
|
3331
|
-
key: 0,
|
|
3332
|
-
value: _ctx.editingPiProvider.form.api
|
|
3333
|
-
}, _toDisplayString(_ctx.editingPiProvider.form.api || '—'), 9 /* TEXT, PROPS */, ["value"]))
|
|
3334
|
-
: _createCommentVNode("v-if", true)
|
|
3335
|
-
], 8 /* PROPS */, ["onUpdate:modelValue", "disabled"]), [
|
|
3336
|
-
[_vModelSelect, _ctx.editingPiProvider.form.api]
|
|
3337
|
-
])
|
|
3338
|
-
]),
|
|
3339
|
-
_createElementVNode("div", { class: "form-group codex-config-field" }, [
|
|
3340
|
-
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('pi.providers.fields.apiKey')), 1 /* TEXT */),
|
|
3341
|
-
_createElementVNode("div", { class: "input-with-toggle" }, [
|
|
3342
|
-
_withDirectives(_createElementVNode("input", {
|
|
3343
|
-
class: "form-input",
|
|
3344
|
-
"onUpdate:modelValue": $event => ((_ctx.editingPiProvider.form.apiKey) = $event),
|
|
3345
|
-
type: _ctx.piShowKey ? 'text' : 'password',
|
|
3346
|
-
autocomplete: "off",
|
|
3347
|
-
spellcheck: "false",
|
|
3348
|
-
placeholder: "sk-..."
|
|
3349
|
-
}, null, 8 /* PROPS */, ["onUpdate:modelValue", "type"]), [
|
|
3350
|
-
[_vModelDynamic, _ctx.editingPiProvider.form.apiKey]
|
|
3351
|
-
]),
|
|
3352
|
-
_createElementVNode("button", {
|
|
3353
|
-
type: "button",
|
|
3354
|
-
class: "input-toggle-btn",
|
|
3355
|
-
onMousedown: _withModifiers(() => {}, ["prevent"]),
|
|
3356
|
-
onClick: $event => (_ctx.piShowKey = !_ctx.piShowKey),
|
|
3357
|
-
title: _ctx.piShowKey ? _ctx.t('common.hide') : _ctx.t('common.show'),
|
|
3358
|
-
"aria-label": _ctx.piShowKey ? _ctx.t('common.hide') : _ctx.t('common.show')
|
|
3359
|
-
}, [
|
|
3360
|
-
(!_ctx.piShowKey)
|
|
3361
|
-
? (_openBlock(), _createElementBlock("svg", {
|
|
3362
|
-
key: 0,
|
|
3363
|
-
viewBox: "0 0 20 20",
|
|
3364
|
-
fill: "none",
|
|
3365
|
-
stroke: "currentColor",
|
|
3366
|
-
"stroke-width": "1.5",
|
|
3367
|
-
width: "16",
|
|
3368
|
-
height: "16"
|
|
3369
|
-
}, [
|
|
3370
|
-
_createElementVNode("path", { d: "M10 4C5 4 1.73 8.11 1 10c.73 1.89 4 6 9 6s8.27-4.11 9-6c-.73-1.89-4-6-9-6z" }),
|
|
3371
|
-
_createElementVNode("circle", {
|
|
3372
|
-
cx: "10",
|
|
3373
|
-
cy: "10",
|
|
3374
|
-
r: "3"
|
|
3375
|
-
})
|
|
3376
|
-
]))
|
|
3377
|
-
: (_openBlock(), _createElementBlock("svg", {
|
|
3378
|
-
key: 1,
|
|
3379
|
-
viewBox: "0 0 20 20",
|
|
3380
|
-
fill: "none",
|
|
3381
|
-
stroke: "currentColor",
|
|
3382
|
-
"stroke-width": "1.5",
|
|
3383
|
-
width: "16",
|
|
3384
|
-
height: "16"
|
|
3331
|
+
_createElementVNode("div", { class: "prompt-history-body" }, [
|
|
3332
|
+
(!_ctx.piHistoryLoading && !_ctx.piHistoryError && _ctx.piHistoryItems.length)
|
|
3333
|
+
? (_openBlock(), _createElementBlock("ul", {
|
|
3334
|
+
key: 0,
|
|
3335
|
+
class: "prompt-history-list"
|
|
3336
|
+
}, [
|
|
3337
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.piHistoryItems, (item) => {
|
|
3338
|
+
return (_openBlock(), _createElementBlock("li", {
|
|
3339
|
+
key: item.id,
|
|
3340
|
+
class: _normalizeClass(['prompt-history-item', { active: _ctx.piHistoryPreviewId === item.id }]),
|
|
3341
|
+
onClick: $event => (_ctx.viewPiConfigHistoryItem(item))
|
|
3385
3342
|
}, [
|
|
3386
|
-
_createElementVNode("
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
]),
|
|
3392
|
-
_createElementVNode("div", { class: "form-group" }, [
|
|
3393
|
-
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('pi.providers.fields.models')), 1 /* TEXT */),
|
|
3394
|
-
(_ctx.piRemoteModelsLoading)
|
|
3395
|
-
? (_openBlock(), _createElementBlock("p", {
|
|
3396
|
-
key: 0,
|
|
3397
|
-
class: "config-template-hint"
|
|
3398
|
-
}, _toDisplayString(_ctx.t('pi.providers.models.remoteLoading')), 1 /* TEXT */))
|
|
3399
|
-
: (_ctx.piRemoteModelError)
|
|
3400
|
-
? (_openBlock(), _createElementBlock("p", {
|
|
3401
|
-
key: 1,
|
|
3402
|
-
class: "config-template-hint"
|
|
3403
|
-
}, _toDisplayString(_ctx.piRemoteModelError) + " · " + _toDisplayString(_ctx.t('pi.providers.models.remoteFailed')), 1 /* TEXT */))
|
|
3343
|
+
_createElementVNode("span", { class: "prompt-history-time" }, _toDisplayString(item.id), 1 /* TEXT */),
|
|
3344
|
+
_createElementVNode("span", { class: "prompt-history-size" }, _toDisplayString(Math.round(item.size / 1024 * 10) / 10) + " KB", 1 /* TEXT */)
|
|
3345
|
+
], 10 /* CLASS, PROPS */, ["onClick"]))
|
|
3346
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
3347
|
+
]))
|
|
3404
3348
|
: _createCommentVNode("v-if", true),
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
class: "
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3349
|
+
(_ctx.piHistoryLoading)
|
|
3350
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
3351
|
+
key: 1,
|
|
3352
|
+
class: "state-message"
|
|
3353
|
+
}, _toDisplayString(_ctx.t('diff.generating')), 1 /* TEXT */))
|
|
3354
|
+
: (_ctx.piHistoryError)
|
|
3355
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
3356
|
+
key: 2,
|
|
3357
|
+
class: "state-message error"
|
|
3358
|
+
}, _toDisplayString(_ctx.piHistoryError), 1 /* TEXT */))
|
|
3359
|
+
: (!_ctx.piHistoryItems.length)
|
|
3360
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
3361
|
+
key: 3,
|
|
3362
|
+
class: "state-message"
|
|
3363
|
+
}, _toDisplayString(_ctx.t('toast.history.empty')), 1 /* TEXT */))
|
|
3364
|
+
: _createCommentVNode("v-if", true),
|
|
3365
|
+
(_ctx.piHistoryPreviewContent)
|
|
3366
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
3367
|
+
key: 4,
|
|
3368
|
+
class: "prompt-history-preview-wrap"
|
|
3369
|
+
}, [
|
|
3370
|
+
_createElementVNode("pre", { class: "prompt-history-preview" }, _toDisplayString(_ctx.piHistoryPreviewContent), 1 /* TEXT */),
|
|
3424
3371
|
_createElementVNode("button", {
|
|
3425
3372
|
type: "button",
|
|
3426
|
-
class: "btn-
|
|
3427
|
-
onClick:
|
|
3428
|
-
disabled: !_ctx.isToolConfigWriteAllowed('pi')
|
|
3429
|
-
}, _toDisplayString(_ctx.t('pi.
|
|
3430
|
-
])
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3373
|
+
class: "btn-mini btn-confirm-mini",
|
|
3374
|
+
onClick: _ctx.applyPiConfigHistory,
|
|
3375
|
+
disabled: _ctx.piHistoryApplying || !_ctx.isToolConfigWriteAllowed('pi')
|
|
3376
|
+
}, _toDisplayString(_ctx.t('pi.history.apply')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
3377
|
+
]))
|
|
3378
|
+
: _createCommentVNode("v-if", true)
|
|
3379
|
+
])
|
|
3380
|
+
]))
|
|
3381
|
+
: _createCommentVNode("v-if", true),
|
|
3382
|
+
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('pi.files.modelsTitle')), 1 /* TEXT */),
|
|
3383
|
+
_withDirectives(_createElementVNode("textarea", {
|
|
3384
|
+
class: "template-textarea config-json-editor",
|
|
3385
|
+
"onUpdate:modelValue": $event => ((_ctx.piModelsJsonDraft) = $event),
|
|
3386
|
+
spellcheck: "false",
|
|
3387
|
+
autocomplete: "off",
|
|
3388
|
+
disabled: !_ctx.isToolConfigWriteAllowed('pi'),
|
|
3389
|
+
onInput: _ctx.piModelsJsonInput,
|
|
3390
|
+
placeholder: "{}"
|
|
3391
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "disabled", "onInput"]), [
|
|
3392
|
+
[_vModelText, _ctx.piModelsJsonDraft]
|
|
3393
|
+
]),
|
|
3394
|
+
(_ctx.piModelsJsonError)
|
|
3395
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
3396
|
+
key: 2,
|
|
3397
|
+
class: "config-template-hint error-text"
|
|
3398
|
+
}, _toDisplayString(_ctx.piModelsJsonError), 1 /* TEXT */))
|
|
3399
|
+
: _createCommentVNode("v-if", true),
|
|
3400
|
+
_createElementVNode("div", { class: "settings-tab-actions" }, [
|
|
3401
|
+
_createElementVNode("button", {
|
|
3402
|
+
type: "button",
|
|
3403
|
+
class: "btn-tool",
|
|
3404
|
+
onClick: _ctx.savePiModelsJson,
|
|
3405
|
+
disabled: !_ctx.isToolConfigWriteAllowed('pi') || _ctx.piSaving || _ctx.piFileJsonSaving || !!_ctx.piModelsJsonError
|
|
3406
|
+
}, _toDisplayString(_ctx.t('common.save')), 9 /* TEXT, PROPS */, ["onClick", "disabled"]),
|
|
3407
|
+
_createElementVNode("button", {
|
|
3408
|
+
type: "button",
|
|
3409
|
+
class: "btn-mini",
|
|
3410
|
+
onClick: $event => (_ctx.openPiConfigHistory('models')),
|
|
3411
|
+
disabled: _ctx.piHistoryLoading
|
|
3412
|
+
}, _toDisplayString(_ctx.t('common.history')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
3413
|
+
]),
|
|
3414
|
+
(_ctx.piHistoryTarget === 'models')
|
|
3415
|
+
? (_openBlock(), _createElementBlock("details", {
|
|
3416
|
+
key: 3,
|
|
3417
|
+
class: "prompt-history-panel",
|
|
3418
|
+
open: ""
|
|
3419
|
+
}, [
|
|
3420
|
+
_createElementVNode("summary", { class: "prompt-history-summary" }, [
|
|
3421
|
+
_createElementVNode("span", null, _toDisplayString(_ctx.t('common.history')), 1 /* TEXT */),
|
|
3422
|
+
_createElementVNode("button", {
|
|
3423
|
+
type: "button",
|
|
3424
|
+
class: "btn-mini prompt-history-close",
|
|
3425
|
+
onClick: _ctx.closePiConfigHistory,
|
|
3426
|
+
title: _ctx.t('common.close')
|
|
3427
|
+
}, "✕", 8 /* PROPS */, ["onClick", "title"])
|
|
3428
|
+
]),
|
|
3429
|
+
_createElementVNode("div", { class: "prompt-history-body" }, [
|
|
3430
|
+
(!_ctx.piHistoryLoading && !_ctx.piHistoryError && _ctx.piHistoryItems.length)
|
|
3431
|
+
? (_openBlock(), _createElementBlock("ul", {
|
|
3435
3432
|
key: 0,
|
|
3436
|
-
class: "
|
|
3433
|
+
class: "prompt-history-list"
|
|
3437
3434
|
}, [
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
])
|
|
3435
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.piHistoryItems, (item) => {
|
|
3436
|
+
return (_openBlock(), _createElementBlock("li", {
|
|
3437
|
+
key: item.id,
|
|
3438
|
+
class: _normalizeClass(['prompt-history-item', { active: _ctx.piHistoryPreviewId === item.id }]),
|
|
3439
|
+
onClick: $event => (_ctx.viewPiConfigHistoryItem(item))
|
|
3440
|
+
}, [
|
|
3441
|
+
_createElementVNode("span", { class: "prompt-history-time" }, _toDisplayString(item.id), 1 /* TEXT */),
|
|
3442
|
+
_createElementVNode("span", { class: "prompt-history-size" }, _toDisplayString(Math.round(item.size / 1024 * 10) / 10) + " KB", 1 /* TEXT */)
|
|
3443
|
+
], 10 /* CLASS, PROPS */, ["onClick"]))
|
|
3444
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
3449
3445
|
]))
|
|
3450
3446
|
: _createCommentVNode("v-if", true),
|
|
3451
|
-
(
|
|
3447
|
+
(_ctx.piHistoryLoading)
|
|
3452
3448
|
? (_openBlock(), _createElementBlock("div", {
|
|
3453
3449
|
key: 1,
|
|
3454
|
-
class: "
|
|
3450
|
+
class: "state-message"
|
|
3451
|
+
}, _toDisplayString(_ctx.t('diff.generating')), 1 /* TEXT */))
|
|
3452
|
+
: (_ctx.piHistoryError)
|
|
3453
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
3454
|
+
key: 2,
|
|
3455
|
+
class: "state-message error"
|
|
3456
|
+
}, _toDisplayString(_ctx.piHistoryError), 1 /* TEXT */))
|
|
3457
|
+
: (!_ctx.piHistoryItems.length)
|
|
3458
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
3459
|
+
key: 3,
|
|
3460
|
+
class: "state-message"
|
|
3461
|
+
}, _toDisplayString(_ctx.t('toast.history.empty')), 1 /* TEXT */))
|
|
3462
|
+
: _createCommentVNode("v-if", true),
|
|
3463
|
+
(_ctx.piHistoryPreviewContent)
|
|
3464
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
3465
|
+
key: 4,
|
|
3466
|
+
class: "prompt-history-preview-wrap"
|
|
3455
3467
|
}, [
|
|
3456
|
-
(
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
}, _toDisplayString(id), 9 /* TEXT, PROPS */, ["onClick"]))
|
|
3464
|
-
}), 128 /* KEYED_FRAGMENT */)),
|
|
3465
|
-
_createElementVNode("p", { class: "config-template-hint" }, _toDisplayString(_ctx.t('pi.providers.models.remoteCount', { count: _ctx.piRemoteModels.length })), 1 /* TEXT */)
|
|
3468
|
+
_createElementVNode("pre", { class: "prompt-history-preview" }, _toDisplayString(_ctx.piHistoryPreviewContent), 1 /* TEXT */),
|
|
3469
|
+
_createElementVNode("button", {
|
|
3470
|
+
type: "button",
|
|
3471
|
+
class: "btn-mini btn-confirm-mini",
|
|
3472
|
+
onClick: _ctx.applyPiConfigHistory,
|
|
3473
|
+
disabled: _ctx.piHistoryApplying || !_ctx.isToolConfigWriteAllowed('pi')
|
|
3474
|
+
}, _toDisplayString(_ctx.t('pi.history.apply')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
3466
3475
|
]))
|
|
3467
|
-
: _createCommentVNode("v-if", true),
|
|
3468
|
-
(!_ctx.piRemoteModelsLoading && !_ctx.piRemoteModelError && _ctx.piModelSearch.trim() && _ctx.piFilteredRemoteModels().length === 0)
|
|
3469
|
-
? (_openBlock(), _createElementBlock("p", {
|
|
3470
|
-
key: 2,
|
|
3471
|
-
class: "config-template-hint"
|
|
3472
|
-
}, _toDisplayString(_ctx.t('pi.providers.models.noMatch')), 1 /* TEXT */))
|
|
3473
3476
|
: _createCommentVNode("v-if", true)
|
|
3474
3477
|
])
|
|
3475
|
-
])
|
|
3476
|
-
|
|
3478
|
+
]))
|
|
3479
|
+
: _createCommentVNode("v-if", true)
|
|
3480
|
+
]),
|
|
3481
|
+
(!_ctx.isToolConfigWriteAllowed('pi'))
|
|
3482
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
3483
|
+
key: 0,
|
|
3484
|
+
class: "tool-config-write-overlay"
|
|
3485
|
+
}, [
|
|
3486
|
+
_createElementVNode("div", { class: "tool-config-write-overlay-card" }, [
|
|
3487
|
+
_createElementVNode("div", { class: "tool-config-write-overlay-title" }, _toDisplayString(_ctx.t('toolConfig.pi.lockedTitle')), 1 /* TEXT */),
|
|
3488
|
+
_createElementVNode("p", null, _toDisplayString(_ctx.t('toolConfig.pi.lockedDesc')), 1 /* TEXT */),
|
|
3477
3489
|
_createElementVNode("button", {
|
|
3478
3490
|
type: "button",
|
|
3479
3491
|
class: "btn-tool",
|
|
3480
|
-
onClick: _ctx.
|
|
3481
|
-
disabled:
|
|
3482
|
-
}, _toDisplayString(_ctx.t('
|
|
3483
|
-
]),
|
|
3484
|
-
_createElementVNode("section", { class: "selector-section" }, [
|
|
3485
|
-
_createElementVNode("div", { class: "selector-header" }, [
|
|
3486
|
-
_createElementVNode("span", { class: "selector-title" }, _toDisplayString(_ctx.t('pi.providers.json.title')), 1 /* TEXT */)
|
|
3487
|
-
]),
|
|
3488
|
-
_createElementVNode("p", { class: "config-template-hint" }, _toDisplayString(_ctx.t('pi.providers.json.desc')), 1 /* TEXT */),
|
|
3489
|
-
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('pi.providers.json.previewTitle')), 1 /* TEXT */),
|
|
3490
|
-
_createElementVNode("pre", { class: "config-json-preview" }, _toDisplayString(_ctx.piProviderPreviewJson()), 1 /* TEXT */),
|
|
3491
|
-
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('pi.providers.json.editTitle')), 1 /* TEXT */),
|
|
3492
|
-
_withDirectives(_createElementVNode("textarea", {
|
|
3493
|
-
class: "template-textarea config-json-editor",
|
|
3494
|
-
"onUpdate:modelValue": $event => ((_ctx.editingPiProvider.form.configJsonDraft) = $event),
|
|
3495
|
-
spellcheck: "false",
|
|
3496
|
-
autocomplete: "off",
|
|
3497
|
-
disabled: !_ctx.isToolConfigWriteAllowed('pi'),
|
|
3498
|
-
onInput: _ctx.piEditorJsonDraftInput,
|
|
3499
|
-
placeholder: "{}"
|
|
3500
|
-
}, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "disabled", "onInput"]), [
|
|
3501
|
-
[_vModelText, _ctx.editingPiProvider.form.configJsonDraft]
|
|
3502
|
-
]),
|
|
3503
|
-
(_ctx.piEditorJsonError)
|
|
3504
|
-
? (_openBlock(), _createElementBlock("p", {
|
|
3505
|
-
key: 0,
|
|
3506
|
-
class: "config-template-hint error-text"
|
|
3507
|
-
}, _toDisplayString(_ctx.piEditorJsonError), 1 /* TEXT */))
|
|
3508
|
-
: _createCommentVNode("v-if", true)
|
|
3492
|
+
onClick: $event => (_ctx.setToolConfigPermission('pi', true)),
|
|
3493
|
+
disabled: _ctx.toolConfigPermissionSaving.pi
|
|
3494
|
+
}, _toDisplayString(_ctx.t('toolConfig.enableWrite')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
3509
3495
|
])
|
|
3510
3496
|
]))
|
|
3511
|
-
: _createCommentVNode("v-if", true)
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3497
|
+
: _createCommentVNode("v-if", true)
|
|
3498
|
+
])
|
|
3499
|
+
], 2 /* CLASS */)
|
|
3500
|
+
], 8 /* PROPS */, ["aria-labelledby"]), [
|
|
3501
|
+
[_vShow, _ctx.mainTab === 'config' && _ctx.configMode === 'pi']
|
|
3502
|
+
]),
|
|
3503
|
+
_createCommentVNode(" Pi 新增供应商模板选择模态框 "),
|
|
3504
|
+
(_ctx.showAddPiProviderModal && !_ctx.editingPiProvider)
|
|
3505
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
3506
|
+
key: 0,
|
|
3507
|
+
class: "modal-overlay",
|
|
3508
|
+
onClick: _withModifiers(_ctx.cancelAddPiProviderModal, ["self"])
|
|
3509
|
+
}, [
|
|
3510
|
+
_createElementVNode("div", {
|
|
3511
|
+
class: "modal modal-wide",
|
|
3512
|
+
role: "dialog",
|
|
3513
|
+
"aria-modal": "true",
|
|
3514
|
+
"aria-labelledby": "pi-provider-picker-modal-title"
|
|
3515
|
+
}, [
|
|
3516
|
+
_createElementVNode("div", {
|
|
3517
|
+
class: "modal-title",
|
|
3518
|
+
id: "pi-provider-picker-modal-title"
|
|
3519
|
+
}, _toDisplayString(_ctx.t('pi.providers.addModal.title')), 1 /* TEXT */),
|
|
3520
|
+
_createElementVNode("div", { class: "config-template-hint" }, _toDisplayString(_ctx.t('pi.providers.addModal.subtitle')), 1 /* TEXT */),
|
|
3521
|
+
_createElementVNode("div", { class: "pi-picker" }, [
|
|
3522
|
+
_withDirectives(_createElementVNode("input", {
|
|
3523
|
+
class: "form-input",
|
|
3524
|
+
type: "text",
|
|
3525
|
+
"onUpdate:modelValue": $event => ((_ctx.piProviderPickerQuery) = $event),
|
|
3526
|
+
autocomplete: "off",
|
|
3527
|
+
spellcheck: "false",
|
|
3528
|
+
placeholder: _ctx.t('pi.picker.searchPlaceholder')
|
|
3529
|
+
}, null, 8 /* PROPS */, ["onUpdate:modelValue", "placeholder"]), [
|
|
3530
|
+
[_vModelText, _ctx.piProviderPickerQuery]
|
|
3531
|
+
]),
|
|
3532
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.piProviderTemplateGroups(), (group) => {
|
|
3533
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
3534
|
+
class: "pi-picker-group",
|
|
3535
|
+
key: group.id
|
|
3536
|
+
}, [
|
|
3537
|
+
_createElementVNode("div", { class: "pi-picker-group-title" }, _toDisplayString(_ctx.t(group.i18nKey)), 1 /* TEXT */),
|
|
3538
|
+
_createElementVNode("div", { class: "pi-picker-grid" }, [
|
|
3539
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(group.templates, (tpl) => {
|
|
3540
|
+
return (_openBlock(), _createElementBlock("button", {
|
|
3541
|
+
type: "button",
|
|
3542
|
+
class: "card pi-picker-card",
|
|
3543
|
+
key: tpl.id,
|
|
3544
|
+
onClick: $event => (_ctx.selectPiProviderTemplate(tpl.id))
|
|
3545
|
+
}, [
|
|
3546
|
+
_createElementVNode("span", { class: "card-icon" }, _toDisplayString(tpl.name.charAt(0).toUpperCase()), 1 /* TEXT */),
|
|
3547
|
+
_createElementVNode("span", { class: "pi-picker-card-name" }, _toDisplayString(tpl.name), 1 /* TEXT */),
|
|
3548
|
+
(tpl.baseUrl)
|
|
3549
|
+
? (_openBlock(), _createElementBlock("span", {
|
|
3550
|
+
key: 0,
|
|
3551
|
+
class: "pi-picker-card-url"
|
|
3552
|
+
}, _toDisplayString(tpl.baseUrl), 1 /* TEXT */))
|
|
3553
|
+
: _createCommentVNode("v-if", true)
|
|
3554
|
+
], 8 /* PROPS */, ["onClick"]))
|
|
3555
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
3531
3556
|
])
|
|
3557
|
+
]))
|
|
3558
|
+
}), 128 /* KEYED_FRAGMENT */)),
|
|
3559
|
+
(_ctx.piProviderPickerQuery.trim() && !_ctx.piProviderTemplateGroups().length)
|
|
3560
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
3561
|
+
key: 0,
|
|
3562
|
+
class: "config-template-hint"
|
|
3563
|
+
}, _toDisplayString(_ctx.t('pi.picker.empty')), 1 /* TEXT */))
|
|
3564
|
+
: _createCommentVNode("v-if", true)
|
|
3565
|
+
]),
|
|
3566
|
+
_createElementVNode("div", { class: "btn-group" }, [
|
|
3567
|
+
_createElementVNode("button", {
|
|
3568
|
+
class: "btn btn-cancel",
|
|
3569
|
+
onClick: _ctx.cancelAddPiProviderModal
|
|
3570
|
+
}, _toDisplayString(_ctx.t('common.cancel')), 9 /* TEXT, PROPS */, ["onClick"])
|
|
3571
|
+
])
|
|
3572
|
+
])
|
|
3573
|
+
], 8 /* PROPS */, ["onClick"]))
|
|
3574
|
+
: _createCommentVNode("v-if", true),
|
|
3575
|
+
_createCommentVNode(" Pi 供应商编辑器模态框 "),
|
|
3576
|
+
(_ctx.editingPiProvider)
|
|
3577
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
3578
|
+
key: 1,
|
|
3579
|
+
class: "modal-overlay",
|
|
3580
|
+
onClick: _withModifiers(_ctx.closePiProviderEditor, ["self"])
|
|
3581
|
+
}, [
|
|
3582
|
+
_createElementVNode("div", {
|
|
3583
|
+
class: "modal modal-wide",
|
|
3584
|
+
role: "dialog",
|
|
3585
|
+
"aria-modal": "true",
|
|
3586
|
+
"aria-labelledby": "pi-provider-editor-modal-title"
|
|
3587
|
+
}, [
|
|
3588
|
+
_createElementVNode("div", {
|
|
3589
|
+
class: "modal-title",
|
|
3590
|
+
id: "pi-provider-editor-modal-title"
|
|
3591
|
+
}, _toDisplayString(_ctx.editingPiProvider.isNew ? _ctx.t('pi.providers.addModal.title') : _ctx.t('pi.providers.editorTitle')), 1 /* TEXT */),
|
|
3592
|
+
(!_ctx.editingPiProvider.isNew)
|
|
3593
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
3594
|
+
key: 0,
|
|
3595
|
+
class: "form-group"
|
|
3596
|
+
}, [
|
|
3597
|
+
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('pi.providers.fields.name')), 1 /* TEXT */),
|
|
3598
|
+
_createElementVNode("input", {
|
|
3599
|
+
class: "form-input",
|
|
3600
|
+
type: "text",
|
|
3601
|
+
value: _ctx.piProviderName(_ctx.editingPiProvider.id),
|
|
3602
|
+
readonly: ""
|
|
3603
|
+
}, null, 8 /* PROPS */, ["value"])
|
|
3604
|
+
]))
|
|
3605
|
+
: _createCommentVNode("v-if", true),
|
|
3606
|
+
_createElementVNode("div", { class: "form-group" }, [
|
|
3607
|
+
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('pi.providers.fields.baseUrl')), 1 /* TEXT */),
|
|
3608
|
+
_withDirectives(_createElementVNode("input", {
|
|
3609
|
+
class: "form-input",
|
|
3610
|
+
type: "url",
|
|
3611
|
+
"onUpdate:modelValue": $event => ((_ctx.editingPiProvider.form.baseUrl) = $event),
|
|
3612
|
+
autocomplete: "off",
|
|
3613
|
+
spellcheck: "false",
|
|
3614
|
+
placeholder: "https://",
|
|
3615
|
+
onChange: _ctx.fetchPiRemoteModels
|
|
3616
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "onChange"]), [
|
|
3617
|
+
[_vModelText, _ctx.editingPiProvider.form.baseUrl]
|
|
3618
|
+
])
|
|
3619
|
+
]),
|
|
3620
|
+
_createElementVNode("div", { class: "form-group" }, [
|
|
3621
|
+
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('pi.providers.fields.api')), 1 /* TEXT */),
|
|
3622
|
+
_withDirectives(_createElementVNode("select", {
|
|
3623
|
+
class: "form-input",
|
|
3624
|
+
"onUpdate:modelValue": $event => ((_ctx.editingPiProvider.form.api) = $event),
|
|
3625
|
+
disabled: !_ctx.isToolConfigWriteAllowed('pi')
|
|
3626
|
+
}, [
|
|
3627
|
+
_createElementVNode("option", { value: "openai-completions" }, "openai-completions — " + _toDisplayString(_ctx.t('pi.providers.addModal.api.openaiCompletions')), 1 /* TEXT */),
|
|
3628
|
+
_createElementVNode("option", { value: "openai-responses" }, "openai-responses — " + _toDisplayString(_ctx.t('pi.providers.addModal.api.openaiResponses')), 1 /* TEXT */),
|
|
3629
|
+
_createElementVNode("option", { value: "anthropic-messages" }, "anthropic-messages — " + _toDisplayString(_ctx.t('pi.providers.addModal.api.anthropicMessages')), 1 /* TEXT */),
|
|
3630
|
+
_createElementVNode("option", { value: "google-generative-ai" }, "google-generative-ai — " + _toDisplayString(_ctx.t('pi.providers.addModal.api.googleGenerativeAi')), 1 /* TEXT */),
|
|
3631
|
+
(!['openai-completions', 'openai-responses', 'anthropic-messages', 'google-generative-ai'].includes(_ctx.editingPiProvider.form.api))
|
|
3632
|
+
? (_openBlock(), _createElementBlock("option", {
|
|
3633
|
+
key: 0,
|
|
3634
|
+
value: _ctx.editingPiProvider.form.api
|
|
3635
|
+
}, _toDisplayString(_ctx.editingPiProvider.form.api || '—'), 9 /* TEXT, PROPS */, ["value"]))
|
|
3636
|
+
: _createCommentVNode("v-if", true)
|
|
3637
|
+
], 8 /* PROPS */, ["onUpdate:modelValue", "disabled"]), [
|
|
3638
|
+
[_vModelSelect, _ctx.editingPiProvider.form.api]
|
|
3639
|
+
])
|
|
3640
|
+
]),
|
|
3641
|
+
_createElementVNode("div", { class: "form-group" }, [
|
|
3642
|
+
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('pi.providers.fields.apiKey')), 1 /* TEXT */),
|
|
3643
|
+
_createElementVNode("div", { class: "input-with-toggle" }, [
|
|
3644
|
+
_withDirectives(_createElementVNode("input", {
|
|
3645
|
+
class: "form-input",
|
|
3646
|
+
"onUpdate:modelValue": $event => ((_ctx.editingPiProvider.form.apiKey) = $event),
|
|
3647
|
+
type: _ctx.piShowKey ? 'text' : 'password',
|
|
3648
|
+
autocomplete: "off",
|
|
3649
|
+
spellcheck: "false",
|
|
3650
|
+
placeholder: "sk-...",
|
|
3651
|
+
onChange: _ctx.fetchPiRemoteModels
|
|
3652
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "type", "onChange"]), [
|
|
3653
|
+
[_vModelDynamic, _ctx.editingPiProvider.form.apiKey]
|
|
3532
3654
|
]),
|
|
3533
|
-
_createElementVNode("
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3655
|
+
_createElementVNode("button", {
|
|
3656
|
+
type: "button",
|
|
3657
|
+
class: "input-toggle-btn",
|
|
3658
|
+
onMousedown: _withModifiers(() => {}, ["prevent"]),
|
|
3659
|
+
onClick: $event => (_ctx.piShowKey = !_ctx.piShowKey),
|
|
3660
|
+
title: _ctx.piShowKey ? _ctx.t('common.hide') : _ctx.t('common.show'),
|
|
3661
|
+
"aria-label": _ctx.piShowKey ? _ctx.t('common.hide') : _ctx.t('common.show')
|
|
3662
|
+
}, [
|
|
3663
|
+
(!_ctx.piShowKey)
|
|
3664
|
+
? (_openBlock(), _createElementBlock("svg", {
|
|
3665
|
+
key: 0,
|
|
3666
|
+
viewBox: "0 0 20 20",
|
|
3667
|
+
fill: "none",
|
|
3668
|
+
stroke: "currentColor",
|
|
3669
|
+
"stroke-width": "1.5",
|
|
3670
|
+
width: "16",
|
|
3671
|
+
height: "16"
|
|
3672
|
+
}, [
|
|
3673
|
+
_createElementVNode("path", { d: "M10 4C5 4 1.73 8.11 1 10c.73 1.89 4 6 9 6s8.27-4.11 9-6c-.73-1.89-4-6-9-6z" }),
|
|
3674
|
+
_createElementVNode("circle", {
|
|
3675
|
+
cx: "10",
|
|
3676
|
+
cy: "10",
|
|
3677
|
+
r: "3"
|
|
3678
|
+
})
|
|
3679
|
+
]))
|
|
3680
|
+
: (_openBlock(), _createElementBlock("svg", {
|
|
3681
|
+
key: 1,
|
|
3682
|
+
viewBox: "0 0 20 20",
|
|
3683
|
+
fill: "none",
|
|
3684
|
+
stroke: "currentColor",
|
|
3685
|
+
"stroke-width": "1.5",
|
|
3686
|
+
width: "16",
|
|
3687
|
+
height: "16"
|
|
3688
|
+
}, [
|
|
3689
|
+
_createElementVNode("path", { d: "M2 2l16 16M8.2 4.2A9.9 9.9 0 0 1 10 4c5 0 8.27 4.11 9 6-.44.94-1.5 2.7-3.2 4.2M14.5 14.5A5.9 5.9 0 0 1 10 16c-5 0-8.27-4.11-9-6 .76-1.66 2.2-3.6 4.3-5" })
|
|
3690
|
+
]))
|
|
3691
|
+
], 40 /* PROPS, NEED_HYDRATION */, ["onMousedown", "onClick", "title", "aria-label"])
|
|
3692
|
+
])
|
|
3693
|
+
]),
|
|
3694
|
+
_createElementVNode("div", { class: "form-group" }, [
|
|
3695
|
+
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('pi.providers.fields.models')), 1 /* TEXT */),
|
|
3696
|
+
(_ctx.piRemoteModelsLoading)
|
|
3697
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
3698
|
+
key: 0,
|
|
3699
|
+
class: "config-template-hint"
|
|
3700
|
+
}, _toDisplayString(_ctx.t('pi.providers.models.remoteLoading')), 1 /* TEXT */))
|
|
3701
|
+
: (_ctx.piRemoteModelError)
|
|
3702
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
3703
|
+
key: 1,
|
|
3704
|
+
class: "config-template-hint"
|
|
3705
|
+
}, _toDisplayString(_ctx.piRemoteModelError) + " · " + _toDisplayString(_ctx.t('pi.providers.models.remoteFailed')), 1 /* TEXT */))
|
|
3706
|
+
: _createCommentVNode("v-if", true),
|
|
3707
|
+
_createElementVNode("div", { class: "card-list" }, [
|
|
3708
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.editingPiProvider.form.models, (model, index) => {
|
|
3709
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
3710
|
+
class: "card",
|
|
3711
|
+
key: index
|
|
3712
|
+
}, [
|
|
3713
|
+
_createElementVNode("div", { class: "input-with-toggle" }, [
|
|
3714
|
+
_withDirectives(_createElementVNode("input", {
|
|
3715
|
+
class: "form-input",
|
|
3716
|
+
type: "text",
|
|
3717
|
+
"onUpdate:modelValue": $event => ((model.id) = $event),
|
|
3718
|
+
autocomplete: "off",
|
|
3719
|
+
spellcheck: "false",
|
|
3720
|
+
placeholder: "claude-sonnet-4",
|
|
3721
|
+
disabled: !_ctx.isToolConfigWriteAllowed('pi')
|
|
3722
|
+
}, null, 8 /* PROPS */, ["onUpdate:modelValue", "disabled"]), [
|
|
3723
|
+
[_vModelText, model.id]
|
|
3724
|
+
]),
|
|
3725
|
+
_createElementVNode("button", {
|
|
3726
|
+
type: "button",
|
|
3727
|
+
class: "btn-tool input-toggle-btn",
|
|
3728
|
+
onClick: $event => (_ctx.editingPiProvider.form.models.splice(index, 1)),
|
|
3729
|
+
disabled: !_ctx.isToolConfigWriteAllowed('pi')
|
|
3730
|
+
}, _toDisplayString(_ctx.t('pi.providers.models.remove')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
3575
3731
|
])
|
|
3576
|
-
])
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
? (_openBlock(), _createElementBlock("p", {
|
|
3581
|
-
key: 0,
|
|
3582
|
-
class: "config-template-hint"
|
|
3583
|
-
}, _toDisplayString(_ctx.t('pi.providers.models.remoteLoading')), 1 /* TEXT */))
|
|
3584
|
-
: (_ctx.addingPiRemoteError)
|
|
3585
|
-
? (_openBlock(), _createElementBlock("p", {
|
|
3586
|
-
key: 1,
|
|
3587
|
-
class: "config-template-hint"
|
|
3588
|
-
}, _toDisplayString(_ctx.addingPiRemoteError) + " · " + _toDisplayString(_ctx.t('pi.providers.models.remoteFailed')), 1 /* TEXT */))
|
|
3589
|
-
: _createCommentVNode("v-if", true),
|
|
3732
|
+
]))
|
|
3733
|
+
}), 128 /* KEYED_FRAGMENT */)),
|
|
3734
|
+
_createElementVNode("div", { class: "card" }, [
|
|
3735
|
+
_createElementVNode("div", { class: "input-with-toggle" }, [
|
|
3590
3736
|
_withDirectives(_createElementVNode("input", {
|
|
3591
3737
|
class: "form-input",
|
|
3592
3738
|
type: "text",
|
|
3593
|
-
"onUpdate:modelValue": $event => ((_ctx.
|
|
3739
|
+
"onUpdate:modelValue": $event => ((_ctx.piModelSearch) = $event),
|
|
3594
3740
|
autocomplete: "off",
|
|
3595
3741
|
spellcheck: "false",
|
|
3596
|
-
placeholder: _ctx.
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
? (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [
|
|
3602
|
-
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.piFilteredAddingRemoteModels(), (id) => {
|
|
3603
|
-
return (_openBlock(), _createElementBlock("button", {
|
|
3604
|
-
type: "button",
|
|
3605
|
-
class: "btn-tool",
|
|
3606
|
-
style: {"width":"100%","text-align":"left","justify-content":"flex-start","margin-top":"8px"},
|
|
3607
|
-
key: id,
|
|
3608
|
-
onClick: $event => (_ctx.addingPiProviderModel = id)
|
|
3609
|
-
}, _toDisplayString(id), 9 /* TEXT, PROPS */, ["onClick"]))
|
|
3610
|
-
}), 128 /* KEYED_FRAGMENT */)),
|
|
3611
|
-
_createElementVNode("p", { class: "config-template-hint" }, _toDisplayString(_ctx.t('pi.providers.models.remoteCount', { count: _ctx.addingPiRemoteModels.length })), 1 /* TEXT */)
|
|
3612
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
3613
|
-
: (!_ctx.addingPiRemoteLoading && !_ctx.addingPiRemoteError && _ctx.addingPiProviderModel.trim() && _ctx.addingPiRemoteModels.length > 0)
|
|
3614
|
-
? (_openBlock(), _createElementBlock("p", {
|
|
3615
|
-
key: 3,
|
|
3616
|
-
class: "config-template-hint"
|
|
3617
|
-
}, _toDisplayString(_ctx.t('pi.providers.models.noMatch')), 1 /* TEXT */))
|
|
3618
|
-
: _createCommentVNode("v-if", true)
|
|
3742
|
+
placeholder: _ctx.t('pi.providers.models.search'),
|
|
3743
|
+
onKeydown: _withKeys(_withModifiers($event => (_ctx.addPiRemoteModel(_ctx.piModelSearch.trim())), ["prevent"]), ["enter"])
|
|
3744
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "placeholder", "onKeydown"]), [
|
|
3745
|
+
[_vModelText, _ctx.piModelSearch]
|
|
3746
|
+
])
|
|
3619
3747
|
])
|
|
3620
|
-
])
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3748
|
+
]),
|
|
3749
|
+
_createElementVNode("div", { class: "pi-model-import-section" }, [
|
|
3750
|
+
_createElementVNode("span", { class: "selector-title" }, _toDisplayString(_ctx.t('pi.providers.models.importTitle')), 1 /* TEXT */),
|
|
3751
|
+
(!_ctx.piRemoteModelsLoading && _ctx.piRemoteSelectableModels().length > 0)
|
|
3752
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
3753
|
+
key: 0,
|
|
3754
|
+
class: "pi-model-import-list"
|
|
3755
|
+
}, [
|
|
3756
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.piRemoteSelectableModels(), (id) => {
|
|
3757
|
+
return (_openBlock(), _createElementBlock("label", {
|
|
3758
|
+
class: "pi-model-import-item",
|
|
3759
|
+
key: id
|
|
3760
|
+
}, [
|
|
3761
|
+
_createElementVNode("input", {
|
|
3762
|
+
type: "checkbox",
|
|
3763
|
+
checked: _ctx.isPiRemoteChecked(id),
|
|
3764
|
+
onChange: $event => (_ctx.togglePiRemoteChecked(id)),
|
|
3765
|
+
disabled: !_ctx.isToolConfigWriteAllowed('pi')
|
|
3766
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, ["checked", "onChange", "disabled"]),
|
|
3767
|
+
_createElementVNode("span", { class: "pi-model-import-id" }, _toDisplayString(id), 1 /* TEXT */)
|
|
3768
|
+
]))
|
|
3769
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
3770
|
+
]))
|
|
3771
|
+
: _createCommentVNode("v-if", true),
|
|
3772
|
+
(!_ctx.piRemoteModelsLoading && _ctx.piRemoteSelectableModels().length > 0)
|
|
3773
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
3774
|
+
key: 1,
|
|
3775
|
+
class: "settings-tab-actions"
|
|
3776
|
+
}, [
|
|
3777
|
+
_createElementVNode("button", {
|
|
3778
|
+
type: "button",
|
|
3779
|
+
class: "btn-tool",
|
|
3780
|
+
disabled: !_ctx.isToolConfigWriteAllowed('pi') || _ctx.piCheckedRemoteCount() === 0,
|
|
3781
|
+
onClick: _ctx.addSelectedPiRemoteModels
|
|
3782
|
+
}, _toDisplayString(_ctx.t('pi.providers.models.addSelected', { count: _ctx.piCheckedRemoteCount() })), 9 /* TEXT, PROPS */, ["disabled", "onClick"])
|
|
3783
|
+
]))
|
|
3784
|
+
: _createCommentVNode("v-if", true),
|
|
3785
|
+
(!_ctx.piRemoteModelsLoading && !_ctx.piRemoteModelError && _ctx.piRemoteModels.length)
|
|
3786
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
3787
|
+
key: 2,
|
|
3788
|
+
class: "config-template-hint"
|
|
3789
|
+
}, _toDisplayString(_ctx.t('pi.providers.models.remoteCount', { count: _ctx.piRemoteModels.length })), 1 /* TEXT */))
|
|
3790
|
+
: _createCommentVNode("v-if", true),
|
|
3791
|
+
(!_ctx.piRemoteModelsLoading && !_ctx.piRemoteModelError && _ctx.piModelSearch.trim() && _ctx.piRemoteSelectableModels().length === 0)
|
|
3792
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
3793
|
+
key: 3,
|
|
3794
|
+
class: "config-template-hint"
|
|
3795
|
+
}, _toDisplayString(_ctx.t('pi.providers.models.noMatch')), 1 /* TEXT */))
|
|
3796
|
+
: _createCommentVNode("v-if", true)
|
|
3797
|
+
])
|
|
3798
|
+
])
|
|
3639
3799
|
]),
|
|
3640
|
-
(
|
|
3641
|
-
? (_openBlock(), _createElementBlock("p", {
|
|
3642
|
-
key: 0,
|
|
3643
|
-
class: "config-template-hint error-text"
|
|
3644
|
-
}, _toDisplayString(_ctx.piSettingsJsonError), 1 /* TEXT */))
|
|
3645
|
-
: _createCommentVNode("v-if", true),
|
|
3646
|
-
_createElementVNode("div", { class: "settings-tab-actions" }, [
|
|
3800
|
+
_createElementVNode("div", { class: "btn-group" }, [
|
|
3647
3801
|
_createElementVNode("button", {
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
autocomplete: "off",
|
|
3660
|
-
disabled: !_ctx.isToolConfigWriteAllowed('pi'),
|
|
3661
|
-
onInput: _ctx.piModelsJsonInput,
|
|
3662
|
-
placeholder: "{}"
|
|
3663
|
-
}, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "disabled", "onInput"]), [
|
|
3664
|
-
[_vModelText, _ctx.piModelsJsonDraft]
|
|
3665
|
-
]),
|
|
3666
|
-
(_ctx.piModelsJsonError)
|
|
3667
|
-
? (_openBlock(), _createElementBlock("p", {
|
|
3668
|
-
key: 1,
|
|
3669
|
-
class: "config-template-hint error-text"
|
|
3670
|
-
}, _toDisplayString(_ctx.piModelsJsonError), 1 /* TEXT */))
|
|
3671
|
-
: _createCommentVNode("v-if", true),
|
|
3672
|
-
_createElementVNode("div", { class: "settings-tab-actions" }, [
|
|
3802
|
+
class: "btn btn-cancel",
|
|
3803
|
+
onClick: _ctx.closePiProviderEditor
|
|
3804
|
+
}, _toDisplayString(_ctx.t('common.cancel')), 9 /* TEXT, PROPS */, ["onClick"]),
|
|
3805
|
+
(!_ctx.editingPiProvider.isNew)
|
|
3806
|
+
? (_openBlock(), _createElementBlock("button", {
|
|
3807
|
+
key: 0,
|
|
3808
|
+
class: "btn btn-confirm btn-danger",
|
|
3809
|
+
onClick: _ctx.confirmDeletePiProvider,
|
|
3810
|
+
disabled: !_ctx.isToolConfigWriteAllowed('pi') || _ctx.piSaving
|
|
3811
|
+
}, _toDisplayString(_ctx.t('pi.providers.delete')), 9 /* TEXT, PROPS */, ["onClick", "disabled"]))
|
|
3812
|
+
: _createCommentVNode("v-if", true),
|
|
3673
3813
|
_createElementVNode("button", {
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
}, _toDisplayString(_ctx.t('common.save')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
3814
|
+
class: "btn btn-confirm",
|
|
3815
|
+
onClick: _ctx.savePiProvider,
|
|
3816
|
+
disabled: !_ctx.isToolConfigWriteAllowed('pi') || _ctx.piSaving
|
|
3817
|
+
}, _toDisplayString(_ctx.t(_ctx.piSaving ? 'common.saving' : 'common.save')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
3679
3818
|
])
|
|
3680
|
-
])
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
key: 2,
|
|
3684
|
-
class: "tool-config-write-overlay"
|
|
3685
|
-
}, [
|
|
3686
|
-
_createElementVNode("div", { class: "tool-config-write-overlay-card" }, [
|
|
3687
|
-
_createElementVNode("div", { class: "tool-config-write-overlay-title" }, _toDisplayString(_ctx.t('toolConfig.pi.lockedTitle')), 1 /* TEXT */),
|
|
3688
|
-
_createElementVNode("p", null, _toDisplayString(_ctx.t('toolConfig.pi.lockedDesc')), 1 /* TEXT */),
|
|
3689
|
-
_createElementVNode("button", {
|
|
3690
|
-
type: "button",
|
|
3691
|
-
class: "btn-tool",
|
|
3692
|
-
onClick: $event => (_ctx.setToolConfigPermission('pi', true)),
|
|
3693
|
-
disabled: _ctx.toolConfigPermissionSaving.pi
|
|
3694
|
-
}, _toDisplayString(_ctx.t('toolConfig.enableWrite')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
3695
|
-
])
|
|
3696
|
-
]))
|
|
3697
|
-
: _createCommentVNode("v-if", true)
|
|
3698
|
-
])
|
|
3699
|
-
], 2 /* CLASS */)
|
|
3700
|
-
], 8 /* PROPS */, ["aria-labelledby"]), [
|
|
3701
|
-
[_vShow, _ctx.mainTab === 'config' && _ctx.configMode === 'pi']
|
|
3702
|
-
]),
|
|
3819
|
+
])
|
|
3820
|
+
], 8 /* PROPS */, ["onClick"]))
|
|
3821
|
+
: _createCommentVNode("v-if", true),
|
|
3703
3822
|
_createCommentVNode(" 会话浏览模式 "),
|
|
3704
3823
|
_withDirectives(_createElementVNode("div", {
|
|
3705
3824
|
class: "mode-content",
|
|
@@ -4777,40 +4896,55 @@ return function render(_ctx, _cache) {
|
|
|
4777
4896
|
})
|
|
4778
4897
|
]))
|
|
4779
4898
|
: _createCommentVNode("v-if", true),
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
},
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4899
|
+
(_ctx.usageCurrentSessionStats)
|
|
4900
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
4901
|
+
key: 1,
|
|
4902
|
+
class: "usage-active-strip",
|
|
4903
|
+
role: "status"
|
|
4904
|
+
}, [
|
|
4905
|
+
_createElementVNode("span", { class: "usage-hero-active-dot" }),
|
|
4906
|
+
_createElementVNode("span", { class: "usage-hero-active-label" }, _toDisplayString(_ctx.usageCurrentSessionStats.label), 1 /* TEXT */),
|
|
4907
|
+
_createElementVNode("span", { class: "usage-hero-active-stat" }, _toDisplayString(_ctx.usageCurrentSessionStats.tokenLabel) + " tokens", 1 /* TEXT */),
|
|
4908
|
+
_createElementVNode("span", { class: "usage-hero-active-stat" }, _toDisplayString(_ctx.usageCurrentSessionStats.apiDurationLabel) + " API", 1 /* TEXT */),
|
|
4909
|
+
_createElementVNode("span", { class: "usage-hero-active-stat" }, _toDisplayString(_ctx.usageCurrentSessionStats.totalDurationLabel) + " total", 1 /* TEXT */)
|
|
4910
|
+
]))
|
|
4911
|
+
: _createCommentVNode("v-if", true),
|
|
4912
|
+
_createCommentVNode(" KPI 指标卡片行 "),
|
|
4913
|
+
_createElementVNode("div", { class: "usage-kpi-grid" }, [
|
|
4914
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.usageKpiCards, (card) => {
|
|
4915
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
4916
|
+
key: card.key,
|
|
4917
|
+
class: "usage-kpi-card"
|
|
4918
|
+
}, [
|
|
4919
|
+
_createElementVNode("div", { class: "usage-kpi-label" }, _toDisplayString(card.label), 1 /* TEXT */),
|
|
4920
|
+
_createElementVNode("div", {
|
|
4921
|
+
class: "usage-kpi-value",
|
|
4922
|
+
title: card.title || card.value
|
|
4923
|
+
}, _toDisplayString(card.value), 9 /* TEXT, PROPS */, ["title"]),
|
|
4924
|
+
(card.delta)
|
|
4799
4925
|
? (_openBlock(), _createElementBlock("span", {
|
|
4800
4926
|
key: 0,
|
|
4801
|
-
class: _normalizeClass(['usage-hero-delta',
|
|
4802
|
-
}, _toDisplayString(
|
|
4927
|
+
class: _normalizeClass(['usage-hero-delta', card.deltaClass])
|
|
4928
|
+
}, _toDisplayString(card.delta), 3 /* TEXT, CLASS */))
|
|
4803
4929
|
: _createCommentVNode("v-if", true)
|
|
4804
|
-
])
|
|
4805
|
-
|
|
4930
|
+
]))
|
|
4931
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
4806
4932
|
]),
|
|
4807
4933
|
_createCommentVNode(" 波浪图 "),
|
|
4808
4934
|
(_ctx.sessionUsageWave.points && _ctx.sessionUsageWave.points.length)
|
|
4809
4935
|
? (_openBlock(), _createElementBlock("section", {
|
|
4810
|
-
key:
|
|
4936
|
+
key: 2,
|
|
4811
4937
|
class: "usage-wave-section"
|
|
4812
4938
|
}, [
|
|
4813
|
-
_createElementVNode("div", { class: "usage-card-title" },
|
|
4939
|
+
_createElementVNode("div", { class: "usage-card-title usage-wave-title" }, [
|
|
4940
|
+
_createElementVNode("span", null, _toDisplayString(_ctx.t('usage.daily.title')), 1 /* TEXT */),
|
|
4941
|
+
(_ctx.usageWaveHeaderSummary)
|
|
4942
|
+
? (_openBlock(), _createElementBlock("span", {
|
|
4943
|
+
key: 0,
|
|
4944
|
+
class: "usage-wave-summary"
|
|
4945
|
+
}, _toDisplayString(_ctx.usageWaveHeaderSummary), 1 /* TEXT */))
|
|
4946
|
+
: _createCommentVNode("v-if", true)
|
|
4947
|
+
]),
|
|
4814
4948
|
_createElementVNode("div", { class: "usage-wave-container" }, [
|
|
4815
4949
|
_createElementVNode("div", { class: "usage-wave-yaxis" }, [
|
|
4816
4950
|
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.sessionUsageWave.yTicks, (tick) => {
|
|
@@ -4975,7 +5109,7 @@ return function render(_ctx, _cache) {
|
|
|
4975
5109
|
_createCommentVNode(" Top Sessions "),
|
|
4976
5110
|
_createElementVNode("section", { class: "usage-card" }, [
|
|
4977
5111
|
_createElementVNode("div", { class: "usage-card-title" }, _toDisplayString(_ctx.t('usage.sessions.topDensity')), 1 /* TEXT */),
|
|
4978
|
-
(!_ctx.
|
|
5112
|
+
(!_ctx.usageRankedLists.topSessions.length)
|
|
4979
5113
|
? (_openBlock(), _createElementBlock("div", {
|
|
4980
5114
|
key: 0,
|
|
4981
5115
|
class: "usage-list-value"
|
|
@@ -4984,7 +5118,7 @@ return function render(_ctx, _cache) {
|
|
|
4984
5118
|
key: 1,
|
|
4985
5119
|
class: "usage-list-compact"
|
|
4986
5120
|
}, [
|
|
4987
|
-
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.
|
|
5121
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.usageRankedLists.topSessions, (item) => {
|
|
4988
5122
|
return (_openBlock(), _createElementBlock("div", {
|
|
4989
5123
|
key: item.key + '-dense',
|
|
4990
5124
|
class: "usage-list-compact-item",
|
|
@@ -4994,7 +5128,16 @@ return function render(_ctx, _cache) {
|
|
|
4994
5128
|
_createElementVNode("span", { class: "usage-list-bullet" }, "·"),
|
|
4995
5129
|
_createElementVNode("div", { class: "usage-list-compact-content" }, [
|
|
4996
5130
|
_createElementVNode("div", { class: "usage-list-title" }, _toDisplayString(item.title), 1 /* TEXT */),
|
|
4997
|
-
_createElementVNode("div", { class: "usage-list-meta" }, _toDisplayString(item.messageCount) + " msgs · " + _toDisplayString(item.sourceLabel) + " · " + _toDisplayString(item.updatedAtLabel), 1 /* TEXT */)
|
|
5131
|
+
_createElementVNode("div", { class: "usage-list-meta" }, _toDisplayString(item.messageCount) + " msgs · " + _toDisplayString(item.sourceLabel) + " · " + _toDisplayString(item.updatedAtLabel), 1 /* TEXT */),
|
|
5132
|
+
_createElementVNode("div", {
|
|
5133
|
+
class: "usage-list-bar",
|
|
5134
|
+
"aria-hidden": "true"
|
|
5135
|
+
}, [
|
|
5136
|
+
_createElementVNode("span", {
|
|
5137
|
+
class: "usage-list-bar-fill",
|
|
5138
|
+
style: _normalizeStyle({ width: item.barPercent + '%' })
|
|
5139
|
+
}, null, 4 /* STYLE */)
|
|
5140
|
+
])
|
|
4998
5141
|
])
|
|
4999
5142
|
], 8 /* PROPS */, ["onClick", "title"]))
|
|
5000
5143
|
}), 128 /* KEYED_FRAGMENT */))
|
|
@@ -5003,7 +5146,7 @@ return function render(_ctx, _cache) {
|
|
|
5003
5146
|
_createCommentVNode(" Recent Activity "),
|
|
5004
5147
|
_createElementVNode("section", { class: "usage-card" }, [
|
|
5005
5148
|
_createElementVNode("div", { class: "usage-card-title" }, _toDisplayString(_ctx.t('usage.recent.title')), 1 /* TEXT */),
|
|
5006
|
-
(!_ctx.
|
|
5149
|
+
(!_ctx.usageRankedLists.recentSessions.length)
|
|
5007
5150
|
? (_openBlock(), _createElementBlock("div", {
|
|
5008
5151
|
key: 0,
|
|
5009
5152
|
class: "usage-list-value"
|
|
@@ -5012,7 +5155,7 @@ return function render(_ctx, _cache) {
|
|
|
5012
5155
|
key: 1,
|
|
5013
5156
|
class: "usage-list-compact"
|
|
5014
5157
|
}, [
|
|
5015
|
-
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.
|
|
5158
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.usageRankedLists.recentSessions, (item) => {
|
|
5016
5159
|
return (_openBlock(), _createElementBlock("div", {
|
|
5017
5160
|
key: item.key,
|
|
5018
5161
|
class: "usage-list-compact-item",
|
|
@@ -5021,7 +5164,16 @@ return function render(_ctx, _cache) {
|
|
|
5021
5164
|
_createElementVNode("span", { class: "usage-list-bullet" }, "·"),
|
|
5022
5165
|
_createElementVNode("div", { class: "usage-list-compact-content" }, [
|
|
5023
5166
|
_createElementVNode("div", { class: "usage-list-title" }, _toDisplayString(item.title), 1 /* TEXT */),
|
|
5024
|
-
_createElementVNode("div", { class: "usage-list-meta" }, _toDisplayString(item.messageCount) + " msgs · " + _toDisplayString(item.sourceLabel) + " · " + _toDisplayString(item.updatedAtLabel), 1 /* TEXT */)
|
|
5167
|
+
_createElementVNode("div", { class: "usage-list-meta" }, _toDisplayString(item.messageCount) + " msgs · " + _toDisplayString(item.sourceLabel) + " · " + _toDisplayString(item.updatedAtLabel), 1 /* TEXT */),
|
|
5168
|
+
_createElementVNode("div", {
|
|
5169
|
+
class: "usage-list-bar",
|
|
5170
|
+
"aria-hidden": "true"
|
|
5171
|
+
}, [
|
|
5172
|
+
_createElementVNode("span", {
|
|
5173
|
+
class: "usage-list-bar-fill",
|
|
5174
|
+
style: _normalizeStyle({ width: item.barPercent + '%' })
|
|
5175
|
+
}, null, 4 /* STYLE */)
|
|
5176
|
+
])
|
|
5025
5177
|
])
|
|
5026
5178
|
], 8 /* PROPS */, ["onClick"]))
|
|
5027
5179
|
}), 128 /* KEYED_FRAGMENT */))
|
|
@@ -5030,7 +5182,7 @@ return function render(_ctx, _cache) {
|
|
|
5030
5182
|
_createCommentVNode(" Top Paths "),
|
|
5031
5183
|
_createElementVNode("section", { class: "usage-paths-section" }, [
|
|
5032
5184
|
_createElementVNode("div", { class: "usage-card-title" }, _toDisplayString(_ctx.t('usage.paths.title')), 1 /* TEXT */),
|
|
5033
|
-
(!_ctx.
|
|
5185
|
+
(!_ctx.usageRankedLists.topPaths.length)
|
|
5034
5186
|
? (_openBlock(), _createElementBlock("div", {
|
|
5035
5187
|
key: 0,
|
|
5036
5188
|
class: "usage-list-value"
|
|
@@ -5039,7 +5191,7 @@ return function render(_ctx, _cache) {
|
|
|
5039
5191
|
key: 1,
|
|
5040
5192
|
class: "usage-list-paths"
|
|
5041
5193
|
}, [
|
|
5042
|
-
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.
|
|
5194
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.usageRankedLists.topPaths, (item, index) => {
|
|
5043
5195
|
return (_openBlock(), _createElementBlock("div", {
|
|
5044
5196
|
key: item.path,
|
|
5045
5197
|
class: "usage-list-path-row"
|
|
@@ -5050,8 +5202,17 @@ return function render(_ctx, _cache) {
|
|
|
5050
5202
|
class: "usage-list-path",
|
|
5051
5203
|
title: item.path
|
|
5052
5204
|
}, _toDisplayString(item.path), 9 /* TEXT, PROPS */, ["title"]),
|
|
5053
|
-
_createElementVNode("div", {
|
|
5054
|
-
|
|
5205
|
+
_createElementVNode("div", {
|
|
5206
|
+
class: "usage-list-bar",
|
|
5207
|
+
"aria-hidden": "true"
|
|
5208
|
+
}, [
|
|
5209
|
+
_createElementVNode("span", {
|
|
5210
|
+
class: "usage-list-bar-fill",
|
|
5211
|
+
style: _normalizeStyle({ width: item.barPercent + '%' })
|
|
5212
|
+
}, null, 4 /* STYLE */)
|
|
5213
|
+
])
|
|
5214
|
+
]),
|
|
5215
|
+
_createElementVNode("div", { class: "usage-list-path-stat" }, _toDisplayString(item.count), 1 /* TEXT */)
|
|
5055
5216
|
]))
|
|
5056
5217
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5057
5218
|
]))
|
|
@@ -5073,23 +5234,26 @@ return function render(_ctx, _cache) {
|
|
|
5073
5234
|
]),
|
|
5074
5235
|
_createElementVNode("div", { class: "docs-toolbar-grid" }, [
|
|
5075
5236
|
_createElementVNode("div", { class: "docs-toolbar-card" }, [
|
|
5076
|
-
_createElementVNode("label", {
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
"
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5237
|
+
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('common.packageManager')), 1 /* TEXT */),
|
|
5238
|
+
_createElementVNode("div", { class: "install-action-tabs" }, [
|
|
5239
|
+
_createElementVNode("button", {
|
|
5240
|
+
type: "button",
|
|
5241
|
+
class: _normalizeClass(["btn-mini", { active: _ctx.installPackageManager === 'npm' }]),
|
|
5242
|
+
onClick: $event => (_ctx.installPackageManager = 'npm')
|
|
5243
|
+
}, "npm", 10 /* CLASS, PROPS */, ["onClick"]),
|
|
5244
|
+
_createElementVNode("button", {
|
|
5245
|
+
type: "button",
|
|
5246
|
+
class: _normalizeClass(["btn-mini", { active: _ctx.installPackageManager === 'pnpm' }]),
|
|
5247
|
+
onClick: $event => (_ctx.installPackageManager = 'pnpm')
|
|
5248
|
+
}, "pnpm", 10 /* CLASS, PROPS */, ["onClick"]),
|
|
5249
|
+
_createElementVNode("button", {
|
|
5250
|
+
type: "button",
|
|
5251
|
+
class: _normalizeClass(["btn-mini", { active: _ctx.installPackageManager === 'bun' }]),
|
|
5252
|
+
onClick: $event => (_ctx.installPackageManager = 'bun')
|
|
5253
|
+
}, "bun", 10 /* CLASS, PROPS */, ["onClick"])
|
|
5090
5254
|
])
|
|
5091
5255
|
]),
|
|
5092
|
-
_createElementVNode("div", { class: "docs-toolbar-card
|
|
5256
|
+
_createElementVNode("div", { class: "docs-toolbar-card" }, [
|
|
5093
5257
|
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('common.mirror')), 1 /* TEXT */),
|
|
5094
5258
|
_createElementVNode("div", { class: "install-action-tabs" }, [
|
|
5095
5259
|
_createElementVNode("button", {
|
|
@@ -5130,7 +5294,7 @@ return function render(_ctx, _cache) {
|
|
|
5130
5294
|
}, _toDisplayString(_ctx.t('docs.registryHintCustom')), 1 /* TEXT */))
|
|
5131
5295
|
: _createCommentVNode("v-if", true)
|
|
5132
5296
|
]),
|
|
5133
|
-
_createElementVNode("div", { class: "docs-toolbar-card
|
|
5297
|
+
_createElementVNode("div", { class: "docs-toolbar-card" }, [
|
|
5134
5298
|
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('common.action')), 1 /* TEXT */),
|
|
5135
5299
|
_createElementVNode("div", { class: "install-action-tabs" }, [
|
|
5136
5300
|
_createElementVNode("button", {
|
|
@@ -5150,20 +5314,6 @@ return function render(_ctx, _cache) {
|
|
|
5150
5314
|
}, _toDisplayString(_ctx.t('common.uninstall')), 11 /* TEXT, CLASS, PROPS */, ["onClick"])
|
|
5151
5315
|
])
|
|
5152
5316
|
])
|
|
5153
|
-
]),
|
|
5154
|
-
_createElementVNode("div", { class: "docs-summary-strip" }, [
|
|
5155
|
-
_createElementVNode("div", { class: "docs-summary-item" }, [
|
|
5156
|
-
_createElementVNode("span", { class: "docs-summary-label" }, _toDisplayString(_ctx.t('common.targets')), 1 /* TEXT */),
|
|
5157
|
-
_createElementVNode("strong", { class: "docs-summary-value" }, _toDisplayString(_ctx.installTargetCards.length), 1 /* TEXT */)
|
|
5158
|
-
]),
|
|
5159
|
-
_createElementVNode("div", { class: "docs-summary-item" }, [
|
|
5160
|
-
_createElementVNode("span", { class: "docs-summary-label" }, _toDisplayString(_ctx.t('common.currentPm')), 1 /* TEXT */),
|
|
5161
|
-
_createElementVNode("strong", { class: "docs-summary-value" }, _toDisplayString(String(_ctx.installPackageManager || 'npm').toUpperCase()), 1 /* TEXT */)
|
|
5162
|
-
]),
|
|
5163
|
-
_createElementVNode("div", { class: "docs-summary-item docs-summary-item-wide" }, [
|
|
5164
|
-
_createElementVNode("span", { class: "docs-summary-label" }, _toDisplayString(_ctx.t('common.registry')), 1 /* TEXT */),
|
|
5165
|
-
_createElementVNode("strong", { class: "docs-summary-value" }, _toDisplayString(_ctx.installRegistryPreview || 'npmmirror'), 1 /* TEXT */)
|
|
5166
|
-
])
|
|
5167
5317
|
])
|
|
5168
5318
|
]),
|
|
5169
5319
|
_createElementVNode("div", { class: "selector-section" }, [
|
|
@@ -5886,7 +6036,14 @@ return function render(_ctx, _cache) {
|
|
|
5886
6036
|
"aria-pressed": _ctx.skillsTargetApp === 'claude',
|
|
5887
6037
|
disabled: _ctx.loading || !!_ctx.initError || _ctx.skillsMarketBusy,
|
|
5888
6038
|
onClick: $event => (_ctx.setSkillsTargetApp('claude', { silent: false }))
|
|
5889
|
-
}, " Claude Code ", 10 /* CLASS, PROPS */, ["aria-pressed", "disabled", "onClick"])
|
|
6039
|
+
}, " Claude Code ", 10 /* CLASS, PROPS */, ["aria-pressed", "disabled", "onClick"]),
|
|
6040
|
+
_createElementVNode("button", {
|
|
6041
|
+
type: "button",
|
|
6042
|
+
class: _normalizeClass(['skills-target-chip', { active: _ctx.skillsTargetApp === 'pi' }]),
|
|
6043
|
+
"aria-pressed": _ctx.skillsTargetApp === 'pi',
|
|
6044
|
+
disabled: _ctx.loading || !!_ctx.initError || _ctx.skillsMarketBusy,
|
|
6045
|
+
onClick: $event => (_ctx.setSkillsTargetApp('pi', { silent: false }))
|
|
6046
|
+
}, " Pi ", 10 /* CLASS, PROPS */, ["aria-pressed", "disabled", "onClick"])
|
|
5890
6047
|
], 8 /* PROPS */, ["aria-label"])
|
|
5891
6048
|
]),
|
|
5892
6049
|
_createElementVNode("div", { class: "skills-header-actions" }, [
|
|
@@ -6145,49 +6302,54 @@ return function render(_ctx, _cache) {
|
|
|
6145
6302
|
role: "tabpanel",
|
|
6146
6303
|
"aria-labelledby": "tab-plugins"
|
|
6147
6304
|
}, [
|
|
6148
|
-
_createElementVNode("div", {
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
class: "btn-tool btn-tool-compact",
|
|
6162
|
-
onClick: $event => (_ctx.loadPluginsOverview({ forceRefresh: true, silent: false })),
|
|
6163
|
-
disabled: _ctx.loading || !!_ctx.initError || _ctx.pluginsLoading
|
|
6164
|
-
}, _toDisplayString(_ctx.pluginsLoading ? _ctx.t('plugins.refreshing') : _ctx.t('plugins.refresh')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
6165
|
-
])
|
|
6166
|
-
]),
|
|
6167
|
-
_createElementVNode("div", {
|
|
6168
|
-
class: "plugins-list",
|
|
6169
|
-
role: "list"
|
|
6170
|
-
}, [
|
|
6171
|
-
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.pluginsCatalog, (plugin) => {
|
|
6172
|
-
return (_openBlock(), _createElementBlock("button", {
|
|
6173
|
-
key: 'plugin-' + plugin.id,
|
|
6174
|
-
type: "button",
|
|
6175
|
-
class: _normalizeClass(['plugins-item', { active: _ctx.pluginsActiveId === plugin.id }]),
|
|
6176
|
-
"aria-current": _ctx.pluginsActiveId === plugin.id ? 'page' : null,
|
|
6177
|
-
disabled: _ctx.loading || !!_ctx.initError || _ctx.pluginsLoading,
|
|
6178
|
-
onClick: $event => (_ctx.selectPlugin(plugin.id))
|
|
6179
|
-
}, [
|
|
6180
|
-
_createElementVNode("div", { class: "plugins-item-main" }, [
|
|
6181
|
-
_createElementVNode("div", { class: "plugins-item-title" }, _toDisplayString(plugin.title), 1 /* TEXT */),
|
|
6182
|
-
_createElementVNode("div", { class: "plugins-item-meta" }, _toDisplayString(plugin.description), 1 /* TEXT */)
|
|
6305
|
+
_createElementVNode("div", {
|
|
6306
|
+
class: _normalizeClass(['plugins-layout', { 'plugins-layout-single': !_ctx.pluginsSidebarVisible }])
|
|
6307
|
+
}, [
|
|
6308
|
+
(_ctx.pluginsSidebarVisible)
|
|
6309
|
+
? (_openBlock(), _createElementBlock("aside", {
|
|
6310
|
+
key: 0,
|
|
6311
|
+
class: "plugins-sidebar",
|
|
6312
|
+
"aria-label": _ctx.t('plugins.sidebar.ariaList')
|
|
6313
|
+
}, [
|
|
6314
|
+
_createElementVNode("div", { class: "selector-header plugins-sidebar-header" }, [
|
|
6315
|
+
_createElementVNode("div", null, [
|
|
6316
|
+
_createElementVNode("span", { class: "selector-title" }, _toDisplayString(_ctx.t('plugins.sidebar.title')), 1 /* TEXT */),
|
|
6317
|
+
_createElementVNode("div", { class: "plugins-panel-note" }, _toDisplayString(_ctx.t('plugins.sidebar.note')), 1 /* TEXT */)
|
|
6183
6318
|
]),
|
|
6184
|
-
_createElementVNode("
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6319
|
+
_createElementVNode("div", { class: "settings-tab-actions" }, [
|
|
6320
|
+
_createElementVNode("button", {
|
|
6321
|
+
type: "button",
|
|
6322
|
+
class: "btn-tool btn-tool-compact",
|
|
6323
|
+
onClick: $event => (_ctx.loadPluginsOverview({ forceRefresh: true, silent: false })),
|
|
6324
|
+
disabled: _ctx.loading || !!_ctx.initError || _ctx.pluginsLoading
|
|
6325
|
+
}, _toDisplayString(_ctx.pluginsLoading ? _ctx.t('plugins.refreshing') : _ctx.t('plugins.refresh')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
6326
|
+
])
|
|
6327
|
+
]),
|
|
6328
|
+
_createElementVNode("div", {
|
|
6329
|
+
class: "plugins-list",
|
|
6330
|
+
role: "list"
|
|
6331
|
+
}, [
|
|
6332
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.pluginsCatalog, (plugin) => {
|
|
6333
|
+
return (_openBlock(), _createElementBlock("button", {
|
|
6334
|
+
key: 'plugin-' + plugin.id,
|
|
6335
|
+
type: "button",
|
|
6336
|
+
class: _normalizeClass(['plugins-item', { active: _ctx.pluginsActiveId === plugin.id }]),
|
|
6337
|
+
"aria-current": _ctx.pluginsActiveId === plugin.id ? 'page' : null,
|
|
6338
|
+
disabled: _ctx.loading || !!_ctx.initError || _ctx.pluginsLoading,
|
|
6339
|
+
onClick: $event => (_ctx.selectPlugin(plugin.id))
|
|
6340
|
+
}, [
|
|
6341
|
+
_createElementVNode("div", { class: "plugins-item-main" }, [
|
|
6342
|
+
_createElementVNode("div", { class: "plugins-item-title" }, _toDisplayString(plugin.title), 1 /* TEXT */),
|
|
6343
|
+
_createElementVNode("div", { class: "plugins-item-meta" }, _toDisplayString(plugin.description), 1 /* TEXT */)
|
|
6344
|
+
]),
|
|
6345
|
+
_createElementVNode("span", {
|
|
6346
|
+
class: _normalizeClass(['pill', plugin.tone])
|
|
6347
|
+
}, _toDisplayString(plugin.statusLabel), 3 /* TEXT, CLASS */)
|
|
6348
|
+
], 10 /* CLASS, PROPS */, ["aria-current", "disabled", "onClick"]))
|
|
6349
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
6350
|
+
])
|
|
6351
|
+
], 8 /* PROPS */, ["aria-label"]))
|
|
6352
|
+
: _createCommentVNode("v-if", true),
|
|
6191
6353
|
_createElementVNode("section", {
|
|
6192
6354
|
class: "plugins-main",
|
|
6193
6355
|
"aria-label": _ctx.t('plugins.main.ariaWorkspace')
|
|
@@ -6216,12 +6378,27 @@ return function render(_ctx, _cache) {
|
|
|
6216
6378
|
class: "plugins-panel"
|
|
6217
6379
|
}, [
|
|
6218
6380
|
_createElementVNode("div", { class: "plugins-panel-head" }, [
|
|
6219
|
-
_createElementVNode("div",
|
|
6220
|
-
|
|
6381
|
+
_createElementVNode("div", null, [
|
|
6382
|
+
_createElementVNode("div", { class: "plugins-panel-title" }, _toDisplayString(_ctx.t('plugins.promptTemplates.title')), 1 /* TEXT */),
|
|
6383
|
+
(_ctx.pluginsActiveAttribution)
|
|
6384
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
6385
|
+
key: 0,
|
|
6386
|
+
class: "plugins-panel-note"
|
|
6387
|
+
}, _toDisplayString(_ctx.pluginsActiveAttribution), 1 /* TEXT */))
|
|
6388
|
+
: _createCommentVNode("v-if", true)
|
|
6389
|
+
]),
|
|
6390
|
+
(!_ctx.pluginsSidebarVisible)
|
|
6221
6391
|
? (_openBlock(), _createElementBlock("div", {
|
|
6222
6392
|
key: 0,
|
|
6223
|
-
class: "
|
|
6224
|
-
},
|
|
6393
|
+
class: "settings-tab-actions"
|
|
6394
|
+
}, [
|
|
6395
|
+
_createElementVNode("button", {
|
|
6396
|
+
type: "button",
|
|
6397
|
+
class: "btn-tool btn-tool-compact",
|
|
6398
|
+
onClick: $event => (_ctx.loadPluginsOverview({ forceRefresh: true, silent: false })),
|
|
6399
|
+
disabled: _ctx.loading || !!_ctx.initError || _ctx.pluginsLoading
|
|
6400
|
+
}, _toDisplayString(_ctx.pluginsLoading ? _ctx.t('plugins.refreshing') : _ctx.t('plugins.refresh')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
6401
|
+
]))
|
|
6225
6402
|
: _createCommentVNode("v-if", true)
|
|
6226
6403
|
]),
|
|
6227
6404
|
_createElementVNode("div", {
|
|
@@ -6275,126 +6452,118 @@ return function render(_ctx, _cache) {
|
|
|
6275
6452
|
class: "prompt-compose"
|
|
6276
6453
|
}, [
|
|
6277
6454
|
_createElementVNode("div", { class: "prompt-compose-workspace" }, [
|
|
6278
|
-
_createElementVNode("div", { class: "prompt-compose-
|
|
6279
|
-
_createElementVNode("div", { class: "prompt-compose-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
}, [
|
|
6296
|
-
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.promptTemplatesList, (tpl) => {
|
|
6297
|
-
return (_openBlock(), _createElementBlock("option", {
|
|
6298
|
-
key: 'compose-tpl-' + tpl.id,
|
|
6299
|
-
value: tpl.id
|
|
6300
|
-
}, _toDisplayString(tpl.name) + _toDisplayString(tpl.isBuiltin ? _ctx.t('plugins.promptTemplates.compose.builtinSuffix') : ''), 9 /* TEXT, PROPS */, ["value"]))
|
|
6301
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
6302
|
-
], 40 /* PROPS, NEED_HYDRATION */, ["value", "onChange", "disabled"]),
|
|
6303
|
-
(!_ctx.promptComposerActiveTemplate)
|
|
6304
|
-
? (_openBlock(), _createElementBlock("div", {
|
|
6305
|
-
key: 0,
|
|
6306
|
-
class: "plugins-panel-note"
|
|
6307
|
-
}, _toDisplayString(_ctx.t('plugins.promptTemplates.compose.empty')), 1 /* TEXT */))
|
|
6308
|
-
: (!_ctx.promptComposerActiveTemplate.isBuiltin)
|
|
6455
|
+
_createElementVNode("div", { class: "prompt-compose-main" }, [
|
|
6456
|
+
_createElementVNode("div", { class: "prompt-compose-form" }, [
|
|
6457
|
+
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('plugins.promptTemplates.compose.selectTemplate')), 1 /* TEXT */),
|
|
6458
|
+
_createElementVNode("select", {
|
|
6459
|
+
class: "form-select prompt-compose-template-select",
|
|
6460
|
+
value: _ctx.promptComposerSelectedTemplateId,
|
|
6461
|
+
onChange: $event => (_ctx.selectPromptComposerTemplate($event.target.value)),
|
|
6462
|
+
disabled: _ctx.pluginsLoading || !_ctx.promptTemplatesList.length
|
|
6463
|
+
}, [
|
|
6464
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.promptTemplatesList, (tpl) => {
|
|
6465
|
+
return (_openBlock(), _createElementBlock("option", {
|
|
6466
|
+
key: 'compose-tpl-' + tpl.id,
|
|
6467
|
+
value: tpl.id
|
|
6468
|
+
}, _toDisplayString(tpl.name) + _toDisplayString(tpl.isBuiltin ? _ctx.t('plugins.promptTemplates.compose.builtinSuffix') : ''), 9 /* TEXT, PROPS */, ["value"]))
|
|
6469
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
6470
|
+
], 40 /* PROPS, NEED_HYDRATION */, ["value", "onChange", "disabled"]),
|
|
6471
|
+
(!_ctx.promptComposerActiveTemplate)
|
|
6309
6472
|
? (_openBlock(), _createElementBlock("div", {
|
|
6310
|
-
key:
|
|
6473
|
+
key: 0,
|
|
6311
6474
|
class: "plugins-panel-note"
|
|
6312
|
-
}, _toDisplayString(_ctx.t('plugins.promptTemplates.compose.
|
|
6313
|
-
:
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
}, _toDisplayString(_ctx.t('plugins.promptTemplates.compose.goManage')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
6325
|
-
]))
|
|
6326
|
-
: _createCommentVNode("v-if", true)
|
|
6327
|
-
]),
|
|
6328
|
-
(_ctx.promptComposerActiveTemplate && _ctx.promptComposerActiveTemplate.vars && _ctx.promptComposerActiveTemplate.vars.length)
|
|
6329
|
-
? (_openBlock(), _createElementBlock("div", {
|
|
6330
|
-
key: 0,
|
|
6331
|
-
class: "prompt-vars-block"
|
|
6332
|
-
}, [
|
|
6333
|
-
_createElementVNode("div", { class: "prompt-vars-head" }, [
|
|
6334
|
-
_createElementVNode("div", null, [
|
|
6335
|
-
_createElementVNode("div", { class: "prompt-vars-title" }, _toDisplayString(_ctx.t('plugins.promptTemplates.vars.title')), 1 /* TEXT */),
|
|
6336
|
-
(!_ctx.promptComposerActiveTemplate.isBuiltin)
|
|
6337
|
-
? (_openBlock(), _createElementBlock("div", {
|
|
6338
|
-
key: 0,
|
|
6339
|
-
class: "plugins-panel-note"
|
|
6340
|
-
}, _toDisplayString(_ctx.t('plugins.promptTemplates.compose.varsHint')), 1 /* TEXT */))
|
|
6341
|
-
: _createCommentVNode("v-if", true),
|
|
6342
|
-
(_ctx.promptComposerMissingVars.length)
|
|
6343
|
-
? (_openBlock(), _createElementBlock("div", {
|
|
6344
|
-
key: 1,
|
|
6345
|
-
class: "plugins-panel-note"
|
|
6346
|
-
}, _toDisplayString(_ctx.t('plugins.promptTemplates.compose.missingCount', { count: _ctx.promptComposerMissingVars.length })), 1 /* TEXT */))
|
|
6347
|
-
: _createCommentVNode("v-if", true)
|
|
6348
|
-
]),
|
|
6349
|
-
_createElementVNode("div", { class: "prompt-editor-actions" }, [
|
|
6350
|
-
(_ctx.promptComposerMissingVars.length)
|
|
6351
|
-
? (_openBlock(), _createElementBlock("button", {
|
|
6352
|
-
key: 0,
|
|
6353
|
-
type: "button",
|
|
6354
|
-
class: "btn-mini",
|
|
6355
|
-
onClick: _ctx.focusPromptComposerFirstMissingVar,
|
|
6356
|
-
disabled: _ctx.pluginsLoading
|
|
6357
|
-
}, _toDisplayString(_ctx.t('plugins.promptTemplates.compose.jumpToMissing')), 9 /* TEXT, PROPS */, ["onClick", "disabled"]))
|
|
6358
|
-
: _createCommentVNode("v-if", true),
|
|
6475
|
+
}, _toDisplayString(_ctx.t('plugins.promptTemplates.compose.empty')), 1 /* TEXT */))
|
|
6476
|
+
: (_ctx.promptComposerActiveTemplate.description)
|
|
6477
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
6478
|
+
key: 1,
|
|
6479
|
+
class: "plugins-panel-note"
|
|
6480
|
+
}, _toDisplayString(_ctx.promptComposerActiveTemplate.description), 1 /* TEXT */))
|
|
6481
|
+
: _createCommentVNode("v-if", true),
|
|
6482
|
+
(_ctx.promptComposerActiveTemplate && !_ctx.promptComposerActiveTemplate.isBuiltin)
|
|
6483
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
6484
|
+
key: 2,
|
|
6485
|
+
class: "prompt-compose-actions"
|
|
6486
|
+
}, [
|
|
6359
6487
|
_createElementVNode("button", {
|
|
6360
6488
|
type: "button",
|
|
6361
6489
|
class: "btn-mini",
|
|
6362
|
-
onClick: _ctx.
|
|
6363
|
-
disabled: _ctx.pluginsLoading
|
|
6364
|
-
}, _toDisplayString(_ctx.t('plugins.promptTemplates.
|
|
6365
|
-
])
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6490
|
+
onClick: $event => (_ctx.selectPromptTemplate(_ctx.promptComposerSelectedTemplateId)),
|
|
6491
|
+
disabled: _ctx.pluginsLoading || !_ctx.promptComposerSelectedTemplateId
|
|
6492
|
+
}, _toDisplayString(_ctx.t('plugins.promptTemplates.compose.goManage')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
6493
|
+
]))
|
|
6494
|
+
: _createCommentVNode("v-if", true)
|
|
6495
|
+
]),
|
|
6496
|
+
(_ctx.promptComposerActiveTemplate && _ctx.promptComposerActiveTemplate.vars && _ctx.promptComposerActiveTemplate.vars.length)
|
|
6497
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
6498
|
+
key: 0,
|
|
6499
|
+
class: "prompt-vars-block"
|
|
6500
|
+
}, [
|
|
6501
|
+
_createElementVNode("div", { class: "prompt-vars-head" }, [
|
|
6502
|
+
_createElementVNode("div", null, [
|
|
6503
|
+
_createElementVNode("div", { class: "prompt-vars-title" }, _toDisplayString(_ctx.t('plugins.promptTemplates.vars.title')), 1 /* TEXT */),
|
|
6504
|
+
(!_ctx.promptComposerActiveTemplate.isBuiltin)
|
|
6505
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
6376
6506
|
key: 0,
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
onInput: $event => (_ctx.setPromptComposerVarValue(name, $event.target.value)),
|
|
6383
|
-
placeholder: _ctx.t('plugins.promptTemplates.vars.valuePlaceholder', { name })
|
|
6384
|
-
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, ["value", "onInput", "placeholder"]))
|
|
6385
|
-
: (_openBlock(), _createElementBlock("input", {
|
|
6507
|
+
class: "plugins-panel-note"
|
|
6508
|
+
}, _toDisplayString(_ctx.t('plugins.promptTemplates.compose.varsHint')), 1 /* TEXT */))
|
|
6509
|
+
: _createCommentVNode("v-if", true),
|
|
6510
|
+
(_ctx.promptComposerMissingVars.length)
|
|
6511
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
6386
6512
|
key: 1,
|
|
6387
|
-
class:
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6513
|
+
class: "plugins-panel-note"
|
|
6514
|
+
}, _toDisplayString(_ctx.t('plugins.promptTemplates.compose.missingCount', { count: _ctx.promptComposerMissingVars.length })), 1 /* TEXT */))
|
|
6515
|
+
: _createCommentVNode("v-if", true)
|
|
6516
|
+
]),
|
|
6517
|
+
_createElementVNode("div", { class: "prompt-editor-actions" }, [
|
|
6518
|
+
(_ctx.promptComposerMissingVars.length)
|
|
6519
|
+
? (_openBlock(), _createElementBlock("button", {
|
|
6520
|
+
key: 0,
|
|
6521
|
+
type: "button",
|
|
6522
|
+
class: "btn-mini",
|
|
6523
|
+
onClick: _ctx.focusPromptComposerFirstMissingVar,
|
|
6524
|
+
disabled: _ctx.pluginsLoading
|
|
6525
|
+
}, _toDisplayString(_ctx.t('plugins.promptTemplates.compose.jumpToMissing')), 9 /* TEXT, PROPS */, ["onClick", "disabled"]))
|
|
6526
|
+
: _createCommentVNode("v-if", true),
|
|
6527
|
+
_createElementVNode("button", {
|
|
6528
|
+
type: "button",
|
|
6529
|
+
class: "btn-mini",
|
|
6530
|
+
onClick: _ctx.resetPromptComposerVarValues,
|
|
6531
|
+
disabled: _ctx.pluginsLoading
|
|
6532
|
+
}, _toDisplayString(_ctx.t('plugins.promptTemplates.vars.reset')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
6533
|
+
])
|
|
6534
|
+
]),
|
|
6535
|
+
_createElementVNode("div", { class: "prompt-vars-grid" }, [
|
|
6536
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.promptComposerActiveTemplate.vars, (name, idx) => {
|
|
6537
|
+
return (_openBlock(), _createElementBlock("label", {
|
|
6538
|
+
key: 'prompt-compose-var-' + name,
|
|
6539
|
+
class: "prompt-var-row"
|
|
6540
|
+
}, [
|
|
6541
|
+
_createElementVNode("span", { class: "prompt-var-label mono" }, _toDisplayString(name), 1 /* TEXT */),
|
|
6542
|
+
(idx === 0)
|
|
6543
|
+
? (_openBlock(), _createElementBlock("input", {
|
|
6544
|
+
key: 0,
|
|
6545
|
+
ref_for: true,
|
|
6546
|
+
ref: "promptComposerFirstField",
|
|
6547
|
+
class: _normalizeClass(['form-input', 'prompt-var-input', { 'is-missing': _ctx.promptComposerMissingVars.includes(name) }]),
|
|
6548
|
+
type: "text",
|
|
6549
|
+
value: _ctx.promptComposerVarValues[name] || '',
|
|
6550
|
+
onInput: $event => (_ctx.setPromptComposerVarValue(name, $event.target.value)),
|
|
6551
|
+
placeholder: _ctx.t('plugins.promptTemplates.vars.valuePlaceholder', { name })
|
|
6552
|
+
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, ["value", "onInput", "placeholder"]))
|
|
6553
|
+
: (_openBlock(), _createElementBlock("input", {
|
|
6554
|
+
key: 1,
|
|
6555
|
+
class: _normalizeClass(['form-input', 'prompt-var-input', { 'is-missing': _ctx.promptComposerMissingVars.includes(name) }]),
|
|
6556
|
+
type: "text",
|
|
6557
|
+
value: _ctx.promptComposerVarValues[name] || '',
|
|
6558
|
+
onInput: $event => (_ctx.setPromptComposerVarValue(name, $event.target.value)),
|
|
6559
|
+
placeholder: _ctx.t('plugins.promptTemplates.vars.valuePlaceholder', { name })
|
|
6560
|
+
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, ["value", "onInput", "placeholder"]))
|
|
6561
|
+
]))
|
|
6562
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
6563
|
+
])
|
|
6564
|
+
]))
|
|
6565
|
+
: _createCommentVNode("v-if", true)
|
|
6566
|
+
]),
|
|
6398
6567
|
_createElementVNode("div", { class: "prompt-preview-block prompt-compose-preview" }, [
|
|
6399
6568
|
_createElementVNode("div", { class: "prompt-vars-head" }, [
|
|
6400
6569
|
_createElementVNode("div", null, [
|
|
@@ -6666,7 +6835,7 @@ return function render(_ctx, _cache) {
|
|
|
6666
6835
|
class: "skills-empty-state"
|
|
6667
6836
|
}, _toDisplayString(_ctx.t('plugins.promptTemplates.noPluginSelected')), 1 /* TEXT */))
|
|
6668
6837
|
], 8 /* PROPS */, ["aria-label"])
|
|
6669
|
-
])
|
|
6838
|
+
], 2 /* CLASS */)
|
|
6670
6839
|
], 512 /* NEED_PATCH */), [
|
|
6671
6840
|
[_vShow, _ctx.mainTab === 'plugins']
|
|
6672
6841
|
]),
|
|
@@ -6680,7 +6849,7 @@ return function render(_ctx, _cache) {
|
|
|
6680
6849
|
_createCommentVNode(" Prompts editor "),
|
|
6681
6850
|
(_ctx.mainTab === 'prompts')
|
|
6682
6851
|
? (_openBlock(), _createElementBlock("div", {
|
|
6683
|
-
key:
|
|
6852
|
+
key: 2,
|
|
6684
6853
|
class: "mode-content mode-cards",
|
|
6685
6854
|
id: "panel-prompts",
|
|
6686
6855
|
role: "tabpanel",
|
|
@@ -7504,12 +7673,12 @@ return function render(_ctx, _cache) {
|
|
|
7504
7673
|
_createCommentVNode(" 加载状态 "),
|
|
7505
7674
|
(_ctx.loading && _ctx.mainTab !== 'usage')
|
|
7506
7675
|
? (_openBlock(), _createElementBlock("div", {
|
|
7507
|
-
key:
|
|
7676
|
+
key: 3,
|
|
7508
7677
|
class: "state-message"
|
|
7509
7678
|
}, _toDisplayString(_ctx.t('app.loadingConfig')), 1 /* TEXT */))
|
|
7510
7679
|
: (_ctx.initError)
|
|
7511
7680
|
? (_openBlock(), _createElementBlock("div", {
|
|
7512
|
-
key:
|
|
7681
|
+
key: 4,
|
|
7513
7682
|
class: "state-message error"
|
|
7514
7683
|
}, [
|
|
7515
7684
|
_createCommentVNode(" 错误状态 "),
|
|
@@ -9819,7 +9988,14 @@ return function render(_ctx, _cache) {
|
|
|
9819
9988
|
"aria-pressed": _ctx.skillsTargetApp === 'claude',
|
|
9820
9989
|
disabled: _ctx.loading || !!_ctx.initError || _ctx.skillsMarketBusy,
|
|
9821
9990
|
onClick: $event => (_ctx.setSkillsTargetApp('claude', { silent: false }))
|
|
9822
|
-
}, " Claude Code ", 10 /* CLASS, PROPS */, ["aria-pressed", "disabled", "onClick"])
|
|
9991
|
+
}, " Claude Code ", 10 /* CLASS, PROPS */, ["aria-pressed", "disabled", "onClick"]),
|
|
9992
|
+
_createElementVNode("button", {
|
|
9993
|
+
type: "button",
|
|
9994
|
+
class: _normalizeClass(['market-target-chip', { active: _ctx.skillsTargetApp === 'pi' }]),
|
|
9995
|
+
"aria-pressed": _ctx.skillsTargetApp === 'pi',
|
|
9996
|
+
disabled: _ctx.loading || !!_ctx.initError || _ctx.skillsMarketBusy,
|
|
9997
|
+
onClick: $event => (_ctx.setSkillsTargetApp('pi', { silent: false }))
|
|
9998
|
+
}, " Pi ", 10 /* CLASS, PROPS */, ["aria-pressed", "disabled", "onClick"])
|
|
9823
9999
|
], 8 /* PROPS */, ["aria-label"]),
|
|
9824
10000
|
_createElementVNode("button", {
|
|
9825
10001
|
class: "btn-mini",
|