codexmate 0.1.31 → 0.1.33

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.
Files changed (92) hide show
  1. package/README.md +8 -3
  2. package/README.vi.md +8 -3
  3. package/README.zh.md +8 -3
  4. package/cli/agents-files.js +18 -4
  5. package/cli/claude-proxy.js +2 -2
  6. package/cli/plugin-config.js +64 -0
  7. package/cli/prompt-history.js +19 -4
  8. package/cli/system-prompt-files.js +7 -2
  9. package/cli.js +200 -214
  10. package/lib/cli-config-engine.js +15 -4
  11. package/lib/cli-file-utils.js +6 -1
  12. package/lib/config-change-fs.js +132 -0
  13. package/lib/config-changes.js +293 -0
  14. package/lib/handoff-mcp.js +18 -2
  15. package/lib/local-feature-store.js +39 -0
  16. package/lib/session-bookmarks.js +72 -0
  17. package/lib/session-context-health.js +102 -0
  18. package/lib/session-context-records.js +153 -0
  19. package/lib/session-diagnostics.js +75 -0
  20. package/lib/session-feature-settings.js +21 -0
  21. package/lib/session-features.js +63 -0
  22. package/lib/session-handoff-draft.js +43 -0
  23. package/lib/session-projects.js +76 -0
  24. package/lib/session-search-index.js +188 -0
  25. package/lib/thread-handoff.js +8 -0
  26. package/lib/web-server.js +216 -0
  27. package/lib/web-startup-auth.js +5 -1
  28. package/package.json +1 -1
  29. package/plugins/prompt-templates/computed.mjs +3 -3
  30. package/plugins/prompt-templates/invocation.mjs +73 -0
  31. package/plugins/prompt-templates/methods.mjs +48 -3
  32. package/plugins/prompt-templates/overview.mjs +2 -0
  33. package/web-ui/app.js +32 -1
  34. package/web-ui/index.html +2 -0
  35. package/web-ui/logic.context-health.mjs +144 -0
  36. package/web-ui/logic.context-window.mjs +15 -0
  37. package/web-ui/modules/api.mjs +72 -39
  38. package/web-ui/modules/app.computed.prompts.mjs +11 -0
  39. package/web-ui/modules/app.methods.agents.mjs +25 -3
  40. package/web-ui/modules/app.methods.claude-config.mjs +2 -0
  41. package/web-ui/modules/app.methods.codex-config.mjs +9 -0
  42. package/web-ui/modules/app.methods.config-changes.mjs +124 -0
  43. package/web-ui/modules/app.methods.index.mjs +4 -0
  44. package/web-ui/modules/app.methods.kilocode-config.mjs +2 -0
  45. package/web-ui/modules/app.methods.openclaw-persist.mjs +2 -0
  46. package/web-ui/modules/app.methods.opencode-config.mjs +2 -0
  47. package/web-ui/modules/app.methods.pi-config.mjs +12 -3
  48. package/web-ui/modules/app.methods.provider-cache.mjs +9 -3
  49. package/web-ui/modules/app.methods.providers.mjs +6 -0
  50. package/web-ui/modules/app.methods.startup-claude.mjs +8 -47
  51. package/web-ui/modules/app.methods.system-prompt.mjs +17 -2
  52. package/web-ui/modules/config-change-actions.mjs +9 -0
  53. package/web-ui/modules/context-health.methods.mjs +70 -0
  54. package/web-ui/modules/i18n/locales/en.mjs +164 -4
  55. package/web-ui/modules/i18n/locales/ja.mjs +164 -4
  56. package/web-ui/modules/i18n/locales/vi.mjs +164 -4
  57. package/web-ui/modules/i18n/locales/zh-tw.mjs +164 -4
  58. package/web-ui/modules/i18n/locales/zh.mjs +164 -4
  59. package/web-ui/modules/plugins.methods.mjs +2 -0
  60. package/web-ui/modules/prompt-ecosystem.methods.mjs +136 -0
  61. package/web-ui/modules/request-deadline.mjs +33 -0
  62. package/web-ui/modules/session-features.mjs +279 -0
  63. package/web-ui/modules/thread-handoff.mjs +1 -1
  64. package/web-ui/partials/index/config-changes.html +25 -0
  65. package/web-ui/partials/index/context-health.html +45 -0
  66. package/web-ui/partials/index/context-window-reference.html +17 -0
  67. package/web-ui/partials/index/layout-header.html +7 -30
  68. package/web-ui/partials/index/modal-openclaw-config.html +0 -2
  69. package/web-ui/partials/index/modal-prompt-invocation.html +17 -0
  70. package/web-ui/partials/index/modal-skills.html +0 -1
  71. package/web-ui/partials/index/modals-basic.html +0 -8
  72. package/web-ui/partials/index/modals-pi-provider.html +0 -1
  73. package/web-ui/partials/index/panel-config-codex.html +0 -3
  74. package/web-ui/partials/index/panel-config-openclaw.html +16 -13
  75. package/web-ui/partials/index/panel-dashboard.html +0 -2
  76. package/web-ui/partials/index/panel-plugins.html +37 -10
  77. package/web-ui/partials/index/panel-prompts.html +18 -3
  78. package/web-ui/partials/index/panel-sessions.html +23 -11
  79. package/web-ui/partials/index/panel-settings.html +1 -12
  80. package/web-ui/partials/index/panel-trash.html +0 -1
  81. package/web-ui/partials/index/session-diagnostics.html +29 -0
  82. package/web-ui/partials/index/session-features.html +107 -0
  83. package/web-ui/partials/index/thread-handoff.html +6 -3
  84. package/web-ui/res/web-ui-render.precompiled.js +1863 -271
  85. package/web-ui/styles/config-changes.css +30 -0
  86. package/web-ui/styles/context-health.css +107 -0
  87. package/web-ui/styles/openclaw-structured.css +205 -189
  88. package/web-ui/styles/prompts-editor.css +23 -0
  89. package/web-ui/styles/session-features.css +148 -0
  90. package/web-ui/styles/sessions-preview.css +21 -0
  91. package/web-ui/styles/sub-tabs.css +181 -0
  92. package/web-ui/styles.css +5 -1
