tagword-codeagent 1.1.6__py3-none-any.whl

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 (173) hide show
  1. codeagent/__init__.py +10 -0
  2. codeagent/__main__.py +13 -0
  3. codeagent/cli/__init__.py +13 -0
  4. codeagent/cli/entrypoint.py +161 -0
  5. codeagent/cli/main.py +979 -0
  6. codeagent/core/__init__.py +2 -0
  7. codeagent/core/attachments.py +342 -0
  8. codeagent/core/audio_models.py +50 -0
  9. codeagent/core/bootstrap.py +178 -0
  10. codeagent/core/default_presets.py +159 -0
  11. codeagent/core/env.py +106 -0
  12. codeagent/core/folder_picker.py +151 -0
  13. codeagent/core/image_understanding.py +90 -0
  14. codeagent/core/models.py +6 -0
  15. codeagent/core/paths.py +238 -0
  16. codeagent/core/pricing.py +107 -0
  17. codeagent/core/process_ports.py +258 -0
  18. codeagent/core/seed_bridge.py +21 -0
  19. codeagent/core/settings.py +98 -0
  20. codeagent/core/speech_synth.py +330 -0
  21. codeagent/core/team_config.py +247 -0
  22. codeagent/core/team_manager.py +245 -0
  23. codeagent/core/token_counter.py +41 -0
  24. codeagent/core/tts_voices.py +103 -0
  25. codeagent/core/usage_billing.py +72 -0
  26. codeagent/core/vision_models.py +93 -0
  27. codeagent/memory/diary.py +144 -0
  28. codeagent/persona_defaults/README.md +12 -0
  29. codeagent/persona_defaults/agent.md +352 -0
  30. codeagent/persona_defaults/identity.md +29 -0
  31. codeagent/persona_defaults/memory.md +4 -0
  32. codeagent/persona_defaults/skills.md +325 -0
  33. codeagent/persona_defaults/soul.md +38 -0
  34. codeagent/persona_defaults/tools.md +41 -0
  35. codeagent/persona_defaults/user.md +18 -0
  36. codeagent/runtime/__init__.py +11 -0
  37. codeagent/runtime/agent_context.py +6 -0
  38. codeagent/runtime/agent_runtime.py +21 -0
  39. codeagent/runtime/compact_prompt.py +9 -0
  40. codeagent/runtime/compact_state.py +40 -0
  41. codeagent/runtime/llm_worker.py +132 -0
  42. codeagent/runtime/orchestrator.py +161 -0
  43. codeagent/runtime/prompt_enrichment.py +324 -0
  44. codeagent/runtime/session_manager.py +30 -0
  45. codeagent/runtime/task_split.py +38 -0
  46. codeagent/runtime/turn_loop.py +13 -0
  47. codeagent/runtime/worker.py +48 -0
  48. codeagent/server/__init__.py +505 -0
  49. codeagent/server/app_factory.py +1292 -0
  50. codeagent/server/attachment_api.py +261 -0
  51. codeagent/server/hub.py +175 -0
  52. codeagent/server/icon.png +0 -0
  53. codeagent/server/self_healing.py +143 -0
  54. codeagent/server/team_engine.py +243 -0
  55. codeagent/server/tts_api.py +51 -0
  56. codeagent/server/webui_api_app.py +3180 -0
  57. codeagent/skills/__init__.py +2 -0
  58. codeagent/skills/select.py +144 -0
  59. codeagent/tools/__init__.py +6 -0
  60. codeagent/tools/agent_tools.py +10 -0
  61. codeagent/web/__init__.py +1 -0
  62. codeagent/web/__pycache__/__init__.cpython-313.pyc +0 -0
  63. codeagent/web/__pycache__/app.cpython-313.pyc +0 -0
  64. codeagent/web/__pycache__/auth_impl.cpython-313.pyc +0 -0
  65. codeagent/web/auth_impl.py +326 -0
  66. codeagent/web/static/00-marked.min.js +6 -0
  67. codeagent/web/static/00-mermaid.min.js +2314 -0
  68. codeagent/web/static/00-purify.min.js +3 -0
  69. codeagent/web/static/00-storage.js +83 -0
  70. codeagent/web/static/00-utils.js +51 -0
  71. codeagent/web/static/01-theme.css +96 -0
  72. codeagent/web/static/01a-scroll.js +86 -0
  73. codeagent/web/static/01b-think.js +62 -0
  74. codeagent/web/static/01c-session-identity.js +81 -0
  75. codeagent/web/static/01c-session-thinking.js +61 -0
  76. codeagent/web/static/01c-session-tree-menus.js +349 -0
  77. codeagent/web/static/01c-session-tree.js +531 -0
  78. codeagent/web/static/01c-session-utilities.js +83 -0
  79. codeagent/web/static/01c-vision-model.js +132 -0
  80. codeagent/web/static/01d-image-gen-model.js +84 -0
  81. codeagent/web/static/01e-audio-model.js +97 -0
  82. codeagent/web/static/01f-compose-ui.js +88 -0
  83. codeagent/web/static/01g-tts-settings.js +128 -0
  84. codeagent/web/static/01h-music-model.js +85 -0
  85. codeagent/web/static/01i-model-stack.js +291 -0
  86. codeagent/web/static/01j-video-gen-model.js +85 -0
  87. codeagent/web/static/01k-model-stack-bootstrap.js +66 -0
  88. codeagent/web/static/01k-model-stack-state.js +209 -0
  89. codeagent/web/static/01q-inflight.js +195 -0
  90. codeagent/web/static/02-reset.css +22 -0
  91. codeagent/web/static/02-session-ui.js +201 -0
  92. codeagent/web/static/03-layout-p1.css +2 -0
  93. codeagent/web/static/03-layout-p2.css +2 -0
  94. codeagent/web/static/03a-links-stream.js +88 -0
  95. codeagent/web/static/03b-stream-text.js +119 -0
  96. codeagent/web/static/03c-render-bubble.js +520 -0
  97. codeagent/web/static/03d-agent-bubble.js +126 -0
  98. codeagent/web/static/03e-tool-trace.js +182 -0
  99. codeagent/web/static/03f-timeline.js +54 -0
  100. codeagent/web/static/03g-bubble-tts.js +292 -0
  101. codeagent/web/static/04-components-p1.css +1 -0
  102. codeagent/web/static/04-components-p2b.css +1 -0
  103. codeagent/web/static/04-components-p3.css +2 -0
  104. codeagent/web/static/04-components-p4.css +1 -0
  105. codeagent/web/static/04-components-p5.css +1 -0
  106. codeagent/web/static/04-components-p6.css +58 -0
  107. codeagent/web/static/04-components-p7.css +4 -0
  108. codeagent/web/static/04-components-p8.css +1 -0
  109. codeagent/web/static/04-components-p9.css +1 -0
  110. codeagent/web/static/04-ws-connect.js +351 -0
  111. codeagent/web/static/04-ws-helpers.js +116 -0
  112. codeagent/web/static/05-chat-p1.css +1058 -0
  113. codeagent/web/static/05-chat-p2.css +1 -0
  114. codeagent/web/static/05-chat-p3.css +295 -0
  115. codeagent/web/static/05a-session-history.js +176 -0
  116. codeagent/web/static/05b-session-list.js +114 -0
  117. codeagent/web/static/05c-dialog.js +123 -0
  118. codeagent/web/static/05d-project-create.js +172 -0
  119. codeagent/web/static/05e-project-remote.js +143 -0
  120. codeagent/web/static/06-chat.js +552 -0
  121. codeagent/web/static/06-utilities.css +181 -0
  122. codeagent/web/static/06b-attachments.js +304 -0
  123. codeagent/web/static/06c-camera.js +488 -0
  124. codeagent/web/static/07-activity-bar.css +127 -0
  125. codeagent/web/static/09-git-p1.css +1 -0
  126. codeagent/web/static/09-git-p2.css +1 -0
  127. codeagent/web/static/09a-init-bind.js +110 -0
  128. codeagent/web/static/09b-panel-toggle.js +80 -0
  129. codeagent/web/static/09c-api-refresh.js +100 -0
  130. codeagent/web/static/09d-status-log.js +80 -0
  131. codeagent/web/static/09e-commit.js +80 -0
  132. codeagent/web/static/09f-remote.js +93 -0
  133. codeagent/web/static/11a-cron-parse.js +117 -0
  134. codeagent/web/static/11b-cron-panel.js +100 -0
  135. codeagent/web/static/11c-cron-card.js +133 -0
  136. codeagent/web/static/11d-cron-form.js +105 -0
  137. codeagent/web/static/11e-env-config.js +168 -0
  138. codeagent/web/static/11f-env-llm-a-state.js +136 -0
  139. codeagent/web/static/11f-env-llm-b-form.js +409 -0
  140. codeagent/web/static/11f-env-llm-c-board.js +322 -0
  141. codeagent/web/static/11g-env-paths-git.js +973 -0
  142. codeagent/web/static/11h-env-mcp-a-state.js +161 -0
  143. codeagent/web/static/11h-env-mcp-b-form.js +229 -0
  144. codeagent/web/static/11h-env-mcp-c-board.js +565 -0
  145. codeagent/web/static/12-plugins.js +127 -0
  146. codeagent/web/static/13a-skills.js +156 -0
  147. codeagent/web/static/13a-todo-utils.js +140 -0
  148. codeagent/web/static/13b-todo-fetch.js +106 -0
  149. codeagent/web/static/13b-tools.js +127 -0
  150. codeagent/web/static/13c-todo-crud.js +92 -0
  151. codeagent/web/static/14-activity-bar.js +177 -0
  152. codeagent/web/static/15-plans.css +194 -0
  153. codeagent/web/static/15-plans.js +219 -0
  154. codeagent/web/static/16-mobile.css +612 -0
  155. codeagent/web/static/16-mobile.js +178 -0
  156. codeagent/web/static/17-preset-ux.css +287 -0
  157. codeagent/web/static/18-agent-mgr.css +616 -0
  158. codeagent/web/static/18-agent-mgr.js +204 -0
  159. codeagent/web/static/24-health-dashboard.js +68 -0
  160. codeagent/web/static/99-brand-polish.css +152 -0
  161. codeagent/web/static/body.html +824 -0
  162. codeagent/web/static/setup/setup_form.html +171 -0
  163. codeagent/web/static/setup/setup_head.html +100 -0
  164. codeagent/web/static/setup/setup_tail.html +264 -0
  165. codeagent/web/static/setup/setup_test.html +38 -0
  166. codeagent/web/web_login.html +265 -0
  167. codeagent/web/webui.html +35 -0
  168. tagword_codeagent-1.1.6.dist-info/METADATA +273 -0
  169. tagword_codeagent-1.1.6.dist-info/RECORD +173 -0
  170. tagword_codeagent-1.1.6.dist-info/WHEEL +5 -0
  171. tagword_codeagent-1.1.6.dist-info/entry_points.txt +3 -0
  172. tagword_codeagent-1.1.6.dist-info/licenses/LICENSE +21 -0
  173. tagword_codeagent-1.1.6.dist-info/top_level.txt +1 -0
