openclaw-openagent 1.0.9 → 1.0.12

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 (64) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/src/app/remote-agent-tool.js +110 -14
  3. package/dist/src/app/types.d.ts +2 -2
  4. package/dist/src/plugin-ui/adapters/adapters/oc-2026-04.js +103 -0
  5. package/dist/src/plugin-ui/adapters/adapters/oc-2026-05.js +125 -0
  6. package/dist/src/plugin-ui/adapters/adapters/oc-2026-06.js +125 -0
  7. package/dist/src/plugin-ui/adapters/adapters/oc-unknown.js +48 -0
  8. package/dist/src/plugin-ui/adapters/oc-2026-04.js +103 -0
  9. package/dist/src/plugin-ui/adapters/oc-2026-05.js +125 -0
  10. package/dist/src/plugin-ui/adapters/oc-2026-06.js +125 -0
  11. package/dist/src/plugin-ui/adapters/oc-unknown.js +48 -0
  12. package/dist/src/plugin-ui/assets/bg.png +0 -0
  13. package/dist/src/plugin-ui/assets/icon.png +0 -0
  14. package/dist/src/plugin-ui/assets/openagent-override.js +2480 -1004
  15. package/dist/src/plugin-ui/index.d.ts +1 -1
  16. package/dist/src/plugin-ui/index.js +2 -2
  17. package/dist/src/plugin-ui/ui-extension-loader/index.d.ts +2 -1
  18. package/dist/src/plugin-ui/ui-extension-loader/index.js +5 -5
  19. package/dist/src/plugin-ui/ui-extension-loader/registry-regex.js +128 -13
  20. package/dist/src/plugin-ui/ui-extension-loader/types.d.ts +4 -1
  21. package/dist/src/state/store.d.ts +21 -0
  22. package/dist/src/state/store.js +54 -0
  23. package/dist/src/transport/oasn/oasn-invocation.d.ts +3 -0
  24. package/dist/src/transport/oasn/oasn-invocation.js +28 -12
  25. package/dist/src/transport/oasn/oasn-types.d.ts +8 -4
  26. package/index.ts +1 -1
  27. package/openclaw.plugin.json +1 -1
  28. package/package.json +5 -4
  29. package/src/app/remote-agent-tool.ts +131 -16
  30. package/src/app/types.ts +2 -2
  31. package/src/plugin-ui/adapters/oc-2026-04.js +103 -0
  32. package/src/plugin-ui/adapters/oc-2026-05.js +125 -0
  33. package/src/plugin-ui/adapters/oc-2026-06.js +125 -0
  34. package/src/plugin-ui/adapters/oc-unknown.js +48 -0
  35. package/src/plugin-ui/assets/bg.png +0 -0
  36. package/src/plugin-ui/assets/icon.png +0 -0
  37. package/src/plugin-ui/assets/openagent-override.js +2480 -1004
  38. package/src/plugin-ui/build.cjs +309 -23
  39. package/src/plugin-ui/index.ts +2 -2
  40. package/src/plugin-ui/modules/agent-book/panel/agent-book.js +187 -14
  41. package/src/plugin-ui/modules/agent-book/panel/agent-card.js +26 -10
  42. package/src/plugin-ui/modules/agent-book/panel/agent-data.js +1 -1
  43. package/src/plugin-ui/modules/agent-book/panel/inject-ui.js +149 -1
  44. package/src/plugin-ui/modules/agent-book/panel/styles.js +352 -210
  45. package/src/plugin-ui/modules/agent-book/remote-agent-tool/components-core.js +4 -2
  46. package/src/plugin-ui/modules/agent-book/remote-agent-tool/thought-chain-card.js +4 -1
  47. package/src/plugin-ui/modules/agent-book/scanner.js +17 -5
  48. package/src/plugin-ui/modules/agent-book/travelcard/travel-styles.js +5 -0
  49. package/src/plugin-ui/modules/loader/bootstrap.js +1 -1
  50. package/src/plugin-ui/modules/loader/shared-state.js +278 -0
  51. package/src/plugin-ui/modules/remote-agent/execution-card.js +385 -124
  52. package/src/plugin-ui/modules/remote-agent/native-style-adapter.js +5 -23
  53. package/src/plugin-ui/modules/remote-agent/output-card.js +97 -31
  54. package/src/plugin-ui/modules/remote-agent/render-hooks.js +149 -58
  55. package/src/plugin-ui/modules/remote-agent/styles.js +690 -523
  56. package/src/plugin-ui/modules/remote-agent/tool-card-model.js +77 -3
  57. package/src/plugin-ui/postinstall-deploy.cjs +52 -0
  58. package/src/plugin-ui/ui-extension-loader/index.ts +6 -6
  59. package/src/plugin-ui/ui-extension-loader/registry-regex.ts +131 -14
  60. package/src/plugin-ui/ui-extension-loader/types.ts +5 -1
  61. package/src/state/store.ts +80 -0
  62. package/src/transport/oasn/oasn-invocation.ts +47 -12
  63. package/src/transport/oasn/oasn-types.ts +6 -2
  64. package/src/types/openclaw-plugin-sdk-media-store.d.ts +9 -0
@@ -1,10 +1,13 @@
1
1
  // ── 样式注入 ──
