share.module.css 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. .root {
  2. padding-top: 0.5rem;
  3. display: flex;
  4. flex-direction: column;
  5. gap: 2.5rem;
  6. line-height: 1;
  7. --term-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2060%2016'%20preserveAspectRatio%3D'xMidYMid%20meet'%3E%3Ccircle%20cx%3D'8'%20cy%3D'8'%20r%3D'8'%2F%3E%3Ccircle%20cx%3D'30'%20cy%3D'8'%20r%3D'8'%2F%3E%3Ccircle%20cx%3D'52'%20cy%3D'8'%20r%3D'8'%2F%3E%3C%2Fsvg%3E");
  8. }
  9. [data-element-button-text] {
  10. cursor: pointer;
  11. appearance: none;
  12. background-color: transparent;
  13. border: none;
  14. padding: 0;
  15. color: var(--sl-color-text-secondary);
  16. &:hover {
  17. color: var(--sl-color-text);
  18. }
  19. &[data-element-button-more] {
  20. display: flex;
  21. align-items: center;
  22. gap: 0.125rem;
  23. span[data-button-icon] {
  24. line-height: 1;
  25. opacity: 0.85;
  26. svg {
  27. display: block;
  28. }
  29. }
  30. }
  31. }
  32. [data-element-label] {
  33. text-transform: uppercase;
  34. letter-spacing: 0.05em;
  35. color: var(--sl-color-text-dimmed);
  36. }
  37. .header {
  38. display: flex;
  39. flex-direction: column;
  40. gap: 0.75rem;
  41. @media (max-width: 30rem) {
  42. gap: 1rem;
  43. }
  44. [data-section="title"] {
  45. display: flex;
  46. align-items: center;
  47. justify-content: space-between;
  48. gap: 3rem;
  49. & > div {
  50. flex: 0 0 auto;
  51. display: flex;
  52. flex-direction: column;
  53. gap: 0.5rem;
  54. align-items: flex-end;
  55. [data-section="date"] {
  56. span {
  57. font-size: 0.875rem;
  58. color: var(--sl-color-text-secondary);
  59. &[data-placeholder] {
  60. color: var(--sl-color-text-dimmed);
  61. }
  62. }
  63. }
  64. p[data-section="status"] {
  65. flex: 0 0 auto;
  66. display: flex;
  67. gap: 0.375rem;
  68. font-size: 0.75rem;
  69. span:first-child {
  70. color: var(--sl-color-divider);
  71. &[data-status="connected"] {
  72. color: var(--sl-color-green);
  73. }
  74. &[data-status="connecting"] {
  75. color: var(--sl-color-orange);
  76. }
  77. &[data-status="disconnected"] {
  78. color: var(--sl-color-divider);
  79. }
  80. &[data-status="reconnecting"] {
  81. color: var(--sl-color-orange);
  82. }
  83. &[data-status="error"] {
  84. color: var(--sl-color-red);
  85. }
  86. }
  87. }
  88. }
  89. }
  90. [data-section="row"] {
  91. display: flex;
  92. flex-direction: column;
  93. gap: 0.375rem;
  94. }
  95. h1 {
  96. font-size: 1.75rem;
  97. font-weight: 500;
  98. line-height: 1.25;
  99. letter-spacing: -0.05em;
  100. display: -webkit-box;
  101. -webkit-box-orient: vertical;
  102. -webkit-line-clamp: 2;
  103. overflow: hidden;
  104. @media (max-width: 30rem) {
  105. font-size: 1.25rem;
  106. -webkit-line-clamp: 3;
  107. }
  108. }
  109. [data-section="stats"] {
  110. list-style-type: none;
  111. padding: 0;
  112. margin: 0;
  113. display: flex;
  114. gap: 0.5rem 1rem;
  115. flex-wrap: wrap;
  116. li {
  117. display: flex;
  118. align-items: center;
  119. gap: 0.5rem;
  120. font-size: 0.875rem;
  121. span[data-placeholder] {
  122. color: var(--sl-color-text-dimmed);
  123. }
  124. }
  125. }
  126. [data-section="stats"][data-section-models] {
  127. li {
  128. gap: 0.3125rem;
  129. [data-stat-model-icon] {
  130. flex: 0 0 auto;
  131. color: var(--sl-color-text-dimmed);
  132. opacity: 0.85;
  133. svg {
  134. display: block;
  135. }
  136. }
  137. span[data-stat-model] {
  138. color: var(--sl-color-text);
  139. }
  140. }
  141. }
  142. [data-section="system-prompt"] {
  143. display: flex;
  144. gap: 0.3125rem;
  145. [data-section="icon"] {
  146. flex: 0 0 auto;
  147. color: var(--sl-color-text-dimmed);
  148. opacity: 0.85;
  149. svg {
  150. display: block;
  151. }
  152. }
  153. [data-section="content"] {
  154. display: flex;
  155. flex-direction: column;
  156. gap: 0.5rem;
  157. }
  158. button {
  159. line-height: 1rem;
  160. font-size: 0.875rem;
  161. }
  162. }
  163. }
  164. .parts {
  165. display: flex;
  166. flex-direction: column;
  167. gap: 0.625rem;
  168. [data-section="part"] {
  169. display: flex;
  170. gap: 0.625rem;
  171. & > [data-section="decoration"] {
  172. flex: 0 0 auto;
  173. display: flex;
  174. flex-direction: column;
  175. gap: 0.625rem;
  176. align-items: center;
  177. justify-content: flex-start;
  178. div:first-child {
  179. flex: 0 0 auto;
  180. width: 18px;
  181. opacity: 0.65;
  182. svg {
  183. color: var(--sl-color-text-secondary);
  184. display: block;
  185. }
  186. }
  187. div:last-child {
  188. width: 3px;
  189. height: 100%;
  190. border-radius: 1px;
  191. background-color: var(--sl-color-hairline);
  192. }
  193. }
  194. & > [data-section="content"] {
  195. min-width: 0;
  196. padding: 0 0 0.375rem;
  197. display: flex;
  198. flex-direction: column;
  199. gap: 1rem;
  200. [data-part-tool-body] {
  201. display: flex;
  202. flex-direction: column;
  203. gap: 0.375rem;
  204. }
  205. span[data-part-title] {
  206. line-height: 18px;
  207. font-size: 0.75rem;
  208. b {
  209. font-weight: 500;
  210. }
  211. &[data-size="md"] {
  212. font-size: 0.875rem;
  213. }
  214. }
  215. span[data-part-footer] {
  216. align-self: flex-start;
  217. font-size: 0.75rem;
  218. color: var(--sl-color-text-dimmed);
  219. }
  220. span[data-part-model] {
  221. line-height: 1.5;
  222. }
  223. [data-part-tool-args] {
  224. display: inline-grid;
  225. align-items: center;
  226. grid-template-columns: max-content max-content minmax(0, 1fr);
  227. max-width: 100%;
  228. gap: 0.25rem 0.375rem;
  229. & > div:nth-child(3n + 1) {
  230. width: 8px;
  231. height: 2px;
  232. border-radius: 1px;
  233. background: var(--sl-color-divider);
  234. }
  235. & > div:nth-child(3n + 2),
  236. & > div:nth-child(3n + 3) {
  237. white-space: nowrap;
  238. overflow: hidden;
  239. text-overflow: ellipsis;
  240. font-size: 0.75rem;
  241. line-height: 1.5;
  242. }
  243. & > div:nth-child(3n + 3) {
  244. padding-left: 0.125rem;
  245. color: var(--sl-color-text-dimmed);
  246. }
  247. }
  248. [data-part-tool-result] {
  249. display: flex;
  250. flex-direction: column;
  251. align-items: flex-start;
  252. gap: 0.5rem;
  253. button {
  254. font-size: 0.75rem;
  255. }
  256. }
  257. }
  258. }
  259. /* Part types */
  260. [data-part-type="user-text"],
  261. [data-part-type="ai-text"],
  262. [data-part-type="ai-model"],
  263. [data-part-type="system-text"],
  264. [data-part-type="fallback"] {
  265. & > [data-section="content"] {
  266. padding-bottom: 1rem;
  267. }
  268. }
  269. [data-part-type="tool-list"],
  270. [data-part-type="tool-read"] {
  271. & > [data-section="content"] > [data-part-tool-body] {
  272. gap: 0.5rem;
  273. }
  274. [data-part-title] {
  275. display: flex;
  276. align-items: flex-start;
  277. gap: 0.5rem;
  278. b {
  279. color: var(--sl-color-text);
  280. word-break: break-all;
  281. }
  282. }
  283. }
  284. [data-part-type="tool-read"] {
  285. [data-part-tool-result] {
  286. [data-part-tool-code] {
  287. border: 1px solid var(--sl-color-divider);
  288. border-radius: 0.25rem;
  289. padding: 0.5rem calc(0.5rem + 3px);
  290. pre {
  291. line-height: 1.6;
  292. font-size: 0.75rem;
  293. }
  294. }
  295. }
  296. }
  297. [data-part-type="tool-edit"] {
  298. & > [data-section="content"] > [data-part-tool-body] {
  299. gap: 0.5rem;
  300. }
  301. [data-part-title] {
  302. display: flex;
  303. align-items: center;
  304. gap: 0.5rem;
  305. b {
  306. color: var(--sl-color-text);
  307. }
  308. }
  309. }
  310. }
  311. .message-text {
  312. background-color: var(--sl-color-bg-surface);
  313. padding: 0.5rem calc(0.5rem + 3px);
  314. border-radius: 0.25rem;
  315. display: flex;
  316. flex-direction: column;
  317. align-items: flex-start;
  318. gap: 1rem;
  319. &[data-size="sm"] {
  320. pre {
  321. font-size: 0.75rem;
  322. }
  323. }
  324. &[data-color="dimmed"] {
  325. pre {
  326. color: var(--sl-color-text-dimmed);
  327. }
  328. }
  329. pre {
  330. line-height: 1.5;
  331. font-size: 0.875rem;
  332. white-space: pre-wrap;
  333. overflow-wrap: anywhere;
  334. color: var(--sl-color-text);
  335. }
  336. button {
  337. flex: 0 0 auto;
  338. padding: 2px 0;
  339. font-size: 0.75rem;
  340. }
  341. &[data-highlight="true"] {
  342. background-color: var(--sl-color-blue-high);
  343. pre {
  344. color: var(--sl-color-text-invert);
  345. }
  346. button {
  347. opacity: 0.85;
  348. color: var(--sl-color-text-invert);
  349. &:hover {
  350. opacity: 1;
  351. }
  352. }
  353. }
  354. &[data-expanded="true"] {
  355. pre {
  356. display: block;
  357. }
  358. }
  359. &[data-expanded="false"] {
  360. pre {
  361. display: -webkit-box;
  362. -webkit-box-orient: vertical;
  363. -webkit-line-clamp: 3;
  364. overflow: hidden;
  365. }
  366. }
  367. }
  368. .message-terminal {
  369. display: flex;
  370. flex-direction: column;
  371. align-items: flex-start;
  372. gap: 0.5rem;
  373. & > [data-section="body"] {
  374. border: 1px solid var(--sl-color-divider);
  375. border-radius: 0.25rem;
  376. max-width: 100%;
  377. [data-section="header"] {
  378. position: relative;
  379. border-bottom: 1px solid var(--sl-color-divider);
  380. width: 100%;
  381. height: 1.625rem;
  382. text-align: center;
  383. padding: 0 0.75rem 0 3.25rem;
  384. & > span {
  385. max-width: min(100%, 140ch);
  386. display: inline-block;
  387. white-space: nowrap;
  388. overflow: hidden;
  389. line-height: 1.625rem;
  390. font-size: 0.75rem;
  391. text-overflow: ellipsis;
  392. color: var(--sl-color-text-dimmed);
  393. }
  394. &::before {
  395. content: '';
  396. position: absolute;
  397. pointer-events: none;
  398. top: 8px;
  399. left: 10px;
  400. width: 2rem;
  401. height: 0.5rem;
  402. line-height: 0;
  403. background-color: var(--sl-color-hairline);
  404. mask-image: var(--term-icon);
  405. mask-repeat: no-repeat;
  406. }
  407. }
  408. }
  409. [data-section="content"] {
  410. padding: 0.5rem calc(0.5rem + 3px);
  411. display: flex;
  412. flex-direction: column;
  413. align-items: flex-start;
  414. gap: 1rem;
  415. pre {
  416. line-height: 1.6;
  417. font-size: 0.75rem;
  418. white-space: pre-wrap;
  419. word-break: break-word;
  420. }
  421. }
  422. &[data-expanded="true"] {
  423. pre {
  424. display: block;
  425. }
  426. }
  427. &[data-expanded="false"] {
  428. pre {
  429. display: -webkit-box;
  430. -webkit-box-orient: vertical;
  431. -webkit-line-clamp: 7;
  432. overflow: hidden;
  433. }
  434. }
  435. button {
  436. flex: 0 0 auto;
  437. padding-left: 1px;
  438. font-size: 0.75rem;
  439. }
  440. }
  441. .diff-code-block {
  442. pre {
  443. line-height: 1.25;
  444. font-size: 0.75rem;
  445. }
  446. }