dsh-plugin-trim 0.3.5 → 0.3.6
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 -1
- package/client.js +184 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ dsh plugin --profile web add dsh-plugin-trim
|
|
|
13
13
|
从 GitHub Release 安装(备用,无需 npm):
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
dsh plugin --profile web add "https://github.com/Starlit-Sky-code/dsh-experience-optimizer/releases/download/v0.3.
|
|
16
|
+
dsh plugin --profile web add "https://github.com/Starlit-Sky-code/dsh-experience-optimizer/releases/download/v0.3.6/dsh-plugin-trim-0.3.6.tgz"
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
本地开发:
|
package/client.js
CHANGED
|
@@ -32,7 +32,7 @@ window.__ModuleLoader__.load({
|
|
|
32
32
|
releases: 'https://github.com/Starlit-Sky-code/dsh-experience-optimizer/releases',
|
|
33
33
|
issues: 'https://github.com/Starlit-Sky-code/dsh-experience-optimizer/issues',
|
|
34
34
|
homepage: 'https://github.com/Starlit-Sky-code/dsh-experience-optimizer',
|
|
35
|
-
qqGroup: '',
|
|
35
|
+
qqGroup: '1134419871',
|
|
36
36
|
qqLink: '',
|
|
37
37
|
donate: [],
|
|
38
38
|
}
|
|
@@ -191,6 +191,14 @@ window.__ModuleLoader__.load({
|
|
|
191
191
|
const storage = browserStorage()
|
|
192
192
|
try { if (storage) storage.removeItem(ONBOARDING_KEY) } catch { /* ignore */ }
|
|
193
193
|
}
|
|
194
|
+
function readPref(key, fallback) {
|
|
195
|
+
const storage = browserStorage()
|
|
196
|
+
try { return (storage && storage.getItem('dsh-experience-optimizer.' + key)) || fallback } catch { return fallback }
|
|
197
|
+
}
|
|
198
|
+
function writePref(key, value) {
|
|
199
|
+
const storage = browserStorage()
|
|
200
|
+
try { if (storage) storage.setItem('dsh-experience-optimizer.' + key, value) } catch { /* ignore */ }
|
|
201
|
+
}
|
|
194
202
|
|
|
195
203
|
const CSS = `
|
|
196
204
|
.eo-root{--eo-primary:var(--dsw-alias-label-primary,#1a1a1a);--eo-secondary:var(--dsw-alias-label-secondary,#5f6b7a);--eo-tertiary:var(--dsw-alias-label-tertiary,#8b96a5);--eo-border:var(--dsw-alias-border-l2,rgba(127,127,127,.16));--eo-border-strong:var(--dsw-alias-border-l3,rgba(127,127,127,.24));--eo-card-bg:var(--dsw-alias-settings-card-fill,transparent);--eo-card-stroke:var(--dsw-alias-settings-card-stroke,var(--dsw-alias-border-l2,rgba(127,127,127,.16)));--eo-hover:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.06));--eo-error:var(--dsw-alias-state-error-primary,#c4314b);--eo-success:var(--dsw-alias-state-success-primary,#1a7f37);--eo-code:var(--ds-font-family-code,"JetBrains Maple Mono",ui-monospace,monospace);--eo-radius:var(--dsw-radius-lg,12px);max-width:760px;color:var(--eo-primary);font-size:13px;line-height:20px;display:flex;flex-direction:column;gap:14px}
|
|
@@ -261,6 +269,24 @@ window.__ModuleLoader__.load({
|
|
|
261
269
|
.eo-metric-hint{font-size:11px;line-height:16px;color:var(--eo-tertiary);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
262
270
|
.eo-card{padding:14px;border:.5px solid var(--eo-card-stroke);border-radius:var(--eo-radius);background:var(--eo-card-bg)}
|
|
263
271
|
.eo-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
|
|
272
|
+
.eo-card-toggle{appearance:none;border:0;background:transparent;color:inherit;font:inherit;padding:0;margin:0;display:flex;align-items:flex-start;gap:7px;text-align:left;cursor:pointer;min-width:0}
|
|
273
|
+
.eo-card-toggle:hover .eo-card-title{text-decoration:underline;text-underline-offset:3px}
|
|
274
|
+
.eo-card-chevron{display:inline-flex;align-items:center;color:var(--eo-tertiary);margin-top:3px;transition:transform .15s ease}
|
|
275
|
+
.eo-card-toggle[aria-expanded="false"] .eo-card-chevron{transform:rotate(-90deg)}
|
|
276
|
+
.eo-card-body{min-width:0}
|
|
277
|
+
.eo-viewbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 2px;padding:8px 10px;border:.5px solid var(--eo-border);border-radius:8px;background:var(--dsw-alias-bg-module-platform,rgba(127,127,127,.03))}
|
|
278
|
+
.eo-viewbar-label{font-size:11px;color:var(--eo-tertiary);white-space:nowrap}
|
|
279
|
+
.eo-viewbar .eo-inline{gap:4px}
|
|
280
|
+
.eo-viewbar .eo-btn{height:26px;font-size:11px;padding:0 8px;border-radius:6px}
|
|
281
|
+
.eo-viewbar .eo-btn-active{border-color:var(--eo-primary);color:var(--eo-primary);background:var(--dsw-alias-bg-layer-1,rgba(127,127,127,.06))}
|
|
282
|
+
.eo-density-compact .eo-card{padding:10px}
|
|
283
|
+
.eo-density-compact .eo-stack,.eo-stack.eo-density-compact{gap:8px}
|
|
284
|
+
.eo-density-compact .eo-item{padding:7px 0}
|
|
285
|
+
.eo-density-compact .eo-metric{padding:9px 11px}
|
|
286
|
+
.eo-layout-two.eo-stack{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
|
|
287
|
+
.eo-layout-two>.eo-viewbar,.eo-layout-two>.eo-metrics,.eo-layout-two>[data-section="draft"],.eo-layout-two>[data-section="inventory"],.eo-layout-two>[data-section="result"],.eo-layout-two>[data-section="dedupe"],.eo-layout-two>[data-section="diagnostics"]{grid-column:1/-1}
|
|
288
|
+
.eo-layout-two>[data-section="compat"],.eo-layout-two>[data-section="context"]{grid-column:span 1}
|
|
289
|
+
.eo-about-hero{display:block;width:100%;height:auto;border-radius:12px;background:#0b1422;margin:0 0 10px}
|
|
264
290
|
.eo-card-title{margin:0;font-size:14px;line-height:22px;font-weight:500;letter-spacing:0}
|
|
265
291
|
.eo-card-sub{margin:2px 0 0;font-size:12px;line-height:18px;color:var(--eo-tertiary)}
|
|
266
292
|
.eo-btn{appearance:none;height:32px;padding:0 12px;border:.5px solid var(--eo-border-strong);border-radius:var(--dsw-radius-md,8px);background:transparent;color:var(--eo-primary);font:inherit;font-size:13px;line-height:20px;font-weight:500;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;transition:background .14s ease,border-color .14s ease,opacity .14s ease}
|
|
@@ -368,7 +394,7 @@ window.__ModuleLoader__.load({
|
|
|
368
394
|
.eo-spacer{height:0}
|
|
369
395
|
@keyframes eo-spin{to{transform:rotate(360deg)}}
|
|
370
396
|
@keyframes eo-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
|
|
371
|
-
@media(max-width:820px){.eo-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.eo-metric:nth-child(2){border-right:0}.eo-metric:nth-child(-n+2){border-bottom:.5px solid var(--eo-border)}.eo-form-grid{grid-template-columns:1fr}.eo-hero{flex-wrap:wrap}.eo-hero-actions{margin-left:0}}
|
|
397
|
+
@media(max-width:820px){.eo-layout-two.eo-stack{grid-template-columns:1fr}.eo-layout-two>*{grid-column:1/-1!important}.eo-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.eo-metric:nth-child(2){border-right:0}.eo-metric:nth-child(-n+2){border-bottom:.5px solid var(--eo-border)}.eo-form-grid{grid-template-columns:1fr}.eo-hero{flex-wrap:wrap}.eo-hero-actions{margin-left:0}}
|
|
372
398
|
@media(max-width:520px){.eo-metrics{grid-template-columns:1fr}.eo-metric{border-right:0;border-bottom:.5px solid var(--eo-border)}.eo-metric:last-child{border-bottom:0}}
|
|
373
399
|
`
|
|
374
400
|
|
|
@@ -411,7 +437,13 @@ window.__ModuleLoader__.load({
|
|
|
411
437
|
)
|
|
412
438
|
}
|
|
413
439
|
|
|
414
|
-
function Card({ title, subtitle, extra, children, className = '', section }) {
|
|
440
|
+
function Card({ title, subtitle, extra, children, className = '', section, collapsible = false, collapsed = false, onToggle }) {
|
|
441
|
+
const heading = h(
|
|
442
|
+
'div',
|
|
443
|
+
null,
|
|
444
|
+
title ? h('h3', { className: 'eo-card-title' }, title) : null,
|
|
445
|
+
subtitle ? h('p', { className: 'eo-card-sub' }, subtitle) : null,
|
|
446
|
+
)
|
|
415
447
|
return h(
|
|
416
448
|
'section',
|
|
417
449
|
{ className: 'eo-card ' + className, 'data-section': section },
|
|
@@ -419,16 +451,25 @@ window.__ModuleLoader__.load({
|
|
|
419
451
|
? h(
|
|
420
452
|
'div',
|
|
421
453
|
{ className: 'eo-card-head' },
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
454
|
+
collapsible
|
|
455
|
+
? h(
|
|
456
|
+
'button',
|
|
457
|
+
{
|
|
458
|
+
type: 'button',
|
|
459
|
+
className: 'eo-card-toggle',
|
|
460
|
+
'aria-expanded': !collapsed,
|
|
461
|
+
onClick: onToggle,
|
|
462
|
+
},
|
|
463
|
+
h('span', { className: 'eo-card-chevron' }, h(Icon, { name: 'chevron', size: 14 })),
|
|
464
|
+
heading,
|
|
465
|
+
)
|
|
466
|
+
: heading,
|
|
428
467
|
extra || null,
|
|
429
468
|
)
|
|
430
469
|
: null,
|
|
431
|
-
|
|
470
|
+
collapsible && collapsed
|
|
471
|
+
? null
|
|
472
|
+
: h('div', { className: 'eo-card-body' }, children),
|
|
432
473
|
)
|
|
433
474
|
}
|
|
434
475
|
|
|
@@ -623,6 +664,7 @@ window.__ModuleLoader__.load({
|
|
|
623
664
|
['rect', { x: '4', y: '14', width: '6', height: '6', rx: '1' }],
|
|
624
665
|
['rect', { x: '14', y: '14', width: '6', height: '6', rx: '1' }],
|
|
625
666
|
],
|
|
667
|
+
chevron: [['path', { d: 'M6 9l6 6 6-6' }]],
|
|
626
668
|
}
|
|
627
669
|
|
|
628
670
|
function Icon({ name, size = 16 }) {
|
|
@@ -747,12 +789,57 @@ window.__ModuleLoader__.load({
|
|
|
747
789
|
)
|
|
748
790
|
}
|
|
749
791
|
|
|
792
|
+
function AboutHero() {
|
|
793
|
+
return h(
|
|
794
|
+
'svg',
|
|
795
|
+
{
|
|
796
|
+
viewBox: '0 0 1200 300',
|
|
797
|
+
className: 'eo-about-hero',
|
|
798
|
+
role: 'img',
|
|
799
|
+
'aria-label': tr('DSH 体验优化器', 'DSH Experience Optimizer'),
|
|
800
|
+
},
|
|
801
|
+
h('defs', null,
|
|
802
|
+
h('linearGradient', { id: 'eo-about-bg', x1: '0', y1: '0', x2: '1', y2: '1' },
|
|
803
|
+
h('stop', { offset: '0', stopColor: '#0a1220' }),
|
|
804
|
+
h('stop', { offset: '1', stopColor: '#101f34' }),
|
|
805
|
+
),
|
|
806
|
+
),
|
|
807
|
+
h('rect', { width: '1200', height: '300', rx: '18', fill: 'url(#eo-about-bg)' }),
|
|
808
|
+
h('circle', { cx: '1010', cy: '150', r: '94', fill: 'none', stroke: '#2a405e' }),
|
|
809
|
+
h('circle', { cx: '1010', cy: '150', r: '58', fill: 'none', stroke: '#355070' }),
|
|
810
|
+
h('path', { d: 'M944 116 L1004 88 L1076 112 L1092 174 L1038 214 L962 190 Z', fill: 'none', stroke: '#45658a', strokeWidth: '1.4' }),
|
|
811
|
+
h('path', { d: 'M944 116 L1038 214 M1004 88 L962 190 M1076 112 L944 116', stroke: '#334d6b' }),
|
|
812
|
+
[[944,116],[1004,88],[1076,112],[1092,174],[1038,214],[962,190]].map(([cx,cy],i) =>
|
|
813
|
+
h('circle', { key: i, cx, cy, r: 8, fill: '#0f1b2c', stroke: '#5eead4', strokeWidth: 1.5 }),
|
|
814
|
+
),
|
|
815
|
+
h('circle', { cx: '1010', cy: '150', r: '34', fill: '#0c1728', stroke: '#fbbf24', strokeWidth: 1.5 }),
|
|
816
|
+
h('path', { d: 'M1010 127 L1028 136 L1028 154 C1028 168 1019 177 1010 181 C1001 177 992 168 992 154 L992 136 Z', fill: 'none', stroke: '#fbbf24', strokeWidth: 1.8 }),
|
|
817
|
+
h('path', { d: 'M1002 151 L1008 157 L1019 144', fill: 'none', stroke: '#fbbf24', strokeWidth: 2, strokeLinecap: 'round', strokeLinejoin: 'round' }),
|
|
818
|
+
h('text', { x: '64', y: '72', fill: '#5eead4', fontFamily: 'ui-monospace, monospace', fontSize: '13', letterSpacing: '2.4' }, 'DSH PLUGIN SUITE · AGPL-3.0'),
|
|
819
|
+
h('text', { x: '62', y: '142', fill: '#f2f7ff', fontFamily: 'Noto Sans SC, sans-serif', fontSize: '44', fontWeight: '700' }, tr('DSH 体验优化器', 'DSH Experience Optimizer')),
|
|
820
|
+
h('text', { x: '64', y: '184', fill: '#c3d3e8', fontFamily: 'Noto Sans SC, sans-serif', fontSize: '20' }, tr('少一点插件负担,多一点兼容确定性。', 'Less plugin overhead, more compatibility certainty.')),
|
|
821
|
+
h('g', { transform: 'translate(64 220)' },
|
|
822
|
+
[tr('插件减负', 'Plugin diet'), tr('兼容性', 'Compatibility'), tr('工作流配方', 'Workflow recipe')].map((label, i) =>
|
|
823
|
+
h('g', { key: label, transform: `translate(${i * 150} 0)` },
|
|
824
|
+
h('rect', { width: '138', height: '30', rx: '15', fill: 'rgba(94,234,212,.08)', stroke: 'rgba(94,234,212,.35)' }),
|
|
825
|
+
h('circle', { cx: '16', cy: '15', r: '3', fill: ['#5eead4','#60a5fa','#fbbf24'][i] }),
|
|
826
|
+
h('text', { x: '28', y: '20', fill: '#dce9f9', fontFamily: 'Noto Sans SC, sans-serif', fontSize: '13' }, label),
|
|
827
|
+
),
|
|
828
|
+
),
|
|
829
|
+
),
|
|
830
|
+
h('text', { x: '64', y: '286', fill: '#7f93b0', fontFamily: 'ui-monospace, monospace', fontSize: '11', letterSpacing: '1.2' }, 'github.com/Starlit-Sky-code/dsh-experience-optimizer'),
|
|
831
|
+
)
|
|
832
|
+
}
|
|
833
|
+
|
|
750
834
|
function ExperiencePanel() {
|
|
751
835
|
|
|
752
836
|
const [tab, setTab] = useState('trim')
|
|
753
837
|
const [locale, setLocale] = useState(detectLocale)
|
|
754
838
|
const [showOnboarding, setShowOnboarding] = useState(false)
|
|
755
839
|
const [onboardingStep, setOnboardingStep] = useState(0)
|
|
840
|
+
const [collapsedCards, setCollapsedCards] = useState({ context: true })
|
|
841
|
+
const [layout, setLayout] = useState(() => readPref('layout', 'standard'))
|
|
842
|
+
const [density, setDensity] = useState(() => readPref('density', 'comfortable'))
|
|
756
843
|
const [overview, setOverview] = useState(null)
|
|
757
844
|
const [loading, setLoading] = useState(true)
|
|
758
845
|
const [error, setError] = useState('')
|
|
@@ -845,6 +932,22 @@ window.__ModuleLoader__.load({
|
|
|
845
932
|
setShowOnboarding(true)
|
|
846
933
|
}, [])
|
|
847
934
|
|
|
935
|
+
const toggleCard = useCallback((id) => {
|
|
936
|
+
setCollapsedCards((current) => ({ ...current, [id]: !current[id] }))
|
|
937
|
+
}, [])
|
|
938
|
+
const collapseAllCards = useCallback(() => {
|
|
939
|
+
setCollapsedCards({ draft: true, inventory: true, compat: true, context: true, result: true, dedupe: true, diagnostics: true })
|
|
940
|
+
}, [])
|
|
941
|
+
const expandAllCards = useCallback(() => setCollapsedCards({}), [])
|
|
942
|
+
const changeLayout = useCallback((value) => {
|
|
943
|
+
setLayout(value)
|
|
944
|
+
writePref('layout', value)
|
|
945
|
+
}, [])
|
|
946
|
+
const changeDensity = useCallback((value) => {
|
|
947
|
+
setDensity(value)
|
|
948
|
+
writePref('density', value)
|
|
949
|
+
}, [])
|
|
950
|
+
|
|
848
951
|
const loadSettings = useCallback(async () => {
|
|
849
952
|
setSettingsBusy(true)
|
|
850
953
|
setSettingsError('')
|
|
@@ -1400,6 +1503,7 @@ window.__ModuleLoader__.load({
|
|
|
1400
1503
|
subtitle: tr('插件减负、兼容性检查与工作流蓝图', 'Plugin diet, compatibility checks, and workflow recipes'),
|
|
1401
1504
|
section: 'about',
|
|
1402
1505
|
},
|
|
1506
|
+
h(AboutHero),
|
|
1403
1507
|
h(
|
|
1404
1508
|
'div',
|
|
1405
1509
|
{ className: 'eo-about-grid' },
|
|
@@ -1408,7 +1512,7 @@ window.__ModuleLoader__.load({
|
|
|
1408
1512
|
{ className: 'eo-about-card' },
|
|
1409
1513
|
h('div', { className: 'eo-inline', style: { marginBottom: '8px' } }, h(Icon, { name: 'shield', size: 24 }), h('strong', null, 'DSH Experience Optimizer')),
|
|
1410
1514
|
h('p', null, tr('少一点插件负担,多一点兼容确定性。', 'Less plugin overhead, more compatibility certainty.')),
|
|
1411
|
-
h('p', null, tr('版本:', 'Version: ') + '0.3.
|
|
1515
|
+
h('p', null, tr('版本:', 'Version: ') + '0.3.6 · AGPL-3.0-only'),
|
|
1412
1516
|
h('p', null, tr('作者:Starlit Sky', 'Author: Starlit Sky')),
|
|
1413
1517
|
),
|
|
1414
1518
|
h(
|
|
@@ -1486,7 +1590,69 @@ window.__ModuleLoader__.load({
|
|
|
1486
1590
|
function renderTrim() {
|
|
1487
1591
|
return h(
|
|
1488
1592
|
'div',
|
|
1489
|
-
{
|
|
1593
|
+
{
|
|
1594
|
+
className:
|
|
1595
|
+
'eo-stack' +
|
|
1596
|
+
(layout === 'two' ? ' eo-layout-two' : '') +
|
|
1597
|
+
(density === 'compact' ? ' eo-density-compact' : ''),
|
|
1598
|
+
},
|
|
1599
|
+
h(
|
|
1600
|
+
'div',
|
|
1601
|
+
{ className: 'eo-viewbar' },
|
|
1602
|
+
h('span', { className: 'eo-viewbar-label' }, tr('视图', 'View')),
|
|
1603
|
+
h(
|
|
1604
|
+
'div',
|
|
1605
|
+
{ className: 'eo-inline' },
|
|
1606
|
+
h(
|
|
1607
|
+
Button,
|
|
1608
|
+
{
|
|
1609
|
+
variant: 'ghost',
|
|
1610
|
+
className: layout === 'standard' ? 'eo-btn-active' : '',
|
|
1611
|
+
onClick: () => changeLayout('standard'),
|
|
1612
|
+
},
|
|
1613
|
+
tr('标准', 'Standard'),
|
|
1614
|
+
),
|
|
1615
|
+
h(
|
|
1616
|
+
Button,
|
|
1617
|
+
{
|
|
1618
|
+
variant: 'ghost',
|
|
1619
|
+
className: layout === 'two' ? 'eo-btn-active' : '',
|
|
1620
|
+
onClick: () => changeLayout('two'),
|
|
1621
|
+
},
|
|
1622
|
+
tr('双列', 'Two-column'),
|
|
1623
|
+
),
|
|
1624
|
+
),
|
|
1625
|
+
h('span', { className: 'eo-viewbar-label' }, tr('密度', 'Density')),
|
|
1626
|
+
h(
|
|
1627
|
+
'div',
|
|
1628
|
+
{ className: 'eo-inline' },
|
|
1629
|
+
h(
|
|
1630
|
+
Button,
|
|
1631
|
+
{
|
|
1632
|
+
variant: 'ghost',
|
|
1633
|
+
className: density === 'comfortable' ? 'eo-btn-active' : '',
|
|
1634
|
+
onClick: () => changeDensity('comfortable'),
|
|
1635
|
+
},
|
|
1636
|
+
tr('舒适', 'Comfortable'),
|
|
1637
|
+
),
|
|
1638
|
+
h(
|
|
1639
|
+
Button,
|
|
1640
|
+
{
|
|
1641
|
+
variant: 'ghost',
|
|
1642
|
+
className: density === 'compact' ? 'eo-btn-active' : '',
|
|
1643
|
+
onClick: () => changeDensity('compact'),
|
|
1644
|
+
},
|
|
1645
|
+
tr('紧凑', 'Compact'),
|
|
1646
|
+
),
|
|
1647
|
+
),
|
|
1648
|
+
h('span', { className: 'eo-viewbar-label', style: { marginLeft: 'auto' } }, tr('折叠', 'Collapse')),
|
|
1649
|
+
h(
|
|
1650
|
+
'div',
|
|
1651
|
+
{ className: 'eo-inline' },
|
|
1652
|
+
h(Button, { variant: 'ghost', onClick: collapseAllCards }, tr('全部折叠', 'Collapse all')),
|
|
1653
|
+
h(Button, { variant: 'ghost', onClick: expandAllCards }, tr('全部展开', 'Expand all')),
|
|
1654
|
+
),
|
|
1655
|
+
),
|
|
1490
1656
|
h('div', { className: 'eo-grid eo-metrics' }, [
|
|
1491
1657
|
h(Metric, {
|
|
1492
1658
|
key: 'tokens',
|
|
@@ -1525,7 +1691,7 @@ window.__ModuleLoader__.load({
|
|
|
1525
1691
|
{
|
|
1526
1692
|
title: tr('兼容性检查', 'Compatibility check'),
|
|
1527
1693
|
subtitle: tr('插件 ↔ 插件 · 插件 ↔ DSH · 当前配置 / 工作区', 'Plugin ↔ plugin · plugin ↔ DSH · profile / workspace'),
|
|
1528
|
-
section: 'compat',
|
|
1694
|
+
section: 'compat', collapsible: true, collapsed: collapsedCards.compat === true, onToggle: () => toggleCard('compat'),
|
|
1529
1695
|
extra: h(
|
|
1530
1696
|
'div',
|
|
1531
1697
|
{ className: 'eo-inline' },
|
|
@@ -1635,7 +1801,7 @@ window.__ModuleLoader__.load({
|
|
|
1635
1801
|
Card,
|
|
1636
1802
|
{
|
|
1637
1803
|
title: tr('上下文成本', 'Context cost'),
|
|
1638
|
-
section: 'context',
|
|
1804
|
+
section: 'context', collapsible: true, collapsed: collapsedCards.context === true, onToggle: () => toggleCard('context'),
|
|
1639
1805
|
subtitle:
|
|
1640
1806
|
'总计 ' +
|
|
1641
1807
|
formatNumber(overview.context.totalTokens) +
|
|
@@ -1726,7 +1892,7 @@ window.__ModuleLoader__.load({
|
|
|
1726
1892
|
{
|
|
1727
1893
|
title: tr('插件清单', 'Plugin inventory'),
|
|
1728
1894
|
subtitle: `${filteredBundles.length} / ${totalBundles} ` + tr('个匹配 · 只读', 'matched · read-only'),
|
|
1729
|
-
section: 'inventory',
|
|
1895
|
+
section: 'inventory', collapsible: true, collapsed: collapsedCards.inventory === true, onToggle: () => toggleCard('inventory'),
|
|
1730
1896
|
extra: h(
|
|
1731
1897
|
Button,
|
|
1732
1898
|
{ variant: 'ghost', onClick: () => setShowAllBundles((value) => !value) },
|
|
@@ -1857,7 +2023,7 @@ window.__ModuleLoader__.load({
|
|
|
1857
2023
|
{
|
|
1858
2024
|
title: tr('插件减负方案', 'Slim plan'),
|
|
1859
2025
|
subtitle: tr('先建议,后确认;受保护项永不改动', 'Suggest first, confirm later; protected items never change'),
|
|
1860
|
-
section: 'draft',
|
|
2026
|
+
section: 'draft', collapsible: true, collapsed: collapsedCards.draft === true, onToggle: () => toggleCard('draft'),
|
|
1861
2027
|
},
|
|
1862
2028
|
h(
|
|
1863
2029
|
'div',
|
|
@@ -2043,7 +2209,7 @@ window.__ModuleLoader__.load({
|
|
|
2043
2209
|
{
|
|
2044
2210
|
title: tr('应用结果', 'Apply result'),
|
|
2045
2211
|
subtitle: applyResult.rolledBack ? tr('中途失败,已自动恢复', 'Failed midway; automatically restored') : tr('变更已写入当前配置', 'Changes written to the current profile'),
|
|
2046
|
-
section: 'result',
|
|
2212
|
+
section: 'result', collapsible: true, collapsed: collapsedCards.result === true, onToggle: () => toggleCard('result'),
|
|
2047
2213
|
extra: h(
|
|
2048
2214
|
Badge,
|
|
2049
2215
|
{ tone: applyResult.rolledBack ? 'warn' : 'ok' },
|
|
@@ -2134,7 +2300,7 @@ window.__ModuleLoader__.load({
|
|
|
2134
2300
|
draft && draft.dedupe && draft.dedupe.length > 0
|
|
2135
2301
|
? h(
|
|
2136
2302
|
Card,
|
|
2137
|
-
{ title: '
|
|
2303
|
+
{ title: tr('跨插件提示词重复', 'Cross-plugin prompt duplication'), subtitle: tr('只建议,不修改第三方源码', 'Suggestion only; never edits third-party source'), section: 'dedupe', collapsible: true, collapsed: collapsedCards.dedupe === true, onToggle: () => toggleCard('dedupe') },
|
|
2138
2304
|
h(
|
|
2139
2305
|
'div',
|
|
2140
2306
|
{ className: 'eo-list' },
|