pi-web-ui 0.114.1 → 0.114.3

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 (130) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +187 -187
  3. package/README.zh-CN.md +227 -227
  4. package/README.zh-TW.md +227 -227
  5. package/bin/device-hub-cli.mjs +577 -577
  6. package/bin/frp-manager.mjs +1573 -1573
  7. package/bin/pi-device-hub.mjs +9 -9
  8. package/bin/pi-web-ui.mjs +4081 -4081
  9. package/deploy/nginx-subpath.conf +100 -100
  10. package/deploy/pi-web-ui.service +36 -36
  11. package/dist/server/agent-service.js +88 -15
  12. package/dist/server/attachments.js +6 -6
  13. package/dist/server/canvas/canvas-orchestrator.js +3 -3
  14. package/dist/server/communicate-tool.js +37 -11
  15. package/dist/server/compaction-instructions.js +8 -8
  16. package/dist/server/context-usage.js +105 -0
  17. package/dist/server/device-center/desktop-page.js +228 -228
  18. package/dist/server/device-center/hub-page.js +64 -64
  19. package/dist/server/device-center/native-desktop/macos.js +190 -190
  20. package/dist/server/device-center/native-desktop/windows.js +116 -116
  21. package/dist/server/dsh/runtime/cordis.yml +1 -1
  22. package/dist/server/dsh/runtime/custom-prompt.mjs +33 -33
  23. package/dist/server/dsh/runtime/goal-rpc.mjs +1309 -1309
  24. package/dist/server/dsh/runtime/launcher.mjs +235 -235
  25. package/dist/server/dsh/runtime/override.patch.yml +89 -89
  26. package/dist/server/dsh/runtime/runtime-root.mjs +405 -405
  27. package/dist/server/durable/durable-event-projector.js +19 -3
  28. package/dist/server/durable/durable-models.js +134 -65
  29. package/dist/server/eval-tool.js +135 -135
  30. package/dist/server/model-resolver.js +4 -1
  31. package/dist/server/patch-bash-process.js +89 -89
  32. package/dist/server/patch-tool.js +9 -9
  33. package/dist/server/patch-turn-end-boundary.js +3 -3
  34. package/dist/server/persona-chain.js +8 -8
  35. package/dist/server/protocol-version.js +1 -1
  36. package/dist/server/remote-ssh-service.js +39 -39
  37. package/dist/server/schedule-agent-tool.js +11 -6
  38. package/dist/server/scheduler-tasks.js +84 -2
  39. package/dist/server/scm-commitmsg.js +10 -10
  40. package/dist/server/setup-page.js +620 -620
  41. package/dist/server/universal/universal-session.js +19 -18
  42. package/dist/server/vision-bridge.js +18 -18
  43. package/docs/device-center.md +148 -148
  44. package/docs/device-desktop.md +48 -48
  45. package/docs/dsh-engine.md +493 -493
  46. package/extensions/webui.ts +335 -335
  47. package/package.json +1 -1
  48. package/plugin-sdk/README.md +174 -174
  49. package/plugin-sdk/client-utils.mjs +279 -279
  50. package/plugin-sdk/import-check.mjs +210 -210
  51. package/plugin-sdk/index.d.ts +698 -698
  52. package/plugin-sdk/index.mjs +696 -696
  53. package/plugin-sdk/package.json +13 -13
  54. package/plugin-sdk/ssh-host-trust.mjs +225 -225
  55. package/themes/aetheris.css +501 -501
  56. package/themes/ayu-light.css +116 -116
  57. package/themes/bases/flow-base.css +1357 -1357
  58. package/themes/bases/obsidian-base.css +895 -895
  59. package/themes/bases/statusbar-flat-base.css +112 -112
  60. package/themes/bases/zhujian-base.css +688 -688
  61. package/themes/bases/zhupi-base.css +660 -660
  62. package/themes/catppuccin-latte.css +119 -119
  63. package/themes/catppuccin.css +116 -116
  64. package/themes/claude-code-dark.css +147 -147
  65. package/themes/codex.css +114 -114
  66. package/themes/cyberpunk.css +50 -50
  67. package/themes/dark-teal.css +264 -264
  68. package/themes/dazzle.css +38 -38
  69. package/themes/everforest-light.css +115 -115
  70. package/themes/flow-light.css +164 -164
  71. package/themes/flow.css +161 -161
  72. package/themes/geist.css +114 -114
  73. package/themes/gruvbox-light.css +115 -115
  74. package/themes/kanagawa-lotus.css +115 -115
  75. package/themes/md-preview.css +24 -24
  76. package/themes/mist.css +166 -166
  77. package/themes/nord.css +107 -107
  78. package/themes/one-dark.css +106 -106
  79. package/themes/paper.css +174 -174
  80. package/themes/rose-pine-dawn.css +114 -114
  81. package/themes/sakura.css +166 -166
  82. package/themes/solarized-light.css +114 -114
  83. package/themes/tokyo-night.css +115 -115
  84. package/themes/translucent.css +85 -85
  85. package/themes/transparent.css +116 -116
  86. package/themes/vs-code-dark.css +147 -147
  87. package/themes/wallpaper-flow.css +382 -382
  88. package/themes/wallpaper-obsidian.css +74 -74
  89. package/themes/white.css +164 -164
  90. package/themes/zhujian-dark.css +115 -115
  91. package/themes/zhujian.css +114 -114
  92. package/themes/zhupi-dark.css +115 -115
  93. package/themes/zhupi.css +114 -114
  94. package/web/dist/.build-assets.json +1 -1
  95. package/web/dist/assets/{BgTasksModal-BcXJ20RO.js → BgTasksModal-BvnUHjFe.js} +1 -1
  96. package/web/dist/assets/{BgTasksModal-DjQmiKnE.js → BgTasksModal-DSC8ncW3.js} +1 -1
  97. package/web/dist/assets/{CanvasStudio-PI9pid0Y.js → CanvasStudio-BSg9ghPV.js} +2 -2
  98. package/web/dist/assets/{CanvasStudio-nf5-HxLM.js → CanvasStudio-DxW7C3Sz.js} +2 -2
  99. package/web/dist/assets/{DeviceCenter-CYttJw2a.js → DeviceCenter-Bmgr-Bwm.js} +1 -1
  100. package/web/dist/assets/{DeviceCenter-DPe4sz74.js → DeviceCenter-Cl9MBXaH.js} +1 -1
  101. package/web/dist/assets/{DeviceGroups-D2rogxEN.js → DeviceGroups-aeLD2msl.js} +1 -1
  102. package/web/dist/assets/{Dropdown-ZLS04O8p.js → Dropdown-D1Jl35dw.js} +1 -1
  103. package/web/dist/assets/{FilePreview-C9Ut4Lq6.js → FilePreview-6CqoDF_P.js} +1 -1
  104. package/web/dist/assets/{FilePreview-CvK3ZzX5.js → FilePreview-CJa27G_Q.js} +1 -1
  105. package/web/dist/assets/{GlobalSearchModal-C5e-OCw2.js → GlobalSearchModal-CJX35rZL.js} +1 -1
  106. package/web/dist/assets/{GlobalSearchModal-H7pFK2UC.js → GlobalSearchModal-CMW0xz0P.js} +1 -1
  107. package/web/dist/assets/{GroupConversation-C2wNM0dQ.js → GroupConversation-Cq4daBFb.js} +1 -1
  108. package/web/dist/assets/{GroupConversation-ChN3TWQK.js → GroupConversation-DoELa83U.js} +1 -1
  109. package/web/dist/assets/{ModelConfigModal-DDZccDYt.js → ModelConfigModal-Bp7tfKYh.js} +1 -1
  110. package/web/dist/assets/{PiSetupModal-DHbqfx8T.js → PiSetupModal-DD8srwBJ.js} +1 -1
  111. package/web/dist/assets/{ProviderOAuthControls-C-MK36Dk.js → ProviderOAuthControls-C6tfXb88.js} +1 -1
  112. package/web/dist/assets/{SCMPanel-kx-SCL2s.js → SCMPanel-CghgsyBN.js} +1 -1
  113. package/web/dist/assets/{SCMPanel-buTGziDB.js → SCMPanel-D8-8aqwC.js} +1 -1
  114. package/web/dist/assets/{SettingsModal-BsUF8jqr.js → SettingsModal-BbBe2rYo.js} +1 -1
  115. package/web/dist/assets/{SettingsModal-D357Ky7P.js → SettingsModal-qETiVPKj.js} +1 -1
  116. package/web/dist/assets/{TerminalPanel-BBuM_Sez.js → TerminalPanel-Da-Xs4Wk.js} +1 -1
  117. package/web/dist/assets/{TerminalPanel-D6x6xz8Q.js → TerminalPanel-DnS4tFQO.js} +1 -1
  118. package/web/dist/assets/{TuiOverlayModal-CdbGV3Za.js → TuiOverlayModal-CGyGkKYl.js} +1 -1
  119. package/web/dist/assets/{TuiOverlayModal-d6x9u25n.js → TuiOverlayModal-CpBKjG6x.js} +1 -1
  120. package/web/dist/assets/{desktop-YguLbrX1.js → desktop-7EvUHhKQ.js} +1 -1
  121. package/web/dist/assets/{fi-DaSO0Q-m.js → fi-NyN-ZrgD.js} +2 -2
  122. package/web/dist/assets/{index-D6u8xH0o.js → index-DK3F5ZJo.js} +50 -50
  123. package/web/dist/assets/{index-BPvpea8t.js → index-DQMii2he.js} +50 -50
  124. package/web/dist/assets/index-vwBnwzkr.css +1 -0
  125. package/web/dist/assets/{plugin-host-BRBg6zmQ.js → plugin-host-BCnX3P8U.js} +1 -1
  126. package/web/dist/assets/{theme-DDl-Oy1b.js → theme-D2DMH6tH.js} +1 -1
  127. package/web/dist/index.html +35 -35
  128. package/web/dist/sw.js +179 -179
  129. package/web/public/sw.js +179 -179
  130. package/web/dist/assets/index-DDZMv6LO.css +0 -1
