message-part.css 27 KB

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