message-part.css 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498
  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(--v2-text-text-base);
  17. display: flex;
  18. flex-direction: column;
  19. align-items: flex-end;
  20. align-self: stretch;
  21. width: 100%;
  22. max-width: 100%;
  23. gap: 0;
  24. [data-slot="user-message-attachments"] {
  25. display: flex;
  26. flex-wrap: wrap;
  27. justify-content: flex-end;
  28. gap: 8px;
  29. width: fit-content;
  30. max-width: min(82%, 64ch);
  31. margin-left: auto;
  32. }
  33. [data-slot="user-message-attachment"] {
  34. display: flex;
  35. flex-direction: column;
  36. align-items: center;
  37. justify-content: center;
  38. min-width: 0;
  39. border-radius: 6px;
  40. overflow: hidden;
  41. background: var(--v2-background-bg-layer-02);
  42. border: 0.5px solid var(--v2-border-border-base);
  43. cursor: default;
  44. transition:
  45. border-color 0.15s ease,
  46. opacity 0.3s ease;
  47. &:hover {
  48. border-color: var(--v2-border-border-strong);
  49. }
  50. &[data-clickable] {
  51. cursor: pointer;
  52. }
  53. &[data-type="image"] {
  54. width: 48px;
  55. height: 48px;
  56. }
  57. &[data-type="file"] {
  58. width: min(220px, 100%);
  59. height: 48px;
  60. padding: 0 10px;
  61. }
  62. }
  63. [data-slot="user-message-attachment-image"] {
  64. width: 100%;
  65. height: 100%;
  66. object-fit: cover;
  67. }
  68. [data-slot="user-message-attachment-icon"] {
  69. width: 100%;
  70. height: 100%;
  71. display: flex;
  72. align-items: center;
  73. justify-content: center;
  74. color: var(--icon-weak);
  75. [data-component="icon"] {
  76. width: 20px;
  77. height: 20px;
  78. }
  79. }
  80. [data-slot="user-message-attachment-file"] {
  81. width: 100%;
  82. min-width: 0;
  83. display: flex;
  84. align-items: center;
  85. gap: 8px;
  86. [data-component="file-icon"] {
  87. width: 20px;
  88. height: 20px;
  89. flex: none;
  90. }
  91. }
  92. [data-slot="user-message-attachment-name"] {
  93. min-width: 0;
  94. overflow: hidden;
  95. text-overflow: ellipsis;
  96. white-space: nowrap;
  97. color: var(--v2-text-text-muted);
  98. font-size: var(--font-size-small);
  99. line-height: var(--line-height-large);
  100. }
  101. [data-slot="user-message-body"] {
  102. width: fit-content;
  103. max-width: min(82%, 64ch);
  104. margin-left: auto;
  105. display: flex;
  106. flex-direction: column;
  107. align-items: flex-end;
  108. }
  109. [data-slot="user-message-attachments"] + [data-slot="user-message-body"] {
  110. margin-top: 8px;
  111. }
  112. [data-slot="user-message-text"] {
  113. display: inline-block;
  114. white-space: pre-wrap;
  115. word-break: break-word;
  116. overflow: hidden;
  117. background: var(--v2-background-bg-layer-02);
  118. border: none;
  119. padding: 8px 12px;
  120. border-radius: 10px;
  121. [data-highlight="file"] {
  122. color: var(--syntax-property);
  123. }
  124. [data-highlight="agent"] {
  125. color: var(--syntax-type);
  126. }
  127. max-width: 100%;
  128. }
  129. [data-slot="user-message-copy-wrapper"] {
  130. min-height: 24px;
  131. margin-top: 4px;
  132. display: flex;
  133. align-items: center;
  134. justify-content: flex-end;
  135. gap: 10px;
  136. width: 100%;
  137. opacity: 0;
  138. pointer-events: none;
  139. transition: opacity 0.15s ease;
  140. will-change: opacity;
  141. [data-component="tooltip-trigger"] {
  142. display: inline-flex;
  143. width: fit-content;
  144. }
  145. }
  146. [data-slot="user-message-meta"] {
  147. user-select: none;
  148. text-align: right;
  149. flex: 1 1 auto;
  150. min-width: 0;
  151. overflow: hidden;
  152. text-overflow: ellipsis;
  153. white-space: nowrap;
  154. }
  155. [data-slot="user-message-meta-wrap"] {
  156. flex: 1 1 auto;
  157. min-width: 0;
  158. display: flex;
  159. align-items: center;
  160. justify-content: flex-end;
  161. overflow: hidden;
  162. gap: 0;
  163. }
  164. [data-slot="user-message-meta-tail"] {
  165. user-select: none;
  166. flex: 0 0 auto;
  167. white-space: nowrap;
  168. text-align: right;
  169. }
  170. &:hover [data-slot="user-message-copy-wrapper"],
  171. &:focus-within [data-slot="user-message-copy-wrapper"] {
  172. opacity: 1;
  173. pointer-events: auto;
  174. }
  175. .text-text-strong {
  176. color: var(--v2-text-text-base);
  177. }
  178. .font-medium {
  179. font-weight: var(--font-weight-medium);
  180. }
  181. }
  182. [data-component="text-part"] {
  183. width: 100%;
  184. margin-top: 24px;
  185. [data-slot="text-part-body"] {
  186. margin-top: 0;
  187. }
  188. [data-slot="text-part-copy-wrapper"] {
  189. min-height: 24px;
  190. margin-top: 4px;
  191. display: flex;
  192. align-items: center;
  193. justify-content: flex-start;
  194. gap: 10px;
  195. opacity: 0;
  196. pointer-events: none;
  197. transition: opacity 0.15s ease;
  198. will-change: opacity;
  199. [data-component="tooltip-trigger"] {
  200. display: inline-flex;
  201. width: fit-content;
  202. }
  203. }
  204. [data-slot="text-part-meta"] {
  205. user-select: none;
  206. }
  207. [data-slot="text-part-copy-wrapper"][data-interrupted] {
  208. width: 100%;
  209. justify-content: flex-end;
  210. gap: 12px;
  211. }
  212. &:hover [data-slot="text-part-copy-wrapper"],
  213. &:focus-within [data-slot="text-part-copy-wrapper"] {
  214. opacity: 1;
  215. pointer-events: auto;
  216. }
  217. }
  218. [data-component="compaction-part"] {
  219. width: 100%;
  220. display: flex;
  221. flex-direction: column;
  222. align-items: stretch;
  223. [data-slot="compaction-part-divider"] {
  224. display: flex;
  225. align-items: center;
  226. gap: 12px;
  227. padding: 10px 0;
  228. width: 100%;
  229. }
  230. [data-slot="compaction-part-line"] {
  231. flex: 1 1 auto;
  232. height: 1px;
  233. background: var(--v2-border-border-base);
  234. }
  235. [data-slot="compaction-part-label"] {
  236. flex: 0 0 auto;
  237. white-space: nowrap;
  238. text-align: center;
  239. }
  240. }
  241. [data-component="reasoning-part"] {
  242. width: 100%;
  243. color: var(--v2-text-text-muted);
  244. line-height: var(--line-height-normal);
  245. [data-component="markdown"] {
  246. margin-top: 16px;
  247. font-style: normal;
  248. font-size: 13px;
  249. color: var(--v2-text-text-muted);
  250. strong,
  251. b {
  252. color: var(--v2-text-text-muted);
  253. }
  254. p:has(strong) {
  255. margin-top: 24px;
  256. margin-bottom: 0;
  257. &:first-child {
  258. margin-top: 0;
  259. }
  260. }
  261. }
  262. }
  263. @media (prefers-color-scheme: dark) {
  264. [data-component="reasoning-part"] [data-component="markdown"] :not(pre) > code {
  265. opacity: 0.6;
  266. }
  267. }
  268. [data-component="tool-output"] {
  269. white-space: pre;
  270. padding: 0;
  271. margin-bottom: 24px;
  272. height: fit-content;
  273. display: flex;
  274. flex-direction: column;
  275. align-items: flex-start;
  276. justify-content: flex-start;
  277. [data-component="markdown"] {
  278. width: 100%;
  279. min-width: 0;
  280. pre {
  281. margin: 0;
  282. padding: 0;
  283. background-color: transparent !important;
  284. border: none !important;
  285. }
  286. }
  287. pre {
  288. margin: 0;
  289. padding: 0;
  290. background: none;
  291. }
  292. &[data-scrollable] {
  293. height: auto;
  294. max-height: 240px;
  295. overflow-y: auto;
  296. scrollbar-width: none;
  297. -ms-overflow-style: none;
  298. &::-webkit-scrollbar {
  299. display: none;
  300. }
  301. [data-component="markdown"] {
  302. overflow: visible;
  303. }
  304. }
  305. }
  306. [data-component="bash-output"] {
  307. width: 100%;
  308. border: 0.5px solid var(--v2-border-border-base);
  309. border-radius: 6px;
  310. background: transparent;
  311. position: relative;
  312. overflow: hidden;
  313. [data-slot="bash-copy"] {
  314. position: absolute;
  315. top: 4px;
  316. right: 4px;
  317. opacity: 0;
  318. pointer-events: none;
  319. transition: opacity 0.15s ease;
  320. }
  321. &:hover [data-slot="bash-copy"],
  322. &:focus-within [data-slot="bash-copy"] {
  323. opacity: 1;
  324. pointer-events: auto;
  325. }
  326. [data-slot="bash-scroll"] {
  327. width: 100%;
  328. overflow-y: auto;
  329. overflow-x: hidden;
  330. max-height: 240px;
  331. scrollbar-width: none;
  332. &::-webkit-scrollbar {
  333. display: none;
  334. }
  335. }
  336. [data-slot="bash-pre"] {
  337. margin: 0;
  338. padding: 12px;
  339. }
  340. [data-slot="bash-pre"] code {
  341. font-family: var(--font-family-mono);
  342. font-feature-settings: var(--font-family-mono--font-feature-settings);
  343. font-size: 13px;
  344. line-height: var(--line-height-large);
  345. white-space: pre-wrap;
  346. overflow-wrap: anywhere;
  347. }
  348. }
  349. [data-component="edit-trigger"],
  350. [data-component="write-trigger"] {
  351. display: flex;
  352. align-items: center;
  353. justify-content: space-between;
  354. gap: 12px;
  355. width: 100%;
  356. [data-slot="message-part-title-area"] {
  357. flex-grow: 1;
  358. display: flex;
  359. align-items: center;
  360. gap: 8px;
  361. min-width: 0;
  362. }
  363. [data-slot="message-part-title"] {
  364. flex: 1 1 auto;
  365. display: flex;
  366. align-items: center;
  367. gap: 8px;
  368. min-width: 0;
  369. font-family: var(--font-family-sans);
  370. font-size: 14px;
  371. font-style: normal;
  372. font-weight: var(--font-weight-medium);
  373. line-height: var(--line-height-large);
  374. letter-spacing: var(--letter-spacing-normal);
  375. color: var(--v2-text-text-muted);
  376. }
  377. [data-slot="message-part-title-spinner"] {
  378. margin-left: 4px;
  379. width: 16px;
  380. height: 16px;
  381. display: inline-flex;
  382. align-items: center;
  383. justify-content: center;
  384. flex-shrink: 0;
  385. color: var(--v2-text-text-muted);
  386. [data-component="spinner"] {
  387. width: 16px;
  388. height: 16px;
  389. }
  390. }
  391. [data-slot="message-part-title-text"] {
  392. flex-shrink: 0;
  393. text-transform: capitalize;
  394. color: var(--v2-text-text-base);
  395. }
  396. [data-slot="message-part-title-filename"] {
  397. /* No text-transform - preserve original filename casing */
  398. min-width: 0;
  399. overflow: hidden;
  400. text-overflow: ellipsis;
  401. white-space: nowrap;
  402. font-weight: var(--font-weight-regular);
  403. }
  404. [data-slot="message-part-path"] {
  405. display: flex;
  406. flex-grow: 1;
  407. min-width: 0;
  408. font-weight: var(--font-weight-regular);
  409. }
  410. [data-slot="message-part-directory"] {
  411. color: var(--v2-text-text-muted);
  412. text-overflow: ellipsis;
  413. overflow: hidden;
  414. white-space: nowrap;
  415. direction: rtl;
  416. text-align: left;
  417. }
  418. [data-slot="message-part-filename"] {
  419. color: var(--v2-text-text-base);
  420. flex-shrink: 0;
  421. }
  422. [data-slot="message-part-actions"] {
  423. display: flex;
  424. gap: 16px;
  425. align-items: center;
  426. justify-content: flex-end;
  427. flex-shrink: 0;
  428. }
  429. }
  430. [data-component="edit-content"] {
  431. border-radius: inherit;
  432. border-top: 0.5px solid var(--v2-border-border-muted);
  433. overflow-x: hidden;
  434. overflow-y: visible;
  435. scrollbar-width: none;
  436. -ms-overflow-style: none;
  437. &::-webkit-scrollbar {
  438. display: none;
  439. }
  440. [data-component="diff"] {
  441. border-radius: inherit;
  442. overflow: hidden;
  443. }
  444. }
  445. [data-component="write-content"] {
  446. border-radius: inherit;
  447. border-top: 0.5px solid var(--v2-border-border-muted);
  448. overflow-x: hidden;
  449. overflow-y: visible;
  450. [data-component="code"] {
  451. padding-bottom: 0 !important;
  452. border-radius: inherit;
  453. overflow: hidden;
  454. }
  455. /* Hide scrollbar */
  456. scrollbar-width: none;
  457. -ms-overflow-style: none;
  458. &::-webkit-scrollbar {
  459. display: none;
  460. }
  461. }
  462. [data-component="tool-action"] {
  463. width: 24px;
  464. height: 24px;
  465. display: flex;
  466. align-items: center;
  467. justify-content: center;
  468. }
  469. [data-component="exa-tool-output"] {
  470. width: 100%;
  471. display: flex;
  472. flex-direction: column;
  473. font-family: var(--font-family-sans);
  474. font-size: var(--font-size-base);
  475. line-height: var(--line-height-large);
  476. color: var(--v2-text-text-muted);
  477. }
  478. [data-slot="basic-tool-tool-subtitle"].exa-tool-query {
  479. display: block;
  480. max-width: 100%;
  481. overflow: hidden;
  482. text-overflow: ellipsis;
  483. white-space: nowrap;
  484. }
  485. [data-slot="exa-tool-links"] {
  486. display: flex;
  487. flex-direction: column;
  488. gap: 4px;
  489. }
  490. [data-slot="exa-tool-link"] {
  491. display: block;
  492. max-width: 100%;
  493. font: inherit;
  494. line-height: inherit;
  495. color: var(--v2-text-text-accent);
  496. text-decoration: underline;
  497. text-underline-offset: 2px;
  498. overflow: hidden;
  499. text-overflow: ellipsis;
  500. white-space: nowrap;
  501. &:hover {
  502. color: var(--v2-text-text-accent);
  503. }
  504. &:visited {
  505. color: var(--v2-text-text-accent);
  506. }
  507. }
  508. [data-component="todos"] {
  509. padding: 10px 0 24px 0;
  510. display: flex;
  511. flex-direction: column;
  512. gap: 8px;
  513. [data-component="checkbox"] {
  514. --checkbox-align: flex-start;
  515. --checkbox-offset: 0.5px;
  516. }
  517. [data-slot="message-part-todo-content"] {
  518. line-height: var(--line-height-normal);
  519. &[data-completed="completed"] {
  520. text-decoration: line-through;
  521. color: var(--v2-text-text-faint);
  522. }
  523. }
  524. }
  525. [data-component="context-tool-group-trigger"] {
  526. width: 100%;
  527. min-height: 24px;
  528. display: flex;
  529. align-items: center;
  530. justify-content: flex-start;
  531. gap: 0px;
  532. cursor: default;
  533. [data-slot="context-tool-group-title"] {
  534. flex-shrink: 1;
  535. min-width: 0;
  536. }
  537. [data-slot="collapsible-arrow"] {
  538. color: var(--icon-weaker);
  539. cursor: pointer;
  540. }
  541. }
  542. [data-component="context-tool-group-list"] {
  543. padding-top: 0;
  544. padding-right: 0;
  545. padding-bottom: 0;
  546. padding-left: 12px;
  547. display: flex;
  548. flex-direction: column;
  549. gap: 4px;
  550. [data-slot="context-tool-group-item"] {
  551. min-width: 0;
  552. padding: 0;
  553. }
  554. }
  555. [data-component="diagnostics"] {
  556. display: flex;
  557. flex-direction: column;
  558. gap: 4px;
  559. padding: 8px 12px;
  560. background-color: var(--v2-state-bg-danger);
  561. border-top: 0.5px solid var(--v2-state-border-danger);
  562. [data-slot="diagnostic"] {
  563. display: flex;
  564. align-items: baseline;
  565. gap: 6px;
  566. font-family: var(--font-family-mono);
  567. font-size: var(--font-size-small);
  568. line-height: var(--line-height-large);
  569. }
  570. [data-slot="diagnostic-label"] {
  571. color: var(--v2-state-fg-danger);
  572. font-weight: var(--font-weight-medium);
  573. text-transform: uppercase;
  574. letter-spacing: -0.5px;
  575. flex-shrink: 0;
  576. }
  577. [data-slot="diagnostic-location"] {
  578. color: var(--v2-state-fg-danger);
  579. flex-shrink: 0;
  580. }
  581. [data-slot="diagnostic-message"] {
  582. color: var(--v2-state-fg-danger);
  583. word-break: break-word;
  584. display: -webkit-box;
  585. -webkit-box-orient: vertical;
  586. -webkit-line-clamp: 3;
  587. line-clamp: 3;
  588. overflow: hidden;
  589. }
  590. }
  591. [data-component="user-message"] [data-slot="user-message-text"],
  592. [data-component="text-part"],
  593. [data-component="reasoning-part"],
  594. [data-component="tool-output"],
  595. [data-component="bash-output"],
  596. [data-component="edit-content"],
  597. [data-component="write-content"],
  598. [data-component="todos"],
  599. [data-component="diagnostics"],
  600. .error-card {
  601. -webkit-user-select: text;
  602. user-select: text;
  603. }
  604. [data-component="tool-part-wrapper"] {
  605. width: 100%;
  606. }
  607. [data-component="dock-prompt"][data-kind="permission"] {
  608. position: relative;
  609. display: flex;
  610. flex-direction: column;
  611. gap: 0;
  612. min-height: 0;
  613. max-height: 100dvh;
  614. [data-slot="permission-body"] {
  615. display: flex;
  616. flex-direction: column;
  617. gap: 16px;
  618. flex: 1;
  619. min-height: 0;
  620. padding: 12px 12px 0;
  621. }
  622. [data-slot="permission-header"] {
  623. padding: 0;
  624. }
  625. [data-slot="permission-row"] {
  626. display: grid;
  627. grid-template-columns: 20px 1fr;
  628. column-gap: 8px;
  629. align-items: start;
  630. }
  631. [data-slot="permission-row"][data-variant="header"] {
  632. align-items: center;
  633. }
  634. [data-slot="permission-icon"] {
  635. display: inline-flex;
  636. align-items: center;
  637. justify-content: center;
  638. }
  639. [data-slot="permission-icon"] [data-component="icon"] {
  640. color: var(--icon-warning-base);
  641. }
  642. [data-slot="permission-header-title"] {
  643. font-family: var(--font-family-sans);
  644. font-size: 14px;
  645. font-weight: var(--font-weight-medium);
  646. line-height: var(--line-height-large);
  647. color: var(--v2-text-text-base);
  648. min-width: 0;
  649. }
  650. [data-slot="permission-content"] {
  651. display: flex;
  652. flex-direction: column;
  653. gap: 4px;
  654. flex: 1;
  655. min-height: 0;
  656. }
  657. [data-slot="permission-hint"] {
  658. font-family: var(--font-family-sans);
  659. font-size: 14px;
  660. font-weight: var(--font-weight-regular);
  661. line-height: var(--line-height-large);
  662. color: var(--v2-text-text-muted);
  663. padding: 0;
  664. }
  665. [data-slot="permission-patterns"] {
  666. display: flex;
  667. flex-direction: column;
  668. gap: 6px;
  669. margin-top: 8px;
  670. margin-bottom: 16px;
  671. padding: 1px 0 8px;
  672. flex: 1;
  673. min-height: 0;
  674. overflow-y: auto;
  675. scrollbar-width: none;
  676. -ms-overflow-style: none;
  677. &::-webkit-scrollbar {
  678. display: none;
  679. }
  680. code {
  681. font-size: 14px;
  682. line-height: var(--line-height-large);
  683. }
  684. }
  685. [data-slot="permission-footer"] {
  686. display: flex;
  687. align-items: center;
  688. justify-content: space-between;
  689. flex-shrink: 0;
  690. padding: 32px 8px 8px;
  691. margin-top: -24px;
  692. }
  693. [data-slot="permission-footer-actions"] {
  694. display: flex;
  695. align-items: center;
  696. gap: 8px;
  697. [data-component="button"] {
  698. padding-left: 12px;
  699. padding-right: 12px;
  700. }
  701. }
  702. }
  703. [data-component="dock-prompt"][data-kind="question"] {
  704. position: relative;
  705. display: flex;
  706. flex-direction: column;
  707. gap: 0;
  708. min-height: 0;
  709. max-height: var(--question-prompt-max-height, 100dvh);
  710. [data-slot="question-body"] {
  711. display: flex;
  712. flex-direction: column;
  713. gap: 16px;
  714. flex: 1;
  715. min-height: 0;
  716. padding: 8px 8px 0;
  717. }
  718. [data-slot="question-header"] {
  719. display: flex;
  720. align-items: center;
  721. justify-content: space-between;
  722. gap: 12px;
  723. padding: 0 10px;
  724. }
  725. [data-slot="question-header-title"] {
  726. font-family: var(--font-family-sans);
  727. font-size: 14px;
  728. font-weight: var(--font-weight-medium);
  729. line-height: var(--line-height-large);
  730. color: var(--v2-text-text-base);
  731. min-width: 0;
  732. }
  733. [data-slot="question-header-actions"] {
  734. display: flex;
  735. align-items: center;
  736. gap: 8px;
  737. flex-shrink: 0;
  738. }
  739. [data-slot="question-progress"] {
  740. display: flex;
  741. align-items: center;
  742. gap: 8px;
  743. flex-shrink: 0;
  744. }
  745. [data-slot="question-progress-segment"] {
  746. width: 16px;
  747. height: 16px;
  748. padding: 0;
  749. border: 0;
  750. background: transparent;
  751. border-radius: 999px;
  752. display: inline-flex;
  753. align-items: center;
  754. justify-content: center;
  755. cursor: pointer;
  756. touch-action: manipulation;
  757. &::after {
  758. content: "";
  759. width: 16px;
  760. height: 2px;
  761. border-radius: 999px;
  762. background-color: var(--icon-weak-base);
  763. transition: background-color 0.2s ease;
  764. }
  765. &[data-active="true"]::after {
  766. background-color: var(--icon-strong-base);
  767. }
  768. &[data-answered="true"]::after {
  769. background-color: var(--icon-interactive-base);
  770. }
  771. &:disabled {
  772. cursor: not-allowed;
  773. opacity: 0.6;
  774. }
  775. }
  776. [data-slot="question-content"] {
  777. display: flex;
  778. flex-direction: column;
  779. gap: 4px;
  780. flex: 1;
  781. min-height: 0;
  782. }
  783. [data-slot="question-text"] {
  784. font-family: var(--font-family-sans);
  785. font-size: 14px;
  786. font-weight: var(--font-weight-medium);
  787. line-height: var(--line-height-large);
  788. color: var(--v2-text-text-base);
  789. padding: 0 10px;
  790. flex-shrink: 0;
  791. -webkit-user-select: text;
  792. user-select: text;
  793. }
  794. [data-slot="question-hint"] {
  795. font-family: var(--font-family-sans);
  796. font-size: 13px;
  797. font-weight: var(--font-weight-regular);
  798. line-height: var(--line-height-large);
  799. color: var(--v2-text-text-muted);
  800. padding: 0 10px;
  801. flex-shrink: 0;
  802. }
  803. [data-slot="question-options"] {
  804. display: flex;
  805. flex-direction: column;
  806. gap: 6px;
  807. margin-top: 12px;
  808. padding: 1px 1px 16px;
  809. flex: 1 1 auto;
  810. min-height: 0;
  811. overflow-y: auto;
  812. scrollbar-width: none;
  813. -ms-overflow-style: none;
  814. &::-webkit-scrollbar {
  815. display: none;
  816. }
  817. }
  818. [data-slot="question-option"] {
  819. display: flex;
  820. align-items: flex-start;
  821. gap: 12px;
  822. padding: 8px 8px 8px 10px;
  823. background-color: var(--v2-background-bg-layer-01);
  824. border: 0.5px solid var(--v2-border-border-base);
  825. border-radius: 6px;
  826. box-shadow: none;
  827. text-align: left;
  828. width: 100%;
  829. cursor: pointer;
  830. transition:
  831. background-color 0.15s ease,
  832. border-color 0.15s ease,
  833. box-shadow 0.15s ease;
  834. &:hover:not([data-picked="true"]) {
  835. background-color: var(--v2-background-bg-base);
  836. }
  837. &[data-picked="true"] {
  838. background-color: var(--v2-state-bg-info);
  839. border-color: transparent;
  840. box-shadow: var(--shadow-xs-border-hover);
  841. }
  842. &:disabled {
  843. cursor: not-allowed;
  844. opacity: 0.6;
  845. }
  846. }
  847. [data-slot="question-option-check"] {
  848. display: inline-flex;
  849. transform: translateY(2px);
  850. }
  851. [data-slot="question-option-box"] {
  852. width: 16px;
  853. height: 16px;
  854. padding: 2px;
  855. border-radius: var(--radius-sm);
  856. border: 0.5px solid var(--v2-border-border-base);
  857. display: inline-flex;
  858. align-items: center;
  859. justify-content: center;
  860. flex-shrink: 0;
  861. background-color: transparent;
  862. transition:
  863. background-color 0.15s ease,
  864. border-color 0.15s ease;
  865. [data-component="icon"] {
  866. opacity: 0;
  867. color: var(--icon-base);
  868. }
  869. &[data-type="radio"] {
  870. border-radius: 999px;
  871. }
  872. [data-slot="question-option-radio-dot"] {
  873. width: 6px;
  874. height: 6px;
  875. border-radius: 999px;
  876. background-color: var(--v2-background-bg-layer-01);
  877. opacity: 0;
  878. }
  879. &[data-picked="true"] {
  880. border-color: var(--icon-interactive-base);
  881. [data-component="icon"] {
  882. opacity: 1;
  883. color: var(--icon-invert-base);
  884. }
  885. &[data-type="checkbox"] {
  886. background-color: var(--icon-interactive-base);
  887. }
  888. &[data-type="radio"] {
  889. background-color: var(--icon-interactive-base);
  890. [data-slot="question-option-radio-dot"] {
  891. opacity: 1;
  892. }
  893. }
  894. }
  895. }
  896. [data-slot="question-option-main"] {
  897. display: flex;
  898. flex-direction: column;
  899. gap: 2px;
  900. min-width: 0;
  901. flex: 1;
  902. }
  903. [data-slot="option-label"] {
  904. font-family: var(--font-family-sans);
  905. font-size: 14px;
  906. font-weight: var(--font-weight-medium);
  907. line-height: var(--line-height-large);
  908. color: var(--v2-text-text-base);
  909. }
  910. [data-slot="option-description"] {
  911. font-family: var(--font-family-sans);
  912. font-size: 14px;
  913. font-weight: var(--font-weight-regular);
  914. line-height: var(--line-height-large);
  915. color: var(--v2-text-text-muted);
  916. min-width: 0;
  917. overflow-wrap: anywhere;
  918. white-space: normal;
  919. }
  920. [data-slot="question-custom"] {
  921. display: flex;
  922. flex-direction: column;
  923. gap: 8px;
  924. }
  925. [data-slot="question-custom-input-wrap"] {
  926. padding-left: 36px;
  927. }
  928. [data-slot="question-custom-input"] {
  929. width: 100%;
  930. padding: 0;
  931. border: 0;
  932. border-radius: 0;
  933. background: transparent;
  934. box-shadow: none;
  935. outline: none;
  936. font-family: var(--font-family-sans);
  937. font-size: 14px;
  938. font-weight: var(--font-weight-regular);
  939. line-height: var(--line-height-large);
  940. color: var(--v2-text-text-muted);
  941. min-width: 0;
  942. cursor: text;
  943. resize: none;
  944. overflow: hidden;
  945. overflow-wrap: anywhere;
  946. &::placeholder {
  947. color: var(--v2-text-text-muted);
  948. }
  949. &:focus-visible {
  950. outline: 0.5px solid var(--v2-border-border-focus);
  951. outline-offset: 2px;
  952. border-radius: var(--radius-xs);
  953. }
  954. &:disabled {
  955. opacity: 0.6;
  956. }
  957. }
  958. [data-slot="question-footer"] {
  959. display: flex;
  960. align-items: center;
  961. justify-content: space-between;
  962. flex-shrink: 0;
  963. padding: 32px 8px 8px;
  964. margin-top: -24px;
  965. }
  966. [data-slot="question-footer-actions"] {
  967. display: flex;
  968. align-items: center;
  969. gap: 8px;
  970. }
  971. }
  972. [data-component="question-minimized-dock"] {
  973. margin-bottom: 8px;
  974. [data-slot="question-minimized-trigger"] {
  975. display: flex;
  976. align-items: center;
  977. gap: 10px;
  978. width: 100%;
  979. padding: 10px 12px;
  980. border: 0;
  981. background: transparent;
  982. color: var(--v2-text-text-base);
  983. text-align: left;
  984. cursor: pointer;
  985. touch-action: manipulation;
  986. &:disabled {
  987. cursor: not-allowed;
  988. opacity: 0.6;
  989. }
  990. [data-component="icon"] {
  991. transform: rotate(180deg);
  992. }
  993. }
  994. [data-slot="question-minimized-summary"] {
  995. flex: 1;
  996. font-family: var(--font-family-sans);
  997. font-size: 14px;
  998. font-weight: var(--font-weight-medium);
  999. line-height: var(--line-height-large);
  1000. color: var(--v2-text-text-base);
  1001. }
  1002. }
  1003. [data-component="question-answers"] {
  1004. display: flex;
  1005. flex-direction: column;
  1006. gap: 12px;
  1007. padding: 8px 0;
  1008. [data-slot="question-answer-item"] {
  1009. display: flex;
  1010. flex-direction: column;
  1011. gap: 2px;
  1012. font-size: 13px;
  1013. [data-slot="question-text"] {
  1014. color: var(--v2-text-text-muted);
  1015. }
  1016. [data-slot="answer-text"] {
  1017. color: var(--v2-text-text-base);
  1018. }
  1019. }
  1020. }
  1021. [data-component="edit-tool"],
  1022. [data-component="write-tool"],
  1023. [data-component="apply-patch-tool"] {
  1024. > [data-component="collapsible"].tool-collapsible {
  1025. gap: 0px;
  1026. }
  1027. > [data-component="collapsible"] > [data-slot="collapsible-content"] {
  1028. border: none;
  1029. background: transparent;
  1030. }
  1031. > [data-component="collapsible"] > [data-slot="collapsible-trigger"][aria-expanded="true"] {
  1032. position: sticky;
  1033. top: var(--sticky-accordion-top, 0px);
  1034. z-index: 20;
  1035. height: calc(32px + var(--tool-content-gap));
  1036. padding-bottom: var(--tool-content-gap);
  1037. background-color: var(--v2-background-bg-base);
  1038. }
  1039. }
  1040. [data-component="accordion"][data-scope="apply-patch"] {
  1041. [data-slot="accordion-trigger"] {
  1042. background-color: var(--v2-background-bg-base) !important;
  1043. }
  1044. [data-slot="apply-patch-trigger-content"] {
  1045. display: flex;
  1046. align-items: center;
  1047. justify-content: space-between;
  1048. width: 100%;
  1049. gap: 20px;
  1050. }
  1051. [data-slot="apply-patch-file-info"] {
  1052. flex-grow: 1;
  1053. display: flex;
  1054. align-items: center;
  1055. gap: 20px;
  1056. min-width: 0;
  1057. }
  1058. [data-slot="apply-patch-file-name-container"] {
  1059. display: flex;
  1060. flex-grow: 1;
  1061. min-width: 0;
  1062. overflow: hidden;
  1063. }
  1064. [data-slot="apply-patch-directory"] {
  1065. color: var(--v2-text-text-muted);
  1066. text-overflow: ellipsis;
  1067. overflow: hidden;
  1068. white-space: nowrap;
  1069. direction: rtl;
  1070. text-align: left;
  1071. }
  1072. [data-slot="apply-patch-filename"] {
  1073. color: var(--v2-text-text-base);
  1074. min-width: 0;
  1075. overflow: hidden;
  1076. text-overflow: ellipsis;
  1077. white-space: nowrap;
  1078. }
  1079. [data-slot="apply-patch-trigger-actions"] {
  1080. flex-shrink: 0;
  1081. display: flex;
  1082. gap: 16px;
  1083. align-items: center;
  1084. justify-content: flex-end;
  1085. }
  1086. [data-slot="apply-patch-change"] {
  1087. font-family: var(--font-family-sans);
  1088. font-size: var(--font-size-small);
  1089. font-weight: var(--font-weight-medium);
  1090. }
  1091. [data-slot="apply-patch-change"][data-type="added"] {
  1092. color: var(--icon-diff-add-base);
  1093. }
  1094. [data-slot="apply-patch-change"][data-type="removed"] {
  1095. color: var(--icon-diff-delete-base);
  1096. }
  1097. [data-slot="apply-patch-change"][data-type="modified"] {
  1098. color: var(--icon-diff-modified-base);
  1099. }
  1100. }
  1101. [data-component="apply-patch-file-diff"] {
  1102. border-radius: inherit;
  1103. overflow-x: hidden;
  1104. overflow-y: visible;
  1105. scrollbar-width: none;
  1106. -ms-overflow-style: none;
  1107. &::-webkit-scrollbar {
  1108. display: none;
  1109. }
  1110. [data-component="diff"] {
  1111. border-radius: inherit;
  1112. overflow: hidden;
  1113. }
  1114. }
  1115. [data-component="tool-loaded-file"] {
  1116. display: flex;
  1117. align-items: center;
  1118. gap: 8px;
  1119. padding: 4px 0 4px 28px;
  1120. font-family: var(--font-family-sans);
  1121. font-size: var(--font-size-small);
  1122. font-weight: var(--font-weight-regular);
  1123. line-height: var(--line-height-large);
  1124. color: var(--v2-text-text-muted);
  1125. [data-component="icon"] {
  1126. flex-shrink: 0;
  1127. color: var(--icon-weak);
  1128. }
  1129. }
  1130. body:not([data-new-layout]) {
  1131. [data-component="user-message"] {
  1132. color: var(--text-strong);
  1133. [data-slot="user-message-attachment"] {
  1134. background: var(--surface-weak);
  1135. border: 1px solid var(--border-weak-base);
  1136. &:hover {
  1137. border-color: var(--border-strong-base);
  1138. }
  1139. }
  1140. [data-slot="user-message-attachment-name"] {
  1141. color: var(--text-base);
  1142. }
  1143. [data-slot="user-message-text"] {
  1144. background: var(--surface-base);
  1145. border: 1px solid var(--border-weak-base);
  1146. border-radius: 6px;
  1147. }
  1148. .text-text-strong {
  1149. color: var(--text-strong);
  1150. }
  1151. }
  1152. [data-slot="compaction-part-line"] {
  1153. background: var(--border-weak-base);
  1154. }
  1155. [data-component="reasoning-part"] {
  1156. color: var(--text-base);
  1157. [data-component="markdown"],
  1158. [data-component="markdown"] :is(strong, b) {
  1159. color: var(--text-weak);
  1160. }
  1161. }
  1162. [data-component="bash-output"] {
  1163. border: 1px solid var(--border-weak-base);
  1164. }
  1165. [data-component="edit-trigger"],
  1166. [data-component="write-trigger"] {
  1167. [data-slot="message-part-title"] {
  1168. color: var(--text-base);
  1169. }
  1170. [data-slot="message-part-title-spinner"],
  1171. [data-slot="message-part-directory"] {
  1172. color: var(--text-weak);
  1173. }
  1174. [data-slot="message-part-title-text"],
  1175. [data-slot="message-part-filename"] {
  1176. color: var(--text-strong);
  1177. }
  1178. }
  1179. [data-component="edit-content"],
  1180. [data-component="write-content"] {
  1181. border-top: 1px solid var(--border-weaker-base);
  1182. }
  1183. [data-component="exa-tool-output"] {
  1184. color: var(--text-base);
  1185. }
  1186. [data-slot="exa-tool-link"],
  1187. [data-slot="exa-tool-link"]:hover,
  1188. [data-slot="exa-tool-link"]:visited {
  1189. color: var(--text-interactive-base);
  1190. }
  1191. [data-slot="message-part-todo-content"][data-completed="completed"] {
  1192. color: var(--text-weaker);
  1193. }
  1194. [data-component="diagnostics"] {
  1195. background-color: var(--surface-critical-weak);
  1196. border-top: 1px solid var(--border-critical-base);
  1197. [data-slot="diagnostic-label"],
  1198. [data-slot="diagnostic-message"] {
  1199. color: var(--text-on-critical-base);
  1200. }
  1201. [data-slot="diagnostic-location"] {
  1202. color: var(--text-on-critical-weak);
  1203. }
  1204. }
  1205. [data-component="dock-prompt"][data-kind="permission"] {
  1206. [data-slot="permission-header-title"] {
  1207. color: var(--text-strong);
  1208. }
  1209. [data-slot="permission-hint"] {
  1210. color: var(--text-weak);
  1211. }
  1212. }
  1213. [data-component="dock-prompt"][data-kind="question"] {
  1214. [data-slot="question-header-title"],
  1215. [data-slot="question-text"],
  1216. [data-slot="option-label"] {
  1217. color: var(--text-strong);
  1218. }
  1219. [data-slot="question-hint"] {
  1220. color: var(--text-weak);
  1221. }
  1222. [data-slot="question-option"] {
  1223. background-color: var(--surface-raised-stronger-non-alpha);
  1224. border: 1px solid var(--border-weak-base);
  1225. &:hover:not([data-picked="true"]) {
  1226. background-color: var(--background-base);
  1227. }
  1228. &[data-picked="true"] {
  1229. background-color: var(--surface-interactive-weak);
  1230. }
  1231. }
  1232. [data-slot="question-option-box"] {
  1233. border: 1px solid var(--border-weak-base);
  1234. [data-slot="question-option-radio-dot"] {
  1235. background-color: var(--background-stronger);
  1236. }
  1237. }
  1238. [data-slot="option-description"],
  1239. [data-slot="question-custom-input"] {
  1240. color: var(--text-base);
  1241. }
  1242. [data-slot="question-custom-input"] {
  1243. &::placeholder {
  1244. color: var(--text-weak);
  1245. }
  1246. &:focus-visible {
  1247. outline: 1px solid var(--border-interactive-base);
  1248. }
  1249. }
  1250. }
  1251. [data-component="question-answers"] {
  1252. [data-slot="question-text"] {
  1253. color: var(--text-weak);
  1254. }
  1255. [data-slot="answer-text"] {
  1256. color: var(--text-strong);
  1257. }
  1258. }
  1259. :is([data-component="edit-tool"], [data-component="write-tool"], [data-component="apply-patch-tool"])
  1260. > [data-component="collapsible"]
  1261. > [data-slot="collapsible-trigger"][aria-expanded="true"],
  1262. [data-component="accordion"][data-scope="apply-patch"] [data-slot="accordion-trigger"] {
  1263. background-color: var(--background-stronger) !important;
  1264. }
  1265. [data-component="accordion"][data-scope="apply-patch"] {
  1266. [data-slot="apply-patch-directory"] {
  1267. color: var(--text-base);
  1268. }
  1269. [data-slot="apply-patch-filename"] {
  1270. color: var(--text-strong);
  1271. }
  1272. }
  1273. [data-component="tool-loaded-file"] {
  1274. color: var(--text-weak);
  1275. }
  1276. }