part.module.css 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  1. .root {
  2. display: flex;
  3. gap: 0.625rem;
  4. [data-component="decoration"] {
  5. flex: 0 0 auto;
  6. display: flex;
  7. flex-direction: column;
  8. gap: 0.625rem;
  9. align-items: center;
  10. justify-content: flex-start;
  11. [data-slot="anchor"] {
  12. position: relative;
  13. a:first-child {
  14. display: block;
  15. flex: 0 0 auto;
  16. width: 18px;
  17. opacity: 0.65;
  18. svg {
  19. color: var(--sl-color-text-secondary);
  20. display: block;
  21. &:nth-child(3) {
  22. color: var(--sl-color-green-high);
  23. }
  24. }
  25. svg:nth-child(2),
  26. svg:nth-child(3) {
  27. display: none;
  28. }
  29. &:hover {
  30. svg:nth-child(1) {
  31. display: none;
  32. }
  33. svg:nth-child(2) {
  34. display: block;
  35. }
  36. }
  37. }
  38. [data-copied] & {
  39. a,
  40. a:hover {
  41. svg:nth-child(1),
  42. svg:nth-child(2) {
  43. display: none;
  44. }
  45. svg:nth-child(3) {
  46. display: block;
  47. }
  48. }
  49. }
  50. }
  51. [data-slot="bar"] {
  52. width: 3px;
  53. height: 100%;
  54. border-radius: 1px;
  55. background-color: var(--sl-color-hairline);
  56. }
  57. [data-slot="tooltip"] {
  58. position: absolute;
  59. top: 50%;
  60. left: calc(100% + 12px);
  61. transform: translate(0, -50%);
  62. line-height: 1.1;
  63. padding: 0.375em 0.5em calc(0.375em + 2px);
  64. background: var(--sl-color-white);
  65. color: var(--sl-color-text-invert);
  66. font-size: 0.6875rem;
  67. border-radius: 7px;
  68. white-space: nowrap;
  69. z-index: 1;
  70. opacity: 0;
  71. visibility: hidden;
  72. &::after {
  73. content: "";
  74. position: absolute;
  75. top: 50%;
  76. left: -15px;
  77. transform: translateY(-50%);
  78. border: 8px solid transparent;
  79. border-right-color: var(--sl-color-white);
  80. }
  81. [data-copied] & {
  82. opacity: 1;
  83. visibility: visible;
  84. }
  85. }
  86. }
  87. [data-component="content"] {
  88. display: flex;
  89. flex-direction: column;
  90. gap: 1rem;
  91. flex-grow: 1;
  92. }
  93. [data-component="spacer"] {
  94. height: 0rem;
  95. }
  96. [data-component="content-footer"] {
  97. align-self: flex-start;
  98. font-size: 0.75rem;
  99. color: var(--sl-color-text-dimmed);
  100. }
  101. [data-component="step-start"] {
  102. display: flex;
  103. flex-direction: column;
  104. align-items: flex-start;
  105. gap: 0.375rem;
  106. padding-bottom: 1rem;
  107. [data-slot="provider"] {
  108. line-height: 18px;
  109. font-size: 0.875rem;
  110. text-transform: uppercase;
  111. letter-spacing: -0.5px;
  112. color: var(--sl-color-text-secondary);
  113. }
  114. [data-slot="model"] {
  115. line-height: 1.5;
  116. }
  117. }
  118. [data-component="attachment"] {
  119. display: flex;
  120. flex-direction: column;
  121. align-items: flex-start;
  122. gap: 0.375rem;
  123. padding-bottom: 1rem;
  124. [data-slot="copy"] {
  125. line-height: 18px;
  126. font-size: 0.875rem;
  127. text-transform: uppercase;
  128. letter-spacing: -0.5px;
  129. color: var(--sl-color-text-secondary);
  130. }
  131. [data-slot="filename"] {
  132. line-height: 1.5;
  133. font-size: 0.875rem;
  134. font-weight: 500;
  135. max-width: var(--md-tool-width);
  136. }
  137. }
  138. [data-component="button-text"] {
  139. cursor: pointer;
  140. appearance: none;
  141. background-color: transparent;
  142. border: none;
  143. padding: 0;
  144. color: var(--sl-color-text-secondary);
  145. font-size: 0.75rem;
  146. &:hover {
  147. color: var(--sl-color-text);
  148. }
  149. &[data-more] {
  150. display: flex;
  151. align-items: center;
  152. gap: 0.125rem;
  153. span[data-slot="icon"] {
  154. line-height: 1;
  155. opacity: 0.85;
  156. svg {
  157. display: block;
  158. }
  159. }
  160. }
  161. }
  162. [data-component="tool"] {
  163. display: flex;
  164. flex-direction: column;
  165. align-items: flex-start;
  166. gap: 0.375rem;
  167. padding-bottom: 1rem;
  168. }
  169. [data-component="tool-title"] {
  170. line-height: 18px;
  171. font-size: 0.875rem;
  172. color: var(--sl-color-text-secondary);
  173. max-width: var(--md-tool-width);
  174. display: flex;
  175. align-items: flex-start;
  176. gap: 0.375rem;
  177. [data-slot="name"] {
  178. text-transform: uppercase;
  179. letter-spacing: -0.5px;
  180. }
  181. [data-slot="target"] {
  182. color: var(--sl-color-text);
  183. word-break: break-all;
  184. font-weight: 500;
  185. }
  186. }
  187. [data-component="tool-result"] {
  188. display: flex;
  189. flex-direction: column;
  190. align-items: flex-start;
  191. gap: 0.5rem;
  192. }
  193. [data-component="todos"] {
  194. list-style-type: none;
  195. padding: 0;
  196. margin: 0;
  197. width: 100%;
  198. max-width: var(--sm-tool-width);
  199. border: 1px solid var(--sl-color-divider);
  200. border-radius: 0.25rem;
  201. [data-slot="item"] {
  202. margin: 0;
  203. position: relative;
  204. padding-left: 1.5rem;
  205. font-size: 0.75rem;
  206. padding: 0.375rem 0.625rem 0.375rem 1.75rem;
  207. border-bottom: 1px solid var(--sl-color-divider);
  208. line-height: 1.5;
  209. word-break: break-word;
  210. &:last-child {
  211. border-bottom: none;
  212. }
  213. & > span {
  214. position: absolute;
  215. display: inline-block;
  216. left: 0.5rem;
  217. top: calc(0.5rem + 1px);
  218. width: 0.75rem;
  219. height: 0.75rem;
  220. border: 1px solid var(--sl-color-divider);
  221. border-radius: 0.15rem;
  222. &::before {
  223. }
  224. }
  225. &[data-status="pending"] {
  226. color: var(--sl-color-text);
  227. }
  228. &[data-status="in_progress"] {
  229. color: var(--sl-color-text);
  230. & > span {
  231. border-color: var(--sl-color-orange);
  232. }
  233. & > span::before {
  234. content: "";
  235. position: absolute;
  236. top: 2px;
  237. left: 2px;
  238. width: calc(0.75rem - 2px - 4px);
  239. height: calc(0.75rem - 2px - 4px);
  240. box-shadow: inset 1rem 1rem var(--sl-color-orange-low);
  241. }
  242. }
  243. &[data-status="completed"] {
  244. color: var(--sl-color-text-secondary);
  245. & > span {
  246. border-color: var(--sl-color-green-low);
  247. }
  248. & > span::before {
  249. content: "";
  250. position: absolute;
  251. top: 2px;
  252. left: 2px;
  253. width: calc(0.75rem - 2px - 4px);
  254. height: calc(0.75rem - 2px - 4px);
  255. box-shadow: inset 1rem 1rem var(--sl-color-green);
  256. transform-origin: bottom left;
  257. clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  258. }
  259. }
  260. }
  261. }
  262. [data-component="terminal"] {
  263. width: 100%;
  264. max-width: var(--sm-tool-width);
  265. [data-slot="body"] {
  266. display: flex;
  267. flex-direction: column;
  268. border: 1px solid var(--sl-color-divider);
  269. border-radius: 0.25rem;
  270. overflow: hidden;
  271. }
  272. [data-slot="header"] {
  273. position: relative;
  274. border-bottom: 1px solid var(--sl-color-divider);
  275. width: 100%;
  276. height: 1.625rem;
  277. text-align: center;
  278. padding: 0 3.25rem;
  279. > span {
  280. max-width: min(100%, 140ch);
  281. display: inline-block;
  282. white-space: nowrap;
  283. overflow: hidden;
  284. line-height: 1.625rem;
  285. font-size: 0.75rem;
  286. text-overflow: ellipsis;
  287. color: var(--sl-color-text-dimmed);
  288. }
  289. &::before {
  290. content: "";
  291. position: absolute;
  292. pointer-events: none;
  293. top: 8px;
  294. left: 10px;
  295. width: 2rem;
  296. height: 0.5rem;
  297. line-height: 0;
  298. background-color: var(--sl-color-hairline);
  299. mask-image: var(--term-icon);
  300. mask-repeat: no-repeat;
  301. }
  302. }
  303. [data-slot="content"] {
  304. display: flex;
  305. flex-direction: column;
  306. padding: 0.5rem calc(0.5rem + 3px);
  307. pre {
  308. --shiki-dark-bg: var(--sl-color-bg) !important;
  309. background-color: var(--sl-color-bg) !important;
  310. line-height: 1.6;
  311. font-size: 0.75rem;
  312. white-space: pre-wrap;
  313. word-break: break-word;
  314. }
  315. }
  316. }
  317. [data-component="tool-args"] {
  318. display: inline-grid;
  319. align-items: center;
  320. grid-template-columns: max-content max-content minmax(0, 1fr);
  321. max-width: var(--md-tool-width);
  322. gap: 0.25rem 0.375rem;
  323. & > div:nth-child(3n + 1) {
  324. width: 8px;
  325. height: 2px;
  326. border-radius: 1px;
  327. background: var(--sl-color-divider);
  328. }
  329. & > div:nth-child(3n + 2),
  330. & > div:nth-child(3n + 3) {
  331. font-size: 0.75rem;
  332. line-height: 1.5;
  333. }
  334. & > div:nth-child(3n + 3) {
  335. padding-left: 0.125rem;
  336. word-break: break-word;
  337. color: var(--sl-color-text-secondary);
  338. }
  339. }
  340. }