message-part.css 26 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268
  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: inherit;
  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: 6px 0 4px 0;
  546. display: flex;
  547. flex-direction: column;
  548. gap: 2px;
  549. [data-slot="context-tool-group-item"] {
  550. min-width: 0;
  551. padding: 6px 0;
  552. }
  553. }
  554. [data-component="diagnostics"] {
  555. display: flex;
  556. flex-direction: column;
  557. gap: 4px;
  558. padding: 8px 12px;
  559. background-color: var(--surface-critical-weak);
  560. border-top: 1px solid var(--border-critical-base);
  561. [data-slot="diagnostic"] {
  562. display: flex;
  563. align-items: baseline;
  564. gap: 6px;
  565. font-family: var(--font-family-mono);
  566. font-size: var(--font-size-small);
  567. line-height: var(--line-height-large);
  568. }
  569. [data-slot="diagnostic-label"] {
  570. color: var(--text-on-critical-base);
  571. font-weight: var(--font-weight-medium);
  572. text-transform: uppercase;
  573. letter-spacing: -0.5px;
  574. flex-shrink: 0;
  575. }
  576. [data-slot="diagnostic-location"] {
  577. color: var(--text-on-critical-weak);
  578. flex-shrink: 0;
  579. }
  580. [data-slot="diagnostic-message"] {
  581. color: var(--text-on-critical-base);
  582. word-break: break-word;
  583. display: -webkit-box;
  584. -webkit-box-orient: vertical;
  585. -webkit-line-clamp: 3;
  586. line-clamp: 3;
  587. overflow: hidden;
  588. }
  589. }
  590. [data-component="user-message"] [data-slot="user-message-text"],
  591. [data-component="text-part"],
  592. [data-component="reasoning-part"],
  593. [data-component="tool-output"],
  594. [data-component="bash-output"],
  595. [data-component="edit-content"],
  596. [data-component="write-content"],
  597. [data-component="todos"],
  598. [data-component="diagnostics"],
  599. .error-card {
  600. -webkit-user-select: text;
  601. user-select: text;
  602. }
  603. [data-component="tool-part-wrapper"] {
  604. width: 100%;
  605. }
  606. [data-component="dock-prompt"][data-kind="permission"] {
  607. position: relative;
  608. display: flex;
  609. flex-direction: column;
  610. gap: 0;
  611. min-height: 0;
  612. max-height: 100dvh;
  613. [data-slot="permission-body"] {
  614. display: flex;
  615. flex-direction: column;
  616. gap: 16px;
  617. flex: 1;
  618. min-height: 0;
  619. padding: 12px 12px 0;
  620. }
  621. [data-slot="permission-header"] {
  622. padding: 0;
  623. }
  624. [data-slot="permission-row"] {
  625. display: grid;
  626. grid-template-columns: 20px 1fr;
  627. column-gap: 8px;
  628. align-items: start;
  629. }
  630. [data-slot="permission-row"][data-variant="header"] {
  631. align-items: center;
  632. }
  633. [data-slot="permission-icon"] {
  634. display: inline-flex;
  635. align-items: center;
  636. justify-content: center;
  637. }
  638. [data-slot="permission-icon"] [data-component="icon"] {
  639. color: var(--icon-warning-base);
  640. }
  641. [data-slot="permission-header-title"] {
  642. font-family: var(--font-family-sans);
  643. font-size: 14px;
  644. font-weight: var(--font-weight-medium);
  645. line-height: var(--line-height-large);
  646. color: var(--text-strong);
  647. min-width: 0;
  648. }
  649. [data-slot="permission-content"] {
  650. display: flex;
  651. flex-direction: column;
  652. gap: 4px;
  653. flex: 1;
  654. min-height: 0;
  655. }
  656. [data-slot="permission-hint"] {
  657. font-family: var(--font-family-sans);
  658. font-size: 14px;
  659. font-weight: var(--font-weight-regular);
  660. line-height: var(--line-height-large);
  661. color: var(--text-weak);
  662. padding: 0;
  663. }
  664. [data-slot="permission-patterns"] {
  665. display: flex;
  666. flex-direction: column;
  667. gap: 6px;
  668. margin-top: 8px;
  669. margin-bottom: 16px;
  670. padding: 1px 0 8px;
  671. flex: 1;
  672. min-height: 0;
  673. overflow-y: auto;
  674. scrollbar-width: none;
  675. -ms-overflow-style: none;
  676. &::-webkit-scrollbar {
  677. display: none;
  678. }
  679. code {
  680. font-size: 14px;
  681. line-height: var(--line-height-large);
  682. }
  683. }
  684. [data-slot="permission-footer"] {
  685. display: flex;
  686. align-items: center;
  687. justify-content: space-between;
  688. flex-shrink: 0;
  689. padding: 32px 8px 8px;
  690. margin-top: -24px;
  691. }
  692. [data-slot="permission-footer-actions"] {
  693. display: flex;
  694. align-items: center;
  695. gap: 8px;
  696. [data-component="button"] {
  697. padding-left: 12px;
  698. padding-right: 12px;
  699. }
  700. }
  701. }
  702. [data-component="dock-prompt"][data-kind="question"] {
  703. position: relative;
  704. display: flex;
  705. flex-direction: column;
  706. gap: 0;
  707. min-height: 0;
  708. max-height: var(--question-prompt-max-height, 100dvh);
  709. [data-slot="question-body"] {
  710. display: flex;
  711. flex-direction: column;
  712. gap: 16px;
  713. flex: 1;
  714. min-height: 0;
  715. padding: 8px 8px 0;
  716. }
  717. [data-slot="question-header"] {
  718. display: flex;
  719. align-items: center;
  720. justify-content: space-between;
  721. gap: 12px;
  722. padding: 0 10px;
  723. }
  724. [data-slot="question-header-title"] {
  725. font-family: var(--font-family-sans);
  726. font-size: 14px;
  727. font-weight: var(--font-weight-medium);
  728. line-height: var(--line-height-large);
  729. color: var(--text-strong);
  730. min-width: 0;
  731. }
  732. [data-slot="question-progress"] {
  733. display: flex;
  734. align-items: center;
  735. gap: 8px;
  736. flex-shrink: 0;
  737. }
  738. [data-slot="question-progress-segment"] {
  739. width: 16px;
  740. height: 16px;
  741. padding: 0;
  742. border: 0;
  743. background: transparent;
  744. border-radius: 999px;
  745. display: inline-flex;
  746. align-items: center;
  747. justify-content: center;
  748. cursor: pointer;
  749. touch-action: manipulation;
  750. &::after {
  751. content: "";
  752. width: 16px;
  753. height: 2px;
  754. border-radius: 999px;
  755. background-color: var(--icon-weak-base);
  756. transition: background-color 0.2s ease;
  757. }
  758. &[data-active="true"]::after {
  759. background-color: var(--icon-strong-base);
  760. }
  761. &[data-answered="true"]::after {
  762. background-color: var(--icon-interactive-base);
  763. }
  764. &:disabled {
  765. cursor: not-allowed;
  766. opacity: 0.6;
  767. }
  768. }
  769. [data-slot="question-content"] {
  770. display: flex;
  771. flex-direction: column;
  772. gap: 4px;
  773. flex: 1;
  774. min-height: 0;
  775. }
  776. [data-slot="question-text"] {
  777. font-family: var(--font-family-sans);
  778. font-size: 14px;
  779. font-weight: var(--font-weight-medium);
  780. line-height: var(--line-height-large);
  781. color: var(--text-strong);
  782. padding: 0 10px;
  783. }
  784. [data-slot="question-hint"] {
  785. font-family: var(--font-family-sans);
  786. font-size: 13px;
  787. font-weight: var(--font-weight-regular);
  788. line-height: var(--line-height-large);
  789. color: var(--text-weak);
  790. padding: 0 10px;
  791. }
  792. [data-slot="question-options"] {
  793. display: flex;
  794. flex-direction: column;
  795. gap: 6px;
  796. margin-top: 12px;
  797. padding: 1px 1px 8px;
  798. flex: 1;
  799. min-height: 0;
  800. overflow-y: auto;
  801. scrollbar-width: none;
  802. -ms-overflow-style: none;
  803. &::-webkit-scrollbar {
  804. display: none;
  805. }
  806. }
  807. [data-slot="question-option"] {
  808. display: flex;
  809. align-items: flex-start;
  810. gap: 12px;
  811. padding: 8px 8px 8px 10px;
  812. background-color: var(--surface-raised-stronger-non-alpha);
  813. border: 1px solid var(--border-weak-base);
  814. border-radius: 6px;
  815. box-shadow: none;
  816. text-align: left;
  817. width: 100%;
  818. cursor: pointer;
  819. transition:
  820. background-color 0.15s ease,
  821. border-color 0.15s ease,
  822. box-shadow 0.15s ease;
  823. &:hover:not([data-picked="true"]) {
  824. background-color: var(--background-base);
  825. }
  826. &[data-picked="true"] {
  827. background-color: var(--surface-interactive-weak);
  828. border-color: transparent;
  829. box-shadow: var(--shadow-xs-border-hover);
  830. }
  831. &:disabled {
  832. cursor: not-allowed;
  833. opacity: 0.6;
  834. }
  835. }
  836. [data-slot="question-option-check"] {
  837. display: inline-flex;
  838. transform: translateY(2px);
  839. }
  840. [data-slot="question-option-box"] {
  841. width: 16px;
  842. height: 16px;
  843. padding: 2px;
  844. border-radius: var(--radius-sm);
  845. border: 1px solid var(--border-weak-base);
  846. display: inline-flex;
  847. align-items: center;
  848. justify-content: center;
  849. flex-shrink: 0;
  850. background-color: transparent;
  851. transition:
  852. background-color 0.15s ease,
  853. border-color 0.15s ease;
  854. [data-component="icon"] {
  855. opacity: 0;
  856. color: var(--icon-base);
  857. }
  858. &[data-type="radio"] {
  859. border-radius: 999px;
  860. }
  861. [data-slot="question-option-radio-dot"] {
  862. width: 6px;
  863. height: 6px;
  864. border-radius: 999px;
  865. background-color: var(--background-stronger);
  866. opacity: 0;
  867. }
  868. &[data-picked="true"] {
  869. border-color: var(--icon-interactive-base);
  870. [data-component="icon"] {
  871. opacity: 1;
  872. color: var(--icon-invert-base);
  873. }
  874. &[data-type="checkbox"] {
  875. background-color: var(--icon-interactive-base);
  876. }
  877. &[data-type="radio"] {
  878. background-color: var(--icon-interactive-base);
  879. [data-slot="question-option-radio-dot"] {
  880. opacity: 1;
  881. }
  882. }
  883. }
  884. }
  885. [data-slot="question-option-main"] {
  886. display: flex;
  887. flex-direction: column;
  888. gap: 2px;
  889. min-width: 0;
  890. flex: 1;
  891. }
  892. [data-slot="option-label"] {
  893. font-family: var(--font-family-sans);
  894. font-size: 14px;
  895. font-weight: var(--font-weight-medium);
  896. line-height: var(--line-height-large);
  897. color: var(--text-strong);
  898. }
  899. [data-slot="option-description"] {
  900. font-family: var(--font-family-sans);
  901. font-size: 14px;
  902. font-weight: var(--font-weight-regular);
  903. line-height: var(--line-height-large);
  904. color: var(--text-base);
  905. min-width: 0;
  906. overflow-wrap: anywhere;
  907. white-space: normal;
  908. }
  909. [data-slot="question-custom"] {
  910. display: flex;
  911. flex-direction: column;
  912. gap: 8px;
  913. }
  914. [data-slot="question-custom-input-wrap"] {
  915. padding-left: 36px;
  916. }
  917. [data-slot="question-custom-input"] {
  918. width: 100%;
  919. padding: 0;
  920. border: 0;
  921. border-radius: 0;
  922. background: transparent;
  923. box-shadow: none;
  924. outline: none;
  925. font-family: var(--font-family-sans);
  926. font-size: 14px;
  927. font-weight: var(--font-weight-regular);
  928. line-height: var(--line-height-large);
  929. color: var(--text-base);
  930. min-width: 0;
  931. cursor: text;
  932. resize: none;
  933. overflow: hidden;
  934. overflow-wrap: anywhere;
  935. &::placeholder {
  936. color: var(--text-weak);
  937. }
  938. &:focus-visible {
  939. outline: 1px solid var(--border-interactive-base);
  940. outline-offset: 2px;
  941. border-radius: var(--radius-xs);
  942. }
  943. &:disabled {
  944. opacity: 0.6;
  945. }
  946. }
  947. [data-slot="question-footer"] {
  948. display: flex;
  949. align-items: center;
  950. justify-content: space-between;
  951. flex-shrink: 0;
  952. padding: 32px 8px 8px;
  953. margin-top: -24px;
  954. }
  955. [data-slot="question-footer-actions"] {
  956. display: flex;
  957. align-items: center;
  958. gap: 8px;
  959. }
  960. }
  961. [data-component="question-answers"] {
  962. display: flex;
  963. flex-direction: column;
  964. gap: 12px;
  965. padding: 8px 0;
  966. [data-slot="question-answer-item"] {
  967. display: flex;
  968. flex-direction: column;
  969. gap: 2px;
  970. font-size: 13px;
  971. [data-slot="question-text"] {
  972. color: var(--text-weak);
  973. }
  974. [data-slot="answer-text"] {
  975. color: var(--text-strong);
  976. }
  977. }
  978. }
  979. [data-component="edit-tool"],
  980. [data-component="write-tool"],
  981. [data-component="apply-patch-tool"] {
  982. > [data-component="collapsible"].tool-collapsible {
  983. gap: 0px;
  984. }
  985. > [data-component="collapsible"] > [data-slot="collapsible-content"] {
  986. border: none;
  987. background: transparent;
  988. }
  989. > [data-component="collapsible"] > [data-slot="collapsible-trigger"][aria-expanded="true"] {
  990. position: sticky;
  991. top: var(--sticky-accordion-top, 0px);
  992. z-index: 20;
  993. height: 40px;
  994. padding-bottom: 8px;
  995. background-color: var(--background-stronger);
  996. }
  997. }
  998. [data-component="accordion"][data-scope="apply-patch"] {
  999. [data-slot="accordion-trigger"] {
  1000. background-color: var(--background-stronger) !important;
  1001. }
  1002. [data-slot="apply-patch-trigger-content"] {
  1003. display: flex;
  1004. align-items: center;
  1005. justify-content: space-between;
  1006. width: 100%;
  1007. gap: 20px;
  1008. }
  1009. [data-slot="apply-patch-file-info"] {
  1010. flex-grow: 1;
  1011. display: flex;
  1012. align-items: center;
  1013. gap: 20px;
  1014. min-width: 0;
  1015. }
  1016. [data-slot="apply-patch-file-name-container"] {
  1017. display: flex;
  1018. flex-grow: 1;
  1019. min-width: 0;
  1020. overflow: hidden;
  1021. }
  1022. [data-slot="apply-patch-directory"] {
  1023. color: var(--text-base);
  1024. text-overflow: ellipsis;
  1025. overflow: hidden;
  1026. white-space: nowrap;
  1027. direction: rtl;
  1028. text-align: left;
  1029. }
  1030. [data-slot="apply-patch-filename"] {
  1031. color: var(--text-strong);
  1032. flex: 1 1 auto;
  1033. min-width: 0;
  1034. overflow: hidden;
  1035. text-overflow: ellipsis;
  1036. white-space: nowrap;
  1037. }
  1038. [data-slot="apply-patch-trigger-actions"] {
  1039. flex-shrink: 0;
  1040. display: flex;
  1041. gap: 16px;
  1042. align-items: center;
  1043. justify-content: flex-end;
  1044. }
  1045. [data-slot="apply-patch-change"] {
  1046. font-family: var(--font-family-sans);
  1047. font-size: var(--font-size-small);
  1048. font-weight: var(--font-weight-medium);
  1049. }
  1050. [data-slot="apply-patch-change"][data-type="added"] {
  1051. color: var(--icon-diff-add-base);
  1052. }
  1053. [data-slot="apply-patch-change"][data-type="removed"] {
  1054. color: var(--icon-diff-delete-base);
  1055. }
  1056. [data-slot="apply-patch-change"][data-type="modified"] {
  1057. color: var(--icon-diff-modified-base);
  1058. }
  1059. }
  1060. [data-component="apply-patch-file-diff"] {
  1061. border-radius: inherit;
  1062. overflow-x: hidden;
  1063. overflow-y: visible;
  1064. scrollbar-width: none;
  1065. -ms-overflow-style: none;
  1066. &::-webkit-scrollbar {
  1067. display: none;
  1068. }
  1069. [data-component="diff"] {
  1070. border-radius: inherit;
  1071. overflow: hidden;
  1072. }
  1073. }
  1074. [data-component="tool-loaded-file"] {
  1075. display: flex;
  1076. align-items: center;
  1077. gap: 8px;
  1078. padding: 4px 0 4px 28px;
  1079. font-family: var(--font-family-sans);
  1080. font-size: var(--font-size-small);
  1081. font-weight: var(--font-weight-regular);
  1082. line-height: var(--line-height-large);
  1083. color: var(--text-weak);
  1084. [data-component="icon"] {
  1085. flex-shrink: 0;
  1086. color: var(--icon-weak);
  1087. }
  1088. }