message-part.css 26 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271
  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(--text-strong);
  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(--surface-weak);
  42. border: 1px solid var(--border-weak-base);
  43. cursor: default;
  44. transition:
  45. border-color 0.15s ease,
  46. opacity 0.3s ease;
  47. &:hover {
  48. border-color: var(--border-strong-base);
  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(--text-base);
  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(--surface-base);
  118. border: 1px solid var(--border-weak-base);
  119. padding: 8px 12px;
  120. border-radius: 6px;
  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(--text-strong);
  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(--border-weak-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(--text-base);
  244. line-height: var(--line-height-normal);
  245. [data-component="markdown"] {
  246. margin-top: 24px;
  247. font-style: normal;
  248. font-size: var(--font-size-base);
  249. color: var(--text-weak);
  250. strong,
  251. b {
  252. color: var(--text-weak);
  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: 1px solid var(--border-weak-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-copy"] [data-component="icon-button"][data-variant="secondary"] {
  327. box-shadow: none;
  328. border: 1px solid var(--border-weak-base);
  329. }
  330. [data-slot="bash-copy"] [data-component="icon-button"][data-variant="secondary"] [data-slot="icon-svg"] {
  331. color: var(--icon-base);
  332. }
  333. [data-slot="bash-scroll"] {
  334. width: 100%;
  335. overflow-y: auto;
  336. overflow-x: hidden;
  337. max-height: 240px;
  338. scrollbar-width: none;
  339. &::-webkit-scrollbar {
  340. display: none;
  341. }
  342. }
  343. [data-slot="bash-pre"] {
  344. margin: 0;
  345. padding: 12px;
  346. }
  347. [data-slot="bash-pre"] code {
  348. font-family: var(--font-family-mono);
  349. font-feature-settings: var(--font-family-mono--font-feature-settings);
  350. font-size: 13px;
  351. line-height: var(--line-height-large);
  352. white-space: pre-wrap;
  353. overflow-wrap: anywhere;
  354. }
  355. }
  356. [data-component="edit-trigger"],
  357. [data-component="write-trigger"] {
  358. display: flex;
  359. align-items: center;
  360. justify-content: space-between;
  361. gap: 12px;
  362. width: 100%;
  363. [data-slot="message-part-title-area"] {
  364. flex-grow: 1;
  365. display: flex;
  366. align-items: center;
  367. gap: 8px;
  368. min-width: 0;
  369. }
  370. [data-slot="message-part-title"] {
  371. flex: 1 1 auto;
  372. display: flex;
  373. align-items: center;
  374. gap: 8px;
  375. min-width: 0;
  376. font-family: var(--font-family-sans);
  377. font-size: 14px;
  378. font-style: normal;
  379. font-weight: var(--font-weight-medium);
  380. line-height: var(--line-height-large);
  381. letter-spacing: var(--letter-spacing-normal);
  382. color: var(--text-base);
  383. }
  384. [data-slot="message-part-title-spinner"] {
  385. margin-left: 4px;
  386. width: 16px;
  387. height: 16px;
  388. display: inline-flex;
  389. align-items: center;
  390. justify-content: center;
  391. flex-shrink: 0;
  392. color: var(--text-weak);
  393. [data-component="spinner"] {
  394. width: 16px;
  395. height: 16px;
  396. }
  397. }
  398. [data-slot="message-part-title-text"] {
  399. flex-shrink: 0;
  400. text-transform: capitalize;
  401. color: var(--text-strong);
  402. }
  403. [data-slot="message-part-title-filename"] {
  404. /* No text-transform - preserve original filename casing */
  405. min-width: 0;
  406. overflow: hidden;
  407. text-overflow: ellipsis;
  408. white-space: nowrap;
  409. font-weight: var(--font-weight-regular);
  410. }
  411. [data-slot="message-part-path"] {
  412. display: flex;
  413. flex-grow: 1;
  414. min-width: 0;
  415. font-weight: var(--font-weight-regular);
  416. }
  417. [data-slot="message-part-directory"] {
  418. color: var(--text-weak);
  419. text-overflow: ellipsis;
  420. overflow: hidden;
  421. white-space: nowrap;
  422. direction: rtl;
  423. text-align: left;
  424. }
  425. [data-slot="message-part-filename"] {
  426. color: var(--text-strong);
  427. flex-shrink: 0;
  428. }
  429. [data-slot="message-part-actions"] {
  430. display: flex;
  431. gap: 16px;
  432. align-items: center;
  433. justify-content: flex-end;
  434. flex-shrink: 0;
  435. }
  436. }
  437. [data-component="edit-content"] {
  438. border-radius: inherit;
  439. border-top: 1px solid var(--border-weaker-base);
  440. overflow-x: hidden;
  441. overflow-y: visible;
  442. scrollbar-width: none;
  443. -ms-overflow-style: none;
  444. &::-webkit-scrollbar {
  445. display: none;
  446. }
  447. [data-component="diff"] {
  448. border-radius: inherit;
  449. overflow: hidden;
  450. }
  451. }
  452. [data-component="write-content"] {
  453. border-radius: inherit;
  454. border-top: 1px solid var(--border-weaker-base);
  455. overflow-x: hidden;
  456. overflow-y: visible;
  457. [data-component="code"] {
  458. padding-bottom: 0 !important;
  459. border-radius: inherit;
  460. overflow: hidden;
  461. }
  462. /* Hide scrollbar */
  463. scrollbar-width: none;
  464. -ms-overflow-style: none;
  465. &::-webkit-scrollbar {
  466. display: none;
  467. }
  468. }
  469. [data-component="tool-action"] {
  470. width: 24px;
  471. height: 24px;
  472. display: flex;
  473. align-items: center;
  474. justify-content: center;
  475. }
  476. [data-component="exa-tool-output"] {
  477. width: 100%;
  478. padding-top: 8px;
  479. display: flex;
  480. flex-direction: column;
  481. }
  482. [data-slot="basic-tool-tool-subtitle"].exa-tool-query {
  483. display: block;
  484. max-width: 100%;
  485. overflow: hidden;
  486. text-overflow: ellipsis;
  487. white-space: nowrap;
  488. }
  489. [data-slot="exa-tool-links"] {
  490. display: flex;
  491. flex-direction: column;
  492. gap: 4px;
  493. }
  494. [data-slot="exa-tool-link"] {
  495. display: block;
  496. max-width: 100%;
  497. color: var(--text-interactive-base);
  498. text-decoration: underline;
  499. text-underline-offset: 2px;
  500. overflow: hidden;
  501. text-overflow: ellipsis;
  502. white-space: nowrap;
  503. &:hover {
  504. color: var(--text-interactive-base);
  505. }
  506. &:visited {
  507. color: var(--text-interactive-base);
  508. }
  509. }
  510. [data-component="todos"] {
  511. padding: 10px 0 24px 0;
  512. display: flex;
  513. flex-direction: column;
  514. gap: 8px;
  515. [data-component="checkbox"] {
  516. --checkbox-align: flex-start;
  517. --checkbox-offset: 0.5px;
  518. }
  519. [data-slot="message-part-todo-content"] {
  520. line-height: var(--line-height-normal);
  521. &[data-completed="completed"] {
  522. text-decoration: line-through;
  523. color: var(--text-weaker);
  524. }
  525. }
  526. }
  527. [data-component="context-tool-group-trigger"] {
  528. width: 100%;
  529. min-height: 24px;
  530. display: flex;
  531. align-items: center;
  532. justify-content: flex-start;
  533. gap: 0px;
  534. cursor: default;
  535. [data-slot="context-tool-group-title"] {
  536. flex-shrink: 1;
  537. min-width: 0;
  538. }
  539. [data-slot="collapsible-arrow"] {
  540. color: var(--icon-weaker);
  541. cursor: pointer;
  542. }
  543. }
  544. [data-component="context-tool-group-list"] {
  545. padding-top: 6px;
  546. padding-right: 0;
  547. padding-bottom: 4px;
  548. padding-left: 13px;
  549. display: flex;
  550. flex-direction: column;
  551. gap: 8px;
  552. [data-slot="context-tool-group-item"] {
  553. min-width: 0;
  554. padding: 0;
  555. }
  556. }
  557. [data-component="diagnostics"] {
  558. display: flex;
  559. flex-direction: column;
  560. gap: 4px;
  561. padding: 8px 12px;
  562. background-color: var(--surface-critical-weak);
  563. border-top: 1px solid var(--border-critical-base);
  564. [data-slot="diagnostic"] {
  565. display: flex;
  566. align-items: baseline;
  567. gap: 6px;
  568. font-family: var(--font-family-mono);
  569. font-size: var(--font-size-small);
  570. line-height: var(--line-height-large);
  571. }
  572. [data-slot="diagnostic-label"] {
  573. color: var(--text-on-critical-base);
  574. font-weight: var(--font-weight-medium);
  575. text-transform: uppercase;
  576. letter-spacing: -0.5px;
  577. flex-shrink: 0;
  578. }
  579. [data-slot="diagnostic-location"] {
  580. color: var(--text-on-critical-weak);
  581. flex-shrink: 0;
  582. }
  583. [data-slot="diagnostic-message"] {
  584. color: var(--text-on-critical-base);
  585. word-break: break-word;
  586. display: -webkit-box;
  587. -webkit-box-orient: vertical;
  588. -webkit-line-clamp: 3;
  589. line-clamp: 3;
  590. overflow: hidden;
  591. }
  592. }
  593. [data-component="user-message"] [data-slot="user-message-text"],
  594. [data-component="text-part"],
  595. [data-component="reasoning-part"],
  596. [data-component="tool-output"],
  597. [data-component="bash-output"],
  598. [data-component="edit-content"],
  599. [data-component="write-content"],
  600. [data-component="todos"],
  601. [data-component="diagnostics"],
  602. .error-card {
  603. -webkit-user-select: text;
  604. user-select: text;
  605. }
  606. [data-component="tool-part-wrapper"] {
  607. width: 100%;
  608. }
  609. [data-component="dock-prompt"][data-kind="permission"] {
  610. position: relative;
  611. display: flex;
  612. flex-direction: column;
  613. gap: 0;
  614. min-height: 0;
  615. max-height: 100dvh;
  616. [data-slot="permission-body"] {
  617. display: flex;
  618. flex-direction: column;
  619. gap: 16px;
  620. flex: 1;
  621. min-height: 0;
  622. padding: 12px 12px 0;
  623. }
  624. [data-slot="permission-header"] {
  625. padding: 0;
  626. }
  627. [data-slot="permission-row"] {
  628. display: grid;
  629. grid-template-columns: 20px 1fr;
  630. column-gap: 8px;
  631. align-items: start;
  632. }
  633. [data-slot="permission-row"][data-variant="header"] {
  634. align-items: center;
  635. }
  636. [data-slot="permission-icon"] {
  637. display: inline-flex;
  638. align-items: center;
  639. justify-content: center;
  640. }
  641. [data-slot="permission-icon"] [data-component="icon"] {
  642. color: var(--icon-warning-base);
  643. }
  644. [data-slot="permission-header-title"] {
  645. font-family: var(--font-family-sans);
  646. font-size: 14px;
  647. font-weight: var(--font-weight-medium);
  648. line-height: var(--line-height-large);
  649. color: var(--text-strong);
  650. min-width: 0;
  651. }
  652. [data-slot="permission-content"] {
  653. display: flex;
  654. flex-direction: column;
  655. gap: 4px;
  656. flex: 1;
  657. min-height: 0;
  658. }
  659. [data-slot="permission-hint"] {
  660. font-family: var(--font-family-sans);
  661. font-size: 14px;
  662. font-weight: var(--font-weight-regular);
  663. line-height: var(--line-height-large);
  664. color: var(--text-weak);
  665. padding: 0;
  666. }
  667. [data-slot="permission-patterns"] {
  668. display: flex;
  669. flex-direction: column;
  670. gap: 6px;
  671. margin-top: 8px;
  672. margin-bottom: 16px;
  673. padding: 1px 0 8px;
  674. flex: 1;
  675. min-height: 0;
  676. overflow-y: auto;
  677. scrollbar-width: none;
  678. -ms-overflow-style: none;
  679. &::-webkit-scrollbar {
  680. display: none;
  681. }
  682. code {
  683. font-size: 14px;
  684. line-height: var(--line-height-large);
  685. }
  686. }
  687. [data-slot="permission-footer"] {
  688. display: flex;
  689. align-items: center;
  690. justify-content: space-between;
  691. flex-shrink: 0;
  692. padding: 32px 8px 8px;
  693. margin-top: -24px;
  694. }
  695. [data-slot="permission-footer-actions"] {
  696. display: flex;
  697. align-items: center;
  698. gap: 8px;
  699. [data-component="button"] {
  700. padding-left: 12px;
  701. padding-right: 12px;
  702. }
  703. }
  704. }
  705. [data-component="dock-prompt"][data-kind="question"] {
  706. position: relative;
  707. display: flex;
  708. flex-direction: column;
  709. gap: 0;
  710. min-height: 0;
  711. max-height: var(--question-prompt-max-height, 100dvh);
  712. [data-slot="question-body"] {
  713. display: flex;
  714. flex-direction: column;
  715. gap: 16px;
  716. flex: 1;
  717. min-height: 0;
  718. padding: 8px 8px 0;
  719. }
  720. [data-slot="question-header"] {
  721. display: flex;
  722. align-items: center;
  723. justify-content: space-between;
  724. gap: 12px;
  725. padding: 0 10px;
  726. }
  727. [data-slot="question-header-title"] {
  728. font-family: var(--font-family-sans);
  729. font-size: 14px;
  730. font-weight: var(--font-weight-medium);
  731. line-height: var(--line-height-large);
  732. color: var(--text-strong);
  733. min-width: 0;
  734. }
  735. [data-slot="question-progress"] {
  736. display: flex;
  737. align-items: center;
  738. gap: 8px;
  739. flex-shrink: 0;
  740. }
  741. [data-slot="question-progress-segment"] {
  742. width: 16px;
  743. height: 16px;
  744. padding: 0;
  745. border: 0;
  746. background: transparent;
  747. border-radius: 999px;
  748. display: inline-flex;
  749. align-items: center;
  750. justify-content: center;
  751. cursor: pointer;
  752. touch-action: manipulation;
  753. &::after {
  754. content: "";
  755. width: 16px;
  756. height: 2px;
  757. border-radius: 999px;
  758. background-color: var(--icon-weak-base);
  759. transition: background-color 0.2s ease;
  760. }
  761. &[data-active="true"]::after {
  762. background-color: var(--icon-strong-base);
  763. }
  764. &[data-answered="true"]::after {
  765. background-color: var(--icon-interactive-base);
  766. }
  767. &:disabled {
  768. cursor: not-allowed;
  769. opacity: 0.6;
  770. }
  771. }
  772. [data-slot="question-content"] {
  773. display: flex;
  774. flex-direction: column;
  775. gap: 4px;
  776. flex: 1;
  777. min-height: 0;
  778. }
  779. [data-slot="question-text"] {
  780. font-family: var(--font-family-sans);
  781. font-size: 14px;
  782. font-weight: var(--font-weight-medium);
  783. line-height: var(--line-height-large);
  784. color: var(--text-strong);
  785. padding: 0 10px;
  786. }
  787. [data-slot="question-hint"] {
  788. font-family: var(--font-family-sans);
  789. font-size: 13px;
  790. font-weight: var(--font-weight-regular);
  791. line-height: var(--line-height-large);
  792. color: var(--text-weak);
  793. padding: 0 10px;
  794. }
  795. [data-slot="question-options"] {
  796. display: flex;
  797. flex-direction: column;
  798. gap: 6px;
  799. margin-top: 12px;
  800. padding: 1px 1px 8px;
  801. flex: 1;
  802. min-height: 0;
  803. overflow-y: auto;
  804. scrollbar-width: none;
  805. -ms-overflow-style: none;
  806. &::-webkit-scrollbar {
  807. display: none;
  808. }
  809. }
  810. [data-slot="question-option"] {
  811. display: flex;
  812. align-items: flex-start;
  813. gap: 12px;
  814. padding: 8px 8px 8px 10px;
  815. background-color: var(--surface-raised-stronger-non-alpha);
  816. border: 1px solid var(--border-weak-base);
  817. border-radius: 6px;
  818. box-shadow: none;
  819. text-align: left;
  820. width: 100%;
  821. cursor: pointer;
  822. transition:
  823. background-color 0.15s ease,
  824. border-color 0.15s ease,
  825. box-shadow 0.15s ease;
  826. &:hover:not([data-picked="true"]) {
  827. background-color: var(--background-base);
  828. }
  829. &[data-picked="true"] {
  830. background-color: var(--surface-interactive-weak);
  831. border-color: transparent;
  832. box-shadow: var(--shadow-xs-border-hover);
  833. }
  834. &:disabled {
  835. cursor: not-allowed;
  836. opacity: 0.6;
  837. }
  838. }
  839. [data-slot="question-option-check"] {
  840. display: inline-flex;
  841. transform: translateY(2px);
  842. }
  843. [data-slot="question-option-box"] {
  844. width: 16px;
  845. height: 16px;
  846. padding: 2px;
  847. border-radius: var(--radius-sm);
  848. border: 1px solid var(--border-weak-base);
  849. display: inline-flex;
  850. align-items: center;
  851. justify-content: center;
  852. flex-shrink: 0;
  853. background-color: transparent;
  854. transition:
  855. background-color 0.15s ease,
  856. border-color 0.15s ease;
  857. [data-component="icon"] {
  858. opacity: 0;
  859. color: var(--icon-base);
  860. }
  861. &[data-type="radio"] {
  862. border-radius: 999px;
  863. }
  864. [data-slot="question-option-radio-dot"] {
  865. width: 6px;
  866. height: 6px;
  867. border-radius: 999px;
  868. background-color: var(--background-stronger);
  869. opacity: 0;
  870. }
  871. &[data-picked="true"] {
  872. border-color: var(--icon-interactive-base);
  873. [data-component="icon"] {
  874. opacity: 1;
  875. color: var(--icon-invert-base);
  876. }
  877. &[data-type="checkbox"] {
  878. background-color: var(--icon-interactive-base);
  879. }
  880. &[data-type="radio"] {
  881. background-color: var(--icon-interactive-base);
  882. [data-slot="question-option-radio-dot"] {
  883. opacity: 1;
  884. }
  885. }
  886. }
  887. }
  888. [data-slot="question-option-main"] {
  889. display: flex;
  890. flex-direction: column;
  891. gap: 2px;
  892. min-width: 0;
  893. flex: 1;
  894. }
  895. [data-slot="option-label"] {
  896. font-family: var(--font-family-sans);
  897. font-size: 14px;
  898. font-weight: var(--font-weight-medium);
  899. line-height: var(--line-height-large);
  900. color: var(--text-strong);
  901. }
  902. [data-slot="option-description"] {
  903. font-family: var(--font-family-sans);
  904. font-size: 14px;
  905. font-weight: var(--font-weight-regular);
  906. line-height: var(--line-height-large);
  907. color: var(--text-base);
  908. min-width: 0;
  909. overflow-wrap: anywhere;
  910. white-space: normal;
  911. }
  912. [data-slot="question-custom"] {
  913. display: flex;
  914. flex-direction: column;
  915. gap: 8px;
  916. }
  917. [data-slot="question-custom-input-wrap"] {
  918. padding-left: 36px;
  919. }
  920. [data-slot="question-custom-input"] {
  921. width: 100%;
  922. padding: 0;
  923. border: 0;
  924. border-radius: 0;
  925. background: transparent;
  926. box-shadow: none;
  927. outline: none;
  928. font-family: var(--font-family-sans);
  929. font-size: 14px;
  930. font-weight: var(--font-weight-regular);
  931. line-height: var(--line-height-large);
  932. color: var(--text-base);
  933. min-width: 0;
  934. cursor: text;
  935. resize: none;
  936. overflow: hidden;
  937. overflow-wrap: anywhere;
  938. &::placeholder {
  939. color: var(--text-weak);
  940. }
  941. &:focus-visible {
  942. outline: 1px solid var(--border-interactive-base);
  943. outline-offset: 2px;
  944. border-radius: var(--radius-xs);
  945. }
  946. &:disabled {
  947. opacity: 0.6;
  948. }
  949. }
  950. [data-slot="question-footer"] {
  951. display: flex;
  952. align-items: center;
  953. justify-content: space-between;
  954. flex-shrink: 0;
  955. padding: 32px 8px 8px;
  956. margin-top: -24px;
  957. }
  958. [data-slot="question-footer-actions"] {
  959. display: flex;
  960. align-items: center;
  961. gap: 8px;
  962. }
  963. }
  964. [data-component="question-answers"] {
  965. display: flex;
  966. flex-direction: column;
  967. gap: 12px;
  968. padding: 8px 0;
  969. [data-slot="question-answer-item"] {
  970. display: flex;
  971. flex-direction: column;
  972. gap: 2px;
  973. font-size: 13px;
  974. [data-slot="question-text"] {
  975. color: var(--text-weak);
  976. }
  977. [data-slot="answer-text"] {
  978. color: var(--text-strong);
  979. }
  980. }
  981. }
  982. [data-component="edit-tool"],
  983. [data-component="write-tool"],
  984. [data-component="apply-patch-tool"] {
  985. > [data-component="collapsible"].tool-collapsible {
  986. gap: 0px;
  987. }
  988. > [data-component="collapsible"] > [data-slot="collapsible-content"] {
  989. border: none;
  990. background: transparent;
  991. }
  992. > [data-component="collapsible"] > [data-slot="collapsible-trigger"][aria-expanded="true"] {
  993. position: sticky;
  994. top: var(--sticky-accordion-top, 0px);
  995. z-index: 20;
  996. height: calc(32px + var(--tool-content-gap));
  997. padding-bottom: var(--tool-content-gap);
  998. background-color: var(--background-stronger);
  999. }
  1000. }
  1001. [data-component="accordion"][data-scope="apply-patch"] {
  1002. [data-slot="accordion-trigger"] {
  1003. background-color: var(--background-stronger) !important;
  1004. }
  1005. [data-slot="apply-patch-trigger-content"] {
  1006. display: flex;
  1007. align-items: center;
  1008. justify-content: space-between;
  1009. width: 100%;
  1010. gap: 20px;
  1011. }
  1012. [data-slot="apply-patch-file-info"] {
  1013. flex-grow: 1;
  1014. display: flex;
  1015. align-items: center;
  1016. gap: 20px;
  1017. min-width: 0;
  1018. }
  1019. [data-slot="apply-patch-file-name-container"] {
  1020. display: flex;
  1021. flex-grow: 1;
  1022. min-width: 0;
  1023. overflow: hidden;
  1024. }
  1025. [data-slot="apply-patch-directory"] {
  1026. color: var(--text-base);
  1027. text-overflow: ellipsis;
  1028. overflow: hidden;
  1029. white-space: nowrap;
  1030. direction: rtl;
  1031. text-align: left;
  1032. }
  1033. [data-slot="apply-patch-filename"] {
  1034. color: var(--text-strong);
  1035. flex: 1 1 auto;
  1036. min-width: 0;
  1037. overflow: hidden;
  1038. text-overflow: ellipsis;
  1039. white-space: nowrap;
  1040. }
  1041. [data-slot="apply-patch-trigger-actions"] {
  1042. flex-shrink: 0;
  1043. display: flex;
  1044. gap: 16px;
  1045. align-items: center;
  1046. justify-content: flex-end;
  1047. }
  1048. [data-slot="apply-patch-change"] {
  1049. font-family: var(--font-family-sans);
  1050. font-size: var(--font-size-small);
  1051. font-weight: var(--font-weight-medium);
  1052. }
  1053. [data-slot="apply-patch-change"][data-type="added"] {
  1054. color: var(--icon-diff-add-base);
  1055. }
  1056. [data-slot="apply-patch-change"][data-type="removed"] {
  1057. color: var(--icon-diff-delete-base);
  1058. }
  1059. [data-slot="apply-patch-change"][data-type="modified"] {
  1060. color: var(--icon-diff-modified-base);
  1061. }
  1062. }
  1063. [data-component="apply-patch-file-diff"] {
  1064. border-radius: inherit;
  1065. overflow-x: hidden;
  1066. overflow-y: visible;
  1067. scrollbar-width: none;
  1068. -ms-overflow-style: none;
  1069. &::-webkit-scrollbar {
  1070. display: none;
  1071. }
  1072. [data-component="diff"] {
  1073. border-radius: inherit;
  1074. overflow: hidden;
  1075. }
  1076. }
  1077. [data-component="tool-loaded-file"] {
  1078. display: flex;
  1079. align-items: center;
  1080. gap: 8px;
  1081. padding: 4px 0 4px 28px;
  1082. font-family: var(--font-family-sans);
  1083. font-size: var(--font-size-small);
  1084. font-weight: var(--font-weight-regular);
  1085. line-height: var(--line-height-large);
  1086. color: var(--text-weak);
  1087. [data-component="icon"] {
  1088. flex-shrink: 0;
  1089. color: var(--icon-weak);
  1090. }
  1091. }