session-turn.css 7.3 KB

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