1
0

message-part.css 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. [data-component="assistant-message"] {
  2. content-visibility: auto;
  3. width: 100%;
  4. display: flex;
  5. flex-direction: column;
  6. align-items: flex-start;
  7. gap: 12px;
  8. }
  9. [data-component="user-message"] {
  10. font-family: var(--font-family-sans);
  11. font-size: var(--font-size-base);
  12. font-style: normal;
  13. font-weight: var(--font-weight-regular);
  14. line-height: var(--line-height-large);
  15. letter-spacing: var(--letter-spacing-normal);
  16. color: var(--text-base);
  17. display: flex;
  18. flex-direction: column;
  19. gap: 8px;
  20. [data-slot="user-message-attachments"] {
  21. display: flex;
  22. flex-wrap: wrap;
  23. gap: 8px;
  24. }
  25. [data-slot="user-message-attachment"] {
  26. display: flex;
  27. flex-direction: column;
  28. align-items: center;
  29. justify-content: center;
  30. border-radius: 6px;
  31. overflow: hidden;
  32. background: var(--surface-base);
  33. border: 1px solid var(--border-base);
  34. transition: border-color 0.15s ease;
  35. &:hover {
  36. border-color: var(--border-strong-base);
  37. }
  38. &[data-type="image"] {
  39. width: 48px;
  40. height: 48px;
  41. }
  42. &[data-type="file"] {
  43. width: 48px;
  44. height: 48px;
  45. }
  46. }
  47. [data-slot="user-message-attachment-image"] {
  48. width: 100%;
  49. height: 100%;
  50. object-fit: cover;
  51. }
  52. [data-slot="user-message-attachment-icon"] {
  53. width: 100%;
  54. height: 100%;
  55. display: flex;
  56. align-items: center;
  57. justify-content: center;
  58. color: var(--icon-weak);
  59. [data-component="icon"] {
  60. width: 20px;
  61. height: 20px;
  62. }
  63. }
  64. [data-slot="user-message-text"] {
  65. display: -webkit-box;
  66. white-space: pre-wrap;
  67. line-clamp: 3;
  68. -webkit-line-clamp: 3;
  69. -webkit-box-orient: vertical;
  70. overflow: hidden;
  71. background: var(--surface-inset-base);
  72. padding: 2px 6px;
  73. border-radius: 4px;
  74. border: 0.5px solid var(--border-weak-base);
  75. }
  76. .text-text-strong {
  77. color: var(--text-strong);
  78. }
  79. .font-medium {
  80. font-weight: var(--font-weight-medium);
  81. }
  82. }
  83. [data-component="text-part"] {
  84. width: 100%;
  85. [data-component="markdown"] {
  86. margin-top: 32px;
  87. font-size: var(--font-size-base);
  88. }
  89. }
  90. [data-component="reasoning-part"] {
  91. width: 100%;
  92. opacity: 0.5;
  93. [data-component="markdown"] {
  94. margin-top: 24px;
  95. font-style: italic !important;
  96. }
  97. }
  98. [data-component="tool-error"] {
  99. display: flex;
  100. align-items: start;
  101. gap: 8px;
  102. [data-slot="icon-svg"] {
  103. color: var(--icon-critical-base);
  104. margin-top: 4px;
  105. }
  106. [data-slot="message-part-tool-error-content"] {
  107. display: flex;
  108. align-items: start;
  109. gap: 8px;
  110. }
  111. [data-slot="message-part-tool-error-title"] {
  112. font-family: var(--font-family-sans);
  113. font-size: var(--font-size-base);
  114. font-style: normal;
  115. font-weight: var(--font-weight-medium);
  116. line-height: var(--line-height-large);
  117. letter-spacing: var(--letter-spacing-normal);
  118. color: var(--text-on-critical-base);
  119. white-space: nowrap;
  120. }
  121. [data-slot="message-part-tool-error-message"] {
  122. color: var(--text-on-critical-weak);
  123. }
  124. }
  125. [data-component="tool-output"] {
  126. white-space: pre;
  127. padding: 8px 12px;
  128. height: fit-content;
  129. display: flex;
  130. flex-direction: column;
  131. align-items: flex-start;
  132. justify-content: flex-start;
  133. [data-component="markdown"] {
  134. width: 100%;
  135. min-width: 0;
  136. pre {
  137. margin: 0;
  138. padding: 0;
  139. background-color: transparent !important;
  140. border: none !important;
  141. }
  142. }
  143. pre {
  144. margin: 0;
  145. padding: 0;
  146. background: none;
  147. }
  148. &[data-scrollable] {
  149. height: auto;
  150. max-height: 240px;
  151. overflow-y: auto;
  152. scrollbar-width: none;
  153. -ms-overflow-style: none;
  154. &::-webkit-scrollbar {
  155. display: none;
  156. }
  157. [data-component="markdown"] {
  158. overflow: visible;
  159. }
  160. }
  161. }
  162. [data-component="edit-trigger"],
  163. [data-component="write-trigger"] {
  164. display: flex;
  165. align-items: center;
  166. justify-content: space-between;
  167. gap: 8px;
  168. width: 100%;
  169. [data-slot="message-part-title-area"] {
  170. flex-grow: 1;
  171. display: flex;
  172. align-items: center;
  173. gap: 8px;
  174. min-width: 0;
  175. }
  176. [data-slot="message-part-title"] {
  177. flex-shrink: 0;
  178. font-family: var(--font-family-sans);
  179. font-size: var(--font-size-base);
  180. font-style: normal;
  181. font-weight: var(--font-weight-medium);
  182. line-height: var(--line-height-large);
  183. letter-spacing: var(--letter-spacing-normal);
  184. color: var(--text-base);
  185. text-transform: capitalize;
  186. }
  187. [data-slot="message-part-path"] {
  188. display: flex;
  189. flex-grow: 1;
  190. min-width: 0;
  191. }
  192. [data-slot="message-part-directory"] {
  193. color: var(--text-weak);
  194. text-overflow: ellipsis;
  195. overflow: hidden;
  196. white-space: nowrap;
  197. direction: rtl;
  198. text-align: left;
  199. }
  200. [data-slot="message-part-filename"] {
  201. color: var(--text-strong);
  202. flex-shrink: 0;
  203. }
  204. [data-slot="message-part-actions"] {
  205. display: flex;
  206. gap: 16px;
  207. align-items: center;
  208. justify-content: flex-end;
  209. }
  210. }
  211. [data-component="edit-content"] {
  212. border-top: 1px solid var(--border-weaker-base);
  213. }
  214. [data-component="write-content"] {
  215. border-top: 1px solid var(--border-weaker-base);
  216. max-height: 240px;
  217. overflow-y: auto;
  218. [data-component="code"] {
  219. padding-bottom: 0px !important;
  220. }
  221. /* Hide scrollbar */
  222. scrollbar-width: none;
  223. -ms-overflow-style: none;
  224. &::-webkit-scrollbar {
  225. display: none;
  226. }
  227. }
  228. [data-component="tool-action"] {
  229. width: 24px;
  230. height: 24px;
  231. display: flex;
  232. align-items: center;
  233. justify-content: center;
  234. }
  235. [data-component="todos"] {
  236. padding: 10px 12px 24px 48px;
  237. display: flex;
  238. flex-direction: column;
  239. gap: 8px;
  240. [data-slot="message-part-todo-content"] {
  241. &[data-completed="completed"] {
  242. text-decoration: line-through;
  243. color: var(--text-weaker);
  244. }
  245. }
  246. }
  247. [data-component="task-tools"] {
  248. padding: 8px 12px;
  249. display: flex;
  250. flex-direction: column;
  251. gap: 6px;
  252. [data-slot="task-tool-item"] {
  253. display: flex;
  254. align-items: center;
  255. gap: 8px;
  256. color: var(--text-weak);
  257. [data-slot="icon-svg"] {
  258. flex-shrink: 0;
  259. color: var(--icon-weak);
  260. }
  261. }
  262. [data-slot="task-tool-title"] {
  263. font-family: var(--font-family-sans);
  264. font-size: var(--font-size-small);
  265. font-weight: var(--font-weight-medium);
  266. line-height: var(--line-height-large);
  267. color: var(--text-weak);
  268. }
  269. [data-slot="task-tool-subtitle"] {
  270. font-family: var(--font-family-sans);
  271. font-size: var(--font-size-small);
  272. font-weight: var(--font-weight-regular);
  273. line-height: var(--line-height-large);
  274. color: var(--text-weaker);
  275. overflow: hidden;
  276. text-overflow: ellipsis;
  277. white-space: nowrap;
  278. }
  279. }
  280. [data-component="diagnostics"] {
  281. display: flex;
  282. flex-direction: column;
  283. gap: 4px;
  284. padding: 8px 12px;
  285. background-color: var(--surface-critical-weak);
  286. border-top: 1px solid var(--border-critical-base);
  287. [data-slot="diagnostic"] {
  288. display: flex;
  289. align-items: baseline;
  290. gap: 6px;
  291. font-family: var(--font-family-mono);
  292. font-size: var(--font-size-small);
  293. line-height: var(--line-height-large);
  294. }
  295. [data-slot="diagnostic-label"] {
  296. color: var(--text-on-critical-base);
  297. font-weight: var(--font-weight-medium);
  298. text-transform: uppercase;
  299. letter-spacing: -0.5px;
  300. flex-shrink: 0;
  301. }
  302. [data-slot="diagnostic-location"] {
  303. color: var(--text-on-critical-weak);
  304. flex-shrink: 0;
  305. }
  306. [data-slot="diagnostic-message"] {
  307. color: var(--text-on-critical-base);
  308. word-break: break-word;
  309. display: -webkit-box;
  310. -webkit-box-orient: vertical;
  311. -webkit-line-clamp: 3;
  312. line-clamp: 3;
  313. overflow: hidden;
  314. }
  315. }