session-turn.css 12 KB

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