@@ -0,0 +1,30 @@
1
+ .config-change-last {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: space-between;
5
+ gap: 16px;
6
+ flex-wrap: wrap;
7
+ margin-bottom: 16px;
8
+ color: var(--text-secondary);
9
+ }
10
+ .config-change-overlay { z-index: 160; }
11
+ .config-change-modal {
12
+ display: flex;
13
+ flex-direction: column;
14
+ max-height: 88dvh;
15
+ gap: 16px;
16
+ }
17
+ .config-change-files {
18
+ min-height: 0;
19
+ overflow: auto;
20
+ overscroll-behavior: contain;
21
+ }
22
+ .config-change-file + .config-change-file { margin-top: 24px; }
23
+ .config-change-file h3 { font-size: 14px; margin: 0 0 8px; }
24
+ .config-change-file code { overflow-wrap: anywhere; font-weight: normal; }
25
+ .config-change-diff { margin: 0; font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
26
+ .config-change-line { display: block; min-height: 1.6em; }
27
+ .config-change-line-add { background: color-mix(in srgb, var(--success, #27834b) 12%, transparent); }
28
+ .config-change-line-del { background: color-mix(in srgb, var(--danger, #b34646) 12%, transparent); }
29
+ .config-change-actions { margin-top: 0; flex-shrink: 0; }
30
+ .config-change-actions button, .config-change-last button { min-height: 44px; }
@@ -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
+ }
@@ -354,309 +354,325 @@
354
354
  }
355
355
 
356
356
 
357
- /* OpenClaw config tab: align with current settings/card system */
358
- .openclaw-layout {
357
+ /* Keep OpenClaw layout isolated from shared cards and theme overrides. */
358
+ #panel-config-openclaw .openclaw-layout {
359
359
  display: grid;
360
- gap: 10px;
361
- padding: 0;
360
+ gap: var(--spacing-sm);
362
361
  width: 100%;
362
+ min-width: 0;
363
+ padding: 0;
363
364
  }
364
365
 
365
- .openclaw-workspace-card.settings-card,
366
- .openclaw-summary-card,
367
- .openclaw-configs-card {
366
+ #panel-config-openclaw .tool-config-write-card {
368
367
  margin: 0;
369
- padding: 0;
368
+ }
369
+
370
+ #panel-config-openclaw :is(.openclaw-workspace-card, .openclaw-summary-card, .openclaw-configs-card) {
370
371
  width: 100%;
371
- align-items: stretch;
372
+ min-width: 0;
373
+ margin: 0;
374
+ padding: 0;
372
375
  border: 0;
373
376
  border-radius: 0;
374
377
  background: transparent;
375
378
  box-shadow: none;
376
379
  }
377
380
 
378
- .openclaw-workspace-card.settings-card:hover,
379
- .openclaw-summary-card:hover,
380
- .openclaw-configs-card:hover {
381
- border-color: transparent;
382
- box-shadow: none;
383
- }
384
-
385
- .openclaw-workspace-card.settings-card > .settings-card-body,
386
- .openclaw-summary-card > .settings-card-body,
387
- .openclaw-configs-card > .settings-card-body {
381
+ #panel-config-openclaw :is(.openclaw-workspace-card, .openclaw-summary-card, .openclaw-configs-card) > .settings-card-body {
382
+ display: grid;
383
+ gap: 16px;
388
384
  width: 100%;
389
385
  min-width: 0;
386
+ padding: 0;
387
+ border: 0;
388
+ border-radius: 0;
389
+ background: transparent;
390
+ box-shadow: none;
390
391
  }
391
392
 
392
- .openclaw-summary-card > .settings-card-body {
393
+ #panel-config-openclaw .tool-config-write-body {
393
394
  display: grid;
394
- gap: 12px;
395
- padding: 16px;
396
- border: 1px solid rgba(137, 111, 94, 0.12);
397
- border-radius: var(--radius-lg);
398
- background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(249, 244, 239, 0.72));
399
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
395
+ gap: var(--spacing-md);
400
396
  }
401
397
 
402
- .openclaw-summary-header {
398
+ #panel-config-openclaw .openclaw-summary-header {
403
399
  display: flex;
404
- justify-content: space-between;
405
- gap: 12px;
406
- align-items: flex-start;
407
- }
408
-
409
- .summary-eyebrow {
410
- font-size: 10px;
411
- letter-spacing: 0.12em;
412
- color: var(--color-text-tertiary);
413
- font-weight: 600;
414
- }
415
-
416
- .summary-title {
417
- margin-top: 2px;
418
- font-size: 16px;
419
- font-weight: 600;
420
- color: var(--color-text-primary);
400
+ align-items: baseline;
401
+ gap: 16px;
421
402
  }
422
403
 
423
- .summary-note,
424
- .openclaw-diagnostic-note {
425
- font-size: 11px;
426
- color: var(--color-text-tertiary);
427
- line-height: 1.45;
404
+ #panel-config-openclaw .summary-title {
405
+ margin: 0;
406
+ color: var(--color-text-secondary);
407
+ font-size: var(--font-size-secondary);
408
+ font-weight: var(--font-weight-secondary);
409
+ line-height: var(--line-height-normal);
428
410
  }
429
411
 
430
- .summary-note {
431
- max-width: 260px;
432
- text-align: right;
412
+ #panel-config-openclaw .openclaw-section-title {
413
+ margin: 0;
414
+ color: var(--color-text-secondary);
415
+ font-size: var(--font-size-secondary);
416
+ font-weight: var(--font-weight-secondary);
417
+ line-height: var(--line-height-normal);
433
418
  }
434
419
 
435
- .openclaw-summary-grid {
420
+ #panel-config-openclaw .openclaw-summary-grid {
436
421
  display: grid;
437
- grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
438
- gap: 8px;
422
+ grid-template-columns: repeat(2, minmax(0, 1fr));
423
+ gap: 16px 24px;
439
424
  }
440
425
 
441
- .openclaw-summary-item {
426
+ #panel-config-openclaw .openclaw-summary-item {
442
427
  min-width: 0;
443
- padding: 10px 12px;
444
- border: 1px solid rgba(137, 111, 94, 0.10);
445
- border-radius: var(--radius-md);
446
- background: rgba(255, 255, 255, 0.72);
428
+ padding: 0;
429
+ border: 0;
430
+ border-radius: 0;
431
+ background: transparent;
432
+ }
433
+
434
+ #panel-config-openclaw .openclaw-summary-item:first-child {
435
+ grid-column: 1 / -1;
447
436
  }
448
437
 
449
- .summary-item-label {
438
+ #panel-config-openclaw .summary-item-label {
450
439
  margin-bottom: 4px;
451
- font-size: 11px;
452
- color: var(--color-text-tertiary);
440
+ color: var(--color-text-secondary);
441
+ font-size: var(--font-size-caption);
442
+ line-height: 1.5;
453
443
  }
454
444
 
455
- .summary-item-value {
456
- font-size: 13px;
457
- font-weight: 500;
445
+ #panel-config-openclaw .summary-item-value {
458
446
  color: var(--color-text-primary);
447
+ font-size: var(--font-size-secondary);
448
+ font-weight: var(--font-weight-secondary);
449
+ line-height: var(--line-height-normal);
459
450
  overflow-wrap: anywhere;
460
451
  }
461
452
 
462
- .openclaw-tools-grid {
453
+ #panel-config-openclaw .openclaw-summary-item:first-child .summary-item-value {
454
+ font-family: var(--font-family-mono);
455
+ font-size: 13px;
456
+ }
457
+
458
+ #panel-config-openclaw .openclaw-diagnostic-note {
459
+ color: var(--color-text-tertiary);
460
+ font-size: 12px;
461
+ line-height: 1.5;
462
+ }
463
+
464
+ #panel-config-openclaw .openclaw-tools-grid {
463
465
  display: grid;
464
- grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
465
- gap: 10px;
466
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
467
+ gap: 8px;
466
468
  }
