codexmate 0.1.30 → 0.1.32
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 +98 -7
- package/README.vi.md +98 -7
- package/README.zh.md +99 -7
- package/cli/agents-files.js +18 -4
- package/cli/config-bootstrap.js +25 -11
- package/cli/plugin-config.js +64 -0
- package/cli/prompt-history.js +17 -4
- package/cli/system-prompt-files.js +7 -2
- package/cli.js +396 -46
- package/lib/cli-config-engine.js +266 -0
- package/lib/cli-utils.js +2 -1
- package/lib/cli-webhook.js +1 -1
- package/lib/handoff-mcp.js +282 -0
- package/lib/http-access-control.js +335 -0
- package/lib/session-context-health.js +82 -0
- package/lib/session-context-records.js +153 -0
- package/lib/thread-handoff.js +130 -0
- package/lib/web-startup-auth.js +53 -0
- package/lib/workflow-engine.js +92 -21
- package/lib/workflow-runner.js +261 -0
- package/package.json +1 -1
- package/plugins/prompt-templates/computed.mjs +3 -3
- package/plugins/prompt-templates/invocation.mjs +73 -0
- package/plugins/prompt-templates/methods.mjs +48 -3
- package/plugins/prompt-templates/overview.mjs +2 -0
- package/web-ui/app.js +48 -2
- package/web-ui/index.html +1 -0
- package/web-ui/logic.context-health.mjs +144 -0
- package/web-ui/modules/access-token.mjs +33 -0
- package/web-ui/modules/api.mjs +2 -1
- package/web-ui/modules/app.computed.prompts.mjs +11 -0
- package/web-ui/modules/app.methods.agents.mjs +20 -3
- package/web-ui/modules/app.methods.index.mjs +6 -0
- package/web-ui/modules/app.methods.navigation.mjs +17 -3
- package/web-ui/modules/app.methods.prompts-editor.mjs +7 -0
- package/web-ui/modules/app.methods.providers.mjs +2 -2
- package/web-ui/modules/app.methods.runtime.mjs +3 -2
- package/web-ui/modules/app.methods.session-actions.mjs +3 -0
- package/web-ui/modules/app.methods.session-browser.mjs +6 -2
- package/web-ui/modules/app.methods.system-prompt.mjs +17 -2
- package/web-ui/modules/app.methods.workflows.mjs +41 -0
- package/web-ui/modules/context-health.methods.mjs +70 -0
- package/web-ui/modules/i18n/locales/en.mjs +70 -2
- package/web-ui/modules/i18n/locales/ja.mjs +70 -2
- package/web-ui/modules/i18n/locales/vi.mjs +70 -2
- package/web-ui/modules/i18n/locales/zh-tw.mjs +70 -2
- package/web-ui/modules/i18n/locales/zh.mjs +70 -2
- package/web-ui/modules/plugins.methods.mjs +2 -0
- package/web-ui/modules/prompt-ecosystem.methods.mjs +136 -0
- package/web-ui/modules/sessions-filters-url.mjs +3 -0
- package/web-ui/modules/skills.methods.mjs +6 -5
- package/web-ui/modules/thread-handoff.mjs +142 -0
- package/web-ui/partials/index/context-health.html +45 -0
- package/web-ui/partials/index/modal-prompt-invocation.html +17 -0
- package/web-ui/partials/index/panel-config-claude.html +2 -0
- package/web-ui/partials/index/panel-config-codex.html +2 -0
- package/web-ui/partials/index/panel-config-kilocode.html +3 -1
- package/web-ui/partials/index/panel-config-openclaw.html +2 -0
- package/web-ui/partials/index/panel-config-opencode.html +3 -1
- package/web-ui/partials/index/panel-config-pi.html +2 -0
- package/web-ui/partials/index/panel-dashboard.html +59 -0
- package/web-ui/partials/index/panel-plugins.html +37 -9
- package/web-ui/partials/index/panel-prompts.html +46 -18
- package/web-ui/partials/index/panel-sessions.html +35 -44
- package/web-ui/partials/index/thread-handoff.html +59 -0
- package/web-ui/res/web-ui-render.precompiled.js +1289 -177
- package/web-ui/styles/context-health.css +107 -0
- package/web-ui/styles/controls-forms.css +9 -0
- package/web-ui/styles/dashboard.css +51 -0
- package/web-ui/styles/modals-core.css +87 -0
- package/web-ui/styles/navigation-panels.css +1 -1
- package/web-ui/styles/plugins-panel.css +62 -0
- package/web-ui/styles/prompts-editor.css +34 -4
- package/web-ui/styles/responsive.css +19 -10
- package/web-ui/styles/sessions-preview.css +206 -111
- package/web-ui/styles/sub-tabs.css +181 -0
- package/web-ui/styles.css +2 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/* 复用会话详情的留白;构成色只承担数据识别。 */
|
|
2
|
+
.context-health {
|
|
3
|
+
--context-system: oklch(62% 0.08 300);
|
|
4
|
+
--context-user: oklch(64% 0.08 155);
|
|
5
|
+
--context-assistant: oklch(64% 0.08 250);
|
|
6
|
+
--context-tools: oklch(72% 0.09 80);
|
|
7
|
+
--context-code: oklch(66% 0.08 25);
|
|
8
|
+
min-width: 0;
|
|
9
|
+
margin-block: 4px 4px;
|
|
10
|
+
padding-block: 0;
|
|
11
|
+
padding-inline: var(--spacing-sm);
|
|
12
|
+
background: transparent;
|
|
13
|
+
color: var(--color-text-primary);
|
|
14
|
+
font-size: var(--font-size-secondary);
|
|
15
|
+
}
|
|
16
|
+
#panel-sessions .context-health + .session-export-feedback:empty { display: none; }
|
|
17
|
+
.context-health-header {
|
|
18
|
+
display: grid;
|
|
19
|
+
grid-template-columns: minmax(0, 1fr) auto 44px;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: 8px;
|
|
22
|
+
min-height: 44px;
|
|
23
|
+
}
|
|
24
|
+
.context-health-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
|
25
|
+
.context-health-title {
|
|
26
|
+
min-width: 0;
|
|
27
|
+
margin: 0;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
color: var(--color-text-primary);
|
|
30
|
+
font-size: var(--font-size-body);
|
|
31
|
+
font-weight: var(--font-weight-secondary);
|
|
32
|
+
line-height: 24px;
|
|
33
|
+
text-overflow: ellipsis;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
}
|
|
36
|
+
.context-health-meta { margin: 0; overflow: hidden; color: var(--color-text-secondary); font-size: var(--font-size-secondary); line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
|
|
37
|
+
.context-health-summary { display: flex; align-items: center; justify-content: flex-end; min-width: 0; min-height: 44px; }
|
|
38
|
+
.context-health-total { min-width: 0; color: var(--color-text-primary); font-size: var(--font-size-body); font-weight: var(--font-weight-secondary); line-height: 24px; white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
39
|
+
.context-health-total small { color: var(--color-text-secondary); font-size: var(--font-size-secondary); font-weight: var(--font-weight-body); }
|
|
40
|
+
.context-health-rating { --context-status: var(--color-text-secondary); display: inline-block; width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--context-status); }
|
|
41
|
+
.context-health-rating.healthy { --context-status: var(--color-success); }
|
|
42
|
+
.context-health-rating.heavy { --context-status: var(--color-brand); }
|
|
43
|
+
.context-health-rating.bloated { --context-status: var(--color-error); }
|
|
44
|
+
.context-health-refresh {
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
min-width: 44px;
|
|
49
|
+
min-height: 44px;
|
|
50
|
+
padding: 8px;
|
|
51
|
+
border: 0;
|
|
52
|
+
border-radius: 4px;
|
|
53
|
+
background: transparent;
|
|
54
|
+
box-shadow: none;
|
|
55
|
+
color: var(--color-text-secondary);
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
transition: color 160ms ease-out, background-color 160ms ease-out;
|
|
58
|
+
}
|
|
59
|
+
.context-health-header > .context-health-refresh { grid-column: 3; }
|
|
60
|
+
.context-health-refresh:hover:not(:disabled) { background: var(--color-brand-light); color: var(--color-brand-dark); }
|
|
61
|
+
.context-health-refresh:active:not(:disabled) { background: var(--color-brand-subtle); }
|
|
62
|
+
.context-health-refresh:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
|
|
63
|
+
.context-health-refresh:disabled { opacity: 0.45; cursor: not-allowed; }
|
|
64
|
+
.context-health-refresh svg { flex-shrink: 0; }
|
|
65
|
+
.context-health-bar { display: flex; height: 4px; margin-block: 4px 12px; overflow: hidden; border-radius: 2px; background: var(--color-border-soft); }
|
|
66
|
+
.context-health-segment { flex-basis: 0; min-width: 0; }
|
|
67
|
+
.context-health-segment.system, .context-health-dot.system { background: var(--context-system); }
|
|
68
|
+
.context-health-segment.user, .context-health-dot.user { background: var(--context-user); }
|
|
69
|
+
.context-health-segment.assistant, .context-health-dot.assistant { background: var(--context-assistant); }
|
|
70
|
+
.context-health-segment.tools, .context-health-dot.tools { background: var(--context-tools); }
|
|
71
|
+
.context-health-segment.code, .context-health-dot.code { background: var(--context-code); }
|
|
72
|
+
.context-health-legend { margin: 0; }
|
|
73
|
+
.context-health-legend > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 32px; padding-block: 4px; }
|
|
74
|
+
.context-health-legend dt { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--color-text-secondary); font-size: var(--font-size-secondary); line-height: 20px; }
|
|
75
|
+
.context-health-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; }
|
|
76
|
+
.context-health-legend dd { display: grid; grid-template-columns: minmax(64px, auto) 56px; gap: 8px; margin: 0; text-align: right; line-height: 20px; }
|
|
77
|
+
.context-health-category-tokens { color: var(--color-text-primary); font-size: var(--font-size-secondary); font-weight: var(--font-weight-secondary); }
|
|
78
|
+
.context-health-category-share { color: var(--color-text-secondary); font-size: var(--font-size-secondary); }
|
|
79
|
+
.context-health-note { max-width: 72ch; margin: 8px 0 0; color: var(--color-text-secondary); font-size: var(--font-size-secondary); line-height: 20px; overflow-wrap: anywhere; }
|
|
80
|
+
.context-health-error { margin-block: 8px 0; }
|
|
81
|
+
.context-health-value-skeleton, .context-health-share-skeleton, .context-health-summary-skeleton span { display: block; justify-self: end; height: 8px; border-radius: 2px; background: var(--color-border-soft); }
|
|
82
|
+
.context-health-value-skeleton { width: 48px; }
|
|
83
|
+
.context-health-share-skeleton { width: 32px; }
|
|
84
|
+
.context-health-summary-skeleton { width: 96px; }
|
|
85
|
+
.context-health-summary-skeleton span { width: 80px; }
|
|
86
|
+
.context-health-focused-message { min-width: 0; margin-block: 16px; scroll-margin-top: 64px; }
|
|
87
|
+
.context-health-focused-message header { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
|
|
88
|
+
.context-health-focused-message header > div { min-width: 0; }
|
|
89
|
+
.context-health-focused-message header .context-health-meta { display: block; margin-top: 4px; }
|
|
90
|
+
.context-health-focused-message pre { max-height: 60vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin-block: 12px 0; padding: 16px; background: var(--color-surface-alt); }
|
|
91
|
+
.context-health-focused-message:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 4px; }
|
|
92
|
+
@container session-preview (max-width: 480px) {
|
|
93
|
+
.context-health-header { grid-template-columns: minmax(0, 1fr) auto 44px; grid-template-rows: 24px 24px; }
|
|
94
|
+
.context-health-heading { grid-column: 1 / 3; grid-row: 1; }
|
|
95
|
+
.context-health-summary { grid-column: 1 / 3; grid-row: 2; justify-content: flex-start; min-height: 24px; }
|
|
96
|
+
.context-health-header > .context-health-refresh { grid-column: 3; grid-row: 1 / 3; }
|
|
97
|
+
}
|
|
98
|
+
@media (max-width: 480px) {
|
|
99
|
+
.context-health-header { grid-template-columns: minmax(0, 1fr) auto 44px; grid-template-rows: 24px 24px; }
|
|
100
|
+
.context-health-heading { grid-column: 1 / 3; grid-row: 1; }
|
|
101
|
+
.context-health-summary { grid-column: 1 / 3; grid-row: 2; justify-content: flex-start; min-height: 24px; }
|
|
102
|
+
.context-health-header > .context-health-refresh { grid-column: 3; grid-row: 1 / 3; }
|
|
103
|
+
.context-health-legend > div { gap: 8px; }
|
|
104
|
+
}
|
|
105
|
+
@media (prefers-reduced-motion: reduce) {
|
|
106
|
+
.context-health-refresh { transition: none; }
|
|
107
|
+
}
|
|
@@ -596,6 +596,15 @@
|
|
|
596
596
|
}
|
|
597
597
|
|
|
598
598
|
.tool-config-write-overlay-card {
|
|
599
|
+
position: fixed;
|
|
600
|
+
top: 50%;
|
|
601
|
+
left: 50%;
|
|
602
|
+
transform: translate(-50%, -50%);
|
|
603
|
+
z-index: 40;
|
|
604
|
+
width: min(460px, calc(100vw - 32px));
|
|
605
|
+
max-height: calc(100dvh - 32px);
|
|
606
|
+
overflow-y: auto;
|
|
607
|
+
box-sizing: border-box;
|
|
599
608
|
max-width: 460px;
|
|
600
609
|
padding: 18px 20px;
|
|
601
610
|
border: 1px solid var(--color-border-soft);
|
|
@@ -330,3 +330,54 @@
|
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
+
|
|
334
|
+
/* Compact workflow launcher: shared controls, progressive disclosure. */
|
|
335
|
+
.workflow-panel.selector-section { gap: 12px; padding: 20px; }
|
|
336
|
+
.workflow-header, .workflow-launch, .workflow-run-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
|
|
337
|
+
.workflow-heading, .workflow-field { min-width: 0; }
|
|
338
|
+
.workflow-title { margin: 0; color: var(--color-text-primary); font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
|
|
339
|
+
.workflow-description { margin: 4px 0 0; color: var(--color-text-tertiary); font-size: 12px; line-height: 1.5; }
|
|
340
|
+
.workflow-refresh.btn-tool { width: auto; flex-shrink: 0; box-shadow: none; background: transparent; }
|
|
341
|
+
.workflow-form { display: grid; gap: 4px; }
|
|
342
|
+
.workflow-launch { align-items: flex-end; }
|
|
343
|
+
.workflow-field { flex: 1; }
|
|
344
|
+
.workflow-field .form-label { font-size: 11px; color: var(--color-text-tertiary); margin-bottom: 6px; }
|
|
345
|
+
.workflow-select.model-select { max-width: none; min-height: 44px; box-sizing: border-box; }
|
|
346
|
+
.workflow-submit.btn { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; gap: 20px; min-height: 44px; padding: 10px 20px; font-size: 13px; white-space: normal; }
|
|
347
|
+
.workflow-submit:disabled { opacity: .5; cursor: not-allowed; }
|
|
348
|
+
.workflow-options { min-width: 0; margin-top: 8px; }
|
|
349
|
+
.workflow-options > summary, .workflow-history > summary { cursor: pointer; min-height: 36px; align-content: center; color: var(--color-text-secondary); font-size: 12px; }
|
|
350
|
+
.workflow-option-kind { margin-inline-start: 8px; color: var(--color-text-tertiary); font-family: var(--font-family-mono); font-size: 10px; }
|
|
351
|
+
.workflow-options > .workflow-field { padding-top: 8px; }
|
|
352
|
+
.workflow-options .form-hint { margin: 8px 0; }
|
|
353
|
+
.workflow-json { box-sizing: border-box; min-width: 0; font-family: var(--font-family-mono); font-size: 12px; line-height: 1.6; resize: vertical; }
|
|
354
|
+
.workflow-authorization { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: var(--color-text-tertiary); font-size: 12px; cursor: pointer; }
|
|
355
|
+
.workflow-authorization input { margin: 0; accent-color: var(--color-brand); flex-shrink: 0; }
|
|
356
|
+
.workflow-history { border-top: 1px solid var(--color-border-soft); padding-top: 8px; min-width: 0; }
|
|
357
|
+
.workflow-history-title { font-weight: 500; }
|
|
358
|
+
.workflow-count { margin-inline-start: 8px; color: var(--color-text-tertiary); font-variant-numeric: tabular-nums; }
|
|
359
|
+
.workflow-empty { padding: 4px 0 12px; }
|
|
360
|
+
.workflow-empty .form-hint { margin: 0; }
|
|
361
|
+
.workflow-run { min-width: 0; padding: 16px 0; }
|
|
362
|
+
.workflow-run + .workflow-run { border-top: 1px solid var(--color-border-soft); }
|
|
363
|
+
.workflow-run-header { align-items: baseline; flex-wrap: wrap; gap: 8px; }
|
|
364
|
+
.workflow-run-header h4 { margin: 0; min-width: 0; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
|
|
365
|
+
.workflow-status { font-size: 11px; color: var(--color-text-tertiary); overflow-wrap: anywhere; }
|
|
366
|
+
.workflow-status[data-status="running"], .workflow-status[data-status="queued"] { color: var(--color-brand-dark); }
|
|
367
|
+
.workflow-status[data-status="completed"] { color: var(--color-success); }
|
|
368
|
+
.workflow-status[data-status="failed"], .workflow-status[data-status="waiting"] { color: var(--color-error); }
|
|
369
|
+
.workflow-run-id { margin: 6px 0 8px; font-size: 10px; color: var(--color-text-tertiary); overflow-wrap: anywhere; }
|
|
370
|
+
.workflow-run-reason { margin: 0 0 8px; font-size: 12px; color: var(--color-text-secondary); overflow-wrap: anywhere; }
|
|
371
|
+
.workflow-run-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
|
|
372
|
+
.workflow-run-actions > .btn-tool { width: auto; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
|
|
373
|
+
.workflow-panel .workflow-run-actions > .btn-tool + .btn-tool { margin: 0; }
|
|
374
|
+
.workflow-details { min-width: 0; font-size: 12px; color: var(--color-text-secondary); }
|
|
375
|
+
.workflow-details > summary { min-height: 36px; align-content: center; cursor: pointer; }
|
|
376
|
+
.workflow-details pre { max-height: 320px; margin: 8px 0; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
377
|
+
.workflow-panel :is(button, select, summary, input):focus-visible { outline: 2px solid var(--color-brand); outline-offset: 3px; }
|
|
378
|
+
@media (max-width: 640px) {
|
|
379
|
+
.workflow-panel.selector-section { padding: 16px; }
|
|
380
|
+
.workflow-launch { flex-direction: column; align-items: stretch; gap: 12px; }
|
|
381
|
+
.workflow-header { gap: 12px; align-items: flex-start; }
|
|
382
|
+
.workflow-run-actions > .btn-tool { flex: 1 1 100%; }
|
|
383
|
+
}
|
|
@@ -667,7 +667,9 @@
|
|
|
667
667
|
display: flex;
|
|
668
668
|
align-items: center;
|
|
669
669
|
justify-content: space-between;
|
|
670
|
+
flex-wrap: nowrap;
|
|
670
671
|
gap: 12px;
|
|
672
|
+
min-width: 0;
|
|
671
673
|
margin-bottom: 8px;
|
|
672
674
|
}
|
|
673
675
|
|
|
@@ -680,13 +682,98 @@
|
|
|
680
682
|
display: flex;
|
|
681
683
|
gap: 6px;
|
|
682
684
|
flex-shrink: 0;
|
|
685
|
+
flex-wrap: nowrap;
|
|
683
686
|
align-items: center;
|
|
687
|
+
min-width: 0;
|
|
684
688
|
}
|
|
685
689
|
|
|
686
690
|
.prompts-editor-group {
|
|
687
691
|
display: flex;
|
|
688
692
|
gap: 6px;
|
|
689
693
|
align-items: center;
|
|
694
|
+
flex-shrink: 0;
|
|
695
|
+
white-space: nowrap;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
.prompts-path-summary-wrap {
|
|
699
|
+
flex: 1 1 auto;
|
|
700
|
+
min-width: 0;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
.prompts-path-summary {
|
|
704
|
+
position: relative;
|
|
705
|
+
min-width: 0;
|
|
706
|
+
max-width: 100%;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
.prompts-path-summary-trigger {
|
|
710
|
+
display: flex;
|
|
711
|
+
align-items: center;
|
|
712
|
+
gap: 4px;
|
|
713
|
+
min-width: 0;
|
|
714
|
+
max-width: 100%;
|
|
715
|
+
padding: 4px 6px;
|
|
716
|
+
border-radius: var(--radius-sm);
|
|
717
|
+
color: var(--color-text-secondary);
|
|
718
|
+
font-size: var(--font-size-caption);
|
|
719
|
+
cursor: pointer;
|
|
720
|
+
list-style: none;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
.prompts-path-summary-trigger::-webkit-details-marker {
|
|
724
|
+
display: none;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
.prompts-path-summary-trigger:hover {
|
|
728
|
+
color: var(--color-brand);
|
|
729
|
+
background: var(--color-brand-light);
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.prompts-path-summary-trigger:focus-visible {
|
|
733
|
+
outline: 2px solid var(--color-brand);
|
|
734
|
+
outline-offset: 2px;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.prompts-path-summary-name {
|
|
738
|
+
flex: 0 1 auto;
|
|
739
|
+
min-width: 0;
|
|
740
|
+
overflow: hidden;
|
|
741
|
+
text-overflow: ellipsis;
|
|
742
|
+
white-space: nowrap;
|
|
743
|
+
font-weight: 600;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
.prompts-token-hint {
|
|
747
|
+
flex: 0 0 auto;
|
|
748
|
+
white-space: nowrap;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
.prompts-path-summary-popover {
|
|
752
|
+
position: absolute;
|
|
753
|
+
top: calc(100% + 6px);
|
|
754
|
+
left: 0;
|
|
755
|
+
z-index: 40;
|
|
756
|
+
display: grid;
|
|
757
|
+
gap: 4px;
|
|
758
|
+
width: max-content;
|
|
759
|
+
max-width: min(520px, calc(100vw - 48px));
|
|
760
|
+
padding: 8px 10px;
|
|
761
|
+
border: 1px solid var(--color-border);
|
|
762
|
+
border-radius: var(--radius-md);
|
|
763
|
+
background: var(--color-bg-card);
|
|
764
|
+
box-shadow: var(--shadow-raised);
|
|
765
|
+
color: var(--color-text-secondary);
|
|
766
|
+
font-size: var(--font-size-caption);
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
.prompts-path-summary-popover-label {
|
|
770
|
+
color: var(--color-text-tertiary);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
.prompts-path-summary-popover code {
|
|
774
|
+
color: var(--color-text);
|
|
775
|
+
white-space: normal;
|
|
776
|
+
overflow-wrap: anywhere;
|
|
690
777
|
}
|
|
691
778
|
|
|
692
779
|
.prompts-editor-group--secondary .btn-mini {
|
|
@@ -562,3 +562,65 @@
|
|
|
562
562
|
grid-template-columns: 1fr;
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
|
+
|
|
566
|
+
/* Match the instruction-file editor: flat workspace, underlined tabs and quiet tools. */
|
|
567
|
+
#panel-plugins { container-type: inline-size; }
|
|
568
|
+
#panel-plugins .plugins-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
|
|
569
|
+
#panel-plugins .plugins-sidebar { padding: 0; border: 0; background: transparent; box-shadow: none; }
|
|
570
|
+
#panel-plugins .plugins-sidebar-header { display: none; }
|
|
571
|
+
#panel-plugins .plugins-sidebar-header .plugins-panel-note { display: none; }
|
|
572
|
+
#panel-plugins .plugins-list { display: flex; flex-wrap: wrap; gap: 2px; width: fit-content; border-bottom: 1px solid var(--color-border-soft); }
|
|
573
|
+
#panel-plugins .plugins-item { width: auto; min-height: 44px; padding: 7px 10px 8px; gap: 12px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; }
|
|
574
|
+
#panel-plugins .plugins-item-meta, #panel-plugins .plugins-item > .pill { display: none; }
|
|
575
|
+
#panel-plugins .plugins-item:hover { transform: none; background: transparent; }
|
|
576
|
+
#panel-plugins .plugins-item.active { background: transparent; color: var(--color-brand-dark); border-bottom-color: var(--color-brand); box-shadow: none; }
|
|
577
|
+
#panel-plugins .plugins-item.active .plugins-item-title { color: var(--color-brand-dark); }
|
|
578
|
+
#panel-plugins .plugins-item.active::before { display: none; }
|
|
579
|
+
#panel-plugins .plugins-item-title { font-size: 13px; }
|
|
580
|
+
#panel-plugins .plugins-panel { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
|
|
581
|
+
#panel-plugins .plugins-panel-head { margin-bottom: 8px; align-items: center; gap: 12px; }
|
|
582
|
+
#panel-plugins .plugins-panel-title { font-size: 14px; line-height: 1.4; font-weight: 600; letter-spacing: -.02em; }
|
|
583
|
+
#panel-plugins .plugins-panel-note { line-height: 1.65; overflow-wrap: anywhere; }
|
|
584
|
+
#panel-plugins .prompt-templates-modebar { padding: 0; gap: 2px; margin-bottom: 12px; border: 0; border-bottom: 1px solid var(--color-border-soft); border-radius: 0; background: transparent; backdrop-filter: none; }
|
|
585
|
+
#panel-plugins .mode-pill { position: relative; min-height: 44px; padding: 7px 10px 8px; border-radius: 0; letter-spacing: 0; }
|
|
586
|
+
#panel-plugins .mode-pill.active { background: transparent; color: var(--color-brand-dark); box-shadow: none; }
|
|
587
|
+
#panel-plugins .mode-pill.active::after { content: ''; position: absolute; right: 0; bottom: 0; left: 0; height: 2px; border-radius: 2px; background: var(--color-brand); }
|
|
588
|
+
#panel-plugins .mode-pill:hover:not(.active) { background: transparent; color: var(--color-text-primary); }
|
|
589
|
+
#panel-plugins .prompt-compose-workspace { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
|
|
590
|
+
#panel-plugins .prompt-compose-main { gap: 24px; align-content: start; }
|
|
591
|
+
#panel-plugins .prompt-compose-form { display: grid; gap: 8px; }
|
|
592
|
+
#panel-plugins .form-label { margin: 0; font-size: 13px; font-weight: 600; }
|
|
593
|
+
#panel-plugins .prompt-vars-block { margin: 0; padding: 0; border: 0; background: transparent; }
|
|
594
|
+
#panel-plugins .prompt-vars-head { align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
|
|
595
|
+
#panel-plugins .prompt-vars-title { font-size: 14px; font-weight: 600; color: var(--color-text-primary); }
|
|
596
|
+
#panel-plugins .prompt-vars-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
|
|
597
|
+
#panel-plugins .prompt-var-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
|
|
598
|
+
#panel-plugins .prompt-var-label { color: var(--color-text-secondary); overflow-wrap: anywhere; }
|
|
599
|
+
#panel-plugins .prompt-preview-block { margin: 0; padding: 0 0 0 16px; border: 0; border-left: 1px solid var(--color-border-soft); border-radius: 0; background: transparent; }
|
|
600
|
+
#panel-plugins .prompt-compose-preview { display: flex; flex-direction: column; min-height: 360px; }
|
|
601
|
+
#panel-plugins .prompt-preview-textarea { flex: 1; width: 100%; min-height: 240px; padding: 16px; border: 0; background: var(--color-surface-alt); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; resize: vertical; }
|
|
602
|
+
#panel-plugins .prompt-templates-grid { grid-template-columns: minmax(240px, .75fr) minmax(0, 1.5fr); gap: 32px; }
|
|
603
|
+
#panel-plugins .prompt-templates-toolbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
|
|
604
|
+
#panel-plugins .prompt-templates-toolbar .form-input { grid-column: 1 / -1; min-width: 0; }
|
|
605
|
+
#panel-plugins .prompt-template-item { border: 0; box-shadow: none; background: transparent; padding: 16px 12px; border-radius: 8px; }
|
|
606
|
+
#panel-plugins .prompt-template-item:hover { transform: none; background: var(--color-surface-alt); }
|
|
607
|
+
#panel-plugins .prompt-template-item.active { background: var(--color-brand-light); box-shadow: none; }
|
|
608
|
+
#panel-plugins .prompt-editor-head { padding: 0; border: 0; border-radius: 0; background: transparent; gap: 12px; margin-bottom: 20px; }
|
|
609
|
+
#panel-plugins .prompt-editor-name { min-width: 0; font-size: 16px; font-weight: 600; }
|
|
610
|
+
#panel-plugins .prompt-editor-textarea { width: 100%; min-height: 240px; line-height: 1.8; white-space: pre-wrap; }
|
|
611
|
+
#panel-plugins :is(.form-input, .form-select) { max-width: 100%; min-height: 44px; border-radius: 8px; }
|
|
612
|
+
#panel-plugins .btn-mini { min-height: 44px; padding: 8px 12px; }
|
|
613
|
+
#panel-plugins .prompt-compose-preview > .prompt-vars-head > .btn-mini { background: transparent; color: var(--color-text-secondary); border-color: var(--color-border-soft); }
|
|
614
|
+
#panel-plugins button { transition: background 160ms ease, color 160ms ease, border-color 160ms ease; }
|
|
615
|
+
#panel-plugins button:active:not(:disabled) { opacity: .8; }
|
|
616
|
+
#panel-plugins button:disabled { opacity: .45; cursor: not-allowed; }
|
|
617
|
+
#panel-plugins :is(button, input, select, textarea):focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
|
|
618
|
+
@container (max-width: 800px) {
|
|
619
|
+
#panel-plugins .prompt-compose-workspace, #panel-plugins .prompt-templates-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
|
|
620
|
+
#panel-plugins .plugins-panel { padding: 0; }
|
|
621
|
+
#panel-plugins .prompt-compose-preview { padding-left: 0; border-left: 0; }
|
|
622
|
+
#panel-plugins .prompt-compose-preview { min-height: 300px; }
|
|
623
|
+
}
|
|
624
|
+
@media (prefers-reduced-motion: reduce) {
|
|
625
|
+
#panel-plugins button { transition: none; }
|
|
626
|
+
}
|
|
@@ -335,17 +335,47 @@
|
|
|
335
335
|
|
|
336
336
|
|
|
337
337
|
.prompts-editor-group--pathref .prompts-path-reference-select {
|
|
338
|
-
width:
|
|
339
|
-
max-width:
|
|
340
|
-
min-width:
|
|
338
|
+
width: 180px;
|
|
339
|
+
max-width: 180px;
|
|
340
|
+
min-width: 180px;
|
|
341
341
|
padding: 5px 8px;
|
|
342
342
|
font-size: var(--font-size-caption);
|
|
343
343
|
color: var(--color-text-secondary);
|
|
344
344
|
cursor: pointer;
|
|
345
|
-
flex
|
|
345
|
+
flex: 0 0 180px;
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
+
@media (max-width: 540px) {
|
|
349
|
+
.prompts-editor-group--pathref .prompts-path-reference-select {
|
|
350
|
+
width: 112px;
|
|
351
|
+
min-width: 112px;
|
|
352
|
+
max-width: 112px;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
348
355
|
.prompts-editor-group--pathref .prompts-path-reference-select:disabled {
|
|
349
356
|
opacity: 0.6;
|
|
350
357
|
cursor: not-allowed;
|
|
351
358
|
}
|
|
359
|
+
|
|
360
|
+
/* 模板调用弹窗:保持多行变量、焦点与窄屏可访问。 */
|
|
361
|
+
.prompt-invocation-dialog {
|
|
362
|
+
max-width: min(640px, calc(100vw - 32px));
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.prompt-invocation-fields {
|
|
366
|
+
display: grid;
|
|
367
|
+
gap: 12px;
|
|
368
|
+
max-height: 60vh;
|
|
369
|
+
overflow-y: auto;
|
|
370
|
+
margin-block: 16px;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.prompt-invocation-dialog :is(textarea, button) {
|
|
374
|
+
min-height: 44px;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.prompt-history-diff {
|
|
378
|
+
max-height: 320px;
|
|
379
|
+
overflow: auto;
|
|
380
|
+
margin-block: 8px;
|
|
381
|
+
}
|
|
@@ -207,14 +207,15 @@ textarea:focus-visible {
|
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
.prompts-editor-toolbar {
|
|
210
|
-
flex-direction:
|
|
211
|
-
align-items:
|
|
210
|
+
flex-direction: row;
|
|
211
|
+
align-items: center;
|
|
212
|
+
flex-wrap: nowrap;
|
|
212
213
|
gap: 8px;
|
|
213
214
|
}
|
|
214
215
|
|
|
215
216
|
.prompts-editor-actions {
|
|
216
|
-
width:
|
|
217
|
-
flex-wrap:
|
|
217
|
+
width: auto;
|
|
218
|
+
flex-wrap: nowrap;
|
|
218
219
|
}
|
|
219
220
|
|
|
220
221
|
.prompt-presets-inline-row {
|
|
@@ -636,19 +637,27 @@ textarea:focus-visible {
|
|
|
636
637
|
}
|
|
637
638
|
|
|
638
639
|
.prompts-editor-actions .btn-mini {
|
|
639
|
-
|
|
640
|
-
|
|
640
|
+
width: 44px;
|
|
641
|
+
min-width: 44px;
|
|
642
|
+
min-height: 44px;
|
|
643
|
+
padding: 0;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.prompts-editor-group--edit .btn-mini:nth-child(3),
|
|
647
|
+
.prompts-editor-group--edit .btn-mini:nth-child(4) {
|
|
648
|
+
display: none;
|
|
641
649
|
}
|
|
642
650
|
|
|
643
651
|
.prompts-editor-toolbar {
|
|
644
|
-
flex-direction:
|
|
645
|
-
align-items:
|
|
652
|
+
flex-direction: row;
|
|
653
|
+
align-items: center;
|
|
654
|
+
flex-wrap: nowrap;
|
|
646
655
|
gap: 8px;
|
|
647
656
|
}
|
|
648
657
|
|
|
649
658
|
.prompts-editor-actions {
|
|
650
|
-
width:
|
|
651
|
-
flex-wrap:
|
|
659
|
+
width: auto;
|
|
660
|
+
flex-wrap: nowrap;
|
|
652
661
|
}
|
|
653
662
|
|
|
654
663
|
.prompt-presets-inline-row {
|