@zyro-sec/session-ui 0.0.0-stage → 1.0.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 (261) hide show
  1. package/AGENTS.md +25 -0
  2. package/bunfig.toml +2 -0
  3. package/component-tests/basic-tool.fixture.tsx +46 -0
  4. package/component-tests/basic-tool.spec.ts +63 -0
  5. package/component-tests/file-media.fixture.tsx +39 -0
  6. package/component-tests/file-media.spec.ts +13 -0
  7. package/component-tests/file-tool.spec.ts +62 -0
  8. package/component-tests/file-viewer.fixture.tsx +109 -0
  9. package/component-tests/file-viewer.spec.ts +134 -0
  10. package/component-tests/file.spec.ts +33 -0
  11. package/component-tests/line-comment-v2.spec.ts +15 -0
  12. package/component-tests/markdown-code-wrap.spec.ts +94 -0
  13. package/component-tests/markdown-readiness.spec.ts +95 -0
  14. package/component-tests/markdown.fixture.tsx +104 -0
  15. package/component-tests/markdown.spec.ts +1564 -0
  16. package/component-tests/mermaid-preview.spec.ts +43 -0
  17. package/component-tests/patch-group.spec.ts +79 -0
  18. package/component-tests/read-group.spec.ts +72 -0
  19. package/component-tests/read-image.fixture.tsx +66 -0
  20. package/component-tests/read-image.spec.ts +154 -0
  21. package/component-tests/session-compaction.spec.ts +254 -0
  22. package/component-tests/session-lifecycle.spec.ts +190 -0
  23. package/component-tests/session-message-projection.spec.ts +639 -0
  24. package/component-tests/session-notice-projection.spec.ts +20 -0
  25. package/component-tests/session-review-comments.spec.ts +179 -0
  26. package/component-tests/session-shell.spec.ts +93 -0
  27. package/component-tests/session-timeline-mobile.spec.ts +201 -0
  28. package/component-tests/session-timeline-notices.spec.ts +38 -0
  29. package/component-tests/session-timeline-reasoning.spec.ts +107 -0
  30. package/component-tests/session-timeline.spec.ts +157 -0
  31. package/component-tests/session-tool-projection.spec.ts +323 -0
  32. package/component-tests/text-lifecycle.fixture.tsx +26 -0
  33. package/component-tests/text-lifecycle.spec.ts +42 -0
  34. package/component-tests/timeline-subagent-rows.spec.ts +33 -0
  35. package/component-tests/tool-disclosure.spec.ts +48 -0
  36. package/component-tests/tool-group-sticky.spec.ts +37 -0
  37. package/component-tests/tool-group.spec.ts +290 -0
  38. package/component-tests/tool-status-title.fixture.tsx +22 -0
  39. package/component-tests/tool-status-title.spec.ts +30 -0
  40. package/component-tests/user-message-quotes.spec.ts +111 -0
  41. package/package.json +91 -4
  42. package/playwright.components.config.ts +4 -0
  43. package/playwright.local.config.ts +2 -0
  44. package/src/actions.ts +54 -0
  45. package/src/components/apply-patch-file.ts +122 -0
  46. package/src/components/basic-tool.css +487 -0
  47. package/src/components/basic-tool.tsx +258 -0
  48. package/src/components/copy-machine.ts +78 -0
  49. package/src/components/copy.ts +85 -0
  50. package/src/components/diagram-preview.tsx +28 -0
  51. package/src/components/disclosure-machine.ts +188 -0
  52. package/src/components/disclosure.ts +129 -0
  53. package/src/components/dock-prompt.stories.tsx +73 -0
  54. package/src/components/dock-prompt.tsx +29 -0
  55. package/src/components/file-comment-selection.tsx +146 -0
  56. package/src/components/file-media-machine.ts +165 -0
  57. package/src/components/file-media.stories.tsx +112 -0
  58. package/src/components/file-media.tsx +323 -0
  59. package/src/components/file-search.tsx +73 -0
  60. package/src/components/file.css +59 -0
  61. package/src/components/file.tsx +1300 -0
  62. package/src/components/image-preview.tsx +35 -0
  63. package/src/components/line-comment-annotations.tsx +580 -0
  64. package/src/components/line-comment-machine.ts +262 -0
  65. package/src/components/line-comment-styles.ts +293 -0
  66. package/src/components/line-comment.stories.tsx +152 -0
  67. package/src/components/line-comment.tsx +448 -0
  68. package/src/components/link-segments.ts +20 -0
  69. package/src/components/linked-text.tsx +21 -0
  70. package/src/components/markdown-cache-machine.ts +257 -0
  71. package/src/components/markdown-cache.tsx +556 -0
  72. package/src/components/markdown-clipboard.ts +101 -0
  73. package/src/components/markdown-code-machine.ts +200 -0
  74. package/src/components/markdown-code-state.ts +22 -0
  75. package/src/components/markdown-fragment-links.ts +74 -0
  76. package/src/components/markdown-github.svg +3 -0
  77. package/src/components/markdown-globe.svg +5 -0
  78. package/src/components/markdown-image-machine.ts +170 -0
  79. package/src/components/markdown-image.ts +156 -0
  80. package/src/components/markdown-inline-code-kind.ts +39 -0
  81. package/src/components/markdown-mermaid.ts +18 -0
  82. package/src/components/markdown-phase-machine.ts +102 -0
  83. package/src/components/markdown-projection.ts +13 -0
  84. package/src/components/markdown-session-links.ts +183 -0
  85. package/src/components/markdown-solid.test.tsx +92 -0
  86. package/src/components/markdown-solid.tsx +113 -0
  87. package/src/components/markdown-stream.ts +95 -0
  88. package/src/components/markdown-worker-machine.ts +516 -0
  89. package/src/components/markdown-worker-protocol.ts +73 -0
  90. package/src/components/markdown-worker.ts +250 -0
  91. package/src/components/markdown.css +672 -0
  92. package/src/components/markdown.stories.tsx +199 -0
  93. package/src/components/markdown.tsx +1612 -0
  94. package/src/components/markdown.worker.ts +188 -0
  95. package/src/components/message-file.ts +102 -0
  96. package/src/components/message-nav.css +134 -0
  97. package/src/components/message-nav.tsx +159 -0
  98. package/src/components/message-part.css +2109 -0
  99. package/src/components/message-part.tsx +3 -0
  100. package/src/components/question-prompt-experimental.css +576 -0
  101. package/src/components/question-prompt.css +527 -0
  102. package/src/components/quote-highlight.css +59 -0
  103. package/src/components/review-focus-driver.ts +142 -0
  104. package/src/components/review-focus-machine.ts +95 -0
  105. package/src/components/session-compaction.css +270 -0
  106. package/src/components/session-diff.ts +358 -0
  107. package/src/components/session-error.tsx +41 -0
  108. package/src/components/session-retry.tsx +92 -0
  109. package/src/components/session-review-machine.ts +241 -0
  110. package/src/components/session-review.css +264 -0
  111. package/src/components/session-review.stories.tsx +232 -0
  112. package/src/components/session-review.tsx +733 -0
  113. package/src/components/session-turn.css +282 -0
  114. package/src/components/shell-submessage.css +24 -0
  115. package/src/components/timeline-separator.tsx +69 -0
  116. package/src/components/tool-count-label.css +57 -0
  117. package/src/components/tool-count-label.tsx +76 -0
  118. package/src/components/tool-count-summary.css +102 -0
  119. package/src/components/tool-count-summary.stories.tsx +99 -0
  120. package/src/components/tool-count-summary.tsx +44 -0
  121. package/src/components/tool-error-card.css +178 -0
  122. package/src/components/tool-error-card.stories.tsx +113 -0
  123. package/src/components/tool-error-card.tsx +202 -0
  124. package/src/components/tool-status-title-machine.ts +128 -0
  125. package/src/components/tool-status-title.css +89 -0
  126. package/src/components/tool-status-title.tsx +163 -0
  127. package/src/context/data.tsx +107 -0
  128. package/src/context/index.ts +1 -0
  129. package/src/context/markdown.tsx +129 -0
  130. package/src/context/sources.tsx +34 -0
  131. package/src/document.ts +8 -0
  132. package/src/file-presentation.ts +34 -0
  133. package/src/message/action-machine.ts +72 -0
  134. package/src/message/agent-label.ts +3 -0
  135. package/src/message/attachment-card.css +119 -0
  136. package/src/message/attachment-card.tsx +40 -0
  137. package/src/message/attachment-media-machine.ts +213 -0
  138. package/src/message/comment-card.tsx +155 -0
  139. package/src/message/compaction-entrance-machine.ts +93 -0
  140. package/src/message/current-message.tsx +157 -0
  141. package/src/message/current-tool-state.ts +161 -0
  142. package/src/message/message-content.tsx +1391 -0
  143. package/src/message/paced-text-machine.ts +73 -0
  144. package/src/message/prompt-message.stories.tsx +149 -0
  145. package/src/message/relative-time.ts +45 -0
  146. package/src/message/user-message-quote-parts.ts +16 -0
  147. package/src/message/user-message-quotes.stories.tsx +797 -0
  148. package/src/message/user-message-quotes.tsx +135 -0
  149. package/src/pierre/comment-hover-machine.ts +53 -0
  150. package/src/pierre/comment-hover.ts +131 -0
  151. package/src/pierre/comment-selection-machine.ts +257 -0
  152. package/src/pierre/commented-lines.ts +106 -0
  153. package/src/pierre/diff-selection.ts +91 -0
  154. package/src/pierre/file-find-machine.ts +323 -0
  155. package/src/pierre/file-find.ts +537 -0
  156. package/src/pierre/file-runtime.ts +42 -0
  157. package/src/pierre/file-selection.ts +140 -0
  158. package/src/pierre/index.ts +344 -0
  159. package/src/pierre/media.ts +140 -0
  160. package/src/pierre/render-machine.ts +381 -0
  161. package/src/pierre/selection-bridge.ts +82 -0
  162. package/src/pierre/selection-machine.ts +198 -0
  163. package/src/pierre/virtualizer.ts +114 -0
  164. package/src/pierre/worker.ts +46 -0
  165. package/src/sources/experiment.ts +59 -0
  166. package/src/sources/site-icon.tsx +53 -0
  167. package/src/sources/sources-chip.tsx +57 -0
  168. package/src/sources/sources-expand-machine.ts +101 -0
  169. package/src/sources/sources-panel.tsx +249 -0
  170. package/src/sources/sources-title.tsx +21 -0
  171. package/src/sources/sources.css +266 -0
  172. package/src/sources/sources.ts +141 -0
  173. package/src/storybook/current-session-fixtures.ts +1492 -0
  174. package/src/storybook/current-session-scenarios.ts +76 -0
  175. package/src/storybook/current-session-story.tsx +154 -0
  176. package/src/storybook/index.ts +43 -0
  177. package/src/styles/index.css +19 -0
  178. package/src/timeline/__snapshots__/group-labels.test.ts.snap +110 -0
  179. package/src/timeline/__snapshots__/placement.test.ts.snap +1041 -0
  180. package/src/timeline/code-blocks.stories.tsx +105 -0
  181. package/src/timeline/commentary.stories.tsx +70 -0
  182. package/src/timeline/commentary.ts +38 -0
  183. package/src/timeline/detail.ts +111 -0
  184. package/src/timeline/error-card.stories.tsx +134 -0
  185. package/src/timeline/error-spacing.stories.tsx +71 -0
  186. package/src/timeline/facts.ts +493 -0
  187. package/src/timeline/file-changes.stories.tsx +436 -0
  188. package/src/timeline/group-label-fixtures.ts +97 -0
  189. package/src/timeline/mermaid.stories.tsx +131 -0
  190. package/src/timeline/place.ts +280 -0
  191. package/src/timeline/placement-fixtures.ts +365 -0
  192. package/src/timeline/placement-reactivity.ts +133 -0
  193. package/src/timeline/projection.ts +1261 -0
  194. package/src/timeline/research-and-agents.stories.tsx +461 -0
  195. package/src/timeline/session-timeline-row.tsx +1675 -0
  196. package/src/timeline/session-timeline.tsx +68 -0
  197. package/src/timeline/steer-arrival-machine.ts +134 -0
  198. package/src/timeline/terminal-work.stories.tsx +464 -0
  199. package/src/timeline/timeline-row.stories.tsx +1069 -0
  200. package/src/timeline/timeline-row.ts +238 -0
  201. package/src/timeline/turn-phase-machine.ts +112 -0
  202. package/src/timeline/user-message-fold.stories.tsx +194 -0
  203. package/src/timeline/user-runs.ts +87 -0
  204. package/src/timeline-next/__snapshots__/placement.test.ts.snap +990 -0
  205. package/src/timeline-next/compaction.tsx +236 -0
  206. package/src/timeline-next/errors.ts +101 -0
  207. package/src/timeline-next/event-row.tsx +168 -0
  208. package/src/timeline-next/events.ts +103 -0
  209. package/src/timeline-next/index.ts +10 -0
  210. package/src/timeline-next/nested-rail.ts +125 -0
  211. package/src/timeline-next/projection.ts +1028 -0
  212. package/src/timeline-next/row.tsx +1728 -0
  213. package/src/timeline-next/rules.ts +89 -0
  214. package/src/timeline-next/separator.tsx +73 -0
  215. package/src/timeline-next/spacing.ts +127 -0
  216. package/src/timeline-next/status-line.tsx +41 -0
  217. package/src/timeline-next/status.ts +33 -0
  218. package/src/timeline-next/stories/compare-renderer.stories.tsx +190 -0
  219. package/src/timeline-next/stories/compare-sessions/.gitignore +3 -0
  220. package/src/timeline-next/stories/compare.stories.tsx +486 -0
  221. package/src/timeline-next/stories/playground.stories.tsx +297 -0
  222. package/src/timeline-next/stories/session-replay.ts +1156 -0
  223. package/src/timeline-next/stories/session-timeline.tsx +50 -0
  224. package/src/timeline-next/stories/subagent-status.stories.tsx +132 -0
  225. package/src/timeline-next/timeline-next.css +649 -0
  226. package/src/timeline-next/tools/__snapshots__/activity-label.test.ts.snap +39 -0
  227. package/src/timeline-next/tools/activity-label.ts +166 -0
  228. package/src/timeline-next/tools/assistant-content.tsx +84 -0
  229. package/src/timeline-next/tools/context-group.tsx +619 -0
  230. package/src/timeline-next/tools/error-card.tsx +147 -0
  231. package/src/timeline-next/tools/explore.tsx +119 -0
  232. package/src/timeline-next/tools/file-group.tsx +128 -0
  233. package/src/timeline-next/tools/patch.tsx +174 -0
  234. package/src/timeline-next/tools/shell.tsx +186 -0
  235. package/src/timeline-next/tools/thought.tsx +87 -0
  236. package/src/timeline-next/tools/tool-display.tsx +119 -0
  237. package/src/tools/ansi.ts +8 -0
  238. package/src/tools/context-group-label.ts +123 -0
  239. package/src/tools/file-runs.ts +35 -0
  240. package/src/tools/project-path.ts +18 -0
  241. package/src/tools/read-group.stories.tsx +159 -0
  242. package/src/tools/run-machine.ts +185 -0
  243. package/src/tools/shell-output-machine.ts +233 -0
  244. package/src/tools/shell-output.ts +91 -0
  245. package/src/tools/subagent-row-variants.stories.tsx +129 -0
  246. package/src/tools/tool-group.stories.tsx +345 -0
  247. package/src/tools/tool-renderer.tsx +2876 -0
  248. package/src/v2/components/line-comment-annotations-v2.tsx +215 -0
  249. package/src/v2/components/session-file-panel-v2.tsx +149 -0
  250. package/src/v2/components/session-progress-indicator-v2.css +5 -0
  251. package/src/v2/components/session-progress-indicator-v2.stories.tsx +86 -0
  252. package/src/v2/components/session-progress-indicator-v2.tsx +16 -0
  253. package/src/v2/components/session-review-empty-changes-v2.tsx +17 -0
  254. package/src/v2/components/session-review-empty-no-git-v2.tsx +28 -0
  255. package/src/v2/components/session-review-file-preview-v2-virtualize.ts +5 -0
  256. package/src/v2/components/session-review-file-preview-v2.tsx +266 -0
  257. package/src/v2/components/session-review-v2.css +653 -0
  258. package/src/v2/components/session-review-v2.tsx +422 -0
  259. package/src/v2/components/sidebar-presence-machine.ts +69 -0
  260. package/tsconfig.json +20 -0
  261. package/README.md +0 -3
