session-turn.css 12 KB

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