basic-tool.css 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. [data-component="tool-trigger"] {
  2. content-visibility: auto;
  3. width: 100%;
  4. display: flex;
  5. align-items: center;
  6. align-self: stretch;
  7. gap: 0px;
  8. justify-content: flex-start;
  9. &[data-clickable="true"] {
  10. cursor: pointer;
  11. }
  12. [data-slot="basic-tool-tool-trigger-content"] {
  13. flex: 0 1 auto;
  14. width: auto;
  15. max-width: calc(100% - 24px);
  16. min-width: 0;
  17. display: flex;
  18. align-items: center;
  19. align-self: stretch;
  20. gap: 8px;
  21. }
  22. [data-slot="basic-tool-tool-indicator"] {
  23. width: 16px;
  24. height: 16px;
  25. display: inline-flex;
  26. align-items: center;
  27. justify-content: center;
  28. flex-shrink: 0;
  29. [data-component="spinner"] {
  30. width: 16px;
  31. height: 16px;
  32. }
  33. }
  34. [data-slot="basic-tool-tool-spinner"] {
  35. width: 16px;
  36. height: 16px;
  37. display: inline-flex;
  38. align-items: center;
  39. justify-content: center;
  40. flex-shrink: 0;
  41. color: var(--v2-text-text-faint);
  42. [data-component="spinner"] {
  43. width: 16px;
  44. height: 16px;
  45. }
  46. }
  47. [data-slot="icon-svg"] {
  48. flex-shrink: 0;
  49. }
  50. [data-slot="basic-tool-tool-info"] {
  51. flex: 0 1 auto;
  52. min-width: 0;
  53. max-width: 100%;
  54. font-size: 14px;
  55. }
  56. [data-slot="basic-tool-tool-info-structured"] {
  57. flex: 0 1 auto;
  58. width: auto;
  59. max-width: 100%;
  60. min-width: 0;
  61. display: inline-flex;
  62. align-items: center;
  63. gap: 8px;
  64. justify-content: flex-start;
  65. }
  66. [data-slot="basic-tool-tool-info-main"] {
  67. display: flex;
  68. align-items: baseline;
  69. gap: 8px;
  70. min-width: 0;
  71. overflow: hidden;
  72. }
  73. [data-slot="basic-tool-tool-title"] {
  74. flex-shrink: 0;
  75. font-family: var(--font-family-sans);
  76. font-size: 14px;
  77. font-style: normal;
  78. font-weight: var(--font-weight-medium);
  79. line-height: var(--line-height-large);
  80. letter-spacing: var(--letter-spacing-normal);
  81. color: var(--v2-text-text-base);
  82. &.capitalize {
  83. text-transform: capitalize;
  84. }
  85. &.agent-title {
  86. color: var(--v2-text-text-base);
  87. font-weight: var(--font-weight-medium);
  88. }
  89. }
  90. [data-slot="basic-tool-tool-subtitle"] {
  91. flex-shrink: 1;
  92. min-width: 0;
  93. overflow: hidden;
  94. text-overflow: ellipsis;
  95. white-space: nowrap;
  96. font-family: var(--font-family-sans);
  97. font-variant-numeric: tabular-nums;
  98. font-size: 14px;
  99. font-style: normal;
  100. font-weight: var(--font-weight-regular);
  101. line-height: var(--line-height-large);
  102. letter-spacing: var(--letter-spacing-normal);
  103. color: var(--v2-text-text-muted);
  104. &.clickable {
  105. cursor: pointer;
  106. text-decoration: underline;
  107. transition: color 0.15s ease;
  108. &:hover {
  109. color: var(--v2-text-text-muted);
  110. }
  111. }
  112. &.subagent-link {
  113. color: var(--text-interactive-base);
  114. text-decoration: none;
  115. text-underline-offset: 2px;
  116. font-weight: var(--font-weight-regular);
  117. &:hover {
  118. color: var(--text-interactive-base);
  119. text-decoration: underline;
  120. }
  121. &:active {
  122. color: var(--text-interactive-base);
  123. }
  124. &:visited {
  125. color: var(--text-interactive-base);
  126. }
  127. }
  128. }
  129. [data-slot="basic-tool-tool-arg"] {
  130. flex-shrink: 1;
  131. min-width: 0;
  132. overflow: hidden;
  133. text-overflow: ellipsis;
  134. white-space: nowrap;
  135. font-family: var(--font-family-sans);
  136. font-variant-numeric: tabular-nums;
  137. font-size: 14px;
  138. font-style: normal;
  139. font-weight: var(--font-weight-regular);
  140. line-height: var(--line-height-large);
  141. letter-spacing: var(--letter-spacing-normal);
  142. color: var(--v2-text-text-muted);
  143. }
  144. [data-slot="basic-tool-tool-action"] {
  145. display: inline-flex;
  146. align-items: center;
  147. flex-shrink: 0;
  148. }
  149. }
  150. [data-component="task-tool-card"] {
  151. width: 100%;
  152. min-width: 0;
  153. display: flex;
  154. align-items: center;
  155. gap: 8px;
  156. padding: 8px 12px;
  157. border-radius: 6px;
  158. border: 0.5px solid var(--border-weak-base, rgba(255, 255, 255, 0.08));
  159. background: color-mix(in srgb, var(--background-base) 92%, transparent);
  160. transition:
  161. border-color 0.15s ease,
  162. background-color 0.15s ease,
  163. color 0.15s ease;
  164. [data-component="task-tool-surface"] {
  165. display: flex;
  166. align-items: center;
  167. gap: 8px;
  168. min-width: 0;
  169. flex: 1 1 auto;
  170. }
  171. [data-slot="basic-tool-tool-info-structured"] {
  172. flex: 1 1 auto;
  173. min-width: 0;
  174. }
  175. [data-slot="basic-tool-tool-info-main"] {
  176. flex: 1 1 auto;
  177. min-width: 0;
  178. align-items: center;
  179. }
  180. [data-component="task-tool-spinner"] {
  181. display: inline-flex;
  182. align-items: center;
  183. justify-content: center;
  184. flex-shrink: 0;
  185. [data-component="spinner"] {
  186. width: 16px;
  187. height: 16px;
  188. }
  189. }
  190. [data-component="task-tool-action"] {
  191. display: inline-flex;
  192. align-items: center;
  193. justify-content: center;
  194. flex-shrink: 0;
  195. color: var(--v2-text-text-faint);
  196. margin-left: auto;
  197. opacity: 0;
  198. transition:
  199. opacity 0.15s ease,
  200. color 0.15s ease;
  201. }
  202. [data-component="task-tool-title"] {
  203. flex-shrink: 0;
  204. font-family: var(--font-family-sans);
  205. font-size: 14px;
  206. font-style: normal;
  207. font-weight: var(--font-weight-medium);
  208. line-height: var(--line-height-large);
  209. letter-spacing: var(--letter-spacing-normal);
  210. text-transform: capitalize;
  211. color: var(--task-agent-legacy-color, var(--text-strong));
  212. }
  213. [data-slot="basic-tool-tool-subtitle"] {
  214. color: var(--v2-text-text-base);
  215. }
  216. &:hover,
  217. &:focus-visible {
  218. border-color: var(--border-weak-base, rgba(255, 255, 255, 0.08));
  219. background: color-mix(in srgb, var(--background-stronger) 88%, transparent);
  220. [data-component="task-tool-action"] {
  221. opacity: 1;
  222. }
  223. }
  224. }
  225. body[data-new-layout] {
  226. [data-component="task-tool-card"] {
  227. gap: 8px;
  228. padding: 0;
  229. border-radius: 0;
  230. border: 0;
  231. border-color: transparent;
  232. background: transparent;
  233. box-shadow: none;
  234. [data-component="task-tool-surface"] {
  235. padding: 8px 12px;
  236. border-radius: 8px;
  237. background: var(--v2-background-bg-layer-01);
  238. }
  239. [data-component="task-tool-spinner"],
  240. [data-component="task-tool-icon"] {
  241. display: inline-flex;
  242. align-items: center;
  243. justify-content: center;
  244. flex-shrink: 0;
  245. [data-component="icon"] {
  246. color: var(--task-agent-color, var(--v2-icon-icon-base));
  247. }
  248. }
  249. [data-component="task-tool-title"] {
  250. height: 20px;
  251. font-family: var(--v2-font-family-sans, "Inter", sans-serif);
  252. font-style: normal;
  253. font-weight: 530;
  254. font-size: 13px;
  255. line-height: 20px;
  256. letter-spacing: -0.04px;
  257. color: var(--v2-text-text-base);
  258. flex: none;
  259. flex-grow: 0;
  260. }
  261. [data-slot="basic-tool-tool-subtitle"] {
  262. font-family: var(--v2-font-family-sans, "Inter", sans-serif);
  263. font-style: normal;
  264. font-weight: 440;
  265. font-size: 13px;
  266. line-height: 20px;
  267. letter-spacing: -0.04px;
  268. color: var(--v2-text-text-base);
  269. font-variation-settings: "slnt" 0;
  270. flex: none;
  271. flex-grow: 0;
  272. }
  273. [data-component="session-progress-indicator-v2"] {
  274. color: var(--task-agent-color, light-dark(var(--v2-text-text-base), #ffffff));
  275. }
  276. &:hover,
  277. &:focus-visible {
  278. border-color: transparent;
  279. background: transparent;
  280. [data-component="task-tool-surface"] {
  281. background: var(--v2-background-bg-layer-01);
  282. }
  283. }
  284. }
  285. }
  286. body:not([data-new-layout]) {
  287. [data-component="tool-trigger"] {
  288. [data-slot="basic-tool-tool-spinner"] {
  289. color: var(--text-weak);
  290. }
  291. [data-slot="basic-tool-tool-title"],
  292. [data-slot="basic-tool-tool-title"].agent-title {
  293. color: var(--text-strong);
  294. }
  295. [data-slot="basic-tool-tool-subtitle"],
  296. [data-slot="basic-tool-tool-subtitle"].clickable:hover,
  297. [data-slot="basic-tool-tool-arg"] {
  298. color: var(--text-base);
  299. }
  300. }
  301. [data-component="task-tool-card"] {
  302. border-width: 1px;
  303. [data-component="task-tool-action"] {
  304. color: var(--icon-weak);
  305. }
  306. [data-slot="basic-tool-tool-subtitle"] {
  307. color: var(--text-strong);
  308. }
  309. }
  310. }