message-part.css 26 KB

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