467
469
 
468
- .openclaw-tool-btn {
470
+ #panel-config-openclaw .openclaw-tool-btn {
469
471
  display: grid;
470
- grid-template-columns: auto minmax(0, 1fr) auto;
471
- gap: 12px;
472
+ grid-template-columns: 20px minmax(0, 1fr) 16px;
472
473
  align-items: center;
473
- min-height: 74px;
474
- padding: 14px 16px;
475
- border: 1px solid rgba(137, 111, 94, 0.12);
476
- border-radius: var(--radius-lg);
477
- background: rgba(255, 255, 255, 0.76);
474
+ gap: 8px;
475
+ min-width: 0;
476
+ min-height: 56px;
477
+ padding: 12px;
478
+ border: 1px solid var(--color-border-soft);
479
+ border-radius: var(--radius-md);
480
+ background: var(--color-surface);
478
481
  color: var(--color-text-primary);
482
+ font: inherit;
479
483
  text-align: left;
480
484
  cursor: pointer;
481
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
482
- transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
485
+ box-shadow: none;
486
+ transition: background-color 160ms var(--ease-smooth), color 160ms var(--ease-smooth);
487
+ }
488
+
489
+ #panel-config-openclaw .openclaw-tool-btn:hover:not(:disabled) {
490
+ background: var(--color-brand-light);
491
+ box-shadow: none;
492
+ transform: none;
483
493
  }