@@ -0,0 +1,616 @@
1
+ /* ═══════════════════════════════════════════════════════════════
2
+ * 18-agent-mgr.css — Agent 管理页面样式(完整重写 v2)
3
+ * ═══════════════════════════════════════════════════════════════ */
4
+
5
+ /* ── 搜索工具栏 ── */
6
+ .agent-toolbar {
7
+ display: flex;
8
+ align-items: center;
9
+ gap: var(--sp-3);
10
+ margin-bottom: var(--sp-4);
11
+ }
12
+
13
+ .agent-search-wrap {
14
+ flex: 1;
15
+ min-width: 0;
16
+ position: relative;
17
+ }
18
+
19
+ .agent-search {
20
+ width: 100%;
21
+ padding: 8px 12px 8px 36px;
22
+ border: 1px solid var(--border-strong);
23
+ border-radius: var(--r-lg);
24
+ background: var(--bg-panel);
25
+ color: var(--text);
26
+ font-size: 13px;
27
+ outline: none;
28
+ transition: border-color 0.15s, box-shadow 0.15s;
29
+ }
30
+
31
+ .agent-search:focus {
32
+ border-color: var(--accent);
33
+ box-shadow: var(--shadow-focus);
34
+ }
35
+
36
+ .agent-search::placeholder {
37
+ color: var(--text-subtle);
38
+ }
39
+
40
+ .agent-search-wrap::before {
41
+ content: '🔍';
42
+ position: absolute;
43
+ left: 10px;
44
+ top: 50%;
45
+ transform: translateY(-50%);
46
+ font-size: 14px;
47
+ opacity: 0.5;
48
+ pointer-events: none;
49
+ }
50
+
51
+ .agent-count {
52
+ font-size: 12px;
53
+ color: var(--text-muted);
54
+ white-space: nowrap;
55
+ font-variant-numeric: tabular-nums;
56
+ }
57
+
58
+ /* ── Agent 卡片网格 ── */
59
+ .agent-list__grid {
60
+ display: grid;
61
+ grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
62
+ gap: var(--sp-3);
63
+ }
64
+
65
+ .agent-card {
66
+ position: relative;
67
+ display: flex;
68
+ align-items: flex-start;
69
+ gap: var(--sp-3);
70
+ padding: var(--sp-4);
71
+ background: var(--bg-panel);
72
+ border: 1px solid var(--border);
73
+ border-radius: var(--r-lg);
74
+ cursor: pointer;
75
+ transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
76
+ }
77
+
78
+ .agent-card:hover {
79
+ border-color: var(--accent);
80
+ box-shadow: 0 2px 8px rgba(0,0,0,0.06);
81
+ transform: translateY(-1px);
82
+ }
83
+
84
+ .agent-card:active {
85
+ transform: translateY(0);
86
+ }
87
+
88
+ /* 当前活跃 Agent */
89
+ .agent-card--active {
90
+ border-color: var(--accent);
91
+ background: var(--accent-soft);
92
+ box-shadow: 0 0 0 1px var(--accent-ring);
93
+ }
94
+
95
+ .agent-card--active::before {
96
+ content: '';
97
+ position: absolute;
98
+ top: 0;
99
+ left: 0;
100
+ width: 3px;
101
+ height: 100%;
102
+ background: var(--accent);
103
+ border-radius: 3px 0 0 3px;
104
+ }
105
+
106
+ /* ── 头像区 ── */
107
+ .agent-card__avatar {
108
+ width: 40px;
109
+ height: 40px;
110
+ border-radius: 50%;
111
+ display: flex;
112
+ align-items: center;
113
+ justify-content: center;
114
+ font-size: 16px;
115
+ font-weight: 600;
116
+ color: #fff;
117
+ flex-shrink: 0;
118
+ user-select: none;
119
+ }
120
+
121
+ .agent-card__avatar--default { background: linear-gradient(135deg, #6366f1, #818cf8); }
122
+ .agent-card__avatar--blue { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
123
+ .agent-card__avatar--teal { background: linear-gradient(135deg, #14b8a6, #2dd4bf); }
124
+ .agent-card__avatar--pink { background: linear-gradient(135deg, #ec4899, #f472b6); }
125
+ .agent-card__avatar--amber { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
126
+ .agent-card__avatar--cyan { background: linear-gradient(135deg, #06b6d4, #22d3ee); }
127
+ .agent-card__avatar--rose { background: linear-gradient(135deg, #f43f5e, #fb7185); }
128
+ .agent-card__avatar--violet { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
129
+ .agent-card__avatar--emerald { background: linear-gradient(135deg, #10b981, #34d399); }
130
+ .agent-card__avatar--orange { background: linear-gradient(135deg, #f97316, #fb923c); }
131
+
132
+ /* ── 卡片主体 ── */
133
+ .agent-card__body {
134
+ flex: 1;
135
+ min-width: 0;
136
+ }
137
+
138
+ .agent-card__name {
139
+ font-weight: 600;
140
+ font-size: 14px;
141
+ color: var(--text);
142
+ line-height: 1.3;
143
+ margin-bottom: 1px;
144
+ }
145
+
146
+ .agent-card__id {
147
+ font-size: 11px;
148
+ color: var(--text-muted);
149
+ font-family: var(--font-mono);
150
+ display: block;
151
+ margin-bottom: 4px;
152
+ }
153
+
154
+ .agent-card__desc {
155
+ font-size: 12px;
156
+ color: var(--text-muted);
157
+ display: -webkit-box;
158
+ -webkit-line-clamp: 2;
159
+ -webkit-box-orient: vertical;
160
+ overflow: hidden;
161
+ line-height: 1.4;
162
+ margin-bottom: var(--sp-2);
163
+ }
164
+
165
+ .agent-card__meta {
166
+ display: flex;
167
+ flex-wrap: wrap;
168
+ align-items: center;
169
+ gap: 4px;
170
+ }
171
+
172
+ .agent-card__tag {
173
+ display: inline-block;
174
+ padding: 1px 7px;
175
+ font-size: 10px;
176
+ font-weight: 500;
177
+ border-radius: 999px;
178
+ background: var(--bg-subtle);
179
+ color: var(--text-muted);
180
+ border: 1px solid var(--border);
181
+ line-height: 1.5;
182
+ }
183
+
184
+ .agent-card__tag--active {
185
+ background: var(--accent-soft);
186
+ color: var(--accent);
187
+ border-color: var(--accent-ring);
188
+ }
189
+
190
+ .agent-card__tag--unrestricted {
191
+ background: var(--bg-subtle);
192
+ color: var(--text-muted);
193
+ border-style: dashed;
194
+ opacity: 0.75;
195
+ }
196
+
197
+ /* ── 卡片右侧操作区 ── */
198
+ .agent-card__actions {
199
+ display: flex;
200
+ flex-direction: column;
201
+ gap: 4px;
202
+ flex-shrink: 0;
203
+ opacity: 0;
204
+ transition: opacity 0.12s;
205
+ }
206
+
207
+ .agent-card:hover .agent-card__actions {
208
+ opacity: 1;
209
+ }
210
+
211
+ .agent-card__action-btn {
212
+ width: 28px;
213
+ height: 28px;
214
+ border: none;
215
+ border-radius: var(--r-sm);
216
+ background: transparent;
217
+ color: var(--text-muted);
218
+ cursor: pointer;
219
+ display: flex;
220
+ align-items: center;
221
+ justify-content: center;
222
+ font-size: 13px;
223
+ transition: background 0.1s, color 0.1s;
224
+ }
225
+
226
+ .agent-card__action-btn:hover {
227
+ background: var(--bg-hover);
228
+ color: var(--text);
229
+ }
230
+
231
+ .agent-card__action-btn--danger:hover {
232
+ background: var(--danger-soft);
233
+ color: var(--danger);
234
+ }
235
+
236
+ .agent-card__action-btn--switch:hover {
237
+ background: var(--accent-soft);
238
+ color: var(--accent);
239
+ }
240
+
241
+ .agent-list__empty {
242
+ padding: var(--sp-8);
243
+ text-align: center;
244
+ color: var(--text-muted);
245
+ font-size: 13px;
246
+ background: var(--bg-subtle);
247
+ border-radius: var(--r-lg);
248
+ border: 1px dashed var(--border-strong);
249
+ }
250
+
251
+ /* ── Agent 详情面板 ── */
252
+ #fieldsetAgentDetail .section__header-left {
253
+ display: flex;
254
+ align-items: center;
255
+ gap: var(--sp-2);
256
+ }
257
+
258
+ #btnAgentDetailBack {
259
+ font-size: 16px;
260
+ padding: 4px 8px;
261
+ }
262
+
263
+ .agent-detail {
264
+ display: flex;
265
+ flex-direction: column;
266
+ gap: var(--sp-4);
267
+ }
268
+
269
+ .agent-detail__hero {
270
+ display: flex;
271
+ align-items: center;
272
+ gap: var(--sp-4);
273
+ padding: var(--sp-4);
274
+ background: var(--bg-subtle);
275
+ border-radius: var(--r-xl);
276
+ border: 1px solid var(--border);
277
+ }
278
+
279
+ .agent-detail__hero .agent-card__avatar {
280
+ width: 56px;
281
+ height: 56px;
282
+ font-size: 22px;
283
+ }
284
+
285
+ .agent-detail__hero-info {
286
+ flex: 1;
287
+ min-width: 0;
288
+ }
289
+
290
+ .agent-detail__hero-name {
291
+ font-size: 18px;
292
+ font-weight: 700;
293
+ color: var(--text);
294
+ margin-bottom: 2px;
295
+ }
296
+
297
+ .agent-detail__hero-id {
298
+ font-size: 12px;
299
+ color: var(--text-muted);
300
+ font-family: var(--font-mono);
301
+ margin-bottom: var(--sp-1);
302
+ }
303
+
304
+ .agent-detail__hero-status {
305
+ font-size: 12px;
306
+ color: var(--text-muted);
307
+ }
308
+
309
+ .agent-detail__hero-status--active {
310
+ color: var(--success);
311
+ }
312
+
313
+ .agent-detail__hero-desc {
314
+ font-size: 13px;
315
+ color: var(--text-muted);
316
+ margin: var(--sp-1) 0;
317
+ display: flex;
318
+ align-items: center;
319
+ gap: var(--sp-1);
320
+ }
321
+
322
+ .agent-detail__desc-edit-btn {
323
+ font-size: 11px;
324
+ padding: 0 4px;
325
+ opacity: 0.5;
326
+ }
327
+
328
+ .agent-detail__desc-edit-btn:hover {
329
+ opacity: 1;
330
+ }
331
+
332
+ .agent-detail__desc-input {
333
+ flex: 1;
334
+ min-width: 200px;
335
+ font-size: 13px;
336
+ }
337
+
338
+ .agent-detail__grid {
339
+ display: grid;
340
+ grid-template-columns: 1fr 1fr;
341
+ gap: var(--sp-3);
342
+ }
343
+
344
+ @media (max-width: 600px) {
345
+ .agent-detail__grid {
346
+ grid-template-columns: 1fr;
347
+ }
348
+ }
349
+
350
+ .agent-detail__card {
351
+ padding: var(--sp-3);
352
+ background: var(--bg-panel);
353
+ border: 1px solid var(--border);
354
+ border-radius: var(--r-lg);
355
+ }
356
+
357
+ .agent-detail__card-title {
358
+ font-size: 11px;
359
+ font-weight: 600;
360
+ text-transform: uppercase;
361
+ letter-spacing: 0.5px;
362
+ color: var(--text-muted);
363
+ margin-bottom: var(--sp-2);
364
+ }
365
+
366
+ .agent-detail__tools {
367
+ display: flex;
368
+ flex-wrap: wrap;
369
+ gap: var(--sp-1);
370
+ }
371
+
372
+ .agent-detail__tool-tag {
373
+ display: inline-flex;
374
+ align-items: center;
375
+ gap: 4px;
376
+ padding: 3px 10px;
377
+ background: var(--accent-soft);
378
+ color: var(--accent);
379
+ border-radius: 999px;
380
+ font-size: 12px;
381
+ font-weight: 500;
382
+ border: 1px solid var(--accent-ring);
383
+ }
384
+
385
+ .agent-detail__tool-tag::before {
386
+ content: '⚙';
387
+ font-size: 11px;
388
+ }
389
+
390
+ .agent-detail__tool-none {
391
+ font-size: 12px;
392
+ color: var(--text-muted);
393
+ font-style: italic;
394
+ padding: var(--sp-2) 0;
395
+ }
396
+
397
+ /* ── 详情 - 会话列表 ── */
398
+ .agent-detail__section {
399
+ margin-top: var(--sp-2);
400
+ }
401
+
402
+ .agent-detail__section-title {
403
+ font-size: 13px;
404
+ font-weight: 600;
405
+ color: var(--text);
406
+ margin: 0 0 var(--sp-3);
407
+ display: flex;
408
+ align-items: center;
409
+ gap: var(--sp-2);
410
+ }
411
+
412
+ .agent-detail__session-list {
413
+ display: flex;
414
+ flex-direction: column;
415
+ gap: 2px;
416
+ max-height: 300px;
417
+ overflow-y: auto;
418
+ border: 1px solid var(--border);
419
+ border-radius: var(--r-md);
420
+ background: var(--bg-panel);
421
+ }
422
+
423
+ .agent-detail__session-item {
424
+ display: flex;
425
+ justify-content: space-between;
426
+ align-items: center;
427
+ padding: var(--sp-2) var(--sp-3);
428
+ cursor: pointer;
429
+ transition: background 0.1s;
430
+ border-bottom: 1px solid var(--border);
431
+ }
432
+
433
+ .agent-detail__session-item:last-child {
434
+ border-bottom: none;
435
+ }
436
+
437
+ .agent-detail__session-item:hover {
438
+ background: var(--bg-hover);
439
+ }
440
+
441
+ .agent-detail__session-title {
442
+ font-size: 13px;
443
+ color: var(--text);
444
+ white-space: nowrap;
445
+ overflow: hidden;
446
+ text-overflow: ellipsis;
447
+ }
448
+
449
+ .agent-detail__session-time {
450
+ font-size: 11px;
451
+ color: var(--text-subtle);
452
+ flex-shrink: 0;
453
+ margin-left: var(--sp-2);
454
+ }
455
+
456
+ .agent-detail__empty {
457
+ font-size: 13px;
458
+ color: var(--text-muted);
459
+ padding: var(--sp-4) var(--sp-3);
460
+ text-align: center;
461
+ }
462
+
463
+ /* ── 空状态插画 ── */
464
+ .agent-loading {
465
+ display: flex;
466
+ flex-direction: column;
467
+ align-items: center;
468
+ justify-content: center;
469
+ padding: var(--sp-10);
470
+ color: var(--text-muted);
471
+ gap: var(--sp-3);
472
+ }
473
+
474
+ .agent-loading__spinner {
475
+ width: 24px;
476
+ height: 24px;
477
+ border: 2px solid var(--border);
478
+ border-top-color: var(--accent);
479
+ border-radius: 50%;
480
+ animation: agent-spin 0.7s linear infinite;
481
+ }
482
+
483
+ @keyframes agent-spin {
484
+ to { transform: rotate(360deg); }
485
+ }
486
+
487
+ /* ── 已有模态框微调 ── */
488
+ .modal--agent {
489
+ max-width: 560px;
490
+ }
491
+
492
+ .agent-modal__preset-hint {
493
+ font-size: 11px;
494
+ color: var(--text-muted);
495
+ margin-top: var(--sp-1);
496
+ }
497
+
498
+ .agent-detail__tool-none--unrestricted {
499
+ color: var(--text-muted);
500
+ font-style: italic;
501
+ border: 1px dashed var(--border);
502
+ padding: var(--sp-1) var(--sp-2);
503
+ border-radius: var(--r-sm);
504
+ display: inline-block;
505
+ }
506
+
507
+ /* ── 工具编辑区 ── */
508
+ .agent-detail__tool-edit-btn {
509
+ margin-top: var(--sp-2);
510
+ display: inline-block;
511
+ }
512
+
513
+ .agent-tool-edit {
514
+ display: flex;
515
+ flex-wrap: wrap;
516
+ gap: var(--sp-1);
517
+ max-height: 300px;
518
+ overflow-y: auto;
519
+ padding: var(--sp-2);
520
+ background: var(--bg-subtle);
521
+ border: 1px solid var(--border);
522
+ border-radius: var(--r-sm);
523
+ margin-bottom: var(--sp-2);
524
+ }
525
+
526
+ .agent-tool-edit .checkbox-label {
527
+ flex: 0 0 auto;
528
+ min-width: 140px;
529
+ font-size: 12px;
530
+ padding: 2px 6px;
531
+ border-radius: var(--r-sm);
532
+ transition: background 0.15s;
533
+ }
534
+
535
+ .agent-tool-edit .checkbox-label:hover {
536
+ background: var(--bg-hover);
537
+ }
538
+
539
+ .agent-detail__tool-actions {
540
+ display: flex;
541
+ gap: var(--sp-2);
542
+ justify-content: flex-end;
543
+ }
544
+
545
+ /* ── 创建模式 ── */
546
+ .agent-detail__create-actions {
547
+ display: flex;
548
+ gap: var(--sp-2);
549
+ justify-content: center;
550
+ margin-top: var(--sp-4);
551
+ padding-top: var(--sp-3);
552
+ border-top: 1px solid var(--border);
553
+ }
554
+
555
+ /* ── 详情扩展区(知识/技能 + 身份配置) ── */
556
+ .detail-extension {
557
+ margin-top: var(--sp-4);
558
+ border-color: var(--border-soft);
559
+ background: var(--bg-subtle);
560
+ }
561
+
562
+ .detail-extension .section__title {
563
+ font-size: 15px;
564
+ }
565
+
566
+ /* ── 外部集成(全局标记) ── */
567
+ .section--global {
568
+ border-left: 3px solid var(--accent-muted, #94a3b8);
569
+ }
570
+
571
+ .section--global .section__header {
572
+ border-bottom-color: var(--border-soft);
573
+ }
574
+
575
+ .section__badge {
576
+ display: inline-block;
577
+ font-size: 10px;
578
+ font-weight: 500;
579
+ padding: 1px 8px;
580
+ border-radius: 999px;
581
+ background: var(--bg-hover);
582
+ color: var(--text-muted);
583
+ vertical-align: middle;
584
+ margin-left: var(--sp-2);
585
+ text-transform: uppercase;
586
+ letter-spacing: 0.3px;
587
+ }
588
+
589
+ /* ── 详情页:返回按钮区域 ── */
590
+ #fieldsetAgentDetail {
591
+ margin-bottom: 0;
592
+ }
593
+
594
+ /* ── 适配手机视图 ── */
595
+ @media (max-width: 768px) {
596
+ .agent-list__grid {
597
+ grid-template-columns: 1fr;
598
+ }
599
+
600
+ .agent-card__actions {
601
+ opacity: 1;
602
+ }
603
+
604
+ .agent-detail__grid {
605
+ grid-template-columns: 1fr;
606
+ }
607
+
608
+ .agent-toolbar {
609
+ flex-direction: column;
610
+ align-items: stretch;
611
+ }
612
+
613
+ .agent-count {
614
+ text-align: right;
615
+ }
616
+ }