@@ -1,1357 +1,1357 @@
1
- /* themes/bases/flow-base.css — 极简行文模式形态与排版基底
2
- * 包含:实体画布骨架、正文零边框无界微流排版、行内微胶囊深度思考与工具集群、
3
- * 双层悬浮输入岛、全自适应浮层与弹窗系统。
4
- *
5
- * 核心设计原则:
6
- * 1. 纯形态与排版:绝不硬编码任何具体色值(如 #ffffff、#141414、#000000);
7
- * 2. 颜色统一由语义变量(var(--text), var(--bg-elev), var(--border), var(--accent) 等)驱动;
8
- * 3. 半透明/微透光统一走 color-mix(in srgb, var(--text) X%, transparent) 自适应深浅主题;
9
- * 4. 所有主操作实底按钮统一走 var(--accent) + var(--accent-contrast, #fff)。
10
- */
11
-
12
- /* 能力声明:本主题要求「正文 + 胶囊」连成一条行内流(字级输入流)。
13
- 前端用 web/src/flow-mode.ts 探测这条属性来决定分组方式与容器外观,
14
- 于是渲染层不需要认识任何主题 id —— 自制主题声明同一条属性即可复用。 */
15
- :root {
16
- --flow-inline-stream: 1;
17
- }
18
-
19
- /* ========================================================
20
- 骨架与层级:实体暗调结构,利落细线分割
21
- ======================================================== */
22
- #root,
23
- .app,
24
- .layout,
25
- .view-pane,
26
- .main,
27
- .chat-view,
28
- .chat-scroll,
29
- .messages {
30
- background: var(--bg);
31
- }
32
-
33
- /* 输入栏与消息包裹层必须保持背景透明,确保快捷短语所在带子透出底层消息正文 */
34
- .messages-wrap,
35
- .inputbar {
36
- background: transparent;
37
- }
38
-
39
- .topbar {
40
- background: var(--topbar-bg, var(--bg-elev));
41
- border-bottom: 1px solid var(--border-soft);
42
- box-shadow: 0 1px 3px var(--sunken-bg, rgba(0, 0, 0, 0.15));
43
- backdrop-filter: none;
44
- -webkit-backdrop-filter: none;
45
- z-index: 50;
46
- }
47
-
48
- .footer-bar,
49
- .statusbar {
50
- background: var(--statusbar-bg, var(--bg-elev));
51
- border-top: 1px solid var(--border-soft);
52
- box-shadow: 0 -1px 3px var(--sunken-bg, rgba(0, 0, 0, 0.15));
53
- backdrop-filter: none;
54
- -webkit-backdrop-filter: none;
55
- z-index: 50;
56
- }
57
-
58
- .panel,
59
- .drawer-left .panel,
60
- .drawer-right .panel,
61
- .lp-panel {
62
- background: var(--panel-bg, var(--bg-elev));
63
- border-color: var(--border-soft);
64
- backdrop-filter: none;
65
- -webkit-backdrop-filter: none;
66
- box-shadow: none;
67
- }
68
-
69
- .panel-header,
70
- .lp-section-header,
71
- .panel-convs,
72
- .panel-sessions,
73
- .lp-group-title,
74
- .panel-body {
75
- background: transparent;
76
- }
77
-
78
- .lp-conv-row:hover,
79
- .lp-conv-row.active,
80
- .ft-row:hover,
81
- .panel-item:hover {
82
- background: var(--border-soft);
83
- border-radius: 8px;
84
- }
85
-
86
- /* 消除会话项激活与聚焦态的一切蓝色/紫蓝色外边框 */
87
- .session-item,
88
- .session-item.active,
89
- .session-item:hover,
90
- .session-item:focus,
91
- .session-item:focus-visible,
92
- .lp-row .session-item,
93
- .lp-row .session-item.active {
94
- border: none;
95
- outline: none;
96
- box-shadow: none;
97
- }
98
-
99
- .session-item.active,
100
- .lp-row .session-item.active {
101
- background: var(--border);
102
- color: var(--md-strong, var(--text));
103
- border: none;
104
- border-radius: 8px;
105
- padding: 8px 10px;
106
- }
107
-
108
- .session-item:hover,
109
- .lp-row .session-item:hover {
110
- background: color-mix(in srgb, var(--text) 5%, transparent);
111
- color: var(--md-strong, var(--text));
112
- border: none;
113
- border-radius: 8px;
114
- }
115
-
116
- .lp-section-header,
117
- .lp-section-title,
118
- .lp-section-title-text,
119
- .panel-section-title {
120
- color: var(--text-faint);
121
- font-size: 11px;
122
- text-transform: uppercase;
123
- letter-spacing: 0.05em;
124
- font-weight: 600;
125
- }
126
-
127
- .lp-conv-title,
128
- .lp-conv-row {
129
- color: var(--control-fg, var(--text));
130
- }
131
- .lp-conv-row:hover .lp-conv-title,
132
- .lp-conv-row.active .lp-conv-title {
133
- color: var(--md-strong, var(--text));
134
- }
135
-
136
- /* ========================================================
137
- 核心:极简行文(Flow)—— 正文零气泡外壳、零边框、极致紧凑排版
138
- ======================================================== */
139
- .messages {
140
- padding-top: 6px;
141
- padding-bottom: calc(48px + var(--quick-row-h, 0px));
142
- }
143
-
144
- .msg {
145
- background: transparent;
146
- border: none;
147
- box-shadow: none;
148
- margin: 4px 0;
149
- padding: 0;
150
- }
151
-
152
- .msg-assistant {
153
- margin: 8px 0;
154
- padding: 0;
155
- }
156
-
157
- /* 助手正文主体:完全透明无外框无圆角无遮挡,如字书印于深曜画布上 */
158
- .msg-assistant .msg-body {
159
- background: transparent;
160
- border: none;
161
- border-radius: 0;
162
- box-shadow: none;
163
- backdrop-filter: none;
164
- -webkit-backdrop-filter: none;
165
- overflow: visible;
166
- display: block;
167
- padding: 0;
168
- margin: 0;
169
- line-height: 1.62;
170
- letter-spacing: 0.012em;
171
- font-size: 14px;
172
- color: var(--text);
173
- word-break: break-word;
174
- }
175
-
176
- .msg-text,
177
- .msg-assistant .msg-text {
178
- background: transparent;
179
- border: none;
180
- box-shadow: none;
181
- padding: 0;
182
- margin: 0;
183
- }
184
-
185
- /* 正文排版:段间距、行高、列表间隙微调,彻底消灭笨重留白 */
186
- .msg-body p {
187
- margin: 0.36em 0;
188
- line-height: 1.62;
189
- }
190
- .msg-body p:first-child {
191
- margin-top: 0;
192
- }
193
- .msg-body p:last-child {
194
- margin-bottom: 0;
195
- }
196
-
197
- .msg-body ul,
198
- .msg-body ol {
199
- margin: 0.25em 0;
200
- padding-left: 1.25em;
201
- }
202
-
203
- .msg-body li {
204
- margin: 0.12em 0;
205
- line-height: 1.58;
206
- }
207
- .msg-body li > p {
208
- margin: 0;
209
- display: inline;
210
- }
211
-
212
- .msg-body h1,
213
- .msg-body h2,
214
- .msg-body h3,
215
- .msg-body h4,
216
- .msg-body h5,
217
- .msg-body h6 {
218
- margin: 0.55em 0 0.22em 0;
219
- line-height: 1.35;
220
- font-weight: 600;
221
- color: var(--md-strong, var(--text));
222
- }
223
- .msg-body h1:first-child,
224
- .msg-body h2:first-child,
225
- .msg-body h3:first-child,
226
- .msg-body h4:first-child {
227
- margin-top: 0;
228
- }
229
-
230
- .msg-body blockquote {
231
- background: transparent;
232
- border: none;
233
- border-left: 2px solid color-mix(in srgb, var(--text) 22%, transparent);
234
- margin: 0.35em 0;
235
- padding: 2px 0 2px 10px;
236
- color: var(--text-dim);
237
- }
238
-
239
- .msg-body hr {
240
- margin: 0.5em 0;
241
- border: none;
242
- border-top: 1px solid var(--border);
243
- }
244
-
245
- .msg-body table {
246
- background: transparent;
247
- border-collapse: collapse;
248
- border: 1px solid var(--border);
249
- margin: 0.4em 0;
250
- font-size: 13.5px;
251
- }
252
-
253
- .msg-body th,
254
- .msg-body td {
255
- background: transparent;
256
- border: 1px solid var(--border-soft);
257
- padding: 4px 8px;
258
- }
259
-
260
- .msg-body code:not(pre code) {
261
- background: var(--border-soft);
262
- border: 1px solid var(--border);
263
- border-radius: 4px;
264
- padding: 1px 4px;
265
- font-size: 12.5px;
266
- color: var(--text);
267
- }
268
-
269
- .msg-body pre {
270
- background: var(--code-bg);
271
- border: 1px solid var(--border);
272
- border-radius: 10px;
273
- margin: 0.42em 0;
274
- padding: 10px 14px;
275
- line-height: 1.45;
276
- font-size: 13px;
277
- }
278
-
279
- /* 工具调用与深度思考:Apple Vision 液态毛玻璃亚克力呼吸晶体微胶囊 */
280
- .toolcall,
281
- .thinking {
282
- display: inline-flex;
283
- align-items: center;
284
- justify-content: center;
285
- vertical-align: middle;
286
- box-sizing: border-box;
287
- width: auto;
288
- min-width: 0;
289
- max-width: fit-content;
290
- flex: 0 0 auto;
291
- flex-shrink: 0;
292
- height: 23px;
293
- line-height: 21px;
294
- margin: 0;
295
- padding: 0 8px;
296
- background: color-mix(in srgb, var(--text) 5%, transparent);
297
- border: 1px solid var(--border);
298
- border-radius: 999px;
299
- font-family: var(--mono, monospace);
300
- font-size: 11px;
301
- font-weight: 500;
302
- cursor: pointer;
303
- white-space: nowrap;
304
- box-shadow:
305
- inset 0 0.5px 0.5px color-mix(in srgb, var(--text) 22%, transparent),
306
- 0 2px 5px rgba(0, 0, 0, 0.35);
307
- backdrop-filter: blur(12px) saturate(140%);
308
- -webkit-backdrop-filter: blur(12px) saturate(140%);
309
- transition:
310
- background 0.15s cubic-bezier(0.16, 1, 0.3, 1),
311
- border-color 0.15s cubic-bezier(0.16, 1, 0.3, 1),
312
- box-shadow 0.15s cubic-bezier(0.16, 1, 0.3, 1);
313
- overflow: hidden;
314
- contain: layout paint;
315
- user-select: none;
316
- text-decoration: none;
317
- }
318
-
319
- .toolcall:hover,
320
- .thinking:hover {
321
- background: var(--border);
322
- border-color: color-mix(in srgb, var(--text) 22%, transparent);
323
- box-shadow:
324
- inset 0 1px 1px rgba(255, 255, 255, 0.35),
325
- 0 4px 10px rgba(0, 0, 0, 0.45);
326
- transform: translateY(-1px);
327
- transition:
328
- background 0.15s cubic-bezier(0.16, 1, 0.3, 1),
329
- border-color 0.15s cubic-bezier(0.16, 1, 0.3, 1),
330
- box-shadow 0.15s cubic-bezier(0.16, 1, 0.3, 1),
331
- transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
332
- }
333
-
334
- /* 状态氛围点睛 */
335
- .toolcall.run {
336
- border-color: rgba(245, 158, 11, 0.45);
337
- box-shadow:
338
- inset 0 0.5px 0.5px rgba(255, 255, 255, 0.25),
339
- 0 0 10px rgba(245, 158, 11, 0.25);
340
- }
341
- .toolcall.ok {
342
- border-color: rgba(52, 211, 153, 0.25);
343
- }
344
- .toolcall.err {
345
- border-color: rgba(248, 113, 113, 0.45);
346
- box-shadow:
347
- inset 0 0.5px 0.5px rgba(255, 255, 255, 0.25),
348
- 0 0 10px rgba(239, 68, 68, 0.25);
349
- }
350
-
351
- .thinking {
352
- border-color: rgba(192, 132, 252, 0.25);
353
- }
354
- .thinking:hover {
355
- border-color: rgba(192, 132, 252, 0.45);
356
- }
357
- .thinking.run {
358
- border-color: rgba(192, 132, 252, 0.5);
359
- box-shadow:
360
- inset 0 0.5px 0.5px rgba(255, 255, 255, 0.25),
361
- 0 0 10px rgba(192, 132, 252, 0.25);
362
- }
363
-
364
- /* 隐藏流内大图缩略图(由点击居中弹窗展示大图) */
365
- .toolcall-images,
366
- .toolcall-image,
367
- .toolcall .toolcall-images {
368
- display: none;
369
- }
370
-
371
- /* 卡头:自适应内容宽度,严格水平对齐 */
372
- .toolcall .toolcall-head,
373
- .toolcall .chead,
374
- .thinking .chead {
375
- display: inline-flex;
376
- align-items: center;
377
- justify-content: center;
378
- vertical-align: middle;
379
- box-sizing: border-box;
380
- width: auto;
381
- min-width: 0;
382
- max-width: fit-content;
383
- min-height: unset;
384
- height: 100%;
385
- padding: 0;
386
- margin: 0;
387
- border: none;
388
- border-top: none;
389
- border-bottom: none;
390
- background: transparent;
391
- gap: 4px;
392
- box-shadow: none;
393
- line-height: 1;
394
- flex: 0 0 auto;
395
- flex-shrink: 0;
396
- white-space: nowrap;
397
- }
398
-
399
- /* 隐藏原地折叠、复制、长命令与长路径等干扰元素 */
400
- .toolcall .chead-toggle,
401
- .toolcall .toolcall-toggle,
402
- .toolcall .toolcall-spacer,
403
- .toolcall .chead-copy,
404
- .toolcall .toolcall-copy,
405
- .toolcall .toolcall-path,
406
- .toolcall .toolcall-cmd,
407
- .toolcall .toolcall-query,
408
- .toolcall .toolcall-timeout,
409
- .toolcall .toolcall-agent,
410
- .toolcall .toolcall-open,
411
- .toolcall .toolcall-kill,
412
- .toolcall .toolcall-duration,
413
- .thinking .chead-toggle,
414
- .thinking .thinking-toggle,
415
- .thinking .chead-copy,
416
- .thinking .thinking-copy,
417
- .thinking .thinking-spacer,
418
- .thinking .thinking-summary-text,
419
- .thinking .thinking-preview-live,
420
- .thinking .thinking-preview-viewport,
421
- .thinking .thinking-preview-track,
422
- .thinking .thinking-preview-prefix,
423
- .thinking .thinking-live-label,
424
- .thinking-summary {
425
- display: none;
426
- }
427
-
428
- .chead-icon,
429
- .chead-icon.thinking-icon,
430
- .chead-icon.toolcall-icon,
431
- .toolcall-icon,
432
- .toolcall-head svg,
433
- .thinking-icon,
434
- .thinking svg {
435
- display: inline-flex;
436
- align-items: center;
437
- justify-content: center;
438
- width: 12px;
439
- height: 12px;
440
- padding: 0;
441
- margin: 0;
442
- border-radius: 0;
443
- background: transparent;
444
- flex: none;
445
- opacity: 0.85;
446
- font-size: 10px;
447
- }
448
-
449
- .toolcall-name,
450
- .chead-title.toolcall-name,
451
- .thinking-name,
452
- .thinking-label,
453
- .chead-title.thinking-label {
454
- display: inline-flex;
455
- align-items: center;
456
- justify-content: center;
457
- line-height: 1;
458
- font-size: 11px;
459
- font-weight: 500;
460
- color: #f1f5f9;
461
- padding: 0;
462
- margin: 0;
463
- flex: none;
464
- min-width: unset;
465
- max-width: unset;
466
- letter-spacing: 0.02em;
467
- }
468
-
469
- .thinking .thinking-name {
470
- color: #f1f5f9;
471
- }
472
- .thinking .thinking-icon,
473
- .thinking .thinking-status {
474
- color: #c084fc;
475
- filter: drop-shadow(0 0 4px rgba(192, 132, 252, 0.75));
476
- }
477
-
478
- /* 语义化工具微光宝石呼吸灯 */
479
- .toolcall-icon.tc-tone-exec {
480
- color: #38bdf8;
481
- filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.75));
482
- }
483
- .toolcall-icon.tc-tone-read,
484
- .toolcall-icon.tc-tone-search {
485
- color: #34d399;
486
- filter: drop-shadow(0 0 4px rgba(52, 211, 153, 0.75));
487
- }
488
- .toolcall-icon.tc-tone-edit {
489
- color: #fbbf24;
490
- filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.75));
491
- }
492
- .toolcall-icon.tc-tone-code {
493
- color: #e879f9;
494
- filter: drop-shadow(0 0 4px rgba(232, 121, 249, 0.75));
495
- }
496
- .toolcall-icon.tc-tone-agent {
497
- color: #f87171;
498
- filter: drop-shadow(0 0 4px rgba(248, 113, 113, 0.75));
499
- }
500
-
501
- .toolcall.ok .toolcall-status {
502
- color: #34d399;
503
- filter: drop-shadow(0 0 3px rgba(52, 211, 153, 0.6));
504
- }
505
- .toolcall.err .toolcall-status {
506
- color: #f87171;
507
- filter: drop-shadow(0 0 4px rgba(248, 113, 113, 0.8));
508
- }
509
-
510
- .toolcall-status,
511
- .thinking-status {
512
- display: inline-flex;
513
- align-items: center;
514
- justify-content: center;
515
- vertical-align: middle;
516
- width: 11px;
517
- height: 11px;
518
- font-size: 9px;
519
- flex: none;
520
- margin: 0;
521
- padding: 0;
522
- }
523
- .toolcall-status > svg,
524
- .toolcall-status svg,
525
- .thinking-status > svg,
526
- .thinking-status svg {
527
- width: 10px;
528
- height: 10px;
529
- margin: 0;
530
- padding: 0;
531
- }
532
- .thinking-status .spin,
533
- .toolcall-status .spin,
534
- .toolcall-status .half-ring-spin,
535
- .thinking-status .half-ring-spin,
536
- .toolcall.run .toolcall-status svg,
537
- .toolcall.run .toolcall-status-icon svg {
538
- animation: spin 0.85s linear infinite;
539
- transform-origin: center center;
540
- }
541
-
542
- /* 输出徽标:图片 🖼️、Markdown 📝 等行内小微标 */
543
- .toolcall-out-badge {
544
- display: inline-flex;
545
- align-items: center;
546
- justify-content: center;
547
- vertical-align: middle;
548
- width: 11px;
549
- height: 11px;
550
- font-size: 9.5px;
551
- margin: 0;
552
- padding: 0;
553
- flex: none;
554
- opacity: 0.85;
555
- }
556
- .toolcall-out-badge.img {
557
- color: #3b82f6;
558
- }
559
- .toolcall-out-badge.md {
560
- color: #a78bfa;
561
- }
562
- .toolcall-out-badge svg {
563
- width: 10px;
564
- height: 10px;
565
- margin: 0;
566
- padding: 0;
567
- }
568
-
569
- /* 附件也是一个“字”:混排在同一输入流中,外边距清零由 gap 管理 */
570
- .msg-queued-atts-bar {
571
- display: inline-flex;
572
- align-items: center;
573
- gap: 6px;
574
- margin: 0;
575
- padding: 0;
576
- }
577
- .queued-att-chip,
578
- .attach-chip {
579
- display: inline-flex;
580
- align-items: center;
581
- vertical-align: middle;
582
- box-sizing: border-box;
583
- height: 22px;
584
- line-height: 20px;
585
- margin: 0;
586
- padding: 0 7px;
587
- font-size: 11px;
588
- border-radius: 6px;
589
- background: var(--code-bg);
590
- border: 1px solid var(--border);
591
- color: var(--control-fg, var(--text));
592
- }
593
-
594
- /* 正文自成段落倾泻,与上方工具流保持舒适间距。
595
- 注意:正文块必须保持块级 —— 用户要的是「正文前后都断行,只有连续胶囊才连排」,
596
- 行内化正文会把它和胶囊焊在同一行,那就又乱了。 */
597
- .msg-assistant .msg-text {
598
- display: block;
599
- padding: 0;
600
- margin: 8px 0 0 0;
601
- }
602
- /* 单行正文保持「正文 + 复制键」的同一条 flex 行(仍是块级:前后照样断行),
603
- 否则复制键会被挤到正文下面单独占一行。 */
604
- .msg-assistant .msg-text.single {
605
- display: flex;
606
- }
607
- .msg-assistant .msg-text > .markdown {
608
- display: inline;
609
- }
610
- .msg-assistant .msg-text > .markdown > p:first-child {
611
- display: inline;
612
- margin: 0;
613
- }
614
-
615
- /* 彻底隐藏原地展开内容,点击由居中检查器弹窗接管 */
616
- .toolcall-body,
617
- .thinking-body {
618
- display: none;
619
- }
620
-
621
- .msg-actions {
622
- opacity: 0.3;
623
- margin-top: 2px;
624
- transition: opacity 0.15s ease;
625
- }
626
- .msg-assistant:hover .msg-actions,
627
- .msg-user:hover .msg-actions {
628
- opacity: 1;
629
- }
630
-
631
- /* ========================================================
632
- 用户消息气泡:克制典雅的暗炭微卡片(无边框纯净融合)
633
- ======================================================== */
634
- .msg-user {
635
- background: transparent;
636
- box-shadow: none;
637
- margin: 6px 0 2px 0;
638
- }
639
-
640
- .msg-user .msg-body {
641
- background: var(--card-bg, var(--bg-elev));
642
- border: none;
643
- border-radius: 14px;
644
- padding: 8px 14px;
645
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
646
- backdrop-filter: none;
647
- -webkit-backdrop-filter: none;
648
- color: var(--text);
649
- }
650
-
651
- /* ========================================================
652
- 输入框与控件(复刻 OpenAI Codex 桌面悬浮岛)
653
- ======================================================== */
654
- .inputbox {
655
- background: var(--card-bg, var(--bg-elev));
656
- border: 1px solid var(--border);
657
- border-radius: 18px;
658
- box-shadow:
659
- 0 4px 24px rgba(0, 0, 0, 0.45),
660
- 0 1px 2px rgba(0, 0, 0, 0.3);
661
- backdrop-filter: none;
662
- -webkit-backdrop-filter: none;
663
- transition:
664
- border-color 0.2s ease,
665
- box-shadow 0.2s ease;
666
- }
667
-
668
- .inputbox:focus-within {
669
- border-color: rgba(255, 255, 255, 0.2);
670
- box-shadow:
671
- 0 6px 32px rgba(0, 0, 0, 0.55),
672
- 0 0 0 1px var(--border);
673
- }
674
-
675
- .inputbox textarea {
676
- background: transparent;
677
- color: var(--md-strong, var(--text));
678
- }
679
-
680
- .composer-tools,
681
- .composer-tools-left,
682
- .composer-tools-center,
683
- .composer-tools-right {
684
- color: var(--text-dim);
685
- }
686
-
687
- .composer-tools .chip {
688
- background: #181818;
689
- border: 1px solid var(--border);
690
- color: var(--control-fg, var(--text));
691
- box-shadow: none;
692
- border-radius: 12px;
693
- transition:
694
- background 0.15s ease,
695
- border-color 0.15s ease,
696
- color 0.15s ease;
697
- }
698
-
699
- .composer-tools .chip:hover {
700
- background: #282828;
701
- border-color: rgba(255, 255, 255, 0.16);
702
- color: var(--md-strong, var(--text));
703
- }
704
-
705
- .composer-tools .chip > span,
706
- .composer-tools .chip > span.chip-model,
707
- .composer-tools .chip > span.chip-sub,
708
- .composer-tools .chip-sub {
709
- color: var(--control-fg, var(--text));
710
- opacity: 0.95;
711
- }
712
-
713
- .inputbox .composer-tools-left button:hover,
714
- .inputbox .btn.composer-plugin-action:hover,
715
- .inputbox .composer-tools-left .btn:hover {
716
- background: var(--border);
717
- }
718
-
719
- .composer-tools .chip,
720
- .composer-tools .chip:hover,
721
- .composer-tools .dropdown > button,
722
- .composer-tools .dropdown > button:hover,
723
- .dropdown > button.chip,
724
- .dropdown > button.chip:hover {
725
- border-radius: 12px;
726
- }
727
-
728
- .inputbox .btn.send {
729
- background: var(--accent);
730
- border-color: var(--accent);
731
- color: var(--accent-contrast, #fff);
732
- border-radius: 50%;
733
- width: 32px;
734
- height: 32px;
735
- min-width: 32px;
736
- padding: 0;
737
- display: inline-flex;
738
- align-items: center;
739
- justify-content: center;
740
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
741
- }
742
- .inputbox .btn.send svg {
743
- stroke: var(--accent-contrast, #fff);
744
- color: var(--accent-contrast, #fff);
745
- stroke-width: 2.5;
746
- }
747
- .inputbox .btn.send:hover:not(:disabled) {
748
- background: var(--accent);
749
- border-color: var(--accent);
750
- color: var(--accent-contrast, #fff);
751
- opacity: 0.92;
752
- box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 30%, transparent);
753
- transform: translateY(-1px);
754
- }
755
- .inputbox .btn.send:disabled {
756
- opacity: 0.35;
757
- box-shadow: none;
758
- cursor: default;
759
- }
760
- .inputbox .btn.send:disabled svg {
761
- stroke: var(--accent-contrast, #fff);
762
- color: var(--accent-contrast, #fff);
763
- }
764
-
765
- .inputbox .split-send {
766
- background: var(--accent);
767
- border-color: var(--accent);
768
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
769
- border-radius: 18px;
770
- }
771
- .inputbox .split-send button {
772
- color: var(--accent-contrast, #fff);
773
- }
774
- .inputbox .split-send button svg {
775
- stroke: var(--accent-contrast, #fff);
776
- color: var(--accent-contrast, #fff);
777
- }
778
- .inputbox .split-send .split-queue {
779
- background: color-mix(in srgb, var(--accent-contrast, #000) 10%, transparent);
780
- }
781
- .inputbox .split-send button + button {
782
- border-left: 1px solid rgba(0, 0, 0, 0.15);
783
- }
784
- .inputbox .split-send:hover {
785
- background: #f4f4f4;
786
- border-color: var(--md-strong, var(--text));
787
- box-shadow: 0 0 14px rgba(255, 255, 255, 0.3);
788
- }
789
- .inputbox .split-send button:hover:not(:disabled) {
790
- background: rgba(0, 0, 0, 0.08);
791
- }
792
-
793
- /* 快捷指令/快捷短语胶囊:悬浮、背景透明、磨砂毛玻璃浮空质感 */
794
- .quick-chip {
795
- background: rgba(33, 33, 33, 0.48);
796
- border: 1px solid var(--border);
797
- border-radius: 999px;
798
- box-shadow:
799
- 0 4px 16px rgba(0, 0, 0, 0.28),
800
- 0 1px 3px rgba(0, 0, 0, 0.2),
801
- inset 0 1px 0 var(--border);
802
- backdrop-filter: blur(14px) saturate(140%);
803
- -webkit-backdrop-filter: blur(14px) saturate(140%);
804
- color: #e0e0e0;
805
- transition:
806
- transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
807
- box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1),
808
- border-color 0.18s ease,
809
- background 0.18s ease,
810
- color 0.18s ease;
811
- }
812
-
813
- .quick-chip:hover:not(:disabled) {
814
- transform: translateY(-2px);
815
- background: rgba(45, 45, 45, 0.72);
816
- border-color: rgba(255, 255, 255, 0.28);
817
- box-shadow:
818
- 0 8px 24px rgba(0, 0, 0, 0.42),
819
- 0 2px 6px rgba(0, 0, 0, 0.25),
820
- inset 0 1px 0 color-mix(in srgb, var(--text) 14%, transparent);
821
- color: var(--md-strong, var(--text));
822
- }
823
-
824
- .quick-chip:active:not(:disabled) {
825
- transform: translateY(0) scale(0.97);
826
- box-shadow:
827
- 0 2px 8px rgba(0, 0, 0, 0.24),
828
- inset 0 1px 0 color-mix(in srgb, var(--text) 5%, transparent);
829
- }
830
-
831
- /* 底部候选操作建议(同属快捷指令交互):悬浮透明毛玻璃 */
832
- .action-suggestion-chip {
833
- background: rgba(33, 33, 33, 0.48);
834
- border: 1px solid var(--border);
835
- border-radius: 999px;
836
- box-shadow:
837
- 0 4px 16px rgba(0, 0, 0, 0.28),
838
- 0 1px 3px rgba(0, 0, 0, 0.2),
839
- inset 0 1px 0 var(--border);
840
- backdrop-filter: blur(14px) saturate(140%);
841
- -webkit-backdrop-filter: blur(14px) saturate(140%);
842
- color: #e0e0e0;
843
- transition:
844
- transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
845
- box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1),
846
- border-color 0.18s ease,
847
- background 0.18s ease,
848
- color 0.18s ease;
849
- }
850
-
851
- .action-suggestion-chip:hover:not(:disabled) {
852
- transform: translateY(-2px);
853
- background: rgba(45, 45, 45, 0.72);
854
- border-color: rgba(255, 255, 255, 0.28);
855
- box-shadow:
856
- 0 8px 24px rgba(0, 0, 0, 0.42),
857
- 0 2px 6px rgba(0, 0, 0, 0.25),
858
- inset 0 1px 0 color-mix(in srgb, var(--text) 14%, transparent);
859
- color: var(--md-strong, var(--text));
860
- }
861
-
862
- .action-suggestion-chip:active:not(:disabled) {
863
- transform: translateY(0) scale(0.97);
864
- }
865
-
866
- /* 浮层与弹窗 */
867
- .dd-menu,
868
- .ctx-menu,
869
- .pm-panel,
870
- .modal-dialog {
871
- background: var(--card-bg, var(--bg-elev));
872
- border: 1px solid var(--border);
873
- box-shadow:
874
- 0 16px 40px rgba(0, 0, 0, 0.65),
875
- inset 0 1px 0 color-mix(in srgb, var(--text) 4%, transparent);
876
- }
877
-
878
- [data-pi-floating-panel],
879
- .floating-panel {
880
- background: var(--card-bg, var(--bg-elev));
881
- border: 1px solid var(--border);
882
- box-shadow:
883
- 0 12px 32px rgba(0, 0, 0, 0.55),
884
- inset 0 1px 0 color-mix(in srgb, var(--text) 4%, transparent);
885
- color: var(--text);
886
- }
887
-
888
- /* ---------------- 工具详情检查器弹窗(Tool Inspector Modal) ---------------- */
889
- .pi-we-inspector-backdrop {
890
- position: fixed;
891
- inset: 0;
892
- z-index: 100000;
893
- background: var(--sunken-bg, rgba(4, 6, 12, 0.72));
894
- backdrop-filter: blur(10px) saturate(120%);
895
- -webkit-backdrop-filter: blur(10px) saturate(120%);
896
- display: flex;
897
- align-items: center;
898
- justify-content: center;
899
- padding: 20px;
900
- opacity: 0;
901
- pointer-events: none;
902
- transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
903
- }
904
-
905
- .pi-we-inspector-backdrop.open {
906
- opacity: 1;
907
- pointer-events: auto;
908
- }
909
-
910
- .pi-we-inspector-dialog {
911
- position: relative;
912
- width: 760px;
913
- max-width: 92vw;
914
- max-height: 82vh;
915
- display: flex;
916
- flex-direction: column;
917
- background: var(--card-bg, var(--bg-elev));
918
- border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
919
- border-radius: 14px;
920
- box-shadow:
921
- 0 20px 50px rgba(0, 0, 0, 0.85),
922
- 0 0 20px var(--border);
923
- color: var(--text);
924
- font-family:
925
- system-ui,
926
- -apple-system,
927
- sans-serif;
928
- overflow: hidden;
929
- transform: scale(0.96) translateY(10px);
930
- transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
931
- }
932
-
933
- .pi-we-inspector-backdrop.open .pi-we-inspector-dialog {
934
- transform: scale(1) translateY(0);
935
- }
936
-
937
- .pi-we-inspector-header {
938
- display: flex;
939
- align-items: center;
940
- justify-content: space-between;
941
- padding: 12px 18px;
942
- background: var(--bg-elev2, var(--bg-elev));
943
- border-bottom: 1px solid var(--border);
944
- gap: 12px;
945
- flex-shrink: 0;
946
- }
947
-
948
- .pi-we-inspector-title-group {
949
- display: flex;
950
- align-items: center;
951
- gap: 8px;
952
- min-width: 0;
953
- }
954
-
955
- .pi-we-inspector-icon {
956
- width: 24px;
957
- height: 24px;
958
- border-radius: 6px;
959
- background: color-mix(in srgb, var(--text) 10%, transparent);
960
- display: flex;
961
- align-items: center;
962
- justify-content: center;
963
- font-size: 13px;
964
- color: var(--text);
965
- flex-shrink: 0;
966
- }
967
-
968
- .pi-we-inspector-title {
969
- font-family: var(--mono, monospace);
970
- font-weight: 700;
971
- font-size: 14.5px;
972
- color: var(--text);
973
- white-space: nowrap;
974
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
975
- }
976
-
977
- .pi-we-inspector-badge {
978
- font-family: var(--mono, monospace);
979
- font-size: 11px;
980
- padding: 2px 7px;
981
- border-radius: 4px;
982
- background: color-mix(in srgb, var(--text) 8%, transparent);
983
- border: 1px solid rgba(255, 255, 255, 0.15);
984
- color: var(--text-dim);
985
- white-space: nowrap;
986
- }
987
-
988
- .pi-we-inspector-badge.ok {
989
- background: rgba(74, 222, 128, 0.15);
990
- border-color: rgba(74, 222, 128, 0.4);
991
- color: var(--green);
992
- }
993
-
994
- .pi-we-inspector-badge.run {
995
- background: rgba(251, 191, 36, 0.15);
996
- border-color: rgba(251, 191, 36, 0.4);
997
- color: var(--amber);
998
- }
999
-
1000
- .pi-we-inspector-badge.err {
1001
- background: rgba(248, 113, 113, 0.15);
1002
- border-color: rgba(248, 113, 113, 0.4);
1003
- color: var(--red-text);
1004
- }
1005
-
1006
- .pi-we-inspector-actions {
1007
- display: flex;
1008
- align-items: center;
1009
- gap: 8px;
1010
- flex-shrink: 0;
1011
- }
1012
-
1013
- .pi-we-inspector-btn {
1014
- background: color-mix(in srgb, var(--text) 8%, transparent);
1015
- border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
1016
- border-radius: 6px;
1017
- color: var(--text);
1018
- font-size: 12px;
1019
- padding: 5px 10px;
1020
- cursor: pointer;
1021
- display: inline-flex;
1022
- align-items: center;
1023
- gap: 5px;
1024
- transition: all 0.15s ease;
1025
- text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
1026
- }
1027
-
1028
- .pi-we-inspector-btn:hover {
1029
- background: color-mix(in srgb, var(--text) 16%, transparent);
1030
- border-color: rgba(255, 255, 255, 0.35);
1031
- color: var(--text);
1032
- }
1033
-
1034
- .pi-we-inspector-close {
1035
- padding: 5px 8px;
1036
- font-size: 14px;
1037
- line-height: 1;
1038
- }
1039
-
1040
- .pi-we-inspector-body {
1041
- flex: 1;
1042
- overflow-y: auto;
1043
- overscroll-behavior: contain;
1044
- padding: 16px 20px 24px;
1045
- display: flex;
1046
- flex-direction: column;
1047
- gap: 16px;
1048
- }
1049
-
1050
- .pi-we-inspector-section {
1051
- display: flex;
1052
- flex-direction: column;
1053
- gap: 6px;
1054
- }
1055
-
1056
- .pi-we-inspector-label {
1057
- font-size: 12px;
1058
- font-weight: 600;
1059
- color: #94a3b8;
1060
- text-transform: uppercase;
1061
- letter-spacing: 0.05em;
1062
- display: flex;
1063
- align-items: center;
1064
- gap: 6px;
1065
- }
1066
-
1067
- .pi-we-inspector-codeblock {
1068
- background: rgba(4, 6, 12, 0.85);
1069
- border: 1px solid var(--border);
1070
- border-radius: 8px;
1071
- padding: 12px 14px;
1072
- font-family: var(--mono, monospace);
1073
- font-size: 12.5px;
1074
- line-height: 1.55;
1075
- color: var(--text);
1076
- white-space: pre-wrap;
1077
- word-break: break-all;
1078
- overflow-x: auto;
1079
- max-height: 40vh;
1080
- margin: 0;
1081
- text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9);
1082
- }
1083
-
1084
- .pi-we-inspector-thinking-text {
1085
- background: rgba(18, 14, 28, 0.65);
1086
- border: 1px solid rgba(168, 85, 247, 0.25);
1087
- border-radius: 8px;
1088
- padding: 14px 16px;
1089
- font-size: 13.5px;
1090
- line-height: 1.68;
1091
- color: var(--text);
1092
- white-space: pre-wrap;
1093
- word-break: break-word;
1094
- max-height: 55vh;
1095
- overflow-y: auto;
1096
- margin: 0;
1097
- text-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.9);
1098
- }
1099
-
1100
- /* 富媒体文件展示预览(针对 present_files 与文件交付) */
1101
- .pi-we-ins-preview-wrap {
1102
- display: flex;
1103
- flex-direction: column;
1104
- gap: 12px;
1105
- }
1106
-
1107
- .pi-we-ins-preview-meta {
1108
- background: color-mix(in srgb, var(--text) 4%, transparent);
1109
- border: 1px solid var(--border);
1110
- border-radius: 8px;
1111
- padding: 12px 14px;
1112
- display: flex;
1113
- flex-direction: column;
1114
- gap: 6px;
1115
- }
1116
-
1117
- .pi-we-ins-preview-title {
1118
- font-size: 14px;
1119
- font-weight: 600;
1120
- color: var(--text);
1121
- display: flex;
1122
- align-items: center;
1123
- gap: 6px;
1124
- }
1125
-
1126
- .pi-we-ins-preview-note {
1127
- font-size: 12.5px;
1128
- line-height: 1.55;
1129
- color: var(--text-dim);
1130
- word-break: break-word;
1131
- }
1132
-
1133
- .pi-we-ins-preview-card {
1134
- background: color-mix(in srgb, var(--text) 5%, transparent);
1135
- border: 1px solid var(--border);
1136
- border-radius: 10px;
1137
- padding: 12px 14px;
1138
- display: flex;
1139
- flex-direction: column;
1140
- gap: 10px;
1141
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
1142
- }
1143
-
1144
- .pi-we-ins-preview-head {
1145
- display: flex;
1146
- align-items: center;
1147
- justify-content: space-between;
1148
- gap: 10px;
1149
- }
1150
-
1151
- .pi-we-ins-preview-info {
1152
- display: flex;
1153
- align-items: center;
1154
- gap: 8px;
1155
- min-width: 0;
1156
- }
1157
-
1158
- .pi-we-ins-preview-icon {
1159
- font-size: 18px;
1160
- line-height: 1;
1161
- }
1162
-
1163
- .pi-we-ins-preview-name {
1164
- font-family: var(--mono, monospace);
1165
- font-size: 13px;
1166
- font-weight: 600;
1167
- color: var(--text);
1168
- white-space: nowrap;
1169
- overflow: hidden;
1170
- text-overflow: ellipsis;
1171
- }
1172
-
1173
- .pi-we-ins-preview-caption {
1174
- font-size: 11.5px;
1175
- color: var(--text-dim);
1176
- white-space: nowrap;
1177
- overflow: hidden;
1178
- text-overflow: ellipsis;
1179
- }
1180
-
1181
- .pi-we-ins-preview-actions {
1182
- display: flex;
1183
- align-items: center;
1184
- gap: 6px;
1185
- flex-shrink: 0;
1186
- }
1187
-
1188
- .pi-we-ins-btn-sm {
1189
- background: color-mix(in srgb, var(--text) 8%, transparent);
1190
- border: 1px solid rgba(255, 255, 255, 0.15);
1191
- border-radius: 4px;
1192
- color: var(--text);
1193
- font-size: 11px;
1194
- padding: 3px 7px;
1195
- cursor: pointer;
1196
- text-decoration: none;
1197
- display: inline-flex;
1198
- align-items: center;
1199
- gap: 4px;
1200
- transition: all 0.15s ease;
1201
- }
1202
-
1203
- .pi-we-ins-btn-sm:hover {
1204
- background: color-mix(in srgb, var(--text) 18%, transparent);
1205
- border-color: rgba(255, 255, 255, 0.3);
1206
- }
1207
-
1208
- .pi-we-ins-preview-media {
1209
- width: 100%;
1210
- display: flex;
1211
- justify-content: center;
1212
- align-items: center;
1213
- background: rgba(0, 0, 0, 0.35);
1214
- border-radius: 6px;
1215
- padding: 8px;
1216
- overflow: hidden;
1217
- }
1218
-
1219
- .pi-we-ins-preview-img {
1220
- max-width: 100%;
1221
- max-height: 380px;
1222
- object-fit: contain;
1223
- border-radius: 4px;
1224
- }
1225
-
1226
- .pi-we-ins-preview-audio {
1227
- width: 100%;
1228
- height: 36px;
1229
- }
1230
-
1231
- .pi-we-ins-preview-video {
1232
- max-width: 100%;
1233
- max-height: 380px;
1234
- border-radius: 4px;
1235
- background: #000;
1236
- }
1237
-
1238
- /* 角标防白底白字:当 --accent 为纯白时,顶栏实体胶囊角标反色为深色,后台任务保持红底白字(底栏透明徽标保持 var(--accent) 纯白高亮) */
1239
- .topbar .bar-item-badge:not(.bg-task-badge) {
1240
- color: #000000;
1241
- }
1242
-
1243
- /* ========================================================
1244
- 字级输入流系统(Character-Level Inline Stream)
1245
- --------------------------------------------------------
1246
- 一个回合的全部助手产出装进同一个 .flow-turn —— 一个弹性行流容器:
1247
- · 胶囊(.toolcall / .thinking / .thinking-wait):行内项,横排、满了换行,
1248
- 同一行 align-items:center + 统一 22px 高度 → 永远互相对齐;
1249
- · 其余内容(正文 / 附件 / 报错 / 折叠卡):100% 宽项 → 独占整行,正文前后必断行;
1250
- · 间距单源:容器 gap(行列同值)+ 正文项外边距,不让每个元素各自 margin 打架。
1251
-
1252
- ⚠ 为什么这里不再需要 `#root` 前缀(原先为了压过基线而加的 ID 权重已撤销):
1253
- 全项目样式改为显式分层(`@layer guard, base, theme;`):基线 styles.css 落在
1254
- `base` 层,本主题样式表由服务端整体包进 `theme` 层。普通声明里**靠后的层恒压过
1255
- 靠前的层**,与选择器权重无关 —— 所以基线那条靠「类选择器军备竞赛」堆出来的
1256
- `.main.hide-model-row .msg-assistant .toolcall`(4 个类)在 theme 层面前自然失效,
1257
- 本主题的布局只由本主题说了算,不需要再挂 ID。
1258
-
1259
- ⚠ 为什么本段整体放在文件末尾:
1260
- 分层只解决「主题 vs 基线」,不解决「本主题内部」的先后问题 —— 同权重仍看源顺序。
1261
- 本段与通用消息排版(如 `.msg-assistant .msg-text` 的 margin,同为 2 个类)本来
1262
- 就会遇到同权撞车,改造前靠 `#root` 的 ID 权重强行胜出;现在用最平权的办法等效:
1263
- 把「特化规则」整段放在文件最后,同权重时靠源顺序取胜,任何选择器都不用加权重。
1264
- 新增本主题的流布局规则时,写普通类选择器、放在本段里即可。
1265
- ======================================================== */
1266
-
1267
- .flow-turn {
1268
- display: flex;
1269
- flex-wrap: wrap;
1270
- align-items: center;
1271
- align-content: flex-start;
1272
- justify-content: flex-start;
1273
- gap: 8px;
1274
- width: 100%;
1275
- min-width: 0;
1276
- max-width: 100%;
1277
- margin: 4px 0 16px 0;
1278
- padding: 0;
1279
- }
1280
-
1281
- /* 壳透明化:消息壳不再是排版单元,内部元素直接成为 .flow-turn 的弹性项 */
1282
- .flow-turn > .msg,
1283
- .flow-turn > .msg-assistant,
1284
- .flow-turn > .msg .msg-body,
1285
- .flow-turn > .msg-assistant .msg-body {
1286
- display: contents;
1287
- width: auto;
1288
- }
1289
-
1290
- /* 元数据行(角色 / 时间)与消息级操作栏在流里没有位置:收起。
1291
- 复制走正文自带的复制键 / 卡头的 .chead-copy。 */
1292
- .flow-turn .msg-meta,
1293
- .flow-turn > .msg > .msg-meta,
1294
- .flow-turn > .msg-assistant > .msg-meta,
1295
- .flow-turn .msg-actions,
1296
- .flow-turn > .msg > .msg-actions,
1297
- .flow-turn > .msg-assistant > .msg-actions {
1298
- display: none;
1299
- }
1300
-
1301
- /* 默认:除胶囊以外的一切(正文 / 附件卡 / 报错 / 技能卡 / 折叠卡 / 工具输出…)
1302
- 都是 100% 宽项 —— 独占整行,前后自动断行,且不吃任何外边距(间距只由 gap 定)。 */
1303
- .flow-turn .msg-body > * {
1304
- flex: 0 0 100%;
1305
- min-width: 0;
1306
- max-width: 100%;
1307
- margin: 0;
1308
- }
1309
-
1310
- /* 胶囊是行内项:宽度按内容、行内垂直居中(同一行内绝对对齐) */
1311
- .flow-turn .toolcall,
1312
- .flow-turn .thinking,
1313
- .flow-turn .thinking-wait {
1314
- flex: 0 0 auto;
1315
- align-self: center;
1316
- display: inline-flex;
1317
- align-items: center;
1318
- justify-content: center;
1319
- box-sizing: border-box;
1320
- width: auto;
1321
- min-width: 0;
1322
- max-width: fit-content;
1323
- /* 高度单源:工具 / 思考 / 等待指示器全部 22px,避免 22/23 混用导致错半行 */
1324
- height: 22px;
1325
- line-height: 20px;
1326
- margin: 0;
1327
- padding: 0 7px;
1328
- overflow: hidden;
1329
- contain: layout paint;
1330
- white-space: nowrap;
1331
- }
1332
- .flow-turn .thinking-wait {
1333
- font-size: 11px;
1334
- font-family: var(--mono, monospace);
1335
- border-radius: 999px;
1336
- background: color-mix(in srgb, var(--text) 5%, transparent);
1337
- border: 1px solid var(--border);
1338
- }
1339
-
1340
- /* 消除兄弟选择器在行内流中对卡头施加的任何 border 细线 */
1341
- .flow-turn .chead,
1342
- .flow-turn .thinking .chead,
1343
- .flow-turn .toolcall .chead,
1344
- .flow-turn .toolcall + .toolcall .chead,
1345
- .flow-turn .thinking + .toolcall .chead,
1346
- .flow-turn .toolcall + .thinking .chead,
1347
- .flow-turn * .chead {
1348
- border: none;
1349
- margin: 0;
1350
- padding: 0;
1351
- }
1352
-
1353
- /* 正文:整行块(100% 宽项),上下再补一点留白,和胶囊行拉开呼吸感 */
1354
- .flow-turn .msg-text {
1355
- padding: 0;
1356
- margin: 6px 0;
1357
- }
1
+ /* themes/bases/flow-base.css — 极简行文模式形态与排版基底
2
+ * 包含:实体画布骨架、正文零边框无界微流排版、行内微胶囊深度思考与工具集群、
3
+ * 双层悬浮输入岛、全自适应浮层与弹窗系统。
4
+ *
5
+ * 核心设计原则:
6
+ * 1. 纯形态与排版:绝不硬编码任何具体色值(如 #ffffff、#141414、#000000);
7
+ * 2. 颜色统一由语义变量(var(--text), var(--bg-elev), var(--border), var(--accent) 等)驱动;
8
+ * 3. 半透明/微透光统一走 color-mix(in srgb, var(--text) X%, transparent) 自适应深浅主题;
9
+ * 4. 所有主操作实底按钮统一走 var(--accent) + var(--accent-contrast, #fff)。
10
+ */
11
+
12
+ /* 能力声明:本主题要求「正文 + 胶囊」连成一条行内流(字级输入流)。
13
+ 前端用 web/src/flow-mode.ts 探测这条属性来决定分组方式与容器外观,
14
+ 于是渲染层不需要认识任何主题 id —— 自制主题声明同一条属性即可复用。 */
15
+ :root {
16
+ --flow-inline-stream: 1;
17
+ }
18
+
19
+ /* ========================================================
20
+ 骨架与层级:实体暗调结构,利落细线分割
21
+ ======================================================== */
22
+ #root,
23
+ .app,
24
+ .layout,
25
+ .view-pane,
26
+ .main,
27
+ .chat-view,
28
+ .chat-scroll,
29
+ .messages {
30
+ background: var(--bg);
31
+ }
32
+
33
+ /* 输入栏与消息包裹层必须保持背景透明,确保快捷短语所在带子透出底层消息正文 */
34
+ .messages-wrap,
35
+ .inputbar {
36
+ background: transparent;
37
+ }
38
+
39
+ .topbar {
40
+ background: var(--topbar-bg, var(--bg-elev));
41
+ border-bottom: 1px solid var(--border-soft);
42
+ box-shadow: 0 1px 3px var(--sunken-bg, rgba(0, 0, 0, 0.15));
43
+ backdrop-filter: none;
44
+ -webkit-backdrop-filter: none;
45
+ z-index: 50;
46
+ }
47
+
48
+ .footer-bar,
49
+ .statusbar {
50
+ background: var(--statusbar-bg, var(--bg-elev));
51
+ border-top: 1px solid var(--border-soft);
52
+ box-shadow: 0 -1px 3px var(--sunken-bg, rgba(0, 0, 0, 0.15));
53
+ backdrop-filter: none;
54
+ -webkit-backdrop-filter: none;
55
+ z-index: 50;
56
+ }
57
+
58
+ .panel,
59
+ .drawer-left .panel,
60
+ .drawer-right .panel,
61
+ .lp-panel {
62
+ background: var(--panel-bg, var(--bg-elev));
63
+ border-color: var(--border-soft);
64
+ backdrop-filter: none;
65
+ -webkit-backdrop-filter: none;
66
+ box-shadow: none;
67
+ }
68
+
69
+ .panel-header,
70
+ .lp-section-header,
71
+ .panel-convs,
72
+ .panel-sessions,
73
+ .lp-group-title,
74
+ .panel-body {
75
+ background: transparent;
76
+ }
77
+
78
+ .lp-conv-row:hover,
79
+ .lp-conv-row.active,
80
+ .ft-row:hover,
81
+ .panel-item:hover {
82
+ background: var(--border-soft);
83
+ border-radius: 8px;
84
+ }
85
+
86
+ /* 消除会话项激活与聚焦态的一切蓝色/紫蓝色外边框 */
87
+ .session-item,
88
+ .session-item.active,
89
+ .session-item:hover,
90
+ .session-item:focus,
91
+ .session-item:focus-visible,
92
+ .lp-row .session-item,
93
+ .lp-row .session-item.active {
94
+ border: none;
95
+ outline: none;
96
+ box-shadow: none;
97
+ }
98
+
99
+ .session-item.active,
100
+ .lp-row .session-item.active {
101
+ background: var(--border);
102
+ color: var(--md-strong, var(--text));
103
+ border: none;
104
+ border-radius: 8px;
105
+ padding: 8px 10px;
106
+ }
107
+
108
+ .session-item:hover,
109
+ .lp-row .session-item:hover {
110
+ background: color-mix(in srgb, var(--text) 5%, transparent);
111
+ color: var(--md-strong, var(--text));
112
+ border: none;
113
+ border-radius: 8px;
114
+ }
115
+
116
+ .lp-section-header,
117
+ .lp-section-title,
118
+ .lp-section-title-text,
119
+ .panel-section-title {
120
+ color: var(--text-faint);
121
+ font-size: 11px;
122
+ text-transform: uppercase;
123
+ letter-spacing: 0.05em;
124
+ font-weight: 600;
125
+ }
126
+
127
+ .lp-conv-title,
128
+ .lp-conv-row {
129
+ color: var(--control-fg, var(--text));
130
+ }
131
+ .lp-conv-row:hover .lp-conv-title,
132
+ .lp-conv-row.active .lp-conv-title {
133
+ color: var(--md-strong, var(--text));
134
+ }
135
+
136
+ /* ========================================================
137
+ 核心:极简行文(Flow)—— 正文零气泡外壳、零边框、极致紧凑排版
138
+ ======================================================== */
139
+ .messages {
140
+ padding-top: 6px;
141
+ padding-bottom: calc(48px + var(--quick-row-h, 0px));
142
+ }
143
+
144
+ .msg {
145
+ background: transparent;
146
+ border: none;
147
+ box-shadow: none;
148
+ margin: 4px 0;
149
+ padding: 0;
150
+ }
151
+
152
+ .msg-assistant {
153
+ margin: 8px 0;
154
+ padding: 0;
155
+ }
156
+
157
+ /* 助手正文主体:完全透明无外框无圆角无遮挡,如字书印于深曜画布上 */
158
+ .msg-assistant .msg-body {
159
+ background: transparent;
160
+ border: none;
161
+ border-radius: 0;
162
+ box-shadow: none;
163
+ backdrop-filter: none;
164
+ -webkit-backdrop-filter: none;
165
+ overflow: visible;
166
+ display: block;
167
+ padding: 0;
168
+ margin: 0;
169
+ line-height: 1.62;
170
+ letter-spacing: 0.012em;
171
+ font-size: 14px;
172
+ color: var(--text);
173
+ word-break: break-word;
174
+ }
175
+
176
+ .msg-text,
177
+ .msg-assistant .msg-text {
178
+ background: transparent;
179
+ border: none;
180
+ box-shadow: none;
181
+ padding: 0;
182
+ margin: 0;
183
+ }
184
+
185
+ /* 正文排版:段间距、行高、列表间隙微调,彻底消灭笨重留白 */
186
+ .msg-body p {
187
+ margin: 0.36em 0;
188
+ line-height: 1.62;
189
+ }
190
+ .msg-body p:first-child {
191
+ margin-top: 0;
192
+ }
193
+ .msg-body p:last-child {
194
+ margin-bottom: 0;
195
+ }
196
+
197
+ .msg-body ul,
198
+ .msg-body ol {
199
+ margin: 0.25em 0;
200
+ padding-left: 1.25em;
201
+ }
202
+
203
+ .msg-body li {
204
+ margin: 0.12em 0;
205
+ line-height: 1.58;
206
+ }
207
+ .msg-body li > p {
208
+ margin: 0;
209
+ display: inline;
210
+ }
211
+
212
+ .msg-body h1,
213
+ .msg-body h2,
214
+ .msg-body h3,
215
+ .msg-body h4,
216
+ .msg-body h5,
217
+ .msg-body h6 {
218
+ margin: 0.55em 0 0.22em 0;
219
+ line-height: 1.35;
220
+ font-weight: 600;
221
+ color: var(--md-strong, var(--text));
222
+ }
223
+ .msg-body h1:first-child,
224
+ .msg-body h2:first-child,
225
+ .msg-body h3:first-child,
226
+ .msg-body h4:first-child {
227
+ margin-top: 0;
228
+ }
229
+
230
+ .msg-body blockquote {
231
+ background: transparent;
232
+ border: none;
233
+ border-left: 2px solid color-mix(in srgb, var(--text) 22%, transparent);
234
+ margin: 0.35em 0;
235
+ padding: 2px 0 2px 10px;
236
+ color: var(--text-dim);
237
+ }
238
+
239
+ .msg-body hr {
240
+ margin: 0.5em 0;
241
+ border: none;
242
+ border-top: 1px solid var(--border);
243
+ }
244
+
245
+ .msg-body table {
246
+ background: transparent;
247
+ border-collapse: collapse;
248
+ border: 1px solid var(--border);
249
+ margin: 0.4em 0;
250
+ font-size: 13.5px;
251
+ }
252
+
253
+ .msg-body th,
254
+ .msg-body td {
255
+ background: transparent;
256
+ border: 1px solid var(--border-soft);
257
+ padding: 4px 8px;
258
+ }
259
+
260
+ .msg-body code:not(pre code) {
261
+ background: var(--border-soft);
262
+ border: 1px solid var(--border);
263
+ border-radius: 4px;
264
+ padding: 1px 4px;
265
+ font-size: 12.5px;
266
+ color: var(--text);
267
+ }
268
+
269
+ .msg-body pre {
270
+ background: var(--code-bg);
271
+ border: 1px solid var(--border);
272
+ border-radius: 10px;
273
+ margin: 0.42em 0;
274
+ padding: 10px 14px;
275
+ line-height: 1.45;
276
+ font-size: 13px;
277
+ }
278
+
279
+ /* 工具调用与深度思考:Apple Vision 液态毛玻璃亚克力呼吸晶体微胶囊 */
280
+ .toolcall,
281
+ .thinking {
282
+ display: inline-flex;
283
+ align-items: center;
284
+ justify-content: center;
285
+ vertical-align: middle;
286
+ box-sizing: border-box;
287
+ width: auto;
288
+ min-width: 0;
289
+ max-width: fit-content;
290
+ flex: 0 0 auto;
291
+ flex-shrink: 0;
292
+ height: 23px;
293
+ line-height: 21px;
294
+ margin: 0;
295
+ padding: 0 8px;
296
+ background: color-mix(in srgb, var(--text) 5%, transparent);
297
+ border: 1px solid var(--border);
298
+ border-radius: 999px;
299
+ font-family: var(--mono, monospace);
300
+ font-size: 11px;
301
+ font-weight: 500;
302
+ cursor: pointer;
303
+ white-space: nowrap;
304
+ box-shadow:
305
+ inset 0 0.5px 0.5px color-mix(in srgb, var(--text) 22%, transparent),
306
+ 0 2px 5px rgba(0, 0, 0, 0.35);
307
+ backdrop-filter: blur(12px) saturate(140%);
308
+ -webkit-backdrop-filter: blur(12px) saturate(140%);
309
+ transition:
310
+ background 0.15s cubic-bezier(0.16, 1, 0.3, 1),
311
+ border-color 0.15s cubic-bezier(0.16, 1, 0.3, 1),
312
+ box-shadow 0.15s cubic-bezier(0.16, 1, 0.3, 1);
313
+ overflow: hidden;
314
+ contain: layout paint;
315
+ user-select: none;
316
+ text-decoration: none;
317
+ }
318
+
319
+ .toolcall:hover,
320
+ .thinking:hover {
321
+ background: var(--border);
322
+ border-color: color-mix(in srgb, var(--text) 22%, transparent);
323
+ box-shadow:
324
+ inset 0 1px 1px rgba(255, 255, 255, 0.35),
325
+ 0 4px 10px rgba(0, 0, 0, 0.45);
326
+ transform: translateY(-1px);
327
+ transition:
328
+ background 0.15s cubic-bezier(0.16, 1, 0.3, 1),
329
+ border-color 0.15s cubic-bezier(0.16, 1, 0.3, 1),
330
+ box-shadow 0.15s cubic-bezier(0.16, 1, 0.3, 1),
331
+ transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
332
+ }
333
+
334
+ /* 状态氛围点睛 */
335
+ .toolcall.run {
336
+ border-color: rgba(245, 158, 11, 0.45);
337
+ box-shadow:
338
+ inset 0 0.5px 0.5px rgba(255, 255, 255, 0.25),
339
+ 0 0 10px rgba(245, 158, 11, 0.25);
340
+ }
341
+ .toolcall.ok {
342
+ border-color: rgba(52, 211, 153, 0.25);
343
+ }
344
+ .toolcall.err {
345
+ border-color: rgba(248, 113, 113, 0.45);
346
+ box-shadow:
347
+ inset 0 0.5px 0.5px rgba(255, 255, 255, 0.25),
348
+ 0 0 10px rgba(239, 68, 68, 0.25);
349
+ }
350
+
351
+ .thinking {
352
+ border-color: rgba(192, 132, 252, 0.25);
353
+ }
354
+ .thinking:hover {
355
+ border-color: rgba(192, 132, 252, 0.45);
356
+ }
357
+ .thinking.run {
358
+ border-color: rgba(192, 132, 252, 0.5);
359
+ box-shadow:
360
+ inset 0 0.5px 0.5px rgba(255, 255, 255, 0.25),
361
+ 0 0 10px rgba(192, 132, 252, 0.25);
362
+ }
363
+
364
+ /* 隐藏流内大图缩略图(由点击居中弹窗展示大图) */
365
+ .toolcall-images,
366
+ .toolcall-image,
367
+ .toolcall .toolcall-images {
368
+ display: none;
369
+ }
370
+
371
+ /* 卡头:自适应内容宽度,严格水平对齐 */
372
+ .toolcall .toolcall-head,
373
+ .toolcall .chead,
374
+ .thinking .chead {
375
+ display: inline-flex;
376
+ align-items: center;
377
+ justify-content: center;
378
+ vertical-align: middle;
379
+ box-sizing: border-box;
380
+ width: auto;
381
+ min-width: 0;
382
+ max-width: fit-content;
383
+ min-height: unset;
384
+ height: 100%;
385
+ padding: 0;
386
+ margin: 0;
387
+ border: none;
388
+ border-top: none;
389
+ border-bottom: none;
390
+ background: transparent;
391
+ gap: 4px;
392
+ box-shadow: none;
393
+ line-height: 1;
394
+ flex: 0 0 auto;
395
+ flex-shrink: 0;
396
+ white-space: nowrap;
397
+ }
398
+
399
+ /* 隐藏原地折叠、复制、长命令与长路径等干扰元素 */
400
+ .toolcall .chead-toggle,
401
+ .toolcall .toolcall-toggle,
402
+ .toolcall .toolcall-spacer,
403
+ .toolcall .chead-copy,
404
+ .toolcall .toolcall-copy,
405
+ .toolcall .toolcall-path,
406
+ .toolcall .toolcall-cmd,
407
+ .toolcall .toolcall-query,
408
+ .toolcall .toolcall-timeout,
409
+ .toolcall .toolcall-agent,
410
+ .toolcall .toolcall-open,
411
+ .toolcall .toolcall-kill,
412
+ .toolcall .toolcall-duration,
413
+ .thinking .chead-toggle,
414
+ .thinking .thinking-toggle,
415
+ .thinking .chead-copy,
416
+ .thinking .thinking-copy,
417
+ .thinking .thinking-spacer,
418
+ .thinking .thinking-summary-text,
419
+ .thinking .thinking-preview-live,
420
+ .thinking .thinking-preview-viewport,
421
+ .thinking .thinking-preview-track,
422
+ .thinking .thinking-preview-prefix,
423
+ .thinking .thinking-live-label,
424
+ .thinking-summary {
425
+ display: none;
426
+ }
427
+
428
+ .chead-icon,
429
+ .chead-icon.thinking-icon,
430
+ .chead-icon.toolcall-icon,
431
+ .toolcall-icon,
432
+ .toolcall-head svg,
433
+ .thinking-icon,
434
+ .thinking svg {
435
+ display: inline-flex;
436
+ align-items: center;
437
+ justify-content: center;
438
+ width: 12px;
439
+ height: 12px;
440
+ padding: 0;
441
+ margin: 0;
442
+ border-radius: 0;
443
+ background: transparent;
444
+ flex: none;
445
+ opacity: 0.85;
446
+ font-size: 10px;
447
+ }
448
+
449
+ .toolcall-name,
450
+ .chead-title.toolcall-name,
451
+ .thinking-name,
452
+ .thinking-label,
453
+ .chead-title.thinking-label {
454
+ display: inline-flex;
455
+ align-items: center;
456
+ justify-content: center;
457
+ line-height: 1;
458
+ font-size: 11px;
459
+ font-weight: 500;
460
+ color: #f1f5f9;
461
+ padding: 0;
462
+ margin: 0;
463
+ flex: none;
464
+ min-width: unset;
465
+ max-width: unset;
466
+ letter-spacing: 0.02em;
467
+ }
468
+
469
+ .thinking .thinking-name {
470
+ color: #f1f5f9;
471
+ }
472
+ .thinking .thinking-icon,
473
+ .thinking .thinking-status {
474
+ color: #c084fc;
475
+ filter: drop-shadow(0 0 4px rgba(192, 132, 252, 0.75));
476
+ }
477
+
478
+ /* 语义化工具微光宝石呼吸灯 */
479
+ .toolcall-icon.tc-tone-exec {
480
+ color: #38bdf8;
481
+ filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.75));
482
+ }
483
+ .toolcall-icon.tc-tone-read,
484
+ .toolcall-icon.tc-tone-search {
485
+ color: #34d399;
486
+ filter: drop-shadow(0 0 4px rgba(52, 211, 153, 0.75));
487
+ }
488
+ .toolcall-icon.tc-tone-edit {
489
+ color: #fbbf24;
490
+ filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.75));
491
+ }
492
+ .toolcall-icon.tc-tone-code {
493
+ color: #e879f9;
494
+ filter: drop-shadow(0 0 4px rgba(232, 121, 249, 0.75));
495
+ }
496
+ .toolcall-icon.tc-tone-agent {
497
+ color: #f87171;
498
+ filter: drop-shadow(0 0 4px rgba(248, 113, 113, 0.75));
499
+ }
500
+
501
+ .toolcall.ok .toolcall-status {
502
+ color: #34d399;
503
+ filter: drop-shadow(0 0 3px rgba(52, 211, 153, 0.6));
504
+ }
505
+ .toolcall.err .toolcall-status {
506
+ color: #f87171;
507
+ filter: drop-shadow(0 0 4px rgba(248, 113, 113, 0.8));
508
+ }
509
+
510
+ .toolcall-status,
511
+ .thinking-status {
512
+ display: inline-flex;
513
+ align-items: center;
514
+ justify-content: center;
515
+ vertical-align: middle;
516
+ width: 11px;
517
+ height: 11px;
518
+ font-size: 9px;
519
+ flex: none;
520
+ margin: 0;
521
+ padding: 0;
522
+ }
523
+ .toolcall-status > svg,
524
+ .toolcall-status svg,
525
+ .thinking-status > svg,
526
+ .thinking-status svg {
527
+ width: 10px;
528
+ height: 10px;
529
+ margin: 0;
530
+ padding: 0;
531
+ }
532
+ .thinking-status .spin,
533
+ .toolcall-status .spin,
534
+ .toolcall-status .half-ring-spin,
535
+ .thinking-status .half-ring-spin,
536
+ .toolcall.run .toolcall-status svg,
537
+ .toolcall.run .toolcall-status-icon svg {
538
+ animation: spin 0.85s linear infinite;
539
+ transform-origin: center center;
540
+ }
541
+
542
+ /* 输出徽标:图片 🖼️、Markdown 📝 等行内小微标 */
543
+ .toolcall-out-badge {
544
+ display: inline-flex;
545
+ align-items: center;
546
+ justify-content: center;
547
+ vertical-align: middle;
548
+ width: 11px;
549
+ height: 11px;
550
+ font-size: 9.5px;
551
+ margin: 0;
552
+ padding: 0;
553
+ flex: none;
554
+ opacity: 0.85;
555
+ }
556
+ .toolcall-out-badge.img {
557
+ color: #3b82f6;
558
+ }
559
+ .toolcall-out-badge.md {
560
+ color: #a78bfa;
561
+ }
562
+ .toolcall-out-badge svg {
563
+ width: 10px;
564
+ height: 10px;
565
+ margin: 0;
566
+ padding: 0;
567
+ }
568
+
569
+ /* 附件也是一个“字”:混排在同一输入流中,外边距清零由 gap 管理 */
570
+ .msg-queued-atts-bar {
571
+ display: inline-flex;
572
+ align-items: center;
573
+ gap: 6px;
574
+ margin: 0;
575
+ padding: 0;
576
+ }
577
+ .queued-att-chip,
578
+ .attach-chip {
579
+ display: inline-flex;
580
+ align-items: center;
581
+ vertical-align: middle;
582
+ box-sizing: border-box;
583
+ height: 22px;
584
+ line-height: 20px;
585
+ margin: 0;
586
+ padding: 0 7px;
587
+ font-size: 11px;
588
+ border-radius: 6px;
589
+ background: var(--code-bg);
590
+ border: 1px solid var(--border);
591
+ color: var(--control-fg, var(--text));
592
+ }
593
+
594
+ /* 正文自成段落倾泻,与上方工具流保持舒适间距。
595
+ 注意:正文块必须保持块级 —— 用户要的是「正文前后都断行,只有连续胶囊才连排」,
596
+ 行内化正文会把它和胶囊焊在同一行,那就又乱了。 */
597
+ .msg-assistant .msg-text {
598
+ display: block;
599
+ padding: 0;
600
+ margin: 8px 0 0 0;
601
+ }
602
+ /* 单行正文保持「正文 + 复制键」的同一条 flex 行(仍是块级:前后照样断行),
603
+ 否则复制键会被挤到正文下面单独占一行。 */
604
+ .msg-assistant .msg-text.single {
605
+ display: flex;
606
+ }
607
+ .msg-assistant .msg-text > .markdown {
608
+ display: inline;
609
+ }
610
+ .msg-assistant .msg-text > .markdown > p:first-child {
611
+ display: inline;
612
+ margin: 0;
613
+ }
614
+
615
+ /* 彻底隐藏原地展开内容,点击由居中检查器弹窗接管 */
616
+ .toolcall-body,
617
+ .thinking-body {
618
+ display: none;
619
+ }
620
+
621
+ .msg-actions {
622
+ opacity: 0.3;
623
+ margin-top: 2px;
624
+ transition: opacity 0.15s ease;
625
+ }
626
+ .msg-assistant:hover .msg-actions,
627
+ .msg-user:hover .msg-actions {
628
+ opacity: 1;
629
+ }
630
+
631
+ /* ========================================================
632
+ 用户消息气泡:克制典雅的暗炭微卡片(无边框纯净融合)
633
+ ======================================================== */
634
+ .msg-user {
635
+ background: transparent;
636
+ box-shadow: none;
637
+ margin: 6px 0 2px 0;
638
+ }
639
+
640
+ .msg-user .msg-body {
641
+ background: var(--card-bg, var(--bg-elev));
642
+ border: none;
643
+ border-radius: 14px;
644
+ padding: 8px 14px;
645
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
646
+ backdrop-filter: none;
647
+ -webkit-backdrop-filter: none;
648
+ color: var(--text);
649
+ }
650
+
651
+ /* ========================================================
652
+ 输入框与控件(复刻 OpenAI Codex 桌面悬浮岛)
653
+ ======================================================== */
654
+ .inputbox {
655
+ background: var(--card-bg, var(--bg-elev));
656
+ border: 1px solid var(--border);
657
+ border-radius: 18px;
658
+ box-shadow:
659
+ 0 4px 24px rgba(0, 0, 0, 0.45),
660
+ 0 1px 2px rgba(0, 0, 0, 0.3);
661
+ backdrop-filter: none;
662
+ -webkit-backdrop-filter: none;
663
+ transition:
664
+ border-color 0.2s ease,
665
+ box-shadow 0.2s ease;
666
+ }
667
+
668
+ .inputbox:focus-within {
669
+ border-color: rgba(255, 255, 255, 0.2);
670
+ box-shadow:
671
+ 0 6px 32px rgba(0, 0, 0, 0.55),
672
+ 0 0 0 1px var(--border);
673
+ }
674
+
675
+ .inputbox textarea {
676
+ background: transparent;
677
+ color: var(--md-strong, var(--text));
678
+ }
679
+
680
+ .composer-tools,
681
+ .composer-tools-left,
682
+ .composer-tools-center,
683
+ .composer-tools-right {
684
+ color: var(--text-dim);
685
+ }
686
+
687
+ .composer-tools .chip {
688
+ background: #181818;
689
+ border: 1px solid var(--border);
690
+ color: var(--control-fg, var(--text));
691
+ box-shadow: none;
692
+ border-radius: 12px;
693
+ transition:
694
+ background 0.15s ease,
695
+ border-color 0.15s ease,
696
+ color 0.15s ease;
697
+ }
698
+
699
+ .composer-tools .chip:hover {
700
+ background: #282828;
701
+ border-color: rgba(255, 255, 255, 0.16);
702
+ color: var(--md-strong, var(--text));
703
+ }
704
+
705
+ .composer-tools .chip > span,
706
+ .composer-tools .chip > span.chip-model,
707
+ .composer-tools .chip > span.chip-sub,
708
+ .composer-tools .chip-sub {
709
+ color: var(--control-fg, var(--text));
710
+ opacity: 0.95;
711
+ }
712
+
713
+ .inputbox .composer-tools-left button:hover,
714
+ .inputbox .btn.composer-plugin-action:hover,
715
+ .inputbox .composer-tools-left .btn:hover {
716
+ background: var(--border);
717
+ }
718
+
719
+ .composer-tools .chip,
720
+ .composer-tools .chip:hover,
721
+ .composer-tools .dropdown > button,
722
+ .composer-tools .dropdown > button:hover,
723
+ .dropdown > button.chip,
724
+ .dropdown > button.chip:hover {
725
+ border-radius: 12px;
726
+ }
727
+
728
+ .inputbox .btn.send {
729
+ background: var(--accent);
730
+ border-color: var(--accent);
731
+ color: var(--accent-contrast, #fff);
732
+ border-radius: 50%;
733
+ width: 32px;
734
+ height: 32px;
735
+ min-width: 32px;
736
+ padding: 0;
737
+ display: inline-flex;
738
+ align-items: center;
739
+ justify-content: center;
740
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
741
+ }
742
+ .inputbox .btn.send svg {
743
+ stroke: var(--accent-contrast, #fff);
744
+ color: var(--accent-contrast, #fff);
745
+ stroke-width: 2.5;
746
+ }
747
+ .inputbox .btn.send:hover:not(:disabled) {
748
+ background: var(--accent);
749
+ border-color: var(--accent);
750
+ color: var(--accent-contrast, #fff);
751
+ opacity: 0.92;
752
+ box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 30%, transparent);
753
+ transform: translateY(-1px);
754
+ }
755
+ .inputbox .btn.send:disabled {
756
+ opacity: 0.35;
757
+ box-shadow: none;
758
+ cursor: default;
759
+ }
760
+ .inputbox .btn.send:disabled svg {
761
+ stroke: var(--accent-contrast, #fff);
762
+ color: var(--accent-contrast, #fff);
763
+ }
764
+
765
+ .inputbox .split-send {
766
+ background: var(--accent);
767
+ border-color: var(--accent);
768
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
769
+ border-radius: 18px;
770
+ }
771
+ .inputbox .split-send button {
772
+ color: var(--accent-contrast, #fff);
773
+ }
774
+ .inputbox .split-send button svg {
775
+ stroke: var(--accent-contrast, #fff);
776
+ color: var(--accent-contrast, #fff);
777
+ }
778
+ .inputbox .split-send .split-queue {
779
+ background: color-mix(in srgb, var(--accent-contrast, #000) 10%, transparent);
780
+ }
781
+ .inputbox .split-send button + button {
782
+ border-left: 1px solid rgba(0, 0, 0, 0.15);
783
+ }
784
+ .inputbox .split-send:hover {
785
+ background: #f4f4f4;
786
+ border-color: var(--md-strong, var(--text));
787
+ box-shadow: 0 0 14px rgba(255, 255, 255, 0.3);
788
+ }
789
+ .inputbox .split-send button:hover:not(:disabled) {
790
+ background: rgba(0, 0, 0, 0.08);
791
+ }
792
+
793
+ /* 快捷指令/快捷短语胶囊:悬浮、背景透明、磨砂毛玻璃浮空质感 */
794
+ .quick-chip {
795
+ background: rgba(33, 33, 33, 0.48);
796
+ border: 1px solid var(--border);
797
+ border-radius: 999px;
798
+ box-shadow:
799
+ 0 4px 16px rgba(0, 0, 0, 0.28),
800
+ 0 1px 3px rgba(0, 0, 0, 0.2),
801
+ inset 0 1px 0 var(--border);
802
+ backdrop-filter: blur(14px) saturate(140%);
803
+ -webkit-backdrop-filter: blur(14px) saturate(140%);
804
+ color: #e0e0e0;
805
+ transition:
806
+ transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
807
+ box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1),
808
+ border-color 0.18s ease,
809
+ background 0.18s ease,
810
+ color 0.18s ease;
811
+ }
812
+
813
+ .quick-chip:hover:not(:disabled) {
814
+ transform: translateY(-2px);
815
+ background: rgba(45, 45, 45, 0.72);
816
+ border-color: rgba(255, 255, 255, 0.28);
817
+ box-shadow:
818
+ 0 8px 24px rgba(0, 0, 0, 0.42),
819
+ 0 2px 6px rgba(0, 0, 0, 0.25),
820
+ inset 0 1px 0 color-mix(in srgb, var(--text) 14%, transparent);
821
+ color: var(--md-strong, var(--text));
822
+ }
823
+
824
+ .quick-chip:active:not(:disabled) {
825
+ transform: translateY(0) scale(0.97);
826
+ box-shadow:
827
+ 0 2px 8px rgba(0, 0, 0, 0.24),
828
+ inset 0 1px 0 color-mix(in srgb, var(--text) 5%, transparent);
829
+ }
830
+
831
+ /* 底部候选操作建议(同属快捷指令交互):悬浮透明毛玻璃 */
832
+ .action-suggestion-chip {
833
+ background: rgba(33, 33, 33, 0.48);
834
+ border: 1px solid var(--border);
835
+ border-radius: 999px;
836
+ box-shadow:
837
+ 0 4px 16px rgba(0, 0, 0, 0.28),
838
+ 0 1px 3px rgba(0, 0, 0, 0.2),
839
+ inset 0 1px 0 var(--border);
840
+ backdrop-filter: blur(14px) saturate(140%);
841
+ -webkit-backdrop-filter: blur(14px) saturate(140%);
842
+ color: #e0e0e0;
843
+ transition:
844
+ transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
845
+ box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1),
846
+ border-color 0.18s ease,
847
+ background 0.18s ease,
848
+ color 0.18s ease;
849
+ }
850
+
851
+ .action-suggestion-chip:hover:not(:disabled) {
852
+ transform: translateY(-2px);
853
+ background: rgba(45, 45, 45, 0.72);
854
+ border-color: rgba(255, 255, 255, 0.28);
855
+ box-shadow:
856
+ 0 8px 24px rgba(0, 0, 0, 0.42),
857
+ 0 2px 6px rgba(0, 0, 0, 0.25),
858
+ inset 0 1px 0 color-mix(in srgb, var(--text) 14%, transparent);
859
+ color: var(--md-strong, var(--text));
860
+ }
861
+
862
+ .action-suggestion-chip:active:not(:disabled) {
863
+ transform: translateY(0) scale(0.97);
864
+ }
865
+
866
+ /* 浮层与弹窗 */
867
+ .dd-menu,
868
+ .ctx-menu,
869
+ .pm-panel,
870
+ .modal-dialog {
871
+ background: var(--card-bg, var(--bg-elev));
872
+ border: 1px solid var(--border);
873
+ box-shadow:
874
+ 0 16px 40px rgba(0, 0, 0, 0.65),
875
+ inset 0 1px 0 color-mix(in srgb, var(--text) 4%, transparent);
876
+ }
877
+
878
+ [data-pi-floating-panel],
879
+ .floating-panel {
880
+ background: var(--card-bg, var(--bg-elev));
881
+ border: 1px solid var(--border);
882
+ box-shadow:
883
+ 0 12px 32px rgba(0, 0, 0, 0.55),
884
+ inset 0 1px 0 color-mix(in srgb, var(--text) 4%, transparent);
885
+ color: var(--text);
886
+ }
887
+
888
+ /* ---------------- 工具详情检查器弹窗(Tool Inspector Modal) ---------------- */
889
+ .pi-we-inspector-backdrop {
890
+ position: fixed;
891
+ inset: 0;
892
+ z-index: 100000;
893
+ background: var(--sunken-bg, rgba(4, 6, 12, 0.72));
894
+ backdrop-filter: blur(10px) saturate(120%);
895
+ -webkit-backdrop-filter: blur(10px) saturate(120%);
896
+ display: flex;
897
+ align-items: center;
898
+ justify-content: center;
899
+ padding: 20px;
900
+ opacity: 0;
901
+ pointer-events: none;
902
+ transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
903
+ }
904
+
905
+ .pi-we-inspector-backdrop.open {
906
+ opacity: 1;
907
+ pointer-events: auto;
908
+ }
909
+
910
+ .pi-we-inspector-dialog {
911
+ position: relative;
912
+ width: 760px;
913
+ max-width: 92vw;
914
+ max-height: 82vh;
915
+ display: flex;
916
+ flex-direction: column;
917
+ background: var(--card-bg, var(--bg-elev));
918
+ border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
919
+ border-radius: 14px;
920
+ box-shadow:
921
+ 0 20px 50px rgba(0, 0, 0, 0.85),
922
+ 0 0 20px var(--border);
923
+ color: var(--text);
924
+ font-family:
925
+ system-ui,
926
+ -apple-system,
927
+ sans-serif;
928
+ overflow: hidden;
929
+ transform: scale(0.96) translateY(10px);
930
+ transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
931
+ }
932
+
933
+ .pi-we-inspector-backdrop.open .pi-we-inspector-dialog {
934
+ transform: scale(1) translateY(0);
935
+ }
936
+
937
+ .pi-we-inspector-header {
938
+ display: flex;
939
+ align-items: center;
940
+ justify-content: space-between;
941
+ padding: 12px 18px;
942
+ background: var(--bg-elev2, var(--bg-elev));
943
+ border-bottom: 1px solid var(--border);
944
+ gap: 12px;
945
+ flex-shrink: 0;
946
+ }
947
+
948
+ .pi-we-inspector-title-group {
949
+ display: flex;
950
+ align-items: center;
951
+ gap: 8px;
952
+ min-width: 0;
953
+ }
954
+
955
+ .pi-we-inspector-icon {
956
+ width: 24px;
957
+ height: 24px;
958
+ border-radius: 6px;
959
+ background: color-mix(in srgb, var(--text) 10%, transparent);
960
+ display: flex;
961
+ align-items: center;
962
+ justify-content: center;
963
+ font-size: 13px;
964
+ color: var(--text);
965
+ flex-shrink: 0;
966
+ }
967
+
968
+ .pi-we-inspector-title {
969
+ font-family: var(--mono, monospace);
970
+ font-weight: 700;
971
+ font-size: 14.5px;
972
+ color: var(--text);
973
+ white-space: nowrap;
974
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
975
+ }
976
+
977
+ .pi-we-inspector-badge {
978
+ font-family: var(--mono, monospace);
979
+ font-size: 11px;
980
+ padding: 2px 7px;
981
+ border-radius: 4px;
982
+ background: color-mix(in srgb, var(--text) 8%, transparent);
983
+ border: 1px solid rgba(255, 255, 255, 0.15);
984
+ color: var(--text-dim);
985
+ white-space: nowrap;
986
+ }
987
+
988
+ .pi-we-inspector-badge.ok {
989
+ background: rgba(74, 222, 128, 0.15);
990
+ border-color: rgba(74, 222, 128, 0.4);
991
+ color: var(--green);
992
+ }
993
+
994
+ .pi-we-inspector-badge.run {
995
+ background: rgba(251, 191, 36, 0.15);
996
+ border-color: rgba(251, 191, 36, 0.4);
997
+ color: var(--amber);
998
+ }
999
+
1000
+ .pi-we-inspector-badge.err {
1001
+ background: rgba(248, 113, 113, 0.15);
1002
+ border-color: rgba(248, 113, 113, 0.4);
1003
+ color: var(--red-text);
1004
+ }
1005
+
1006
+ .pi-we-inspector-actions {
1007
+ display: flex;
1008
+ align-items: center;
1009
+ gap: 8px;
1010
+ flex-shrink: 0;
1011
+ }
1012
+
1013
+ .pi-we-inspector-btn {
1014
+ background: color-mix(in srgb, var(--text) 8%, transparent);
1015
+ border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
1016
+ border-radius: 6px;
1017
+ color: var(--text);
1018
+ font-size: 12px;
1019
+ padding: 5px 10px;
1020
+ cursor: pointer;
1021
+ display: inline-flex;
1022
+ align-items: center;
1023
+ gap: 5px;
1024
+ transition: all 0.15s ease;
1025
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
1026
+ }
1027
+
1028
+ .pi-we-inspector-btn:hover {
1029
+ background: color-mix(in srgb, var(--text) 16%, transparent);
1030
+ border-color: rgba(255, 255, 255, 0.35);
1031
+ color: var(--text);
1032
+ }
1033
+
1034
+ .pi-we-inspector-close {
1035
+ padding: 5px 8px;
1036
+ font-size: 14px;
1037
+ line-height: 1;
1038
+ }
1039
+
1040
+ .pi-we-inspector-body {
1041
+ flex: 1;
1042
+ overflow-y: auto;
1043
+ overscroll-behavior: contain;
1044
+ padding: 16px 20px 24px;
1045
+ display: flex;
1046
+ flex-direction: column;
1047
+ gap: 16px;
1048
+ }
1049
+
1050
+ .pi-we-inspector-section {
1051
+ display: flex;
1052
+ flex-direction: column;
1053
+ gap: 6px;
1054
+ }
1055
+
1056
+ .pi-we-inspector-label {
1057
+ font-size: 12px;
1058
+ font-weight: 600;
1059
+ color: #94a3b8;
1060
+ text-transform: uppercase;
1061
+ letter-spacing: 0.05em;
1062
+ display: flex;
1063
+ align-items: center;
1064
+ gap: 6px;
1065
+ }
1066
+
1067
+ .pi-we-inspector-codeblock {
1068
+ background: rgba(4, 6, 12, 0.85);
1069
+ border: 1px solid var(--border);
1070
+ border-radius: 8px;
1071
+ padding: 12px 14px;
1072
+ font-family: var(--mono, monospace);
1073
+ font-size: 12.5px;
1074
+ line-height: 1.55;
1075
+ color: var(--text);
1076
+ white-space: pre-wrap;
1077
+ word-break: break-all;
1078
+ overflow-x: auto;
1079
+ max-height: 40vh;
1080
+ margin: 0;
1081
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9);
1082
+ }
1083
+
1084
+ .pi-we-inspector-thinking-text {
1085
+ background: rgba(18, 14, 28, 0.65);
1086
+ border: 1px solid rgba(168, 85, 247, 0.25);
1087
+ border-radius: 8px;
1088
+ padding: 14px 16px;
1089
+ font-size: 13.5px;
1090
+ line-height: 1.68;
1091
+ color: var(--text);
1092
+ white-space: pre-wrap;
1093
+ word-break: break-word;
1094
+ max-height: 55vh;
1095
+ overflow-y: auto;
1096
+ margin: 0;
1097
+ text-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.9);
1098
+ }
1099
+
1100
+ /* 富媒体文件展示预览(针对 present_files 与文件交付) */
1101
+ .pi-we-ins-preview-wrap {
1102
+ display: flex;
1103
+ flex-direction: column;
1104
+ gap: 12px;
1105
+ }
1106
+
1107
+ .pi-we-ins-preview-meta {
1108
+ background: color-mix(in srgb, var(--text) 4%, transparent);
1109
+ border: 1px solid var(--border);
1110
+ border-radius: 8px;
1111
+ padding: 12px 14px;
1112
+ display: flex;
1113
+ flex-direction: column;
1114
+ gap: 6px;
1115
+ }
1116
+
1117
+ .pi-we-ins-preview-title {
1118
+ font-size: 14px;
1119
+ font-weight: 600;
1120
+ color: var(--text);
1121
+ display: flex;
1122
+ align-items: center;
1123
+ gap: 6px;
1124
+ }
1125
+
1126
+ .pi-we-ins-preview-note {
1127
+ font-size: 12.5px;
1128
+ line-height: 1.55;
1129
+ color: var(--text-dim);
1130
+ word-break: break-word;
1131
+ }
1132
+
1133
+ .pi-we-ins-preview-card {
1134
+ background: color-mix(in srgb, var(--text) 5%, transparent);
1135
+ border: 1px solid var(--border);
1136
+ border-radius: 10px;
1137
+ padding: 12px 14px;
1138
+ display: flex;
1139
+ flex-direction: column;
1140
+ gap: 10px;
1141
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
1142
+ }
1143
+
1144
+ .pi-we-ins-preview-head {
1145
+ display: flex;
1146
+ align-items: center;
1147
+ justify-content: space-between;
1148
+ gap: 10px;
1149
+ }
1150
+
1151
+ .pi-we-ins-preview-info {
1152
+ display: flex;
1153
+ align-items: center;
1154
+ gap: 8px;
1155
+ min-width: 0;
1156
+ }
1157
+
1158
+ .pi-we-ins-preview-icon {
1159
+ font-size: 18px;
1160
+ line-height: 1;
1161
+ }
1162
+
1163
+ .pi-we-ins-preview-name {
1164
+ font-family: var(--mono, monospace);
1165
+ font-size: 13px;
1166
+ font-weight: 600;
1167
+ color: var(--text);
1168
+ white-space: nowrap;
1169
+ overflow: hidden;
1170
+ text-overflow: ellipsis;
1171
+ }
1172
+
1173
+ .pi-we-ins-preview-caption {
1174
+ font-size: 11.5px;
1175
+ color: var(--text-dim);
1176
+ white-space: nowrap;
1177
+ overflow: hidden;
1178
+ text-overflow: ellipsis;
1179
+ }
1180
+
1181
+ .pi-we-ins-preview-actions {
1182
+ display: flex;
1183
+ align-items: center;
1184
+ gap: 6px;
1185
+ flex-shrink: 0;
1186
+ }
1187
+
1188
+ .pi-we-ins-btn-sm {
1189
+ background: color-mix(in srgb, var(--text) 8%, transparent);
1190
+ border: 1px solid rgba(255, 255, 255, 0.15);
1191
+ border-radius: 4px;
1192
+ color: var(--text);
1193
+ font-size: 11px;
1194
+ padding: 3px 7px;
1195
+ cursor: pointer;
1196
+ text-decoration: none;
1197
+ display: inline-flex;
1198
+ align-items: center;
1199
+ gap: 4px;
1200
+ transition: all 0.15s ease;
1201
+ }
1202
+
1203
+ .pi-we-ins-btn-sm:hover {
1204
+ background: color-mix(in srgb, var(--text) 18%, transparent);
1205
+ border-color: rgba(255, 255, 255, 0.3);
1206
+ }
1207
+
1208
+ .pi-we-ins-preview-media {
1209
+ width: 100%;
1210
+ display: flex;
1211
+ justify-content: center;
1212
+ align-items: center;
1213
+ background: rgba(0, 0, 0, 0.35);
1214
+ border-radius: 6px;
1215
+ padding: 8px;
1216
+ overflow: hidden;
1217
+ }
1218
+
1219
+ .pi-we-ins-preview-img {
1220
+ max-width: 100%;
1221
+ max-height: 380px;
1222
+ object-fit: contain;
1223
+ border-radius: 4px;
1224
+ }
1225
+
1226
+ .pi-we-ins-preview-audio {
1227
+ width: 100%;
1228
+ height: 36px;
1229
+ }
1230
+
1231
+ .pi-we-ins-preview-video {
1232
+ max-width: 100%;
1233
+ max-height: 380px;
1234
+ border-radius: 4px;
1235
+ background: #000;
1236
+ }
1237
+
1238
+ /* 角标防白底白字:当 --accent 为纯白时,顶栏实体胶囊角标反色为深色,后台任务保持红底白字(底栏透明徽标保持 var(--accent) 纯白高亮) */
1239
+ .topbar .bar-item-badge:not(.bg-task-badge) {
1240
+ color: #000000;
1241
+ }
1242
+
1243
+ /* ========================================================
1244
+ 字级输入流系统(Character-Level Inline Stream)
1245
+ --------------------------------------------------------
1246
+ 一个回合的全部助手产出装进同一个 .flow-turn —— 一个弹性行流容器:
1247
+ · 胶囊(.toolcall / .thinking / .thinking-wait):行内项,横排、满了换行,
1248
+ 同一行 align-items:center + 统一 22px 高度 → 永远互相对齐;
1249
+ · 其余内容(正文 / 附件 / 报错 / 折叠卡):100% 宽项 → 独占整行,正文前后必断行;
1250
+ · 间距单源:容器 gap(行列同值)+ 正文项外边距,不让每个元素各自 margin 打架。
1251
+
1252
+ ⚠ 为什么这里不再需要 `#root` 前缀(原先为了压过基线而加的 ID 权重已撤销):
1253
+ 全项目样式改为显式分层(`@layer guard, base, theme;`):基线 styles.css 落在
1254
+ `base` 层,本主题样式表由服务端整体包进 `theme` 层。普通声明里**靠后的层恒压过
1255
+ 靠前的层**,与选择器权重无关 —— 所以基线那条靠「类选择器军备竞赛」堆出来的
1256
+ `.main.hide-model-row .msg-assistant .toolcall`(4 个类)在 theme 层面前自然失效,
1257
+ 本主题的布局只由本主题说了算,不需要再挂 ID。
1258
+
1259
+ ⚠ 为什么本段整体放在文件末尾:
1260
+ 分层只解决「主题 vs 基线」,不解决「本主题内部」的先后问题 —— 同权重仍看源顺序。
1261
+ 本段与通用消息排版(如 `.msg-assistant .msg-text` 的 margin,同为 2 个类)本来
1262
+ 就会遇到同权撞车,改造前靠 `#root` 的 ID 权重强行胜出;现在用最平权的办法等效:
1263
+ 把「特化规则」整段放在文件最后,同权重时靠源顺序取胜,任何选择器都不用加权重。
1264
+ 新增本主题的流布局规则时,写普通类选择器、放在本段里即可。
1265
+ ======================================================== */
1266
+
1267
+ .flow-turn {
1268
+ display: flex;
1269
+ flex-wrap: wrap;
1270
+ align-items: center;
1271
+ align-content: flex-start;
1272
+ justify-content: flex-start;
1273
+ gap: 8px;
1274
+ width: 100%;
1275
+ min-width: 0;
1276
+ max-width: 100%;
1277
+ margin: 4px 0 16px 0;
1278
+ padding: 0;
1279
+ }
1280
+
1281
+ /* 壳透明化:消息壳不再是排版单元,内部元素直接成为 .flow-turn 的弹性项 */
1282
+ .flow-turn > .msg,
1283
+ .flow-turn > .msg-assistant,
1284
+ .flow-turn > .msg .msg-body,
1285
+ .flow-turn > .msg-assistant .msg-body {
1286
+ display: contents;
1287
+ width: auto;
1288
+ }
1289
+
1290
+ /* 元数据行(角色 / 时间)与消息级操作栏在流里没有位置:收起。
1291
+ 复制走正文自带的复制键 / 卡头的 .chead-copy。 */
1292
+ .flow-turn .msg-meta,
1293
+ .flow-turn > .msg > .msg-meta,
1294
+ .flow-turn > .msg-assistant > .msg-meta,
1295
+ .flow-turn .msg-actions,
1296
+ .flow-turn > .msg > .msg-actions,
1297
+ .flow-turn > .msg-assistant > .msg-actions {
1298
+ display: none;
1299
+ }
1300
+
1301
+ /* 默认:除胶囊以外的一切(正文 / 附件卡 / 报错 / 技能卡 / 折叠卡 / 工具输出…)
1302
+ 都是 100% 宽项 —— 独占整行,前后自动断行,且不吃任何外边距(间距只由 gap 定)。 */
1303
+ .flow-turn .msg-body > * {
1304
+ flex: 0 0 100%;
1305
+ min-width: 0;
1306
+ max-width: 100%;
1307
+ margin: 0;
1308
+ }
1309
+
1310
+ /* 胶囊是行内项:宽度按内容、行内垂直居中(同一行内绝对对齐) */
1311
+ .flow-turn .toolcall,
1312
+ .flow-turn .thinking,
1313
+ .flow-turn .thinking-wait {
1314
+ flex: 0 0 auto;
1315
+ align-self: center;
1316
+ display: inline-flex;
1317
+ align-items: center;
1318
+ justify-content: center;
1319
+ box-sizing: border-box;
1320
+ width: auto;
1321
+ min-width: 0;
1322
+ max-width: fit-content;
1323
+ /* 高度单源:工具 / 思考 / 等待指示器全部 22px,避免 22/23 混用导致错半行 */
1324
+ height: 22px;
1325
+ line-height: 20px;
1326
+ margin: 0;
1327
+ padding: 0 7px;
1328
+ overflow: hidden;
1329
+ contain: layout paint;
1330
+ white-space: nowrap;
1331
+ }
1332
+ .flow-turn .thinking-wait {
1333
+ font-size: 11px;
1334
+ font-family: var(--mono, monospace);
1335
+ border-radius: 999px;
1336
+ background: color-mix(in srgb, var(--text) 5%, transparent);
1337
+ border: 1px solid var(--border);
1338
+ }
1339
+
1340
+ /* 消除兄弟选择器在行内流中对卡头施加的任何 border 细线 */
1341
+ .flow-turn .chead,
1342
+ .flow-turn .thinking .chead,
1343
+ .flow-turn .toolcall .chead,
1344
+ .flow-turn .toolcall + .toolcall .chead,
1345
+ .flow-turn .thinking + .toolcall .chead,
1346
+ .flow-turn .toolcall + .thinking .chead,
1347
+ .flow-turn * .chead {
1348
+ border: none;
1349
+ margin: 0;
1350
+ padding: 0;
1351
+ }
1352
+
1353
+ /* 正文:整行块(100% 宽项),上下再补一点留白,和胶囊行拉开呼吸感 */
1354
+ .flow-turn .msg-text {
1355
+ padding: 0;
1356
+ margin: 6px 0;
1357
+ }