484
494
 
485
- .openclaw-tool-btn:hover:not(:disabled) {
486
- transform: translateY(-1px);
487
- border-color: rgba(137, 111, 94, 0.22);
488
- box-shadow: 0 8px 22px rgba(68, 52, 39, 0.08);
495
+ #panel-config-openclaw .openclaw-tool-btn:active:not(:disabled) {
496
+ background: var(--color-brand-subtle);
489
497
  }
490
498
 
491
- .openclaw-tool-btn:disabled {
492
- opacity: 0.58;
499
+ #panel-config-openclaw .openclaw-tool-btn:disabled {
500
+ opacity: 0.55;
493
501
  cursor: not-allowed;
494
502
  }
495
503
 
496
- .tool-icon {
497
- display: inline-flex;
498
- align-items: center;
499
- justify-content: center;
500
- width: 38px;
501
- height: 38px;
502
- border-radius: var(--radius-md);
503
- background: rgba(137, 111, 94, 0.08);
504
- font-size: 19px;
504
+ #panel-config-openclaw :is(.openclaw-tool-btn, .card-action-btn, .card):focus-visible {
505
+ outline: 2px solid var(--color-brand);
506
+ outline-offset: 2px;
507
+ }
508
+
509
+ #panel-config-openclaw .tool-icon {
510
+ width: 20px;
511
+ height: 20px;
512
+ border-radius: 0;
513
+ background: transparent;
514
+ color: var(--color-text-secondary);
505
515
  }
506
516
 
507
- .tool-content {
517
+ #panel-config-openclaw .tool-content {
508
518
  min-width: 0;
509
519
  }
510
520
 
511
- .tool-title {
512
- font-size: 14px;
513
- font-weight: 600;
521
+ #panel-config-openclaw .tool-title {
514
522
  color: var(--color-text-primary);
515
- line-height: 1.25;
523
+ font-family: var(--font-family-body);
524
+ font-size: var(--font-size-secondary);
525
+ font-weight: var(--font-weight-secondary);
526
+ line-height: 1.5;
516
527
  overflow-wrap: anywhere;
517
528
  }