@@ -0,0 +1,2109 @@
1
+ [data-component="user-message"] {
2
+ font-family: var(--font-family-sans);
3
+ font-size: var(--font-size-base);
4
+ font-style: normal;
5
+ font-weight: var(--font-weight-regular);
6
+ line-height: var(--line-height-large);
7
+ letter-spacing: var(--letter-spacing-normal);
8
+ color: var(--v2-text-text-base);
9
+ display: flex;
10
+ flex-direction: column;
11
+ align-items: flex-end;
12
+ align-self: stretch;
13
+ width: 100%;
14
+ max-width: 100%;
15
+ gap: 0;
16
+
17
+ [data-slot="user-message-attachments"] {
18
+ display: flex;
19
+ flex-wrap: wrap;
20
+ justify-content: flex-end;
21
+ gap: 8px;
22
+ width: fit-content;
23
+ max-width: min(82%, 64ch);
24
+ margin-inline-start: auto;
25
+ }
26
+
27
+ [data-slot="user-message-attachment"] {
28
+ display: flex;
29
+ flex-direction: column;
30
+ align-items: center;
31
+ justify-content: center;
32
+ min-width: 0;
33
+ border-radius: 6px;
34
+ overflow: hidden;
35
+ background: var(--v2-background-bg-layer-02);
36
+ border: 0.5px solid var(--v2-border-border-base);
37
+ cursor: default;
38
+ transition:
39
+ border-color 0.15s ease,
40
+ opacity 0.3s ease;
41
+
42
+ &:hover {
43
+ border-color: var(--v2-border-border-strong);
44
+ }
45
+
46
+ &[data-clickable] {
47
+ cursor: pointer;
48
+ }
49
+
50
+ &[data-type="image"] {
51
+ position: relative;
52
+ height: 88px;
53
+ aspect-ratio: 3 / 2;
54
+ border: none;
55
+
56
+ /* inset box-shadows do not paint over <img> content, so the hairline is an overlay */
57
+ &::after {
58
+ content: "";
59
+ position: absolute;
60
+ inset: 0;
61
+ border-radius: inherit;
62
+ box-shadow: inset 0 0 0 0.5px var(--v2-border-border-base);
63
+ pointer-events: none;
64
+ }
65
+ }
66
+
67
+ &[data-type="file"] {
68
+ width: min(220px, 100%);
69
+ height: 48px;
70
+ padding: 0 10px;
71
+ }
72
+ }
73
+
74
+ [data-slot="user-message-attachment-image"] {
75
+ width: 100%;
76
+ height: 100%;
77
+ object-fit: cover;
78
+ }
79
+
80
+ [data-slot="user-message-attachment-icon"] {
81
+ width: 100%;
82
+ height: 100%;
83
+ display: flex;
84
+ align-items: center;
85
+ justify-content: center;
86
+ color: var(--icon-weak);
87
+
88
+ [data-slot="icon-svg"] {
89
+ width: 20px;
90
+ height: 20px;
91
+ }
92
+ }
93
+
94
+ [data-slot="user-message-attachment-file"] {
95
+ width: 100%;
96
+ min-width: 0;
97
+ display: flex;
98
+ align-items: center;
99
+ gap: 8px;
100
+
101
+ [data-component="file-icon"] {
102
+ width: 20px;
103
+ height: 20px;
104
+ flex: none;
105
+ }
106
+ }
107
+
108
+ [data-slot="user-message-attachment-name"] {
109
+ min-width: 0;
110
+ overflow: hidden;
111
+ text-overflow: ellipsis;
112
+ white-space: nowrap;
113
+ color: var(--v2-text-text-muted);
114
+ font-size: var(--font-size-small);
115
+ line-height: var(--line-height-large);
116
+ }
117
+
118
+ [data-slot="user-message-body"] {
119
+ width: fit-content;
120
+ max-width: min(82%, 64ch);
121
+ margin-inline-start: auto;
122
+ display: flex;
123
+ flex-direction: column;
124
+ align-items: flex-end;
125
+ }
126
+
127
+ /* Like the iOS app's Voice badge: on the bubble's top leading corner, ringed in the page background. */
128
+ [data-slot="user-message-body"][data-voice="true"] {
129
+ position: relative;
130
+ margin-top: 8px;
131
+ }
132
+
133
+ [data-slot="user-message-voice"] {
134
+ position: absolute;
135
+ top: -8px;
136
+ inset-inline-start: -8px;
137
+ z-index: 1;
138
+ width: 20px;
139
+ height: 20px;
140
+ border-radius: 9999px;
141
+ background: var(--v2-background-bg-layer-03);
142
+ box-shadow: 0 0 0 2px var(--v2-background-bg-base);
143
+
144
+ [data-component="tooltip-v2-trigger"] {
145
+ width: 100%;
146
+ height: 100%;
147
+ display: flex;
148
+ align-items: center;
149
+ justify-content: center;
150
+ }
151
+
152
+ [data-slot="icon-svg"] {
153
+ width: 14px;
154
+ height: 14px;
155
+ }
156
+ }
157
+
158
+ [data-slot="user-message-voice"] {
159
+ color: var(--v2-icon-icon-muted);
160
+ }
161
+
162
+ [data-slot="user-message-text"] {
163
+ display: inline-block;
164
+ white-space: pre-wrap;
165
+ word-break: break-word;
166
+ overflow: hidden;
167
+ unicode-bidi: plaintext;
168
+ background: var(--v2-background-bg-layer-02);
169
+ border: none;
170
+ padding: 8px 12px;
171
+ border-radius: 10px;
172
+ /* Where two bubbles of a run meet, their trailing corners tighten to 4px. */
173
+ border-start-end-radius: calc(10px - 6px * var(--user-run-top, 0));
174
+ border-end-end-radius: calc(10px - 6px * var(--user-run-bottom, 0));
175
+ transition:
176
+ background-color 150ms ease-out,
177
+ color 150ms ease-out;
178
+
179
+ :root[data-motion="reduce"] & {
180
+ transition: none;
181
+ }
182
+
183
+ [data-highlight="file"],
184
+ [data-highlight="agent"] {
185
+ color: var(--v2-text-text-accent);
186
+ font-weight: 440;
187
+ direction: ltr;
188
+ unicode-bidi: isolate;
189
+ }
190
+
191
+ [data-slot="user-message-mention-prefix"] {
192
+ color: var(--v2-text-text-accent);
193
+ }
194
+
195
+ [data-slot="user-message-link"] {
196
+ color: inherit;
197
+ text-decoration: underline;
198
+ text-decoration-color: color-mix(in oklch, currentColor 40%, transparent);
199
+ text-underline-offset: 2px;
200
+ cursor: pointer;
201
+ /* Focus scrolls a link in a folded message clear of the 40px fade. */
202
+ scroll-margin-block-end: 40px;
203
+
204
+ &:hover {
205
+ text-decoration-color: currentColor;
206
+ }
207
+
208
+ &:focus-visible {
209
+ outline: 2px solid var(--v2-border-border-focus);
210
+ outline-offset: 2px;
211
+ border-radius: 2px;
212
+ }
213
+ }
214
+
215
+ max-width: 100%;
216
+ }
217
+
218
+ /* A folded message is laid out whole and clipped, so copy, select-all and assistive tech still get all of it. Its
219
+ last lines fade out (a mask, not a crop) into the toggle. Opening and closing are instant. The inline padding,
220
+ taken back by the margin, is room for a link's focus ring at the start and end of a line. */
221
+ [data-slot="user-message-fold"] {
222
+ overflow: hidden;
223
+ padding-inline: 5px;
224
+ margin-inline: -5px;
225
+
226
+ /* unicode-bidi isn't inherited, and each paragraph of mixed LTR and RTL text takes its own direction. */
227
+ > div {
228
+ unicode-bidi: plaintext;
229
+ }
230
+
231
+ &[data-folded] {
232
+ mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
233
+ }
234
+ }
235
+
236
+ [data-slot="user-message-fold-toggle"] {
237
+ display: flex;
238
+ width: fit-content;
239
+ align-items: center;
240
+ gap: 2px;
241
+ height: 24px;
242
+ margin-top: 2px;
243
+ padding: 0;
244
+ border: none;
245
+ background: none;
246
+ white-space: nowrap;
247
+ user-select: none;
248
+ cursor: pointer;
249
+ font-size: 13px;
250
+ line-height: var(--line-height-compact);
251
+ font-weight: 530;
252
+ color: var(--v2-text-text-muted);
253
+
254
+ [data-slot="icon-svg"] {
255
+ color: var(--v2-icon-icon-muted);
256
+ }
257
+
258
+ &[aria-expanded="true"] [data-slot="icon-svg"] {
259
+ transform: rotate(180deg);
260
+ }
261
+
262
+ &:hover {
263
+ color: var(--v2-text-text-base);
264
+ }
265
+
266
+ &:focus-visible {
267
+ outline: 2px solid var(--v2-border-border-focus);
268
+ outline-offset: 2px;
269
+ border-radius: 4px;
270
+ }
271
+ }
272
+
273
+ [data-slot="user-message-copy-wrapper"] {
274
+ height: calc(20px * var(--user-run-meta, 1));
275
+ margin-top: calc(8px * var(--user-run-meta, 1));
276
+ display: flex;
277
+ align-items: center;
278
+ justify-content: flex-end;
279
+ gap: 8px;
280
+ width: 100%;
281
+
282
+ /* The meta line shows and hides at once, together with the chevron. */
283
+ @media (hover: hover) {
284
+ opacity: 0;
285
+ pointer-events: none;
286
+ }
287
+
288
+ [data-component="tooltip-v2-trigger"] {
289
+ display: inline-flex;
290
+ width: fit-content;
291
+ }
292
+ }
293
+
294
+ [data-slot="user-message-meta"] {
295
+ --user-message-transition-gap: 4px;
296
+ display: flex;
297
+ align-items: center;
298
+ justify-content: flex-end;
299
+ gap: 4px;
300
+ user-select: none;
301
+ text-align: end;
302
+ flex: 1 1 auto;
303
+ min-width: 0;
304
+ overflow: hidden;
305
+ white-space: nowrap;
306
+ }
307
+
308
+ [data-slot="user-message-meta-label"] {
309
+ display: flex;
310
+ align-items: center;
311
+ gap: 4px;
312
+ min-width: 0;
313
+ overflow: hidden;
314
+ }
315
+
316
+ [data-slot="user-message-meta-item"] {
317
+ min-width: 0;
318
+ overflow: hidden;
319
+ text-overflow: ellipsis;
320
+
321
+ /* The variant reads as a qualifier of the model before it, so it is never the part that truncates. */
322
+ &[data-variant] {
323
+ flex: none;
324
+ }
325
+ }
326
+
327
+ [data-slot="user-message-meta-separator"] {
328
+ flex: none;
329
+ }
330
+
331
+ [data-slot="user-message-meta-wrap"],
332
+ [data-slot="user-message-meta-tail"] {
333
+ font-family: var(--v2-font-family-sans);
334
+ font-size: 12px;
335
+ font-weight: 440;
336
+ line-height: 18px;
337
+ letter-spacing: 0.05px;
338
+ color: var(--v2-text-text-faint);
339
+ cursor: default;
340
+ }
341
+
342
+ [data-slot="user-message-meta-wrap"] {
343
+ flex: 1 1 auto;
344
+ min-width: 0;
345
+ display: flex;
346
+ align-items: center;
347
+ justify-content: flex-end;
348
+ overflow: hidden;
349
+ gap: 0;
350
+ }
351
+
352
+ [data-slot="user-message-meta-tail"] {
353
+ display: inline-flex;
354
+ align-items: center;
355
+ gap: 4px;
356
+ user-select: none;
357
+ flex: 0 0 auto;
358
+ white-space: nowrap;
359
+ text-align: end;
360
+
361
+ @media (hover: hover) {
362
+ opacity: 0;
363
+ pointer-events: none;
364
+ }
365
+ }
366
+
367
+ [data-slot="user-message-transition"] {
368
+ display: inline-grid;
369
+ grid-template-columns: 0fr;
370
+ flex: none;
371
+ min-width: 0;
372
+ opacity: 0;
373
+ visibility: hidden;
374
+ margin-inline-end: calc(-1 * var(--user-message-transition-gap));
375
+
376
+ /* Labels and actions slide in as they arrive and leave at once, like the Pending label on delivery. Active ones
377
+ inherit visibility, so a folded message's hidden footer also hides them. */
378
+ &[data-active="true"] {
379
+ grid-template-columns: 1fr;
380
+ margin-inline-end: 0;
381
+ opacity: 1;
382
+ visibility: inherit;
383
+ transition:
384
+ grid-template-columns 200ms ease-out,
385
+ margin-inline-end 200ms ease-out,
386
+ opacity 200ms ease-out;
387
+ }
388
+ }
389
+
390
+ [data-slot="user-message-transition-inner"] {
391
+ display: inline-flex;
392
+ align-items: center;
393
+ gap: var(--user-message-transition-gap);
394
+ min-width: 0;
395
+ overflow: clip;
396
+ white-space: nowrap;
397
+ }
398
+
399
+ [data-slot="user-message-transition"][data-active="true"]:focus-within [data-slot="user-message-transition-inner"] {
400
+ overflow: visible;
401
+ }
402
+
403
+ /* Delivery swaps Pending for the time at once, and a growing row settles its labels in place: its pending status
404
+ can land a few frames after it appears. */
405
+ :root[data-motion="reduce"] &,
406
+ &[data-delivering],
407
+ [data-timeline-grow] & {
408
+ [data-slot="user-message-transition"] {
409
+ transition: none;
410
+ }
411
+ }
412
+
413
+ /* A closed menu hands focus back without a ring, so only keyboard focus keeps the meta line shown. */
414
+ &:has([data-slot="user-message-body"]:hover) [data-slot="user-message-copy-wrapper"],
415
+ &:not(:has([data-slot="user-message-body"])):hover [data-slot="user-message-copy-wrapper"],
416
+ /* A footer holding its own buttons, as the /btw panel's does, stays reachable anywhere over the message. */
417
+ &:has([data-slot="user-message-copy-wrapper"] button):hover [data-slot="user-message-copy-wrapper"],
418
+ &:has(:focus-visible) [data-slot="user-message-copy-wrapper"],
419
+ [data-slot="user-message-copy-wrapper"]:has([data-expanded], [data-closing]),
420
+ &:has([data-slot="user-message-body"]:hover) [data-slot="user-message-meta-tail"],
421
+ &:has([data-slot="user-message-copy-wrapper"] button):hover [data-slot="user-message-meta-tail"],
422
+ &:has(:focus-visible) [data-slot="user-message-meta-tail"] {
423
+ opacity: 1;
424
+ pointer-events: auto;
425
+ }
426
+
427
+ /* A run's last message carries the whole run's agent and model, so hovering anywhere in the run shows it. */
428
+ &[data-run-hovered] [data-slot="user-message-copy-wrapper"] {
429
+ opacity: 1;
430
+ pointer-events: auto;
431
+ }
432
+
433
+ /* A pending steer keeps its Pending label in view. */
434
+ &[data-pending] [data-slot="user-message-copy-wrapper"] {
435
+ opacity: 1;
436
+ pointer-events: auto;
437
+ }
438
+
439
+ /* Its agent and model show on hover, like any other message's meta line. */
440
+ @media (hover: hover) {
441
+ &[data-pending] {
442
+ [data-slot="user-message-meta-label"],
443
+ [data-slot="user-message-pending-separator"] {
444
+ opacity: 0;
445
+ }
446
+ }
447
+
448
+ &[data-pending]:has([data-slot="user-message-body"]:hover),
449
+ &[data-pending]:not(:has([data-slot="user-message-body"])):hover,
450
+ &[data-pending]:has(:focus-visible),
451
+ &[data-pending][data-run-hovered] {
452
+ [data-slot="user-message-meta-label"],
453
+ [data-slot="user-message-pending-separator"] {
454
+ opacity: 1;
455
+ }
456
+ }
457
+ }
458
+
459
+ [data-slot="user-message-copy-wrapper"] > * {
460
+ opacity: var(--user-run-meta, 1);
461
+ }
462
+
463
+ /* The bubbles of a run and the gaps between them are one hover zone: each body reaches across the 4px gap to its
464
+ neighbor, so the pointer never falls between them. */
465
+ [data-slot="user-message-body"] {
466
+ position: relative;
467
+ }
468
+
469
+ &[data-run-above] [data-slot="user-message-body"]::before,
470
+ &[data-run-folded] [data-slot="user-message-body"]::after {
471
+ content: "";
472
+ position: absolute;
473
+ inset-inline: 0;
474
+ height: 4px;
475
+ }
476
+
477
+ &[data-run-above] [data-slot="user-message-body"]::before {
478
+ bottom: 100%;
479
+ }
480
+
481
+ &[data-run-folded] [data-slot="user-message-body"]::after {
482
+ top: 100%;
483
+ }
484
+
485
+ /* The last message of a run carries the meta line; the others fold theirs away. */
486
+ &[data-run-folded] {
487
+ [data-slot="user-message-body"] {
488
+ position: relative;
489
+ }
490
+
491
+ [data-slot="user-message-copy-wrapper"] {
492
+ overflow: clip;
493
+ pointer-events: none;
494
+ }
495
+ }
496
+
497
+ &[data-run-meta-hidden] [data-slot="user-message-copy-wrapper"] {
498
+ visibility: hidden;
499
+ }
500
+
501
+ /* Every bubble offers its actions from a chevron pinned to its top trailing corner, centered on the first line.
502
+ The bubble color fades in behind it so text under the corner never competes with the control. */
503
+ [data-slot="user-message-text"] {
504
+ --user-message-bubble: var(--v2-background-bg-layer-02);
505
+ position: relative;
506
+ }
507
+
508
+ /* Inset from the trailing edge by the same distance as from the top. */
509
+ [data-slot="user-message-menu"] {
510
+ --user-message-menu-inset: calc(8px + (1lh - 20px) / 2);
511
+ position: absolute;
512
+ top: var(--user-message-menu-inset);
513
+ inset-inline-end: var(--user-message-menu-inset);
514
+ display: flex;
515
+ padding-inline-start: 16px;
516
+ background: linear-gradient(to left, var(--user-message-bubble) calc(100% - 16px), transparent);
517
+ border-radius: 4px;
518
+
519
+ &:dir(rtl) {
520
+ background: linear-gradient(to right, var(--user-message-bubble) calc(100% - 16px), transparent);
521
+ }
522
+
523
+ @media (hover: hover) {
524
+ opacity: 0;
525
+ pointer-events: none;
526
+ }
527
+ }
528
+
529
+ /* Without hover the chevron always shows, so the first line keeps room for it instead of fading text under it. The
530
+ float also widens a short bubble, so a one-word prompt stays readable. 20px spans the 20px button, less the 12px
531
+ text padding it overlaps, plus a 4px gap at the 8px inset. */
532
+ @media not (hover: hover) {
533
+ [data-slot="user-message-text"]:has(> [data-slot="user-message-menu"])::before {
534
+ content: "";
535
+ float: inline-end;
536
+ width: 20px;
537
+ height: 1lh;
538
+ }
539
+
540
+ [data-slot="user-message-text"] > [data-slot="user-message-menu"] {
541
+ padding: 0;
542
+ background: none;
543
+ }
544
+ }
545
+
546
+ [data-slot="user-message-copy-wrapper"] [data-slot="user-message-menu"] {
547
+ position: static;
548
+ padding: 0;
549
+ background: none;
550
+ }
551
+
552
+ /* Only the bubble itself shows its chevron; a message without one shows it in its footer on hover. A closed menu hands
553
+ focus back without a ring, so only keyboard focus keeps the chevron shown. */
554
+ [data-slot="user-message-text"]:hover [data-slot="user-message-menu"],
555
+ &:not(:has([data-slot="user-message-text"])):hover [data-slot="user-message-menu"],
556
+ &:has(:focus-visible) [data-slot="user-message-menu"],
557
+ [data-slot="user-message-menu"]:has([data-expanded], [data-closing]) {
558
+ opacity: 1;
559
+ pointer-events: auto;
560
+ }
561
+
562
+ .text-text-strong {
563
+ color: var(--v2-text-text-base);
564
+ }
565
+
566
+ .font-medium {
567
+ font-weight: var(--font-weight-medium);
568
+ }
569
+ }
570
+
571
+ [data-component="text-part"] {
572
+ width: 100%;
573
+ margin-top: 24px;
574
+
575
+ [data-slot="text-part-body"] {
576
+ margin-top: 0;
577
+ }
578
+
579
+ [data-slot="text-part-copy-wrapper"] {
580
+ height: 20px;
581
+ margin-top: 8px;
582
+ display: flex;
583
+ align-items: center;
584
+ justify-content: flex-start;
585
+ gap: 4px;
586
+
587
+ [data-component="tooltip-v2-trigger"] {
588
+ display: inline-flex;
589
+ flex: none;
590
+ width: fit-content;
591
+ }
592
+
593
+ [data-component="icon-button-v2"] [data-slot="icon-svg"] {
594
+ width: 14px;
595
+ height: 14px;
596
+ }
597
+
598
+ /* Pulls the glyph toward the reply's text edge. */
599
+ [data-component="tooltip-v2-trigger"]:first-child {
600
+ margin-inline-start: -2px;
601
+ }
602
+ }
603
+
604
+ [data-slot="text-part-meta"] {
605
+ display: flex;
606
+ align-items: center;
607
+ gap: 4px;
608
+ min-width: 0;
609
+ overflow: hidden;
610
+ white-space: nowrap;
611
+ font-family: var(--v2-font-family-sans);
612
+ font-size: 12px;
613
+ font-weight: 440;
614
+ line-height: 18px;
615
+ letter-spacing: 0.05px;
616
+ color: var(--v2-text-text-faint);
617
+ cursor: default;
618
+ user-select: none;
619
+ }
620
+
621
+ [data-slot="text-part-meta-item"] {
622
+ min-width: 0;
623
+ overflow: hidden;
624
+ text-overflow: ellipsis;
625
+
626
+ &[data-variant] {
627
+ flex: none;
628
+ }
629
+ }
630
+
631
+ [data-slot="text-part-meta-speed"] {
632
+ display: none;
633
+ flex: none;
634
+ align-items: center;
635
+ gap: 4px;
636
+ }
637
+
638
+ @media (hover: hover) {
639
+ [data-slot="text-part-meta-speed"] {
640
+ display: inline-flex;
641
+ }
642
+ }
643
+
644
+ [data-slot="text-part-meta-separator"] {
645
+ flex: none;
646
+ }
647
+
648
+ [data-slot="text-part-copy-wrapper"][data-interrupted] {
649
+ width: 100%;
650
+ justify-content: flex-end;
651
+ }
652
+
653
+ :root[data-motion="reduce"] & [data-slot="text-part-copy-wrapper"] {
654
+ transition: none;
655
+ }
656
+
657
+ @media (hover: hover) {
658
+ &:not(:hover, :focus-within) {
659
+ [data-slot="text-part-copy-wrapper"]:not([data-keep-copy-visible]),
660
+ [data-slot="text-part-copy-wrapper"][data-keep-copy-visible] [data-slot="text-part-meta"] {
661
+ opacity: 0;
662
+ pointer-events: none;
663
+ }
664
+ }
665
+ }
666
+ }
667
+
668
+ [data-timeline-row="AssistantPart"][data-timeline-spacing="content"] [data-component="text-part"] {
669
+ margin-top: 0;
670
+ }
671
+
672
+ [data-component="reasoning-part"] {
673
+ width: 100%;
674
+ color: var(--v2-text-text-muted);
675
+ line-height: var(--line-height-normal);
676
+
677
+ [data-component="markdown"] {
678
+ margin-top: 0;
679
+ font-style: normal;
680
+ font-size: 13px;
681
+ line-height: var(--line-height-base);
682
+ color: var(--v2-text-text-muted);
683
+
684
+ h1,
685
+ h2,
686
+ h3,
687
+ h4,
688
+ h5,
689
+ h6 {
690
+ font-size: inherit;
691
+ font-weight: inherit;
692
+ color: inherit;
693
+ }
694
+
695
+ strong,
696
+ b {
697
+ color: var(--v2-text-text-muted);
698
+ }
699
+
700
+ p:has(strong) {
701
+ margin-top: 24px;
702
+ margin-bottom: 0;
703
+
704
+ &:first-child {
705
+ margin-top: 0;
706
+ }
707
+ }
708
+ }
709
+ }
710
+
711
+ @media (prefers-color-scheme: dark) {
712
+ [data-component="reasoning-part"] [data-component="markdown"] :not(pre) > code {
713
+ opacity: 0.6;
714
+ }
715
+ }
716
+
717
+ /* Tool output regions take focus so the keyboard can scroll them, and draw no ring. */
718
+ [data-component="tool-output"]:focus-visible,
719
+ [data-slot="bash-scroll"]:focus-visible {
720
+ outline: none;
721
+ }
722
+
723
+ [data-component="tool-output"] {
724
+ white-space: pre;
725
+ padding: 0;
726
+ margin-bottom: 0px;
727
+ height: fit-content;
728
+ display: flex;
729
+ flex-direction: column;
730
+ align-items: flex-start;
731
+ justify-content: flex-start;
732
+
733
+ [data-component="markdown"] {
734
+ width: 100%;
735
+ min-width: 0;
736
+
737
+ pre {
738
+ margin: 0;
739
+ padding: 0;
740
+ background-color: transparent !important;
741
+ border: none !important;
742
+ }
743
+ }
744
+
745
+ pre {
746
+ margin: 0;
747
+ padding: 0;
748
+ background: none;
749
+ }
750
+
751
+ &[data-scrollable] {
752
+ height: auto;
753
+ max-height: 240px;
754
+ overflow-y: auto;
755
+ scrollbar-width: none;
756
+ -ms-overflow-style: none;
757
+
758
+ &::-webkit-scrollbar {
759
+ display: none;
760
+ }
761
+
762
+ [data-component="markdown"] {
763
+ overflow: visible;
764
+ }
765
+ }
766
+ }
767
+
768
+ [data-component="read-image"] {
769
+ min-width: 0;
770
+
771
+ img {
772
+ cursor: zoom-in;
773
+ display: block;
774
+ max-width: 100%;
775
+ height: auto;
776
+ border-radius: 4px;
777
+ }
778
+ }
779
+
780
+ [data-slot="linked-text-link"] {
781
+ color: inherit;
782
+ text-decoration: underline;
783
+ text-decoration-color: color-mix(in oklch, currentColor 40%, transparent);
784
+ text-underline-offset: 2px;
785
+
786
+ &:hover {
787
+ color: var(--v2-text-text-base);
788
+ text-decoration-color: currentColor;
789
+ }
790
+ }
791
+
792
+ [data-component="bash-output"] {
793
+ direction: ltr;
794
+ unicode-bidi: isolate;
795
+ width: 100%;
796
+ border: 0.5px solid var(--v2-border-border-base);
797
+ border-radius: 6px;
798
+ background: transparent;
799
+ position: relative;
800
+ overflow: hidden;
801
+
802
+ [data-slot="bash-copy"] {
803
+ position: absolute;
804
+ top: 4px;
805
+ right: 4px;
806
+ transition: opacity 0.15s ease;
807
+
808
+ @media (hover: hover) {
809
+ opacity: 0;
810
+ pointer-events: none;
811
+ }
812
+ }
813
+
814
+ &:hover [data-slot="bash-copy"],
815
+ &:focus-within [data-slot="bash-copy"] {
816
+ opacity: 1;
817
+ pointer-events: auto;
818
+ }
819
+
820
+ [data-slot="bash-scroll"] {
821
+ width: 100%;
822
+ overflow-y: auto;
823
+ overflow-x: hidden;
824
+ max-height: 240px;
825
+
826
+ scrollbar-width: none;
827
+ &::-webkit-scrollbar {
828
+ display: none;
829
+ }
830
+ }
831
+
832
+ [data-slot="bash-pre"] {
833
+ margin: 0;
834
+ padding: 12px;
835
+ }
836
+
837
+ [data-slot="bash-pre"] code {
838
+ font-family: var(--font-family-mono);
839
+ font-feature-settings: var(--font-family-mono--font-feature-settings);
840
+ font-size: 13px;
841
+ line-height: var(--line-height-large);
842
+ white-space: pre-wrap;
843
+ overflow-wrap: anywhere;
844
+ }
845
+
846
+ &[data-variant="shell"] {
847
+ background: var(--v2-background-bg-base);
848
+
849
+ [data-slot="bash-pre"] code {
850
+ display: block;
851
+ font-family: var(--v2-font-family-code);
852
+ font-weight: 440;
853
+ line-height: var(--line-height-base);
854
+ letter-spacing: -0.04px;
855
+ }
856
+
857
+ /* Each section stacks its copy button over its text in one grid cell, so the sticky button stays in view
858
+ while that section scrolls and never leaves its own section. */
859
+ [data-slot="bash-command"],
860
+ [data-slot="bash-result"] {
861
+ display: grid;
862
+ grid-template-columns: minmax(0, 1fr);
863
+ }
864
+
865
+ [data-slot="bash-pre"],
866
+ [data-slot="bash-copy"] {
867
+ grid-area: 1 / 1;
868
+ }
869
+
870
+ [data-slot="bash-copy"] {
871
+ position: sticky;
872
+ top: 4px;
873
+ z-index: 1;
874
+ justify-self: end;
875
+ align-self: start;
876
+ margin: 4px;
877
+ }
878
+
879
+ /* The ghost button is transparent, so paint the section's background behind it. It fades out to the left, top
880
+ and bottom so text at its edges softens instead of being cut, and runs to the card edge on the right. It is
881
+ solid only across the button's height and never takes pointer events, so there is no gutter and the lines
882
+ below keep the full width. The top stops at the section edge, so it never covers the border above the output. */
883
+ [data-slot="bash-copy"]::before {
884
+ content: "";
885
+ position: absolute;
886
+ z-index: -1;
887
+ inset: -4px -4px -8px -24px;
888
+ background: var(--bash-section-background);
889
+ mask-image:
890
+ linear-gradient(to right, transparent, #000 24px),
891
+ linear-gradient(transparent, #000 8px, #000 calc(100% - 8px), transparent);
892
+ mask-composite: intersect;
893
+ pointer-events: none;
894
+ }
895
+
896
+ [data-slot="bash-result"] {
897
+ --bash-section-background: var(--v2-background-bg-layer-01);
898
+ border-block-start: 0.5px solid var(--v2-border-border-base);
899
+ background: var(--bash-section-background);
900
+ color: var(--v2-text-text-muted);
901
+ }
902
+
903
+ /* Code Mode results have no command line above them. */
904
+ [data-slot="bash-result"]:first-child {
905
+ border-block-start: 0;
906
+ }
907
+
908
+ [data-slot="bash-command"] {
909
+ --bash-section-background: var(--v2-background-bg-base);
910
+ color: var(--v2-text-text-base);
911
+ }
912
+ }
913
+ }
914
+
915
+ /* Only a shell's own card; an Execute output card opens inside the content and must not move the rows above it. */
916
+ [data-component="collapsible"].tool-collapsible:has(
917
+ > [data-slot="collapsible-content"] > [data-component="bash-output"][data-variant="shell"]
918
+ ) {
919
+ --tool-content-gap: 8px;
920
+ }
921
+
922
+ [data-component="edit-content"] {
923
+ border-radius: inherit;
924
+ border-top: 0.5px solid var(--v2-border-border-muted);
925
+ overflow-x: hidden;
926
+ overflow-y: visible;
927
+
928
+ scrollbar-width: none;
929
+ -ms-overflow-style: none;
930
+
931
+ &::-webkit-scrollbar {
932
+ display: none;
933
+ }
934
+
935
+ [data-component="diff"] {
936
+ border-radius: inherit;
937
+ overflow: hidden;
938
+ }
939
+ }
940
+
941
+ [data-component="write-content"] {
942
+ border-radius: inherit;
943
+ border-top: 0.5px solid var(--v2-border-border-muted);
944
+ overflow-x: hidden;
945
+ overflow-y: visible;
946
+
947
+ [data-component="code"] {
948
+ padding-bottom: 0 !important;
949
+ border-radius: inherit;
950
+ overflow: hidden;
951
+ }
952
+
953
+ /* Hide scrollbar */
954
+ scrollbar-width: none;
955
+ -ms-overflow-style: none;
956
+
957
+ &::-webkit-scrollbar {
958
+ display: none;
959
+ }
960
+ }
961
+
962
+ [data-component="tool-action"] {
963
+ width: 24px;
964
+ height: 24px;
965
+ display: flex;
966
+ align-items: center;
967
+ justify-content: center;
968
+ }
969
+
970
+ [data-component="file-counts"] {
971
+ display: flex;
972
+ align-items: center;
973
+ gap: 8px;
974
+ min-width: 0;
975
+ padding: 6px 0;
976
+ font-size: 13px;
977
+ color: var(--v2-text-text-base);
978
+
979
+ [data-slot="file-counts-name"] {
980
+ flex: 1;
981
+ min-width: 0;
982
+ overflow: hidden;
983
+ text-overflow: ellipsis;
984
+ white-space: nowrap;
985
+ }
986
+
987
+ [data-slot="file-counts-directory"] {
988
+ color: var(--v2-text-text-muted);
989
+ }
990
+
991
+ [data-component="diff-changes"] {
992
+ flex-shrink: 0;
993
+ }
994
+
995
+ [data-component="diff-changes"] [data-empty] {
996
+ display: none;
997
+ }
998
+ }
999
+
1000
+ /* A script's changes are each their own card, set apart by the gap between a turn's items, so two changes to one file
1001
+ read as two. The New timeline spaces them its own way. */
1002
+ [data-script-change="patch"] + [data-script-change="patch"] {
1003
+ margin-top: 12px;
1004
+ }
1005
+
1006
+ [data-component="execute-tool-calls"] {
1007
+ display: flex;
1008
+ flex-direction: column;
1009
+ gap: 6px;
1010
+ min-width: 0;
1011
+ width: 100%;
1012
+ font-family: var(--v2-font-family-code);
1013
+ font-size: 13px;
1014
+ font-weight: 440;
1015
+ line-height: var(--line-height-base);
1016
+ letter-spacing: -0.04px;
1017
+ color: var(--v2-text-text-muted);
1018
+
1019
+ [data-slot="execute-tool-call"] {
1020
+ display: flex;
1021
+ align-items: center;
1022
+ gap: 6px;
1023
+ min-width: 0;
1024
+ white-space: nowrap;
1025
+ }
1026
+
1027
+ [data-slot="execute-tool-call-marker"] {
1028
+ display: inline-flex;
1029
+ justify-content: center;
1030
+ width: 14px;
1031
+ flex-shrink: 0;
1032
+ color: var(--v2-text-text-faint);
1033
+
1034
+ /* Centre on the lowercase code text rather than its line box. */
1035
+ [data-slot="icon-svg"] {
1036
+ transform: translateY(1px);
1037
+ }
1038
+ }
1039
+
1040
+ [data-slot="execute-tool-call-name"] {
1041
+ flex-shrink: 0;
1042
+ color: var(--v2-text-text-base);
1043
+ }
1044
+
1045
+ [data-slot="execute-tool-call-args"] {
1046
+ min-width: 0;
1047
+ overflow: hidden;
1048
+ text-overflow: ellipsis;
1049
+ }
1050
+
1051
+ [data-slot="execute-tool-call"][role="button"] {
1052
+ cursor: pointer;
1053
+
1054
+ &:hover [data-slot="execute-tool-call-name"],
1055
+ &:hover [data-slot="execute-tool-call-args"] {
1056
+ color: var(--v2-text-text-base);
1057
+ }
1058
+
1059
+ &:focus-visible {
1060
+ outline: 2px solid var(--v2-border-border-focus);
1061
+ outline-offset: 2px;
1062
+ border-radius: 4px;
1063
+ }
1064
+ }
1065
+
1066
+ /* Lines up with the calls' names, past their markers. */
1067
+ [data-slot="execute-tool-call-more"] {
1068
+ all: unset;
1069
+ width: fit-content;
1070
+ margin-inline-start: 20px;
1071
+ cursor: pointer;
1072
+ color: var(--v2-text-text-faint);
1073
+ user-select: none;
1074
+
1075
+ &:hover {
1076
+ color: var(--v2-text-text-base);
1077
+ }
1078
+
1079
+ &:focus-visible {
1080
+ outline: 2px solid var(--v2-border-border-focus);
1081
+ outline-offset: 2px;
1082
+ border-radius: 4px;
1083
+ }
1084
+ }
1085
+
1086
+ [data-slot="execute-tool-call-input"] {
1087
+ display: flex;
1088
+ flex-direction: column;
1089
+ gap: 2px;
1090
+ margin: 4px 0 2px 4px;
1091
+ padding-inline-start: 13px;
1092
+ border-inline-start: 0.5px solid var(--v2-border-border-base);
1093
+ max-height: 240px;
1094
+ overflow-y: auto;
1095
+ }
1096
+
1097
+ [data-slot="execute-tool-call-input-entry"] {
1098
+ display: flex;
1099
+ gap: 6px;
1100
+ min-width: 0;
1101
+
1102
+ dt {
1103
+ flex-shrink: 0;
1104
+ }
1105
+
1106
+ dd {
1107
+ margin: 0;
1108
+ min-width: 0;
1109
+ color: var(--v2-text-text-base);
1110
+ white-space: pre-wrap;
1111
+ overflow-wrap: anywhere;
1112
+ }
1113
+ }
1114
+
1115
+ [data-slot="execute-tool-call-arrow"] {
1116
+ display: inline-flex;
1117
+ flex-shrink: 0;
1118
+ color: var(--v2-text-text-faint);
1119
+ transition: transform 0.15s ease;
1120
+ }
1121
+
1122
+ [data-slot="execute-tool-call"][aria-expanded="true"] [data-slot="execute-tool-call-arrow"] {
1123
+ transform: rotate(90deg);
1124
+ }
1125
+
1126
+ [data-slot="execute-tool-call"][data-status="error"] [data-slot="execute-tool-call-marker"],
1127
+ [data-slot="execute-tool-error"] {
1128
+ color: var(--v2-state-fg-danger);
1129
+ }
1130
+
1131
+ [data-slot="execute-tool-output"] {
1132
+ margin-top: 4px;
1133
+ padding-inline-start: 20px;
1134
+ }
1135
+
1136
+ [data-slot="execute-tool-error"] {
1137
+ margin-top: 4px;
1138
+ max-height: 240px;
1139
+ overflow-y: auto;
1140
+ padding-inline-start: 20px;
1141
+ white-space: pre-wrap;
1142
+ overflow-wrap: anywhere;
1143
+ }
1144
+ }
1145
+
1146
+ [data-slot="execute-tool-call-marker"] [data-slot="icon-svg"] {
1147
+ color: inherit;
1148
+ }
1149
+
1150
+ [data-slot="execute-details-title"] {
1151
+ display: flex;
1152
+ align-items: center;
1153
+ gap: 8px;
1154
+ min-width: 0;
1155
+ }
1156
+
1157
+ [data-component="execute-details"] {
1158
+ display: flex;
1159
+ flex-direction: column;
1160
+ gap: 16px;
1161
+ width: 100%;
1162
+ min-width: 0;
1163
+ /* Code and output share the dialog's height and scroll in their own boxes, so the bottom padding always shows. */
1164
+ min-height: 0;
1165
+ padding: 0 16px 16px;
1166
+
1167
+ [data-slot="execute-details-section"] {
1168
+ display: flex;
1169
+ flex-direction: column;
1170
+ gap: 6px;
1171
+ min-width: 0;
1172
+ min-height: 0;
1173
+ }
1174
+
1175
+ [data-slot="execute-details-section-header"] {
1176
+ display: flex;
1177
+ align-items: center;
1178
+ gap: 8px;
1179
+ height: 24px;
1180
+
1181
+ > :last-child {
1182
+ margin-inline-start: auto;
1183
+ }
1184
+ }
1185
+
1186
+ [data-slot="execute-details-section-label"] {
1187
+ font-size: 13px;
1188
+ font-weight: 530;
1189
+ color: var(--v2-text-text-muted);
1190
+ }
1191
+
1192
+ [data-slot="execute-details-source"] {
1193
+ max-height: 360px;
1194
+ overflow: auto;
1195
+ border-radius: 8px;
1196
+ box-shadow: 0 0 0 0.5px var(--v2-border-border-base);
1197
+
1198
+ /* The file wrapper sets Pierre's defaults inline, so override them on the shadow host below that wrapper. */
1199
+ diffs-container {
1200
+ --diffs-min-number-column-width: var(--execute-details-number-width, 1ch);
1201
+ --opencode-diffs-number-inset: 12px;
1202
+ --diffs-gap-block: 4px;
1203
+ /* Wrapped blocks never scroll sideways; Pierre would otherwise subtract a scrollbar track from the bottom gap. */
1204
+ --diffs-scrollbar-gutter-override: 0px;
1205
+ }
1206
+ }
1207
+
1208
+ [data-tone="danger"] {
1209
+ --opencode-diffs-fg: var(--v2-state-fg-danger);
1210
+ }
1211
+ }
1212
+
1213
+ [data-component="exa-tool-output"] {
1214
+ display: flex;
1215
+ flex-direction: column;
1216
+ min-width: 0;
1217
+ width: 100%;
1218
+ font-family: var(--font-family-sans);
1219
+ font-size: 13px;
1220
+ line-height: 16px;
1221
+ color: var(--v2-text-text-muted);
1222
+ }
1223
+
1224
+ [data-slot="basic-tool-tool-subtitle"].exa-tool-query {
1225
+ display: block;
1226
+ max-width: 100%;
1227
+ overflow: hidden;
1228
+ text-overflow: ellipsis;
1229
+ white-space: nowrap;
1230
+ }
1231
+
1232
+ [data-slot="exa-tool-links"] {
1233
+ display: flex;
1234
+ flex-direction: column;
1235
+ align-items: flex-start;
1236
+ gap: 8px;
1237
+ min-width: 0;
1238
+ flex: 1 0 0;
1239
+ }
1240
+
1241
+ [data-slot="exa-tool-link"] {
1242
+ width: fit-content;
1243
+ max-width: 100%;
1244
+ align-self: flex-start;
1245
+ }
1246
+
1247
+ [data-slot="exa-tool-more"] {
1248
+ all: unset;
1249
+ cursor: pointer;
1250
+ width: fit-content;
1251
+ font-family: var(--font-family-sans);
1252
+ font-size: 13px;
1253
+ font-weight: var(--font-weight-regular, 440);
1254
+ line-height: var(--line-height-compact);
1255
+ letter-spacing: -0.04px;
1256
+ color: var(--v2-text-text-faint, #808080);
1257
+ user-select: none;
1258
+
1259
+ &:hover {
1260
+ color: var(--v2-text-text-muted);
1261
+ text-decoration: underline;
1262
+ text-underline-offset: 2px;
1263
+ }
1264
+
1265
+ &:focus-visible {
1266
+ outline: 2px solid var(--v2-border-border-focus);
1267
+ outline-offset: 2px;
1268
+ border-radius: 4px;
1269
+ }
1270
+ }
1271
+
1272
+ [data-component="todos"] {
1273
+ padding: 10px 0 24px 0;
1274
+ display: flex;
1275
+ flex-direction: column;
1276
+ gap: 8px;
1277
+
1278
+ [data-component="checkbox"] {
1279
+ --checkbox-align: flex-start;
1280
+ --checkbox-offset: 0.5px;
1281
+ }
1282
+
1283
+ [data-slot="message-part-todo-content"] {
1284
+ line-height: var(--line-height-normal);
1285
+
1286
+ &[data-completed="completed"] {
1287
+ text-decoration: line-through;
1288
+ color: var(--v2-text-text-faint);
1289
+ }
1290
+ }
1291
+ }
1292
+
1293
+ [data-component="context-tool-group-trigger"] {
1294
+ width: 100%;
1295
+ min-height: 24px;
1296
+ display: flex;
1297
+ align-items: center;
1298
+ justify-content: flex-start;
1299
+ gap: 0px;
1300
+ cursor: default;
1301
+
1302
+ [data-slot="context-tool-group-title"] {
1303
+ display: flex;
1304
+ align-items: center;
1305
+ gap: 4px;
1306
+ flex-shrink: 1;
1307
+ min-width: 0;
1308
+ }
1309
+
1310
+ [data-slot="context-tool-group-usage"] {
1311
+ flex-shrink: 0;
1312
+ display: flex;
1313
+ align-items: center;
1314
+ gap: 4px;
1315
+ color: var(--v2-text-text-muted);
1316
+ font-family: var(--v2-font-family-sans);
1317
+ font-size: 13px;
1318
+ font-weight: 440;
1319
+ line-height: var(--line-height-compact);
1320
+ letter-spacing: -0.04px;
1321
+
1322
+ & > [data-slot="context-tool-group-prefix"],
1323
+ & > [data-slot="context-tool-group-count"] {
1324
+ white-space: pre;
1325
+ }
1326
+ }
1327
+
1328
+ [data-slot="context-tool-group-count"] {
1329
+ color: var(--v2-text-text-base);
1330
+ font-variant-numeric: tabular-nums;
1331
+ }
1332
+
1333
+ [data-slot="context-tool-group-prefix"] {
1334
+ flex-shrink: 0;
1335
+ }
1336
+
1337
+ [data-slot="basic-tool-tool-title"] {
1338
+ overflow: hidden;
1339
+ text-overflow: ellipsis;
1340
+ white-space: nowrap;
1341
+ }
1342
+
1343
+ [data-slot="collapsible-arrow"] {
1344
+ color: var(--icon-weaker);
1345
+ cursor: pointer;
1346
+ }
1347
+ }
1348
+
1349
+ [data-component="collapsed-tool-group"] {
1350
+ --context-group-sticky-top: var(--sticky-accordion-top, 0px);
1351
+
1352
+ > [data-component="collapsible"].tool-collapsible {
1353
+ --tool-content-gap: 8px;
1354
+ gap: 0px;
1355
+
1356
+ > [data-slot="collapsible-trigger"][aria-expanded="true"] {
1357
+ position: sticky;
1358
+ top: var(--context-group-sticky-top);
1359
+ /* Above nested file headers as they scroll out under this row. */
1360
+ z-index: 21;
1361
+ height: calc(28px + var(--tool-content-gap));
1362
+ padding-bottom: var(--tool-content-gap);
1363
+ background-color: var(--v2-background-bg-base);
1364
+ }
1365
+
1366
+ /* Nested sticky file headers stop below the open group header. */
1367
+ > [data-slot="collapsible-content"] {
1368
+ --sticky-accordion-top: calc(var(--context-group-sticky-top) + 28px + var(--tool-content-gap));
1369
+ position: relative;
1370
+ margin-inline-start: 12px;
1371
+ padding-inline-start: 12px;
1372
+
1373
+ &::before {
1374
+ content: "";
1375
+ position: absolute;
1376
+ inset-inline-start: -0.25px;
1377
+ inset-block: 6px;
1378
+ width: 0.5px;
1379
+ background-color: var(--v2-border-border-base);
1380
+ pointer-events: none;
1381
+ }
1382
+ }
1383
+ }
1384
+ }
1385
+
1386
+ [data-notices-only] > [data-component="collapsed-tool-group"] > [data-component="collapsible"].tool-collapsible {
1387
+ --tool-content-gap: 0px;
1388
+ }
1389
+
1390
+ [data-component="context-tool-group-list"] {
1391
+ padding: 0;
1392
+ display: flex;
1393
+ flex-direction: column;
1394
+ gap: 8px;
1395
+
1396
+ [data-slot="context-tool-group-item"] {
1397
+ min-width: 0;
1398
+ min-height: 28px;
1399
+ display: flex;
1400
+ flex-direction: column;
1401
+ justify-content: center;
1402
+ padding: 0;
1403
+
1404
+ > [data-component="tool-part-wrapper"] {
1405
+ width: 100%;
1406
+ }
1407
+
1408
+ /* Grouped commentary follows the list rhythm instead of the timeline's text spacing. */
1409
+ > [data-component="text-part"] {
1410
+ margin-top: 0;
1411
+ }
1412
+
1413
+ > [data-component="tool-part-wrapper"]
1414
+ > [data-component="collapsible"]
1415
+ > [data-slot="collapsible-trigger"]:not([data-hide-details="true"]) {
1416
+ height: 28px;
1417
+ }
1418
+
1419
+ [data-slot="basic-tool-tool-info-structured"] {
1420
+ gap: 6px;
1421
+ }
1422
+
1423
+ [data-slot="basic-tool-tool-title"],
1424
+ [data-slot="basic-tool-tool-subtitle"],
1425
+ [data-slot="basic-tool-tool-arg"],
1426
+ [data-slot="context-tool-group-matches"] {
1427
+ font-family: var(--v2-font-family-sans);
1428
+ font-size: 13px;
1429
+ font-weight: 440;
1430
+ line-height: var(--line-height-compact);
1431
+ letter-spacing: -0.04px;
1432
+ }
1433
+
1434
+ [data-slot="basic-tool-tool-subtitle"] {
1435
+ color: var(--v2-text-text-faint);
1436
+ }
1437
+
1438
+ [data-slot="context-tool-group-dot"] {
1439
+ flex-shrink: 0;
1440
+ width: 6px;
1441
+ height: 6px;
1442
+ display: inline-flex;
1443
+ align-items: center;
1444
+ justify-content: center;
1445
+
1446
+ &::before {
1447
+ content: "";
1448
+ width: 2.25px;
1449
+ height: 2.25px;
1450
+ border-radius: 50%;
1451
+ background-color: var(--v2-icon-icon-muted);
1452
+ }
1453
+ }
1454
+
1455
+ [data-slot="context-tool-group-matches"] {
1456
+ flex-shrink: 0;
1457
+ white-space: nowrap;
1458
+ color: var(--v2-text-text-faint);
1459
+ }
1460
+ }
1461
+ }
1462
+
1463
+ [data-component="diagnostics"] {
1464
+ display: flex;
1465
+ flex-direction: column;
1466
+ gap: 4px;
1467
+ padding: 8px 12px;
1468
+ background-color: var(--v2-state-bg-danger);
1469
+ border-top: 0.5px solid var(--v2-state-border-danger);
1470
+
1471
+ [data-slot="diagnostic"] {
1472
+ display: flex;
1473
+ align-items: baseline;
1474
+ gap: 6px;
1475
+ font-family: var(--font-family-mono);
1476
+ font-size: var(--font-size-small);
1477
+ line-height: var(--line-height-large);
1478
+ }
1479
+
1480
+ [data-slot="diagnostic-label"] {
1481
+ color: var(--v2-state-fg-danger);
1482
+ font-weight: var(--font-weight-medium);
1483
+ text-transform: uppercase;
1484
+ letter-spacing: -0.5px;
1485
+ flex-shrink: 0;
1486
+ }
1487
+
1488
+ [data-slot="diagnostic-location"] {
1489
+ color: var(--v2-state-fg-danger);
1490
+ flex-shrink: 0;
1491
+ }
1492
+
1493
+ [data-slot="diagnostic-message"] {
1494
+ color: var(--v2-state-fg-danger);
1495
+ word-break: break-word;
1496
+ display: -webkit-box;
1497
+ -webkit-box-orient: vertical;
1498
+ -webkit-line-clamp: 3;
1499
+ line-clamp: 3;
1500
+ overflow: hidden;
1501
+ }
1502
+ }
1503
+
1504
+ [data-component="user-message"] [data-slot="user-message-text"],
1505
+ [data-component="text-part"],
1506
+ [data-component="reasoning-part"],
1507
+ [data-component="tool-output"],
1508
+ [data-component="bash-output"],
1509
+ [data-component="edit-content"],
1510
+ [data-component="write-content"],
1511
+ [data-component="todos"],
1512
+ [data-component="diagnostics"],
1513
+ .error-card {
1514
+ -webkit-user-select: text;
1515
+ user-select: text;
1516
+ }
1517
+
1518
+ [data-component="tool-part-wrapper"] {
1519
+ width: 100%;
1520
+ /* Revealing a tool lands its title just below the headers that stick above it. */
1521
+ scroll-margin-top: var(--sticky-accordion-top, 0px);
1522
+ }
1523
+
1524
+ [data-component="dock-prompt"][data-kind="permission"],
1525
+ [data-component="dock-prompt"][data-variant="experimental"] {
1526
+ position: relative;
1527
+ display: flex;
1528
+ flex-direction: column;
1529
+ min-height: 0;
1530
+ background-color: var(--v2-background-bg-base);
1531
+ border-radius: 12px;
1532
+ box-shadow:
1533
+ var(--v2-elevation-raised),
1534
+ 0 0 0 0.5px var(--v2-background-bg-base);
1535
+ overflow: clip;
1536
+
1537
+ [data-color-scheme="dark"] & {
1538
+ background-color: var(--v2-background-bg-layer-01);
1539
+ }
1540
+ }
1541
+
1542
+ [data-component="dock-prompt"][data-kind="permission"] {
1543
+ max-height: 100dvh;
1544
+
1545
+ [data-slot="permission-body"] {
1546
+ display: flex;
1547
+ flex-direction: column;
1548
+ gap: 16px;
1549
+ flex: 1;
1550
+ min-height: 0;
1551
+ padding: 12px 12px 0;
1552
+ }
1553
+
1554
+ [data-slot="permission-header"] {
1555
+ padding: 0;
1556
+ }
1557
+
1558
+ [data-slot="permission-row"] {
1559
+ display: grid;
1560
+ grid-template-columns: 20px 1fr;
1561
+ column-gap: 8px;
1562
+ align-items: start;
1563
+ }
1564
+
1565
+ [data-slot="permission-row"][data-variant="header"] {
1566
+ align-items: center;
1567
+ }
1568
+
1569
+ [data-slot="permission-icon"] {
1570
+ display: inline-flex;
1571
+ align-items: center;
1572
+ justify-content: center;
1573
+ }
1574
+
1575
+ [data-slot="permission-icon"] [data-slot="icon-svg"] {
1576
+ color: var(--icon-warning-base);
1577
+ }
1578
+
1579
+ [data-slot="permission-header-title"] {
1580
+ font-family: var(--font-family-sans);
1581
+ font-size: 13px;
1582
+ font-weight: var(--font-weight-medium);
1583
+ line-height: var(--line-height-base);
1584
+ color: var(--v2-text-text-base);
1585
+ min-width: 0;
1586
+ }
1587
+
1588
+ [data-slot="permission-content"] {
1589
+ display: flex;
1590
+ flex-direction: column;
1591
+ gap: 4px;
1592
+ flex: 1;
1593
+ min-height: 0;
1594
+ }
1595
+
1596
+ [data-slot="permission-hint"] {
1597
+ font-family: var(--font-family-sans);
1598
+ font-size: 13px;
1599
+ font-weight: var(--font-weight-regular);
1600
+ line-height: var(--line-height-base);
1601
+ color: var(--v2-text-text-muted);
1602
+ padding: 0;
1603
+ }
1604
+
1605
+ [data-slot="permission-action"] {
1606
+ font-family: var(--v2-font-family-code);
1607
+ font-size: 13px;
1608
+ font-weight: 440;
1609
+ line-height: var(--line-height-base);
1610
+ letter-spacing: -0.04px;
1611
+ color: var(--v2-text-text-base);
1612
+ }
1613
+
1614
+ [data-slot="permission-input"] {
1615
+ display: flex;
1616
+ flex-direction: column;
1617
+ gap: 2px;
1618
+ margin-top: 8px;
1619
+ max-height: 160px;
1620
+ overflow-y: auto;
1621
+
1622
+ code {
1623
+ font-family: var(--v2-font-family-code);
1624
+ font-size: 13px;
1625
+ font-weight: 440;
1626
+ letter-spacing: -0.04px;
1627
+ line-height: var(--line-height-base);
1628
+ white-space: pre-wrap;
1629
+ }
1630
+ }
1631
+
1632
+ [data-slot="permission-patterns"] {
1633
+ display: flex;
1634
+ flex-direction: column;
1635
+ gap: 6px;
1636
+ margin-top: 8px;
1637
+ margin-bottom: 16px;
1638
+ padding: 1px 0 8px;
1639
+ flex: 1;
1640
+ min-height: 0;
1641
+ overflow-y: auto;
1642
+ scrollbar-width: none;
1643
+ -ms-overflow-style: none;
1644
+
1645
+ &::-webkit-scrollbar {
1646
+ display: none;
1647
+ }
1648
+
1649
+ code {
1650
+ font-family: var(--v2-font-family-code);
1651
+ font-size: 13px;
1652
+ font-weight: 440;
1653
+ line-height: var(--line-height-base);
1654
+ letter-spacing: -0.04px;
1655
+ }
1656
+ }
1657
+
1658
+ [data-slot="permission-footer"] {
1659
+ display: flex;
1660
+ align-items: center;
1661
+ justify-content: space-between;
1662
+ flex-shrink: 0;
1663
+ padding: 8px;
1664
+ }
1665
+
1666
+ [data-slot="permission-footer-actions"] {
1667
+ display: flex;
1668
+ align-items: center;
1669
+ gap: 8px;
1670
+
1671
+ [data-component="button-v2"] {
1672
+ padding-left: 12px;
1673
+ padding-right: 12px;
1674
+ }
1675
+ }
1676
+ }
1677
+
1678
+ [data-component="question-answers"] {
1679
+ display: flex;
1680
+ flex-direction: column;
1681
+ gap: 12px;
1682
+ padding: 8px 0;
1683
+
1684
+ [data-slot="question-answer-item"] {
1685
+ display: flex;
1686
+ flex-direction: column;
1687
+ gap: 2px;
1688
+ font-size: 13px;
1689
+
1690
+ [data-slot="question-text"] {
1691
+ color: var(--v2-text-text-muted);
1692
+ }
1693
+
1694
+ [data-slot="answer-text"] {
1695
+ color: var(--v2-text-text-base);
1696
+ }
1697
+ }
1698
+ }
1699
+
1700
+ [data-component="edit-tool"],
1701
+ [data-component="write-tool"],
1702
+ [data-component="apply-patch-tool"] {
1703
+ > [data-component="collapsible"].tool-collapsible {
1704
+ /* Only file lists with a tool title reserve space for its sticky row. */
1705
+ --sticky-accordion-offset: calc(32px + var(--tool-content-gap));
1706
+ gap: 0px;
1707
+ }
1708
+
1709
+ > [data-component="collapsible"] > [data-slot="collapsible-content"] {
1710
+ border: none;
1711
+ border-inline-start: none;
1712
+ margin-inline-start: 0;
1713
+ padding-inline-start: 0;
1714
+ padding-bottom: 0;
1715
+ background: transparent;
1716
+
1717
+ &::before {
1718
+ display: none;
1719
+ }
1720
+ }
1721
+
1722
+ > [data-component="collapsible"] > [data-slot="collapsible-trigger"][aria-expanded="true"],
1723
+ > [data-component="collapsible"] > [data-slot="collapsible-trigger"][data-locked] {
1724
+ position: sticky;
1725
+ top: var(--sticky-accordion-top, 0px);
1726
+ z-index: 20;
1727
+ height: var(--sticky-accordion-offset);
1728
+ padding-bottom: var(--tool-content-gap);
1729
+ background-color: var(--v2-background-bg-base);
1730
+ }
1731
+ }
1732
+
1733
+ [data-component="accordion"][data-scope="apply-patch"] {
1734
+ /* Keep the sticky header square so its page-colored corners hide the diff scrolling under the rounded trigger. */
1735
+ [data-slot="accordion-header"] {
1736
+ background-color: var(--v2-background-bg-base);
1737
+ }
1738
+
1739
+ [data-slot="apply-patch-trigger-content"] {
1740
+ display: flex;
1741
+ align-items: center;
1742
+ justify-content: space-between;
1743
+ width: 100%;
1744
+ gap: 20px;
1745
+ }
1746
+
1747
+ [data-slot="apply-patch-file-info"] {
1748
+ flex-grow: 1;
1749
+ display: flex;
1750
+ align-items: center;
1751
+ gap: 8px;
1752
+ min-width: 0;
1753
+ }
1754
+
1755
+ [data-slot="apply-patch-file-name-container"] {
1756
+ display: flex;
1757
+ flex-grow: 1;
1758
+ min-width: 0;
1759
+ overflow: hidden;
1760
+ direction: ltr;
1761
+ unicode-bidi: isolate;
1762
+ }
1763
+
1764
+ [data-slot="apply-patch-directory"] {
1765
+ color: var(--v2-text-text-muted);
1766
+ text-overflow: ellipsis;
1767
+ overflow: hidden;
1768
+ white-space: nowrap;
1769
+ direction: rtl;
1770
+ text-align: left;
1771
+ }
1772
+
1773
+ [data-slot="apply-patch-filename"] {
1774
+ color: var(--v2-text-text-base);
1775
+ min-width: 0;
1776
+ overflow: hidden;
1777
+ text-overflow: ellipsis;
1778
+ white-space: nowrap;
1779
+ }
1780
+
1781
+ [data-slot="apply-patch-trigger-actions"] {
1782
+ flex-shrink: 0;
1783
+ display: flex;
1784
+ gap: 16px;
1785
+ align-items: center;
1786
+ justify-content: flex-end;
1787
+ }
1788
+
1789
+ [data-slot="apply-patch-change"] {
1790
+ font-family: var(--font-family-sans);
1791
+ font-size: var(--font-size-small);
1792
+ font-weight: var(--font-weight-medium);
1793
+ }
1794
+
1795
+ [data-slot="apply-patch-change"][data-type="added"] {
1796
+ color: var(--icon-diff-add-base);
1797
+ }
1798
+
1799
+ [data-slot="apply-patch-change"][data-type="removed"] {
1800
+ color: var(--icon-diff-delete-base);
1801
+ }
1802
+
1803
+ [data-slot="apply-patch-change"][data-type="modified"] {
1804
+ color: var(--icon-diff-modified-base);
1805
+ }
1806
+ }
1807
+
1808
+ [data-component="apply-patch-file-diff"] {
1809
+ border-radius: inherit;
1810
+ overflow-x: hidden;
1811
+ overflow-y: visible;
1812
+ scrollbar-width: none;
1813
+ -ms-overflow-style: none;
1814
+
1815
+ &::-webkit-scrollbar {
1816
+ display: none;
1817
+ }
1818
+
1819
+ [data-component="diff"] {
1820
+ border-radius: inherit;
1821
+ overflow: hidden;
1822
+ }
1823
+ }
1824
+
1825
+ [data-component="tool-loaded-item"] {
1826
+ display: flex;
1827
+ align-items: center;
1828
+ gap: 6px;
1829
+ min-width: 0;
1830
+ max-width: 100%;
1831
+ font-family: var(--font-family-sans);
1832
+ font-size: 13px;
1833
+ /* Loaded values truncate, so they require the full compact line box for descenders. */
1834
+ line-height: var(--line-height-compact);
1835
+ letter-spacing: -0.04px;
1836
+ color: var(--v2-text-text-base);
1837
+
1838
+ [data-slot="tool-loaded-label"] {
1839
+ flex-shrink: 0;
1840
+ font-weight: 530;
1841
+ }
1842
+
1843
+ [data-slot="tool-loaded-value"] {
1844
+ min-width: 0;
1845
+ overflow: hidden;
1846
+ text-overflow: ellipsis;
1847
+ white-space: nowrap;
1848
+ font-weight: 440;
1849
+ }
1850
+
1851
+ [data-slot="tool-loaded-kind"] {
1852
+ flex-shrink: 0;
1853
+ margin-inline-start: -2px;
1854
+ font-weight: 440;
1855
+ color: var(--v2-text-text-muted);
1856
+ }
1857
+ }
1858
+
1859
+ [data-component="read-tool-group"] {
1860
+ --read-tool-group-height: 32px;
1861
+ width: 100%;
1862
+ min-width: 0;
1863
+ min-height: var(--read-tool-group-height);
1864
+ display: flex;
1865
+ align-items: center;
1866
+ border-radius: var(--radius-md);
1867
+
1868
+ &[role="button"] {
1869
+ cursor: pointer;
1870
+ }
1871
+
1872
+ &:focus-visible {
1873
+ outline: none;
1874
+ background-color: var(--surface-raised-base-hover);
1875
+ }
1876
+
1877
+ [data-slot="read-tool-group-file"] {
1878
+ white-space: nowrap;
1879
+
1880
+ /* Args carry a leading space for their accessible text; the margin completes the 6px row gap. */
1881
+ > [data-slot="basic-tool-tool-arg"] {
1882
+ margin-inline-start: 2px;
1883
+ }
1884
+ }
1885
+
1886
+ [data-slot="read-tool-group-arrow"] {
1887
+ flex-shrink: 0;
1888
+ width: 16px;
1889
+ height: 20px;
1890
+ display: inline-flex;
1891
+ align-items: center;
1892
+ justify-content: center;
1893
+ color: var(--icon-weaker);
1894
+ opacity: 0;
1895
+ transform: rotate(-90deg);
1896
+ transition:
1897
+ opacity 0.15s ease,
1898
+ transform 0.15s ease;
1899
+
1900
+ &:dir(rtl) {
1901
+ transform: rotate(90deg);
1902
+ }
1903
+
1904
+ @media (hover: none) {
1905
+ opacity: 1;
1906
+ }
1907
+
1908
+ :root[data-motion="reduce"] & {
1909
+ transition: none;
1910
+ }
1911
+ }
1912
+
1913
+ &:hover [data-slot="read-tool-group-arrow"],
1914
+ &:focus-visible [data-slot="read-tool-group-arrow"] {
1915
+ opacity: 1;
1916
+ }
1917
+
1918
+ &[data-expanded="true"] {
1919
+ /* Wrapped lines use body line height; padding keeps the first line where the collapsed row placed it. */
1920
+ padding-block: calc((var(--read-tool-group-height) - var(--line-height-base)) / 2);
1921
+
1922
+ > [data-component="tool-trigger"] {
1923
+ align-items: flex-start;
1924
+ }
1925
+
1926
+ [data-slot="basic-tool-tool-subtitle"] {
1927
+ overflow: visible;
1928
+ white-space: normal;
1929
+ line-height: var(--line-height-base);
1930
+ }
1931
+
1932
+ [data-slot="read-tool-group-arrow"] {
1933
+ opacity: 1;
1934
+ transform: none;
1935
+ }
1936
+ }
1937
+ }
1938
+
1939
+ [data-slot="context-tool-group-item"] > [data-component="read-tool-group"] {
1940
+ --read-tool-group-height: 28px;
1941
+ }
1942
+
1943
+ :root body [data-component="user-message"] {
1944
+ font-weight: 440;
1945
+
1946
+ [data-slot="user-message-text"] {
1947
+ background: var(--v2-background-bg-layer-02);
1948
+ color: var(--v2-text-text-base);
1949
+ }
1950
+
1951
+ [data-slot="user-message-comments"] {
1952
+ display: flex;
1953
+ flex-direction: column;
1954
+ align-items: flex-start;
1955
+ gap: 8px;
1956
+ width: min(320px, 82%);
1957
+ margin-left: auto;
1958
+
1959
+ &[data-bounded] {
1960
+ width: 318px;
1961
+ max-width: 100%;
1962
+ margin-top: 8px;
1963
+ }
1964
+
1965
+ [data-component="tooltip-v2-trigger"] {
1966
+ width: 100%;
1967
+ }
1968
+
1969
+ [data-component="button-v2"] {
1970
+ font-family: var(--v2-font-family-sans, "Inter", sans-serif);
1971
+ font-weight: 530;
1972
+ font-variation-settings:
1973
+ "wght" 530,
1974
+ "slnt" 0;
1975
+ }
1976
+ }
1977
+
1978
+ [data-slot="user-message-attachments"] + [data-slot="user-message-body"],
1979
+ [data-slot="user-message-attachments"] + [data-slot="user-message-comments"] {
1980
+ margin-top: 8px;
1981
+ }
1982
+
1983
+ [data-slot="user-message-text"][data-comments] {
1984
+ width: 342px;
1985
+ padding-bottom: 12px;
1986
+ }
1987
+
1988
+ [data-slot="user-message-quotes"] {
1989
+ display: flex;
1990
+ flex-direction: column;
1991
+ gap: 8px;
1992
+ white-space: normal;
1993
+ }
1994
+
1995
+ [data-slot="user-message-text"] > [data-slot="user-message-quotes"]:not(:first-child),
1996
+ [data-slot="user-message-fold"] > div > [data-slot="user-message-quotes"]:not(:first-child) {
1997
+ margin-top: 8px;
1998
+ }
1999
+
2000
+ [data-slot="user-message-quote-group"] {
2001
+ display: flex;
2002
+ flex-direction: column;
2003
+ gap: 4px;
2004
+ }
2005
+
2006
+ [data-slot="user-message-quote"] {
2007
+ margin: 0;
2008
+ padding-inline-start: 8px;
2009
+ border-inline-start: 2px solid var(--v2-border-border-strong);
2010
+ color: var(--v2-text-text-muted);
2011
+ }
2012
+
2013
+ [data-slot="user-message-quote-text"],
2014
+ [data-slot="user-message-quote-comment"] {
2015
+ white-space: pre-wrap;
2016
+ overflow-wrap: anywhere;
2017
+ unicode-bidi: plaintext;
2018
+
2019
+ /* Each paragraph reads in its own direction but lines up with the bubble, so an English quote in a Hebrew message
2020
+ starts at the bar. */
2021
+ &:dir(ltr) {
2022
+ text-align: left;
2023
+ }
2024
+
2025
+ &:dir(rtl) {
2026
+ text-align: right;
2027
+ }
2028
+ }
2029
+
2030
+ [data-slot="user-message-quote-text"] {
2031
+ &:not([data-open]) {
2032
+ display: -webkit-box;
2033
+ -webkit-box-orient: vertical;
2034
+ -webkit-line-clamp: 3;
2035
+ line-clamp: 3;
2036
+ overflow: hidden;
2037
+ }
2038
+
2039
+ &[data-expandable] {
2040
+ cursor: pointer;
2041
+ border-radius: 4px;
2042
+ }
2043
+
2044
+ &[data-expandable]:hover,
2045
+ &[data-expandable]:focus-visible {
2046
+ color: var(--v2-text-text-base);
2047
+ }
2048
+ }
2049
+
2050
+ /* Inter centers capitals on the line, so lowercase reads about 1px low against the bar. A one-line quote's bar runs
2051
+ 1px past the line, which puts the text half a pixel above its middle, between the two. Wrapped quotes already sit
2052
+ evenly between the bar's ends. */
2053
+ [data-slot="user-message-quote"][data-single-line] {
2054
+ padding-bottom: 1px;
2055
+ }
2056
+
2057
+ /* A source's icon leads the quote like a file's. It sits inline, so wrapped lines return to the bar. */
2058
+ [data-slot="user-message-quote-icon"] {
2059
+ display: inline-flex;
2060
+ vertical-align: -2px;
2061
+ margin-inline-end: 6px;
2062
+ color: var(--v2-icon-icon-muted);
2063
+
2064
+ [data-slot="icon-svg"] {
2065
+ width: 14px;
2066
+ height: 14px;
2067
+ }
2068
+ }
2069
+
2070
+ [data-slot="user-message-quote-reference"] {
2071
+ display: flex;
2072
+ align-items: center;
2073
+ gap: 6px;
2074
+ min-width: 0;
2075
+
2076
+ [data-component="file-icon"],
2077
+ [data-slot="icon-svg"] {
2078
+ width: 14px;
2079
+ height: 14px;
2080
+ flex: none;
2081
+ }
2082
+ }
2083
+
2084
+ [data-slot="user-message-quote-reference-label"] {
2085
+ min-width: 0;
2086
+ overflow: hidden;
2087
+ text-overflow: ellipsis;
2088
+ white-space: nowrap;
2089
+ }
2090
+
2091
+ [data-slot="user-message-quote-reference-detail"] {
2092
+ flex: none;
2093
+ color: var(--v2-text-text-faint);
2094
+ }
2095
+ }
2096
+
2097
+ /* Only delivery animates. A steer can render once before its admission marks it pending, and must not fade from the
2098
+ delivered color. */
2099
+ :root body [data-component="user-message"][data-pending] [data-slot="user-message-text"] {
2100
+ --user-message-bubble: var(--v2-background-bg-layer-01);
2101
+ background: var(--v2-background-bg-layer-01);
2102
+ color: var(--v2-text-text-muted);
2103
+ transition: none;
2104
+ }
2105
+
2106
+ :root body [data-component="user-message"][data-pending] [data-slot="user-message-quote"] {
2107
+ border-color: var(--v2-border-border-base);
2108
+ color: var(--v2-text-text-faint);
2109
+ }