session-turn.css 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. [data-component="session-turn"] {
  2. /* flex: 1; */
  3. height: 100%;
  4. min-height: 0;
  5. min-width: 0;
  6. display: flex;
  7. align-items: flex-start;
  8. justify-content: flex-start;
  9. [data-slot="session-turn-content"] {
  10. flex-grow: 1;
  11. width: 100%;
  12. height: 100%;
  13. min-width: 0;
  14. overflow-y: auto;
  15. scrollbar-width: none;
  16. }
  17. [data-slot="session-turn-content"]::-webkit-scrollbar {
  18. display: none;
  19. }
  20. [data-slot="session-turn-message-container"] {
  21. display: flex;
  22. flex-direction: column;
  23. align-items: flex-start;
  24. align-self: stretch;
  25. min-width: 0;
  26. gap: 28px;
  27. overflow-anchor: none;
  28. }
  29. [data-slot="session-turn-user-badges"] {
  30. display: flex;
  31. flex-shrink: 0;
  32. align-items: center;
  33. gap: 6px;
  34. opacity: 0;
  35. transition: opacity 0.15s ease;
  36. pointer-events: none;
  37. &[data-visible="true"] {
  38. opacity: 1;
  39. pointer-events: auto;
  40. }
  41. }
  42. [data-slot="session-turn-badge"] {
  43. display: inline-flex;
  44. align-items: center;
  45. padding: 2px 6px;
  46. border-radius: 4px;
  47. font-family: var(--font-family-mono);
  48. font-size: var(--font-size-x-small);
  49. font-weight: var(--font-weight-medium);
  50. line-height: var(--line-height-normal);
  51. white-space: nowrap;
  52. color: var(--text-base);
  53. background: var(--surface-raised-base);
  54. }
  55. [data-slot="session-turn-sticky-title"] {
  56. width: 100%;
  57. position: sticky;
  58. top: 0;
  59. background-color: var(--background-stronger);
  60. z-index: 21;
  61. }
  62. [data-slot="session-turn-response-trigger"] {
  63. position: sticky;
  64. top: 32px;
  65. background-color: var(--background-stronger);
  66. z-index: 20;
  67. width: calc(100% + 9px);
  68. margin-left: -9px;
  69. padding-left: 9px;
  70. padding-bottom: 8px;
  71. }
  72. [data-slot="session-turn-message-header"] {
  73. display: flex;
  74. align-items: center;
  75. justify-content: space-between;
  76. gap: 12px;
  77. align-self: stretch;
  78. height: 32px;
  79. }
  80. [data-slot="session-turn-message-content"] {
  81. margin-top: -18px;
  82. max-width: 100%;
  83. }
  84. [data-slot="session-turn-message-title"] {
  85. width: 100%;
  86. font-size: var(--font-size-large);
  87. font-weight: 500;
  88. color: var(--text-strong);
  89. overflow: hidden;
  90. text-overflow: ellipsis;
  91. min-width: 0;
  92. white-space: nowrap;
  93. }
  94. [data-slot="session-turn-message-title"] h1 {
  95. overflow: hidden;
  96. text-overflow: ellipsis;
  97. min-width: 0;
  98. white-space: nowrap;
  99. font-size: inherit;
  100. font-weight: inherit;
  101. }
  102. [data-slot="session-turn-typewriter"] {
  103. overflow: hidden;
  104. text-overflow: ellipsis;
  105. min-width: 0;
  106. white-space: nowrap;
  107. }
  108. [data-slot="session-turn-summary-section"] {
  109. width: 100%;
  110. display: flex;
  111. flex-direction: column;
  112. gap: 24px;
  113. align-items: flex-start;
  114. align-self: stretch;
  115. }
  116. [data-slot="session-turn-summary-header"] {
  117. display: flex;
  118. flex-direction: column;
  119. align-items: flex-start;
  120. gap: 4px;
  121. align-self: stretch;
  122. p {
  123. font-size: var(--font-size-base);
  124. line-height: var(--line-height-x-large);
  125. }
  126. }
  127. [data-slot="session-turn-summary-title"] {
  128. font-size: 13px; /* text-12-medium */
  129. font-weight: 500;
  130. color: var(--text-weak);
  131. }
  132. [data-slot="session-turn-markdown"],
  133. [data-slot="session-turn-accordion"] [data-slot="accordion-content"] {
  134. -webkit-user-select: text;
  135. user-select: text;
  136. }
  137. [data-slot="session-turn-markdown"] {
  138. &[data-diffs="true"] {
  139. font-size: 15px;
  140. }
  141. &[data-fade="true"] > * {
  142. animation: fadeUp 0.4s ease-out forwards;
  143. opacity: 0;
  144. &:nth-child(1) {
  145. animation-delay: 0.1s;
  146. }
  147. &:nth-child(2) {
  148. animation-delay: 0.2s;
  149. }
  150. &:nth-child(3) {
  151. animation-delay: 0.3s;
  152. }
  153. &:nth-child(4) {
  154. animation-delay: 0.4s;
  155. }
  156. &:nth-child(5) {
  157. animation-delay: 0.5s;
  158. }
  159. &:nth-child(6) {
  160. animation-delay: 0.6s;
  161. }
  162. &:nth-child(7) {
  163. animation-delay: 0.7s;
  164. }
  165. &:nth-child(8) {
  166. animation-delay: 0.8s;
  167. }
  168. &:nth-child(9) {
  169. animation-delay: 0.9s;
  170. }
  171. &:nth-child(10) {
  172. animation-delay: 1s;
  173. }
  174. &:nth-child(11) {
  175. animation-delay: 1.1s;
  176. }
  177. &:nth-child(12) {
  178. animation-delay: 1.2s;
  179. }
  180. &:nth-child(13) {
  181. animation-delay: 1.3s;
  182. }
  183. &:nth-child(14) {
  184. animation-delay: 1.4s;
  185. }
  186. &:nth-child(15) {
  187. animation-delay: 1.5s;
  188. }
  189. &:nth-child(16) {
  190. animation-delay: 1.6s;
  191. }
  192. &:nth-child(17) {
  193. animation-delay: 1.7s;
  194. }
  195. &:nth-child(18) {
  196. animation-delay: 1.8s;
  197. }
  198. &:nth-child(19) {
  199. animation-delay: 1.9s;
  200. }
  201. &:nth-child(20) {
  202. animation-delay: 2s;
  203. }
  204. &:nth-child(21) {
  205. animation-delay: 2.1s;
  206. }
  207. &:nth-child(22) {
  208. animation-delay: 2.2s;
  209. }
  210. &:nth-child(23) {
  211. animation-delay: 2.3s;
  212. }
  213. &:nth-child(24) {
  214. animation-delay: 2.4s;
  215. }
  216. &:nth-child(25) {
  217. animation-delay: 2.5s;
  218. }
  219. &:nth-child(26) {
  220. animation-delay: 2.6s;
  221. }
  222. &:nth-child(27) {
  223. animation-delay: 2.7s;
  224. }
  225. &:nth-child(28) {
  226. animation-delay: 2.8s;
  227. }
  228. &:nth-child(29) {
  229. animation-delay: 2.9s;
  230. }
  231. &:nth-child(30) {
  232. animation-delay: 3s;
  233. }
  234. }
  235. }
  236. [data-slot="session-turn-summary-section"] {
  237. position: relative;
  238. [data-slot="session-turn-summary-copy"] {
  239. position: absolute;
  240. top: 0;
  241. right: 0;
  242. opacity: 0;
  243. transition: opacity 0.15s ease;
  244. }
  245. &:hover [data-slot="session-turn-summary-copy"] {
  246. opacity: 1;
  247. }
  248. }
  249. [data-slot="session-turn-accordion"] {
  250. width: 100%;
  251. }
  252. [data-component="sticky-accordion-header"] {
  253. top: var(--sticky-header-height, 40px);
  254. &[data-expanded]::before {
  255. top: calc(-1 * var(--sticky-header-height, 40px));
  256. }
  257. }
  258. [data-slot="session-turn-accordion-trigger-content"] {
  259. display: flex;
  260. align-items: center;
  261. justify-content: space-between;
  262. width: 100%;
  263. gap: 20px;
  264. [data-expandable="false"] {
  265. pointer-events: none;
  266. }
  267. }
  268. [data-slot="session-turn-file-info"] {
  269. flex-grow: 1;
  270. display: flex;
  271. align-items: center;
  272. gap: 20px;
  273. min-width: 0;
  274. }
  275. [data-slot="session-turn-file-icon"] {
  276. flex-shrink: 0;
  277. width: 16px;
  278. height: 16px;
  279. }
  280. [data-slot="session-turn-file-path"] {
  281. display: flex;
  282. flex-grow: 1;
  283. min-width: 0;
  284. }
  285. [data-slot="session-turn-directory"] {
  286. color: var(--text-base);
  287. text-overflow: ellipsis;
  288. overflow: hidden;
  289. white-space: nowrap;
  290. direction: rtl;
  291. text-align: left;
  292. }
  293. [data-slot="session-turn-filename"] {
  294. color: var(--text-strong);
  295. flex-shrink: 0;
  296. }
  297. [data-slot="session-turn-accordion-actions"] {
  298. flex-shrink: 0;
  299. display: flex;
  300. gap: 16px;
  301. align-items: center;
  302. justify-content: flex-end;
  303. }
  304. [data-slot="session-turn-accordion-content"] {
  305. max-height: 240px; /* max-h-60 */
  306. overflow-y: auto;
  307. scrollbar-width: none;
  308. }
  309. [data-slot="session-turn-accordion-content"]::-webkit-scrollbar {
  310. display: none;
  311. }
  312. [data-slot="session-turn-response-section"] {
  313. width: calc(100% + 9px);
  314. min-width: 0;
  315. margin-left: -9px;
  316. padding-left: 9px;
  317. }
  318. [data-slot="session-turn-collapsible"] {
  319. gap: 32px;
  320. overflow: visible;
  321. }
  322. [data-slot="session-turn-collapsible-trigger-content"] {
  323. width: fit-content;
  324. display: flex;
  325. align-items: center;
  326. gap: 4px;
  327. color: var(--text-weak);
  328. margin-left: -9px;
  329. [data-component="spinner"] {
  330. width: 12px;
  331. height: 12px;
  332. margin-right: 4px;
  333. }
  334. [data-component="icon"] {
  335. width: 14px;
  336. height: 14px;
  337. }
  338. }
  339. [data-slot="session-turn-retry-message"] {
  340. font-weight: 500;
  341. color: var(--syntax-critical);
  342. }
  343. [data-slot="session-turn-retry-seconds"] {
  344. color: var(--text-weak);
  345. }
  346. [data-slot="session-turn-retry-attempt"] {
  347. color: var(--text-weak);
  348. }
  349. [data-slot="session-turn-details-text"] {
  350. font-size: 13px; /* text-12-medium */
  351. font-weight: 500;
  352. }
  353. .error-card {
  354. color: var(--text-on-critical-base);
  355. max-height: 240px;
  356. overflow-y: auto;
  357. }
  358. [data-slot="session-turn-collapsible-content-inner"] {
  359. width: 100%;
  360. min-width: 0;
  361. display: flex;
  362. flex-direction: column;
  363. align-self: stretch;
  364. gap: 12px;
  365. > :first-child > [data-component="markdown"]:first-child {
  366. margin-top: 0;
  367. }
  368. }
  369. [data-slot="session-turn-permission-parts"] {
  370. width: 100%;
  371. min-width: 0;
  372. display: flex;
  373. flex-direction: column;
  374. gap: 12px;
  375. }
  376. }