518
529
 
519
- .tool-meta {
530
+ #panel-config-openclaw .tool-meta {
520
531
  margin-top: 4px;
521
- font-size: 11px;
522
- letter-spacing: 0.03em;
523
- text-transform: uppercase;
524
- color: var(--color-text-tertiary);
525
- white-space: nowrap;
532
+ color: var(--color-text-secondary);
533
+ font-size: 12px;
534
+ line-height: 1.5;
526
535
  }
527
536
 
528
- .tool-chevron {
529
- width: 18px;
530
- height: 18px;
537
+ #panel-config-openclaw .tool-chevron {
538
+ width: 16px;
539
+ height: 16px;
531
540
  color: var(--color-text-tertiary);
532
541
  }
533
542
 
534
- .openclaw-card-list {
535
- margin-bottom: 0;
543
+ #panel-config-openclaw .openclaw-card-list {
544
+ grid-template-columns: minmax(0, 1fr);
545
+ gap: 8px;
546
+ margin: 0;
536
547
  }
537
548
 
538
- .openclaw-card-list .card {
549
+ #panel-config-openclaw .openclaw-card-list .card {
539
550
  width: 100%;
540
- min-height: 70px;
541
- flex-direction: row;
551
+ min-width: 0;
552
+ min-height: 88px;
542
553
  align-items: center;
543
- gap: 14px;
544
- padding: 14px 16px;
554
+ flex-direction: row;
555
+ gap: 16px;
556
+ padding: 16px;
557
+ border: 1px solid var(--color-border-soft);
558
+ background: var(--color-surface);
559
+ box-shadow: none;
560
+ transition: background-color 160ms var(--ease-smooth);
561
+ border-radius: var(--radius-md);
545
562
  }
546
563
 
547
- .openclaw-card-list .card-icon {
548
- display: none;
564
+ #panel-config-openclaw .openclaw-card-list .card:hover:not(.disabled) {
565
+ background: var(--color-surface-alt);
566
+ box-shadow: none;
567
+ transform: none;
568
+ border-color: var(--color-border-strong);
549
569
  }
550
570
 
551
- .openclaw-card-list .card-leading {
552
- flex: 1 1 auto;
553
- min-width: 0;
571
+ #panel-config-openclaw .openclaw-card-list .card.active,
572
+ #panel-config-openclaw .openclaw-card-list .card.active:hover:not(.disabled) {
573
+ background: var(--color-brand-light);
574
+ border-color: var(--color-brand-subtle);
554
575
  }
555
576
 
556
- .openclaw-card-list .card-content {
557
- flex: 1;
577
+ #panel-config-openclaw .openclaw-card-list .card::before,
578
+ #panel-config-openclaw .openclaw-card-list .card::after {
579
+ display: none;
558
580
  }
559
581
 
560
- .openclaw-card-list .card-title {
561
- white-space: normal;
562
- overflow: visible;
582
+ #panel-config-openclaw .openclaw-card-list :is(.card-leading, .card-content) {
583
+ flex: 1 1 auto;
584
+ min-width: 0;
563
585
  }
564
586
 
565
- .openclaw-card-list .card-subtitle {
587
+ #panel-config-openclaw .openclaw-card-list .card-title {
566
588
  white-space: normal;
567
589
  overflow: visible;
590
+ overflow-wrap: anywhere;
568
591
  }
569
592
 
570
- .openclaw-card-list .card-trailing {
571
- width: auto;
572
- min-width: max-content;
573
- grid-auto-flow: column;
574
- grid-auto-columns: max-content;
575
- align-items: center;
576
- justify-content: end;
577
- }
578
-
579
- .openclaw-card-list .card {
580
- background: rgba(255, 255, 255, 0.76);
581
- border-color: rgba(137, 111, 94, 0.12);
582
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
583
- }
584
-
585
- .openclaw-card-list .card-subtitle {
593
+ #panel-config-openclaw .openclaw-card-list .card-subtitle {
586
594
  white-space: normal;
587
- display: -webkit-box;
588
- -webkit-box-orient: vertical;
589
- -webkit-line-clamp: 2;
590
595
  overflow-wrap: anywhere;
591
596
  }
592
597
 
