part.module.css 8.6 KB

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