part.module.css 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  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. flex: 1 1 auto;
  89. min-width: 0;
  90. padding: 0 0 1rem;
  91. display: flex;
  92. flex-direction: column;
  93. gap: 1rem;
  94. }
  95. [data-component="spacer"] {
  96. height: 0rem;
  97. }
  98. [data-component="content-footer"] {
  99. align-self: flex-start;
  100. font-size: 0.75rem;
  101. color: var(--sl-color-text-dimmed);
  102. }
  103. [data-component="user-text"] {
  104. min-width: 0;
  105. display: flex;
  106. flex-direction: column;
  107. gap: 1rem;
  108. flex-grow: 1;
  109. max-width: var(--md-tool-width);
  110. }
  111. [data-component="assistant-text"] {
  112. min-width: 0;
  113. display: flex;
  114. flex-direction: column;
  115. gap: 1rem;
  116. flex-grow: 1;
  117. max-width: var(--md-tool-width);
  118. & > [data-component="assistant-text-markdown"] {
  119. align-self: flex-start;
  120. font-size: 0.875rem;
  121. border: 1px solid var(--sl-color-blue-high);
  122. padding: 0.5rem calc(0.5rem + 3px);
  123. border-radius: 0.25rem;
  124. }
  125. }
  126. [data-component="step-start"] {
  127. display: flex;
  128. flex-direction: column;
  129. align-items: flex-start;
  130. gap: 0.375rem;
  131. [data-slot="provider"] {
  132. line-height: 18px;
  133. font-size: 0.875rem;
  134. text-transform: uppercase;
  135. letter-spacing: -0.5px;
  136. color: var(--sl-color-text-secondary);
  137. }
  138. [data-slot="model"] {
  139. line-height: 1.5;
  140. }
  141. }
  142. [data-component="attachment"] {
  143. display: flex;
  144. flex-direction: column;
  145. align-items: flex-start;
  146. gap: 0.375rem;
  147. padding-bottom: 1rem;
  148. [data-slot="copy"] {
  149. line-height: 18px;
  150. font-size: 0.875rem;
  151. text-transform: uppercase;
  152. letter-spacing: -0.5px;
  153. color: var(--sl-color-text-secondary);
  154. }
  155. [data-slot="filename"] {
  156. line-height: 1.5;
  157. font-size: 0.875rem;
  158. font-weight: 500;
  159. max-width: var(--md-tool-width);
  160. }
  161. }
  162. [data-component="button-text"] {
  163. cursor: pointer;
  164. appearance: none;
  165. background-color: transparent;
  166. border: none;
  167. padding: 0;
  168. color: var(--sl-color-text-secondary);
  169. font-size: 0.75rem;
  170. &:hover {
  171. color: var(--sl-color-text);
  172. }
  173. &[data-more] {
  174. display: flex;
  175. align-items: center;
  176. gap: 0.125rem;
  177. span[data-slot="icon"] {
  178. line-height: 1;
  179. opacity: 0.85;
  180. svg {
  181. display: block;
  182. }
  183. }
  184. }
  185. }
  186. [data-component="tool"] {
  187. display: flex;
  188. flex-direction: column;
  189. align-items: flex-start;
  190. gap: 0.375rem;
  191. &[data-tool="bash"] {
  192. max-width: var(--sm-tool-width);
  193. }
  194. &[data-tool="error"] {
  195. max-width: var(--md-tool-width);
  196. }
  197. &[data-tool="read"],
  198. &[data-tool="edit"],
  199. &[data-tool="list"],
  200. &[data-tool="glob"],
  201. &[data-tool="grep"],
  202. &[data-tool="write"],
  203. &[data-tool="webfetch"] {
  204. [data-component="tool-result"] {
  205. max-width: var(--sm-tool-width);
  206. }
  207. }
  208. &[data-tool="edit"] {
  209. [data-component="tool-result"] {
  210. max-width: var(--lg-tool-width);
  211. align-items: stretch;
  212. width: 100%;
  213. }
  214. }
  215. &[data-tool="task"] {
  216. [data-component="tool-input"] {
  217. font-size: 0.75rem;
  218. line-height: 1.5;
  219. max-width: var(--md-tool-width);
  220. display: -webkit-box;
  221. -webkit-line-clamp: 3;
  222. -webkit-box-orient: vertical;
  223. overflow: hidden;
  224. }
  225. [data-component="tool-output"] {
  226. max-width: var(--sm-tool-width);
  227. font-size: 0.75rem;
  228. border: 1px solid var(--sl-color-divider);
  229. padding: 0.5rem calc(0.5rem + 3px);
  230. border-radius: 0.25rem;
  231. }
  232. }
  233. }
  234. [data-component="tool-title"] {
  235. line-height: 18px;
  236. font-size: 0.875rem;
  237. color: var(--sl-color-text-secondary);
  238. max-width: var(--md-tool-width);
  239. display: flex;
  240. align-items: flex-start;
  241. gap: 0.375rem;
  242. [data-slot="name"] {
  243. text-transform: uppercase;
  244. letter-spacing: -0.5px;
  245. }
  246. [data-slot="target"] {
  247. color: var(--sl-color-text);
  248. word-break: break-all;
  249. font-weight: 500;
  250. }
  251. }
  252. [data-component="tool-result"] {
  253. display: flex;
  254. flex-direction: column;
  255. align-items: flex-start;
  256. gap: 0.5rem;
  257. }
  258. [data-component="todos"] {
  259. list-style-type: none;
  260. padding: 0;
  261. margin: 0;
  262. width: 100%;
  263. max-width: var(--sm-tool-width);
  264. border: 1px solid var(--sl-color-divider);
  265. border-radius: 0.25rem;
  266. [data-slot="item"] {
  267. margin: 0;
  268. position: relative;
  269. padding-left: 1.5rem;
  270. font-size: 0.75rem;
  271. padding: 0.375rem 0.625rem 0.375rem 1.75rem;
  272. border-bottom: 1px solid var(--sl-color-divider);
  273. line-height: 1.5;
  274. word-break: break-word;
  275. &:last-child {
  276. border-bottom: none;
  277. }
  278. & > span {
  279. position: absolute;
  280. display: inline-block;
  281. left: 0.5rem;
  282. top: calc(0.5rem + 1px);
  283. width: 0.75rem;
  284. height: 0.75rem;
  285. border: 1px solid var(--sl-color-divider);
  286. border-radius: 0.15rem;
  287. &::before {
  288. }
  289. }
  290. &[data-status="pending"] {
  291. color: var(--sl-color-text);
  292. }
  293. &[data-status="in_progress"] {
  294. color: var(--sl-color-text);
  295. & > span {
  296. border-color: var(--sl-color-orange);
  297. }
  298. & > span::before {
  299. content: "";
  300. position: absolute;
  301. top: 2px;
  302. left: 2px;
  303. width: calc(0.75rem - 2px - 4px);
  304. height: calc(0.75rem - 2px - 4px);
  305. box-shadow: inset 1rem 1rem var(--sl-color-orange-low);
  306. }
  307. }
  308. &[data-status="completed"] {
  309. color: var(--sl-color-text-secondary);
  310. & > span {
  311. border-color: var(--sl-color-green-low);
  312. }
  313. & > span::before {
  314. content: "";
  315. position: absolute;
  316. top: 2px;
  317. left: 2px;
  318. width: calc(0.75rem - 2px - 4px);
  319. height: calc(0.75rem - 2px - 4px);
  320. box-shadow: inset 1rem 1rem var(--sl-color-green);
  321. transform-origin: bottom left;
  322. clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  323. }
  324. }
  325. }
  326. }
  327. [data-component="tool-args"] {
  328. display: inline-grid;
  329. align-items: center;
  330. grid-template-columns: max-content max-content minmax(0, 1fr);
  331. max-width: var(--md-tool-width);
  332. gap: 0.25rem 0.375rem;
  333. & > div:nth-child(3n + 1) {
  334. width: 8px;
  335. height: 2px;
  336. border-radius: 1px;
  337. background: var(--sl-color-divider);
  338. }
  339. & > div:nth-child(3n + 2),
  340. & > div:nth-child(3n + 3) {
  341. font-size: 0.75rem;
  342. line-height: 1.5;
  343. }
  344. & > div:nth-child(3n + 3) {
  345. padding-left: 0.125rem;
  346. word-break: break-word;
  347. color: var(--sl-color-text-secondary);
  348. }
  349. }
  350. }