2
2
 
3
3
  function injectStyles() {
4
- if (document.getElementById('openagent-override-styles')) return;
4
+ var oldStyle = document.getElementById('openagent-override-styles');
5
+ if (oldStyle) oldStyle.remove();
5
6
 
6
7
  const style = document.createElement('style');
7
8
  style.id = 'openagent-override-styles';
9
+ style.setAttribute('data-openagent-style', 'agent-book-panel');
10
+ style.setAttribute('data-openagent-host-version', CL.hostVersion || 'unknown');
8
11
  style.textContent = `
9
12
  /* ── 流式回复边框闪烁:覆盖为蓝色 ── */
10
13
  @keyframes chatStreamPulse {
@@ -16,80 +19,39 @@ function injectStyles() {
16
19
  border-color: #3b82f6;
17
20
  }
18
21
 
19
- /* ── @ Agent Book 按钮(Figma 1:1117 物理级复刻Mesh Gradient) ── */
22
+ /* ── @ Agent Book 按钮(Figma 129:955 Frame 72552 紫色渐变) ── */
20
23
  .openagent-at-btn {
21
24
  position: relative;
22
- overflow: hidden; /* Figma clipsContent: true */
25
+ overflow: hidden;
23
26
  display: inline-flex;
24
27
  align-items: center;
25
28
  justify-content: center;
26
29
  gap: 4px;
27
- height: 26px;
28
- padding: 0 16px;
29
- border-radius: 100px;
30
+ height: 27px;
31
+ padding: 0 12px;
32
+ border-radius: 150px;
30
33
  border: none;
31
- background: #6ECCFF; /* Figma Frame 72552 底色 */
32
- box-shadow: inset 0 0 8.5px 0 #96ECFF; /* Figma INNER_SHADOW */
34
+ background: linear-gradient(90deg, #5c4aff 0%, #8274ff 100%);
33
35
  color: #fff;
34
- font-size: 13px;
35
- font-weight: 600;
36
+ font-size: 12px;
37
+ font-weight: 500;
36
38
  cursor: pointer;
37
39
  transition: all 0.2s ease;
38
- line-height: 26px;
40
+ line-height: 27px;
39
41
  margin-left: 6px;
40
42
  white-space: nowrap;
41
43
  flex-shrink: 0;
42
44
  letter-spacing: 0.2px;
43
- /* 建立层叠上下文,让伪元素在底层 */
44
- z-index: 1;
45
- isolation: isolate;
46
- }
47
-
48
- /* Figma 外层 Ellipse 12873:蓝色椭圆,偏左 */
49
- .openagent-at-btn::before {
50
- content: '';
51
- position: absolute;
52
- left: -13%;
53
- top: -98%;
54
- width: 50%;
55
- height: 304%;
56
- background: #7A94FF;
57
- filter: blur(23px); /* Figma LAYER_BLUR: 23.2px */
58
- transform: rotate(174deg);
59
- z-index: -1;
60
- pointer-events: none;
61
- }
62
-
63
- /* Figma 外层 Ellipse 12872:黄绿色椭圆,偏右 */
64
- .openagent-at-btn::after {
65
- content: '';
66
- position: absolute;
67
- left: 70%;
68
- top: -49%;
69
- width: 54%;
70
- height: 145%;
71
- background: #A1FF2E;
72
- filter: blur(30.5px); /* Figma LAYER_BLUR: 30.5px */
73
- transform: rotate(27deg);
74
- z-index: -1;
75
- pointer-events: none;
76
- }
77
-
78
- /* 确保文字始终在最高层 */
79
- .openagent-at-btn .at-sym,
80
- .openagent-at-btn span {
81
- position: relative;
82
- z-index: 2;
45
+ font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
83
46
  }
84
47
 
85
48
  .openagent-at-btn:hover {
86
- filter: brightness(1.08);
87
49
  transform: translateY(-1px);
88
- box-shadow: inset 0 0 8.5px 0 #96ECFF, 0 2px 8px rgba(110, 204, 255, 0.4);
50
+ box-shadow: inset 0 0 6px 1px rgba(255, 255, 255, 0.65);
89
51
  }
90
52
  .openagent-at-btn .at-sym {
91
- font-size: 14px;
92
- font-weight: 700;
53
+ font-size: 11.6px;
54
+ font-weight: 500;
93
55
  color: #fff;
94
56
  }
95
57
 
@@ -112,9 +74,8 @@ function injectStyles() {
112
74
  position: fixed;
113
75
  max-height: none;
114
76
  background: var(--oa-panel-bg, #fff);
115
- border: 1.2px solid var(--oa-border, rgba(47, 47, 51, 0.12));
116
- border-radius: 18px;
117
- box-shadow: 0 -4px 24px var(--oa-shadow-color, rgba(0,0,0,0.08)), 0 2px 8px var(--oa-shadow-color, rgba(0,0,0,0.04));
77
+ border: 0.5px solid #dbdbdb;
78
+ border-radius: 16px;
118
79
  z-index: 99999;
119
80
  overflow: hidden;
120
81
  display: none;
@@ -126,6 +87,7 @@ function injectStyles() {
126
87
  }
127
88
  .openagent-agent-panel.visible {
128
89
  display: flex;
90
+ padding: 30px;
129
91
  animation: openagent-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
130
92
  }
131
93
  @keyframes openagent-up {
@@ -139,28 +101,26 @@ function injectStyles() {
139
101
  justify-content: space-between;
140
102
  align-items: center;
141
103
  min-height: 26px;
142
- padding: 6px 10px 0 10px;
143
104
  border-bottom: none;
144
105
  }
145
106
  .openagent-panel-title {
146
107
  display: flex;
147
108
  align-items: center;
148
109
  gap: 6px;
149
- font-size: 16px;
110
+ font-size: 18px;
150
111
  font-weight: 500;
151
- color: rgba(47, 47, 51, 0.8);
112
+ color: #333;
152
113
  text-transform: uppercase;
153
114
  letter-spacing: 0.3px;
154
115
  }
155
116
  .openagent-panel-title-icon {
156
- width: 21px;
157
- height: 21px;
117
+ width: 24px;
118
+ height: 24px;
158
119
  flex-shrink: 0;
159
120
  }
160
121
  .openagent-panel-close {
161
- background: var(--oa-card-bg, rgba(249, 249, 249, 1));
122
+ background: transparent;
162
123
  border: none;
163
- color: rgba(47, 47, 51, 0.6);
164
124
  cursor: pointer;
165
125
  width: 21px;
166
126
  height: 21px;
@@ -176,17 +136,184 @@ function injectStyles() {
176
136
  }
177
137
  .openagent-panel-close:hover {
178
138
  background: #eee;
179
- color: rgba(47, 47, 51, 1);
180
139
  }
181
140
 
182
141
  /* ── 分隔线(Figma: 0.2px, opacity 0.16) ── */
183
142
  .openagent-panel-divider {
184
143
  height: 0;
185
144
  border: none;
186
- border-top: 0.2px solid rgba(47, 47, 51, 0.16);
145
+ border-top: 0.2px solid #EAEAEA;
187
146
  margin: 0;
188
147
  }
189
148
 
149
+ /* ── 提示栏(Figma 141:3293,页面加载即显示) ── */
150
+ .openagent-hint-bar {
151
+ display: flex;
152
+ align-items: center;
153
+ justify-content: space-between;
154
+ padding: 12px 12px;
155
+ margin-bottom: 12px;
156
+ background: #fff;
157
+ border: 1.2px solid rgba(47, 47, 51, 0.1);
158
+ border-radius: var(--radius-lg, 18px);
159
+ gap: 12px;
160
+ width: 100%;
161
+ box-sizing: border-box;
162
+ margin:0 auto;
163
+ margin-bottom: 12px;
164
+ }
165
+ .openagent-hint-bar__content {
166
+ display: flex;
167
+ align-items: center;
168
+ gap: 9px;
169
+ flex: 1;
170
+ min-width: 0;
171
+ }
172
+ .openagent-hint-bar__icon {
173
+ display: flex;
174
+ align-items: center;
175
+ justify-content: center;
176
+ width: 27px;
177
+ height: 27px;
178
+ border-radius: 6px;
179
+ background: linear-gradient(135deg, rgba(130,116,255,0.1) 0%, rgba(56,144,255,0.1) 100%);
180
+ flex-shrink: 0;
181
+ }
182
+ .openagent-hint-bar__text {
183
+ font-family: "PingFang SC", sans-serif;
184
+ font-size: 15px;
185
+ font-weight: 400;
186
+ color: rgba(51, 51, 51, 0.8);
187
+ white-space: nowrap;
188
+ overflow: hidden;
189
+ text-overflow: ellipsis;
190
+ }
191
+ .openagent-hint-bar__close {
192
+ display: flex;
193
+ align-items: center;
194
+ justify-content: center;
195
+ width: 21px;
196
+ height: 21px;
197
+ padding: 0;
198
+ border: none;
199
+ background: transparent;
200
+ cursor: pointer;
201
+ flex-shrink: 0;
202
+ border-radius: 4px;
203
+ transition: all 0.1s;
204
+ }
205
+ .openagent-hint-bar__close:hover {
206
+ background: #eee;
207
+ }
208
+
209
+ /* 暗色主题 */
210
+ [data-theme-mode="dark"] .openagent-hint-bar,
211
+ [data-theme="dark"] .openagent-hint-bar {
212
+ background: #1c1c1c;
213
+ border-color: rgba(255,255,255,0.1);
214
+ }
215
+ [data-theme-mode="dark"] .openagent-hint-bar__text,
216
+ [data-theme="dark"] .openagent-hint-bar__text {
217
+ color: rgba(224, 224, 224, 0.8);
218
+ }
219
+ [data-theme-mode="dark"] .openagent-hint-bar__close,
220
+ [data-theme="dark"] .openagent-hint-bar__close {
221
+ }
222
+ [data-theme-mode="dark"] .openagent-hint-bar__close:hover,
223
+ [data-theme="dark"] .openagent-hint-bar__close:hover {
224
+ background: #333;
225
+ }
226
+
227
+ /* ── 空状态独立浮层(Figma 144:3444) ── */
228
+ .openagent-empty-toast {
229
+ display: flex;
230
+ align-items: center;
231
+ gap: 9px;
232
+ padding: 18px;
233
+ background: #fff;
234
+ border: 1.2px solid rgba(47, 47, 51, 0.1);
235
+ border-radius: 18px;
236
+ box-sizing: border-box;
237
+ animation: openagent-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
238
+ box-shadow: 0 -4px 24px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
239
+ }
240
+ [data-theme-mode="dark"] .openagent-empty-toast,
241
+ [data-theme="dark"] .openagent-empty-toast {
242
+ background: #1c1c1c; border-color: rgba(255,255,255,0.1);
243
+ box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
244
+ }
245
+ [data-theme-mode="dark"] .openagent-empty-toast .openagent-empty-state__text,
246
+ [data-theme="dark"] .openagent-empty-toast .openagent-empty-state__text {
247
+ color: rgba(224, 224, 224, 0.8);
248
+ }
249
+ [data-theme-mode="dark"] .openagent-empty-toast .openagent-empty-state__close,
250
+ [data-theme="dark"] .openagent-empty-toast .openagent-empty-state__close {
251
+ }
252
+
253
+ /* ── 空状态(Figma 144:3444)— 无匹配结果 ── */
254
+ .openagent-empty-state {
255
+ padding: 18px;
256
+ background: #fff;
257
+ border: 1.2px solid rgba(47, 47, 51, 0.1);
258
+ border-radius: 18px;
259
+ }
260
+ .openagent-empty-state__row {
261
+ display: flex;
262
+ align-items: flex-start;
263
+ justify-content: space-between;
264
+ gap: 9px;
265
+ }
266
+ .openagent-empty-state__icon {
267
+ display: flex;
268
+ align-items: center;
269
+ justify-content: center;
270
+ width: 27px;
271
+ height: 27px;
272
+ border-radius: 6px;
273
+ background: linear-gradient(135deg, rgba(92,74,255,0.1) 0%, rgba(130,116,255,0.1) 100%);
274
+ flex-shrink: 0;
275
+ }
276
+ .openagent-empty-state__text {
277
+ flex: 1;
278
+ font-family: "PingFang SC", sans-serif;
279
+ font-size: 15px;
280
+ font-weight: 400;
281
+ color: rgba(51, 51, 51, 0.8);
282
+ line-height: 1.5;
283
+ }
284
+ .openagent-empty-state__close {
285
+ display: flex;
286
+ align-items: center;
287
+ justify-content: center;
288
+ width: 21px;
289
+ height: 21px;
290
+ padding: 0;
291
+ border: none;
292
+ background: transparent;
293
+ cursor: pointer;
294
+ flex-shrink: 0;
295
+ border-radius: 4px;
296
+ }
297
+ .openagent-empty-state__close:hover {
298
+ background: #eee;
299
+ }
300
+ [data-theme-mode="dark"] .openagent-empty-state,
301
+ [data-theme="dark"] .openagent-empty-state {
302
+ background: #1c1c1c;
303
+ border-color: rgba(255,255,255,0.1);
304
+ }
305
+ [data-theme-mode="dark"] .openagent-empty-state__text,
306
+ [data-theme="dark"] .openagent-empty-state__text {
307
+ color: rgba(224, 224, 224, 0.8);
308
+ }
309
+ [data-theme-mode="dark"] .openagent-empty-state__close,
310
+ [data-theme="dark"] .openagent-empty-state__close {
311
+ }
312
+ [data-theme-mode="dark"] .openagent-empty-state__close:hover,
313
+ [data-theme="dark"] .openagent-empty-state__close:hover {
314
+ background: #333;
315
+ }
316
+
190
317
  /* ── Agent 列表(section stack) ── */
191
318
  .openagent-agent-list {
192
319
  overflow-y: auto;
@@ -194,7 +321,6 @@ function injectStyles() {
194
321
  flex: 1;
195
322
  display: flex;
196
323
  flex-direction: column;
197
- gap: 14px;
198
324
  min-height: 0;
199
325
  max-height: min(56vh, 451px);
200
326
  scrollbar-width: thin;
@@ -217,9 +343,9 @@ function injectStyles() {
217
343
  .openagent-agent-section {
218
344
  display: flex;
219
345
  flex-direction: column;
220
- gap: 8px;
221
346
  width: 100%;
222
347
  min-width: 0;
348
+ margin-bottom: 30px;
223
349
  }
224
350
 
225
351
  /* ── 父分类标题(两级结构:Research > Market Research) ── */
@@ -230,33 +356,22 @@ function injectStyles() {
230
356
  width: 100%;
231
357
  min-width: 0;
232
358
  }
233
- .openagent-parent-heading {
234
- font-size: 11px;
235
- font-weight: 600;
236
- line-height: 13px;
237
- color: rgba(47, 47, 51, 0.45);
238
- padding: 0 12px;
239
- text-transform: uppercase;
240
- letter-spacing: 0.8px;
241
- }
242
-
243
359
  /* ── 分组标题 ── */
244
360
  .openagent-section-heading {
245
- font-size: 14px;
361
+ font-size: 16px;
246
362
  font-weight: 400;
247
- line-height: 14px;
363
+ line-height: 16px;
248
364
  color: rgba(47, 47, 51, 0.80);
249
- padding: 0 12px 0 12px;
250
365
  letter-spacing: 0;
366
+ margin-bottom: 20px;
251
367
  }
252
368
 
253
369
  /* ── 分组网格容器 ── */
254
370
  .openagent-section-grid {
255
371
  display: grid;
256
- grid-template-columns: repeat(3, minmax(0, 439.5px));
372
+ grid-template-columns: repeat(3, 1fr);
257
373
  justify-content: start;
258
- gap: 8px 14px;
259
- padding: 0 12px;
374
+ gap: 12px;
260
375
  width: 100%;
261
376
  box-sizing: border-box;
262
377
  }
@@ -289,9 +404,15 @@ function injectStyles() {
289
404
  .agent-card__body { flex: 1; min-width: 0; }
290
405
  .agent-card__name-line { display: flex; align-items: baseline; gap: 8px; }
291
406
  .agent-card__name {
407
+ display: block;
408
+ min-width: 0;
409
+ max-width: 100%;
292
410
  font-family: "PingFang SC", sans-serif;
293
411
  font-weight: 600;
294
412
  color: rgba(47, 47, 51, 1);
413
+ white-space: nowrap;
414
+ overflow: hidden;
415
+ text-overflow: ellipsis;
295
416
  }
296
417
  .agent-card__tag { font-size: 12px; color: #6366f1; font-weight: 500; }
297
418
  .agent-card__specialty { font-size: 12px; color: #999; font-weight: 400; }
@@ -315,6 +436,23 @@ function injectStyles() {
315
436
  gap: 0;
316
437
  flex-wrap: wrap;
317
438
  }
439
+ /* 星标+数字 紧密组合(Figma gap 1.5px) */
440
+ .agent-card__stat-group {
441
+ display: flex;
442
+ align-items: center;
443
+ gap: 1.5px;
444
+ }
445
+ .agent-card__stat-icon {
446
+ display: inline-flex;
447
+ align-items: center;
448
+ justify-content: center;
449
+ width: 12px;
450
+ height: 12px;
451
+ font-size: 14px;
452
+ line-height: 1;
453
+ color: #666;
454
+ flex-shrink: 0;
455
+ }
318
456
  .agent-card__stat {
319
457
  font-family: "PingFang SC", sans-serif;
320
458
  font-size: 13.5px;
@@ -340,96 +478,99 @@ function injectStyles() {
340
478
  white-space: nowrap;
341
479
  }
342
480
 
343
- /* ── mode: mention(Figma Agent item avart 实例) ── */
481
+ /* ── mode: mention(Figma Agent 卡片 142:3392) ── */
344
482
  .agent-card--mention {
345
483
  flex-direction: row;
346
- align-items: stretch;
347
- gap: 0;
348
- padding: 0;
349
- border-radius: 8px;
350
- border: none;
351
- background: transparent;
352
- min-height: 88px;
484
+ align-items: center;
485
+ gap: 10px;
486
+ padding: 15px;
487
+ border-radius: 20px;
488
+ border: 0.5px solid #dbdbdb;
489
+ background: #fff;
353
490
  min-width: 0;
491
+ box-sizing: border-box;
354
492
  }
355
493
  .agent-card--mention:hover {
356
- background: rgba(0, 0, 0, 0.02);
494
+ border-color: transparent;
495
+ box-shadow: 0 4px 12px 0 rgba(149, 147, 240, 0.10);
357
496
  }
358
- /* 键盘导航高亮(§1.5)— 对标 TIM index.vue:32 'selected' class */
359
- .agent-card--mention.openagent-card-selected {
360
- background: rgba(99, 102, 241, 0.06);
361
- outline: 2px solid rgba(99, 102, 241, 0.3);
362
- outline-offset: -2px;
497
+ .openagent-agent-list .agent-card--mention:hover,
498
+ .openagent-agent-list .agent-card--search:hover {
499
+ position: relative;
500
+ border-color: transparent;
363
501
  }
364
- [data-theme-mode="dark"] .agent-card--mention.openagent-card-selected {
365
- background: rgba(99, 102, 241, 0.12);
366
- outline-color: rgba(99, 102, 241, 0.4);
502
+ .openagent-agent-list .agent-card--mention:hover::after,
503
+ .openagent-agent-list .agent-card--search:hover::after {
504
+ content: "";
505
+ position: absolute;
506
+ inset: 0;
507
+ border-radius: inherit;
508
+ padding: 1px;
509
+ background: linear-gradient(90deg, rgba(92, 74, 255, 0.5), rgba(130, 116, 255, 0.5));
510
+ pointer-events: none;
511
+ box-sizing: border-box;
512
+ -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
513
+ -webkit-mask-composite: xor;
514
+ mask-composite: exclude;
367
515
  }
368
-
369
- /* avart 外壳: Figma px 12, centered */
516
+ /* avart 外壳简化 — 不再需要 */
370
517
  .agent-card--mention .agent-card__avart {
371
- display: flex;
372
- flex-direction: column;
373
- justify-content: center;
374
- gap: 0;
375
- padding: 0 10px;
376
- flex: 1;
518
+ display: contents;
519
+ padding: 0;
520
+ flex: none;
377
521
  min-width: 0;
378
- box-sizing: border-box;
379
522
  }
380
523
 
381
- /* 第一行: row, gap:24 (内容组 + @Try) */
524
+ /* 第一行: 内容区 + 按钮 */
382
525
  .agent-card--mention .agent-card__row1 {
383
- display: flex;
384
- flex-direction: row;
385
- align-items: center;
386
- gap: 16px;
387
- width: 100%;
526
+ display: contents;
527
+ gap: 0;
528
+ width: auto;
388
529
  min-width: 0;
389
530
  }
390
531
 
391
- /* 内容组: row, gap:18 (头像 + 信息列) */
532
+ /* 内容组: 头像 + 信息列 */
392
533
  .agent-card--mention .agent-card__content-group {
393
534
  display: flex;
394
535
  flex-direction: row;
395
- align-items: flex-start;
396
- gap: 12px;
536
+ align-items: center;
537
+ gap: 10px;
397
538
  flex: 1;
398
539
  min-width: 0;
399
540
  }
400
541
 
401
- /* 头像 */
542
+ /* 头像: 50×50 */
402
543
  .agent-card--mention .agent-card__avatar {
403
- width: 48px;
404
- height: 48px;
544
+ width: 50px;
545
+ height: 50px;
405
546
  border-radius: 50%;
406
547
  border: none;
407
548
  flex-shrink: 0;
408
549
  margin-top: 0;
409
550
  }
410
551
 
411
- /* 信息列: name / bio / stats */
552
+ /* 信息列 */
412
553
  .agent-card--mention .agent-card__info {
413
554
  display: flex;
414
555
  flex-direction: column;
415
- gap: 4px;
416
- padding: 3px 0;
556
+ gap: 6px;
557
+ padding: 0;
417
558
  flex: 1;
418
559
  min-width: 0;
419
560
  }
420
561
 
421
562
  .agent-card--mention .agent-card__name {
422
- font-size: 12px;
563
+ font-size: 15px;
423
564
  font-weight: 600;
424
- line-height: 14px;
425
- color: rgba(47, 47, 51, 1);
565
+ line-height: 1;
566
+ color: #333;
567
+ width:200px;
426
568
  }
427
569
  .agent-card--mention .agent-card__bio {
428
- font-size: 10px;
570
+ font-size: 14px;
429
571
  font-weight: 400;
430
- line-height: 14px;
431
- color: rgba(47, 47, 51, 0.40);
432
- text-align: justify;
572
+ line-height: 1.5;
573
+ color: rgba(47, 47, 51, 0.80);
433
574
  overflow: hidden;
434
575
  text-overflow: ellipsis;
435
576
  display: -webkit-box;
@@ -438,37 +579,31 @@ function injectStyles() {
438
579
  margin-top: 0;
439
580
  }
440
581
 
441
- /* @Try 按钮 */
582
+ /* @召唤 按钮 */
442
583
  .agent-card--mention .agent-card__action {
443
- width: 64px;
444
- height: 30px;
445
- padding: 0 14px;
446
- border-radius: 10px;
447
- background: #EFF0F2;
448
- border: 1.286px solid rgba(47, 47, 51, 0.04);
449
- color: rgba(47, 47, 51, 1);
584
+ height: 36px;
585
+ padding: 0 18px;
586
+ border-radius: 23px;
587
+ background: transparent;
588
+ border: 0.5px solid #dbdbdb;
589
+ color: #333;
450
590
  font-family: "PingFang SC", sans-serif;
451
- font-size: 12px;
591
+ font-size: 16px;
452
592
  font-weight: 500;
453
- line-height: 12px;
593
+ line-height: 15.43px;
454
594
  text-transform: capitalize;
455
595
  flex-shrink: 0;
456
596
  display: inline-flex;
457
597
  align-items: center;
458
598
  justify-content: center;
599
+ width: auto;
459
600
  }
460
- .agent-card--mention .agent-card__action::before { content: '@'; font-weight: 600; }
601
+ .agent-card--mention .agent-card__action::before { content: none; }
461
602
  .agent-card--mention .agent-card__action:hover {
462
- background: #e2e3e5;
603
+ background: rgba(0, 0, 0, 0.04);
463
604
  }
464
605
 
465
- /* Legacy row2 kept for older generated DOM, but current mention card keeps stats in info. */
466
- .agent-card--mention .agent-card__row2 {
467
- display: none;
468
- flex-direction: row;
469
- align-items: center;
470
- padding-left: 60px;
471
- }
606
+ /* 统计行 */
472
607
  .agent-card--mention .agent-card__stats {
473
608
  display: flex;
474
609
  align-items: center;
@@ -476,16 +611,21 @@ function injectStyles() {
476
611
  margin-top: 0;
477
612
  }
478
613
  .agent-card--mention .agent-card__stat--claws {
479
- color: rgba(240, 152, 0, 1);
480
- font-size: 10px;
481
- line-height: 12px;
482
- letter-spacing: 1px;
614
+ color: #666;
615
+ font-size: 14px;
616
+ line-height: 1;
617
+ letter-spacing: 1.5px;
483
618
  }
484
619
  .agent-card--mention .agent-card__stat--owner {
485
- color: rgba(47, 47, 51, 1);
486
- font-size: 10px;
487
- line-height: 12px;
488
- letter-spacing: 1px;
620
+ color: #666;
621
+ font-size: 14px;
622
+ line-height: 1;
623
+ letter-spacing: 1.5px;
624
+ }
625
+
626
+ /* row2 (legacy compat) */
627
+ .agent-card--mention .agent-card__row2 {
628
+ display: none;
489
629
  }
490
630
 
491
631
  /* ── mode: search(有输入搜索结果,沿用旧式单列行) ── */
@@ -495,18 +635,11 @@ function injectStyles() {
495
635
  width: 100%;
496
636
  min-height: 64px;
497
637
  padding: 10px 12px;
498
- border-radius: 10px;
638
+ border-radius: 20px;
499
639
  background: transparent;
640
+ border: 0.5px solid transparent;
500
641
  box-sizing: border-box;
501
642
  }
502
- .agent-card--search:hover {
503
- background: rgba(0, 0, 0, 0.02);
504
- }
505
- .agent-card--search.openagent-card-selected {
506
- background: rgba(99, 102, 241, 0.06);
507
- outline: 2px solid rgba(99, 102, 241, 0.3);
508
- outline-offset: -2px;
509
- }
510
643
  .agent-card--search .agent-card__avatar {
511
644
  width: 40px;
512
645
  height: 40px;
@@ -520,48 +653,50 @@ function injectStyles() {
520
653
  min-width: 0;
521
654
  }
522
655
  .agent-card--search .agent-card__name {
523
- font-size: 13px;
656
+ font-size: 15px;
524
657
  line-height: 16px;
525
658
  font-weight: 600;
526
- color: rgba(47, 47, 51, 1);
659
+ color: #333;
527
660
  }
528
661
  .agent-card--search .agent-card__bio {
529
- font-size: 11px;
530
- line-height: 15px;
531
- color: rgba(47, 47, 51, 0.45);
662
+ font-size: 14px;
663
+ line-height: 1.5;
664
+ color: rgba(47, 47, 51, 0.80);
532
665
  -webkit-line-clamp: 1;
533
666
  }
534
667
  .agent-card--search .agent-card__stats {
535
668
  margin-top: 0;
536
669
  }
537
670
  .agent-card--search .agent-card__stat--claws {
538
- font-size: 11px;
539
- line-height: 13px;
540
- color: rgba(240, 152, 0, 1);
671
+ font-size: 14px;
672
+ line-height: 1;
673
+ color: #666;
674
+ letter-spacing: 1.5px;
541
675
  }
542
676
  .agent-card--search .agent-card__stat--owner {
543
- font-size: 11px;
544
- line-height: 13px;
545
- color: rgba(47, 47, 51, 0.65);
677
+ font-size: 14px;
678
+ line-height: 1;
679
+ color: #666;
680
+ letter-spacing: 1.5px;
546
681
  }
547
682
  .agent-card--search .agent-card__action {
548
- width: 60px;
549
- height: 28px;
550
- padding: 0 12px;
551
- border-radius: 10px;
552
- background: #EFF0F2;
553
- border: 1px solid rgba(47, 47, 51, 0.04);
554
- color: rgba(47, 47, 51, 1);
683
+ height: 36px;
684
+ padding: 0 18px;
685
+ border-radius: 23px;
686
+ background: transparent;
687
+ border: 0.5px solid #dbdbdb;
688
+ color: #333;
555
689
  font-family: "PingFang SC", sans-serif;
556
- font-size: 12px;
557
- line-height: 12px;
690
+ font-size: 16px;
691
+ font-weight: 500;
692
+ line-height: 15.43px;
558
693
  display: inline-flex;
559
694
  align-items: center;
560
695
  justify-content: center;
561
696
  }
562
- .agent-card--search .agent-card__action::before { content: '@'; font-weight: 600; }
697
+ .agent-card--search .agent-card__action::before { content: none; }
563
698
  .agent-card--search .agent-card__action:hover {
564
- background: #e2e3e5;
699
+ background: rgba(0, 0, 0, 0.04);
565
700
  }
566
701
 
567
702
  @media (max-width: 980px) {
@@ -622,20 +757,17 @@ function injectStyles() {
622
757
  [data-theme-mode="dark"] .openagent-agent-panel,
623
758
  [data-theme="dark"] .openagent-agent-panel {
624
759
  background: #1c1c1c; border-color: rgba(255,255,255,0.12);
625
- box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
626
760
  }
627
761
  [data-theme-mode="dark"] .openagent-panel-head,
628
762
  [data-theme="dark"] .openagent-panel-head { border-color: #2a2a2a; }
629
763
  [data-theme-mode="dark"] .openagent-panel-title,
630
764
  [data-theme="dark"] .openagent-panel-title { color: rgba(224, 224, 224, 0.8); }
631
765
  [data-theme-mode="dark"] .openagent-panel-close,
632
- [data-theme="dark"] .openagent-panel-close { background: #2a2a2a; color: #888; }
766
+ [data-theme="dark"] .openagent-panel-close { background: #2a2a2a; }
633
767
  [data-theme-mode="dark"] .openagent-panel-close:hover,
634
- [data-theme="dark"] .openagent-panel-close:hover { background: #333; color: #ccc; }
768
+ [data-theme="dark"] .openagent-panel-close:hover { background: #333; }
635
769
  [data-theme-mode="dark"] .openagent-section-heading,
636
770
  [data-theme="dark"] .openagent-section-heading { color: rgba(224, 224, 224, 0.45); }
637
- [data-theme-mode="dark"] .openagent-parent-heading,
638
- [data-theme="dark"] .openagent-parent-heading { color: rgba(224, 224, 224, 0.3); }
639
771
  [data-theme-mode="dark"] .openagent-panel-divider,
640
772
  [data-theme="dark"] .openagent-panel-divider { border-color: rgba(255,255,255,0.1); }
641
773
 
@@ -647,28 +779,37 @@ function injectStyles() {
647
779
  [data-theme="dark"] .agent-card__stat { color: #64748b; }
648
780
 
649
781
  [data-theme-mode="dark"] .agent-card--mention,
650
- [data-theme="dark"] .agent-card--mention { background: transparent; }
782
+ [data-theme="dark"] .agent-card--mention { background: #1c1c1c; border-color: rgba(255,255,255,0.12); }
651
783
  [data-theme-mode="dark"] .agent-card--mention:hover,
652
- [data-theme="dark"] .agent-card--mention:hover { background: #252525; }
784
+ [data-theme="dark"] .agent-card--mention:hover { border-color: transparent; }
785
+ [data-theme-mode="dark"] .agent-card--mention .agent-card__name,
786
+ [data-theme="dark"] .agent-card--mention .agent-card__name { color: #e0e0e0; }
787
+ [data-theme-mode="dark"] .agent-card--mention .agent-card__bio,
788
+ [data-theme="dark"] .agent-card--mention .agent-card__bio { color: rgba(224,224,224,0.7); }
789
+ [data-theme-mode="dark"] .agent-card--mention .agent-card__stat--claws,
790
+ [data-theme="dark"] .agent-card--mention .agent-card__stat--claws { color: #aaa; }
791
+ [data-theme-mode="dark"] .agent-card--mention .agent-card__stat--owner,
792
+ [data-theme="dark"] .agent-card--mention .agent-card__stat--owner { color: #aaa; }
653
793
  [data-theme-mode="dark"] .agent-card--mention .agent-card__action,
654
794
  [data-theme="dark"] .agent-card--mention .agent-card__action {
655
- background: #333; border-color: #555; color: #ddd;
795
+ background: transparent; border-color: rgba(255,255,255,0.2); color: #ddd;
656
796
  }
657
797
  [data-theme-mode="dark"] .agent-card--mention .agent-card__action:hover,
658
- [data-theme="dark"] .agent-card--mention .agent-card__action:hover { background: #444; }
659
- [data-theme-mode="dark"] .agent-card--search:hover,
660
- [data-theme="dark"] .agent-card--search:hover { background: #252525; }
661
- [data-theme-mode="dark"] .agent-card--search.openagent-card-selected,
662
- [data-theme="dark"] .agent-card--search.openagent-card-selected {
663
- background: rgba(99, 102, 241, 0.12);
664
- outline-color: rgba(99, 102, 241, 0.4);
665
- }
798
+ [data-theme="dark"] .agent-card--mention .agent-card__action:hover { background: rgba(255,255,255,0.06); }
799
+ [data-theme-mode="dark"] .agent-card--search .agent-card__name,
800
+ [data-theme="dark"] .agent-card--search .agent-card__name { color: #e0e0e0; }
801
+ [data-theme-mode="dark"] .agent-card--search .agent-card__bio,
802
+ [data-theme="dark"] .agent-card--search .agent-card__bio { color: rgba(224, 224, 224, 0.65); }
803
+ [data-theme-mode="dark"] .agent-card--search .agent-card__stat--claws,
804
+ [data-theme="dark"] .agent-card--search .agent-card__stat--claws { color: #aaa; }
805
+ [data-theme-mode="dark"] .agent-card--search .agent-card__stat--owner,
806
+ [data-theme="dark"] .agent-card--search .agent-card__stat--owner { color: #aaa; }
666
807
  [data-theme-mode="dark"] .agent-card--search .agent-card__action,
667
808
  [data-theme="dark"] .agent-card--search .agent-card__action {
668
- background: #333; border-color: #555; color: #ddd;
809
+ background: transparent; border-color: rgba(255,255,255,0.2); color: #ddd;
669
810
  }
670
811
  [data-theme-mode="dark"] .agent-card--search .agent-card__action:hover,
671
- [data-theme="dark"] .agent-card--search .agent-card__action:hover { background: #444; }
812
+ [data-theme="dark"] .agent-card--search .agent-card__action:hover { background: rgba(255,255,255,0.06); }
672
813
 
673
814
 
674
815
  [data-theme-mode="dark"] .agent-card--inline,
@@ -686,6 +827,7 @@ function injectStyles() {
686
827
  [data-theme="dark"] .agent-card__loading {
687
828
  background: #1e1b3a; border-color: #2d2b55; color: #64748b;
688
829
  }
689
- `;
830
+
831
+ `;
690
832
  document.head.appendChild(style);
691
833
  }