593
- .openclaw-config-summary-mini {
598
+ #panel-config-openclaw .openclaw-config-summary-mini {
594
599
  display: flex;
595
600
  flex-wrap: wrap;
596
- gap: 6px;
597
- margin-top: 6px;
601
+ gap: 4px 16px;
602
+ margin-top: 8px;
598
603
  }
599
604
 
600
- .openclaw-config-summary-mini span {
605
+ #panel-config-openclaw .openclaw-config-summary-mini span {
601
606
  max-width: 100%;
602
- padding: 3px 7px;
603
- border-radius: 999px;
604
- background: rgba(137, 111, 94, 0.08);
605
- color: var(--color-text-tertiary);
606
- font-size: 11px;
607
+ padding: 0;
608
+ border-radius: 0;
609
+ background: transparent;
610
+ color: var(--color-text-secondary);
611
+ font-size: 12px;
612
+ line-height: 1.5;
607
613
  overflow-wrap: anywhere;
608
614
  }
609
615
 
610
- @media (min-width: 1200px) {
611
- .tool-icon {
612
- width: 42px;
613
- height: 42px;
614
- font-size: 21px;
615
- }
616
+ #panel-config-openclaw .openclaw-card-list .card-trailing {
617
+ display: flex;
618
+ flex: 0 0 auto;
619
+ align-items: center;
620
+ gap: 12px;
621
+ width: auto;
622
+ min-width: 0;
616
623
  }
617
624
 
618
- @media (max-width: 820px) {
619
- .openclaw-tools-grid {
620
- grid-template-columns: 1fr;
621
- }
625
+ #panel-config-openclaw .card-actions {
626
+ display: flex;
627
+ align-items: center;
628
+ gap: 8px;
629
+ }
622
630
 
631
+ #panel-config-openclaw .card-action-btn {
632
+ width: 44px;
633
+ height: 44px;
634
+ min-width: 44px;
635
+ padding: 12px;
636
+ }
623
637
 
624
- .openclaw-summary-header {
638
+ @media (min-width: 960px) {
639
+ #panel-config-openclaw .openclaw-summary-grid {
640
+ grid-template-columns: repeat(4, minmax(0, 1fr));
641
+ }
642
+ #panel-config-openclaw .openclaw-card-list {
643
+ grid-template-columns: repeat(2, minmax(0, 1fr));
644
+ }
645
+ #panel-config-openclaw .openclaw-card-list .card {
646
+ align-items: stretch;
625
647
  flex-direction: column;
648
+ gap: 12px;
626
649
  }
627
-
628
- .summary-note {
629
- max-width: none;
630
- text-align: left;
650
+ #panel-config-openclaw .openclaw-card-list .card-trailing {
651
+ width: 100%;
652
+ align-self: stretch;
653
+ justify-content: space-between;
631
654
  }
632
655
  }
633
656
 
634
657
  @media (max-width: 520px) {
635
- .openclaw-layout {
636
- gap: 12px;
637
- padding-top: 0;
658
+ #panel-config-openclaw .openclaw-tools-grid {
659
+ grid-template-columns: minmax(0, 1fr);
638
660
  }
639
661
 
640
- .openclaw-tool-btn {
641
- padding: 14px;
642
- }
643
-
644
- .tool-icon {
645
- width: 36px;
646
- height: 36px;
647
- font-size: 18px;
662
+ #panel-config-openclaw .openclaw-card-list .card {
663
+ align-items: stretch;
664
+ flex-direction: column;
665
+ gap: 12px;
648
666
  }
649
667
 
650
- .openclaw-card-list .card {
651
- align-items: center;
652
- flex-direction: row;
653
- gap: 10px;
668
+ #panel-config-openclaw .openclaw-card-list .card-trailing {
669
+ width: 100%;
670
+ justify-content: space-between;
654
671
  }
672
+ }
655
673
 
656
- .openclaw-card-list .card-trailing {
657
- width: auto;
658
- min-width: max-content;
659
- grid-auto-flow: column;
660
- justify-content: end;
674
+ @media (prefers-reduced-motion: reduce) {
675
+ #panel-config-openclaw :is(.openclaw-tool-btn, .openclaw-card-list .card) {
676
+ transition: none;
661
677
  }
662
678
  }
@@ -356,3 +356,26 @@
356
356
  opacity: 0.6;
357
357
  cursor: not-allowed;
358
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
+ }