@sero-ai/ui 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/.turbo/turbo-build.log +397 -384
  2. package/.turbo/turbo-test.log +18 -0
  3. package/.turbo/turbo-typecheck.log +1 -1
  4. package/CHANGELOG.md +18 -0
  5. package/dist/components/ai-elements/agent.cjs +6 -6
  6. package/dist/components/ai-elements/agent.js +6 -6
  7. package/dist/components/ai-elements/artifact.cjs +2 -2
  8. package/dist/components/ai-elements/artifact.js +2 -2
  9. package/dist/components/ai-elements/attachments.cjs +2 -2
  10. package/dist/components/ai-elements/attachments.js +2 -2
  11. package/dist/components/ai-elements/chain-of-thought.cjs +2 -2
  12. package/dist/components/ai-elements/chain-of-thought.js +2 -2
  13. package/dist/components/ai-elements/code-block.cjs +7 -5
  14. package/dist/components/ai-elements/code-block.d.cts +2 -1
  15. package/dist/components/ai-elements/code-block.d.ts +2 -1
  16. package/dist/components/ai-elements/code-block.js +7 -5
  17. package/dist/components/ai-elements/commit.cjs +2 -2
  18. package/dist/components/ai-elements/commit.js +2 -2
  19. package/dist/components/ai-elements/confirmation.cjs +1 -1
  20. package/dist/components/ai-elements/confirmation.js +1 -1
  21. package/dist/components/ai-elements/conversation.cjs +2 -2
  22. package/dist/components/ai-elements/conversation.js +2 -2
  23. package/dist/components/ai-elements/environment-variables.cjs +3 -3
  24. package/dist/components/ai-elements/environment-variables.js +3 -3
  25. package/dist/components/ai-elements/file-tree.cjs +1 -1
  26. package/dist/components/ai-elements/file-tree.js +1 -1
  27. package/dist/components/ai-elements/inline-citation.cjs +3 -3
  28. package/dist/components/ai-elements/inline-citation.js +3 -3
  29. package/dist/components/ai-elements/jsx-preview.cjs +1 -1
  30. package/dist/components/ai-elements/jsx-preview.js +1 -1
  31. package/dist/components/ai-elements/message.cjs +1 -1
  32. package/dist/components/ai-elements/message.js +1 -1
  33. package/dist/components/ai-elements/package-info.cjs +4 -4
  34. package/dist/components/ai-elements/package-info.js +4 -4
  35. package/dist/components/ai-elements/prompt-input-context.cjs +2 -3
  36. package/dist/components/ai-elements/prompt-input-context.js +2 -3
  37. package/dist/components/ai-elements/queue.cjs +2 -2
  38. package/dist/components/ai-elements/queue.js +2 -2
  39. package/dist/components/ai-elements/reasoning.cjs +2 -2
  40. package/dist/components/ai-elements/reasoning.js +2 -2
  41. package/dist/components/ai-elements/sandbox.cjs +3 -3
  42. package/dist/components/ai-elements/sandbox.js +3 -3
  43. package/dist/components/ai-elements/schema-display.cjs +12 -12
  44. package/dist/components/ai-elements/schema-display.js +12 -12
  45. package/dist/components/ai-elements/speech-input.cjs +18 -2
  46. package/dist/components/ai-elements/speech-input.js +16 -0
  47. package/dist/components/ai-elements/stack-trace.cjs +1 -1
  48. package/dist/components/ai-elements/stack-trace.js +1 -1
  49. package/dist/components/ai-elements/task.cjs +3 -3
  50. package/dist/components/ai-elements/task.js +3 -3
  51. package/dist/components/ai-elements/terminal.cjs +2 -2
  52. package/dist/components/ai-elements/terminal.js +2 -2
  53. package/dist/components/ai-elements/test-results.cjs +4 -4
  54. package/dist/components/ai-elements/test-results.js +4 -4
  55. package/dist/components/ai-elements/tool.cjs +4 -4
  56. package/dist/components/ai-elements/tool.js +4 -4
  57. package/dist/components/ai-elements/transcription.cjs +1 -1
  58. package/dist/components/ai-elements/transcription.js +1 -1
  59. package/dist/components/ai-elements/web-preview.cjs +2 -2
  60. package/dist/components/ai-elements/web-preview.js +2 -2
  61. package/dist/components/context-editor/CapabilitySection.cjs +2 -2
  62. package/dist/components/context-editor/CapabilitySection.js +2 -2
  63. package/dist/components/context-editor/ContextEditor.cjs +2 -2
  64. package/dist/components/context-editor/ContextEditor.js +2 -2
  65. package/dist/components/context-editor/PresetBar.cjs +3 -3
  66. package/dist/components/context-editor/PresetBar.js +3 -3
  67. package/dist/components/context-editor/SystemPromptSection.cjs +4 -4
  68. package/dist/components/context-editor/SystemPromptSection.js +4 -4
  69. package/dist/components/context-editor/parts.cjs +6 -6
  70. package/dist/components/context-editor/parts.js +6 -6
  71. package/dist/components/dashboard/activity-list.cjs +2 -2
  72. package/dist/components/dashboard/activity-list.js +2 -2
  73. package/dist/components/dashboard/empty-state.cjs +1 -1
  74. package/dist/components/dashboard/empty-state.js +1 -1
  75. package/dist/components/dashboard/item-list.cjs +2 -2
  76. package/dist/components/dashboard/item-list.js +2 -2
  77. package/dist/components/dashboard/layout.cjs +1 -1
  78. package/dist/components/dashboard/layout.js +1 -1
  79. package/dist/components/dashboard/metric.cjs +1 -1
  80. package/dist/components/dashboard/metric.js +1 -1
  81. package/dist/components/dashboard/stale-indicator.cjs +1 -1
  82. package/dist/components/dashboard/stale-indicator.js +1 -1
  83. package/dist/components/dashboard/typography.cjs +4 -4
  84. package/dist/components/dashboard/typography.d.cts +1 -1
  85. package/dist/components/dashboard/typography.d.ts +1 -1
  86. package/dist/components/dashboard/typography.js +4 -4
  87. package/dist/components/model-selection/available-model-picker.cjs +6 -6
  88. package/dist/components/model-selection/available-model-picker.js +6 -6
  89. package/dist/components/model-selection/thinking-level-picker.cjs +1 -1
  90. package/dist/components/model-selection/thinking-level-picker.js +1 -1
  91. package/dist/components/model-selection/thinking-picker.cjs +70 -0
  92. package/dist/components/model-selection/thinking-picker.d.cts +12 -0
  93. package/dist/components/model-selection/thinking-picker.d.ts +12 -0
  94. package/dist/components/model-selection/thinking-picker.js +70 -0
  95. package/dist/components/ui/accordion.cjs +2 -2
  96. package/dist/components/ui/accordion.js +2 -2
  97. package/dist/components/ui/alert-dialog.cjs +4 -2
  98. package/dist/components/ui/alert-dialog.js +4 -2
  99. package/dist/components/ui/alert.cjs +2 -2
  100. package/dist/components/ui/alert.js +2 -2
  101. package/dist/components/ui/avatar.cjs +2 -2
  102. package/dist/components/ui/avatar.js +2 -2
  103. package/dist/components/ui/breadcrumb.cjs +1 -1
  104. package/dist/components/ui/breadcrumb.js +1 -1
  105. package/dist/components/ui/button-group.cjs +1 -1
  106. package/dist/components/ui/button-group.js +1 -1
  107. package/dist/components/ui/button.cjs +1 -1
  108. package/dist/components/ui/button.js +1 -1
  109. package/dist/components/ui/calendar.cjs +2 -2
  110. package/dist/components/ui/calendar.js +2 -2
  111. package/dist/components/ui/card.cjs +1 -1
  112. package/dist/components/ui/card.js +1 -1
  113. package/dist/components/ui/carousel.cjs +3 -2
  114. package/dist/components/ui/carousel.js +2 -1
  115. package/dist/components/ui/chart.cjs +36 -27
  116. package/dist/components/ui/chart.d.cts +21 -17
  117. package/dist/components/ui/chart.d.ts +21 -17
  118. package/dist/components/ui/chart.js +30 -21
  119. package/dist/components/ui/combobox.cjs +7 -5
  120. package/dist/components/ui/combobox.js +7 -5
  121. package/dist/components/ui/command.cjs +3 -3
  122. package/dist/components/ui/command.js +3 -3
  123. package/dist/components/ui/context-menu.cjs +10 -7
  124. package/dist/components/ui/context-menu.js +10 -7
  125. package/dist/components/ui/dialog.cjs +4 -2
  126. package/dist/components/ui/dialog.js +4 -2
  127. package/dist/components/ui/drawer.cjs +4 -2
  128. package/dist/components/ui/drawer.js +4 -2
  129. package/dist/components/ui/dropdown-menu.cjs +10 -7
  130. package/dist/components/ui/dropdown-menu.js +10 -7
  131. package/dist/components/ui/empty.cjs +2 -2
  132. package/dist/components/ui/empty.js +2 -2
  133. package/dist/components/ui/field.cjs +5 -5
  134. package/dist/components/ui/field.js +5 -5
  135. package/dist/components/ui/form.cjs +2 -2
  136. package/dist/components/ui/form.d.cts +1 -1
  137. package/dist/components/ui/form.d.ts +1 -1
  138. package/dist/components/ui/form.js +2 -2
  139. package/dist/components/ui/hover-card.cjs +3 -1
  140. package/dist/components/ui/hover-card.js +3 -1
  141. package/dist/components/ui/input-group.cjs +3 -3
  142. package/dist/components/ui/input-group.js +3 -3
  143. package/dist/components/ui/input-otp.cjs +1 -1
  144. package/dist/components/ui/input-otp.js +1 -1
  145. package/dist/components/ui/input.cjs +1 -1
  146. package/dist/components/ui/input.js +1 -1
  147. package/dist/components/ui/item.cjs +3 -3
  148. package/dist/components/ui/item.js +3 -3
  149. package/dist/components/ui/label.cjs +1 -1
  150. package/dist/components/ui/label.js +1 -1
  151. package/dist/components/ui/menubar.cjs +9 -7
  152. package/dist/components/ui/menubar.js +9 -7
  153. package/dist/components/ui/native-select.cjs +1 -1
  154. package/dist/components/ui/native-select.js +1 -1
  155. package/dist/components/ui/navigation-menu.cjs +2 -2
  156. package/dist/components/ui/navigation-menu.js +2 -2
  157. package/dist/components/ui/plugin-safety-disclaimer.cjs +1 -1
  158. package/dist/components/ui/plugin-safety-disclaimer.js +1 -1
  159. package/dist/components/ui/popover.cjs +4 -2
  160. package/dist/components/ui/popover.js +4 -2
  161. package/dist/components/ui/select.cjs +5 -3
  162. package/dist/components/ui/select.js +5 -3
  163. package/dist/components/ui/sheet.cjs +4 -2
  164. package/dist/components/ui/sheet.js +4 -2
  165. package/dist/components/ui/sidebar.cjs +5 -5
  166. package/dist/components/ui/sidebar.js +5 -5
  167. package/dist/components/ui/table.cjs +2 -2
  168. package/dist/components/ui/table.js +2 -2
  169. package/dist/components/ui/tabs.cjs +1 -1
  170. package/dist/components/ui/tabs.js +1 -1
  171. package/dist/components/ui/textarea.cjs +1 -1
  172. package/dist/components/ui/textarea.js +1 -1
  173. package/dist/components/ui/toggle.cjs +1 -1
  174. package/dist/components/ui/toggle.js +1 -1
  175. package/dist/components/ui/tooltip.cjs +3 -1
  176. package/dist/components/ui/tooltip.js +3 -1
  177. package/dist/index.cjs +5 -56
  178. package/dist/index.d.cts +2 -65
  179. package/dist/index.d.ts +2 -65
  180. package/dist/index.js +5 -56
  181. package/dist/plugin-style-scope-context.cjs +10 -0
  182. package/dist/plugin-style-scope-context.d.cts +13 -0
  183. package/dist/plugin-style-scope-context.d.ts +13 -0
  184. package/dist/plugin-style-scope-context.js +10 -0
  185. package/dist/plugin-style-scope.cjs +25 -0
  186. package/dist/plugin-style-scope.d.cts +11 -0
  187. package/dist/plugin-style-scope.d.ts +11 -0
  188. package/dist/plugin-style-scope.js +25 -0
  189. package/dist/reference.cjs +71 -98
  190. package/dist/reference.js +71 -98
  191. package/dist/styles/ai-elements.css +2 -0
  192. package/dist/styles/context-editor.css +2 -0
  193. package/dist/styles/globals.css +22 -3
  194. package/dist/styles/model-selection.css +2 -0
  195. package/dist/styles/plugin-theme.css +80 -0
  196. package/dist/styles/plugin.css +17 -2
  197. package/package.json +32 -19
  198. package/scripts/smoke-dist.mjs +104 -2
  199. package/src/components/ai-elements/agent.tsx +6 -6
  200. package/src/components/ai-elements/artifact.tsx +2 -2
  201. package/src/components/ai-elements/attachments.tsx +2 -2
  202. package/src/components/ai-elements/chain-of-thought.tsx +2 -2
  203. package/src/components/ai-elements/code-block.tsx +6 -3
  204. package/src/components/ai-elements/commit.tsx +2 -2
  205. package/src/components/ai-elements/confirmation.tsx +1 -1
  206. package/src/components/ai-elements/conversation.tsx +2 -2
  207. package/src/components/ai-elements/environment-variables.tsx +3 -3
  208. package/src/components/ai-elements/file-tree.tsx +1 -1
  209. package/src/components/ai-elements/inline-citation.tsx +3 -3
  210. package/src/components/ai-elements/jsx-preview.tsx +1 -1
  211. package/src/components/ai-elements/message.tsx +1 -1
  212. package/src/components/ai-elements/package-info.tsx +4 -4
  213. package/src/components/ai-elements/prompt-input-context.tsx +3 -2
  214. package/src/components/ai-elements/queue.tsx +2 -2
  215. package/src/components/ai-elements/reasoning.tsx +2 -2
  216. package/src/components/ai-elements/sandbox.tsx +3 -3
  217. package/src/components/ai-elements/schema-display.tsx +12 -12
  218. package/src/components/ai-elements/speech-input.tsx +17 -0
  219. package/src/components/ai-elements/stack-trace.tsx +1 -1
  220. package/src/components/ai-elements/task.tsx +3 -3
  221. package/src/components/ai-elements/terminal.tsx +2 -2
  222. package/src/components/ai-elements/test-results.tsx +4 -4
  223. package/src/components/ai-elements/tool.tsx +4 -4
  224. package/src/components/ai-elements/transcription.tsx +1 -1
  225. package/src/components/ai-elements/web-preview.tsx +2 -2
  226. package/src/components/context-editor/CapabilitySection.tsx +2 -2
  227. package/src/components/context-editor/ContextEditor.tsx +2 -2
  228. package/src/components/context-editor/PresetBar.tsx +3 -3
  229. package/src/components/context-editor/SystemPromptSection.tsx +4 -4
  230. package/src/components/context-editor/parts.tsx +6 -6
  231. package/src/components/dashboard/activity-list.tsx +2 -2
  232. package/src/components/dashboard/empty-state.tsx +1 -1
  233. package/src/components/dashboard/item-list.tsx +2 -2
  234. package/src/components/dashboard/layout.tsx +1 -1
  235. package/src/components/dashboard/metric.tsx +1 -1
  236. package/src/components/dashboard/stale-indicator.tsx +1 -1
  237. package/src/components/dashboard/typography.tsx +5 -5
  238. package/src/components/model-selection/available-model-picker.tsx +7 -7
  239. package/src/components/model-selection/thinking-level-picker.tsx +1 -1
  240. package/src/components/model-selection/thinking-picker.tsx +90 -0
  241. package/src/components/ui/accordion.tsx +2 -2
  242. package/src/components/ui/alert-dialog.tsx +4 -2
  243. package/src/components/ui/alert.tsx +2 -2
  244. package/src/components/ui/avatar.tsx +2 -2
  245. package/src/components/ui/breadcrumb.tsx +1 -1
  246. package/src/components/ui/button-group.tsx +1 -1
  247. package/src/components/ui/button.tsx +1 -1
  248. package/src/components/ui/calendar.tsx +3 -3
  249. package/src/components/ui/card.tsx +1 -1
  250. package/src/components/ui/carousel.tsx +2 -1
  251. package/src/components/ui/chart.tsx +54 -36
  252. package/src/components/ui/combobox.tsx +7 -5
  253. package/src/components/ui/command.tsx +3 -3
  254. package/src/components/ui/context-menu.tsx +10 -7
  255. package/src/components/ui/dialog.tsx +4 -2
  256. package/src/components/ui/drawer.tsx +4 -2
  257. package/src/components/ui/dropdown-menu.tsx +10 -7
  258. package/src/components/ui/empty.tsx +2 -2
  259. package/src/components/ui/field.tsx +5 -5
  260. package/src/components/ui/form.tsx +2 -2
  261. package/src/components/ui/hover-card.tsx +3 -1
  262. package/src/components/ui/input-group.tsx +3 -3
  263. package/src/components/ui/input-otp.tsx +1 -1
  264. package/src/components/ui/input.tsx +1 -1
  265. package/src/components/ui/item.tsx +3 -3
  266. package/src/components/ui/label.tsx +1 -1
  267. package/src/components/ui/menubar.tsx +9 -7
  268. package/src/components/ui/native-select.tsx +1 -1
  269. package/src/components/ui/navigation-menu.tsx +2 -2
  270. package/src/components/ui/plugin-safety-disclaimer.tsx +1 -1
  271. package/src/components/ui/popover.tsx +4 -2
  272. package/src/components/ui/select.tsx +5 -3
  273. package/src/components/ui/sheet.tsx +4 -2
  274. package/src/components/ui/sidebar.tsx +5 -5
  275. package/src/components/ui/table.tsx +2 -2
  276. package/src/components/ui/tabs.tsx +1 -1
  277. package/src/components/ui/textarea.tsx +1 -1
  278. package/src/components/ui/toggle.tsx +1 -1
  279. package/src/components/ui/tooltip.tsx +3 -1
  280. package/src/index.ts +6 -63
  281. package/src/plugin-style-scope-context.ts +21 -0
  282. package/src/plugin-style-scope.test.tsx +38 -0
  283. package/src/plugin-style-scope.tsx +35 -0
  284. package/src/styles/ai-elements.css +2 -0
  285. package/src/styles/context-editor.css +2 -0
  286. package/src/styles/globals.css +22 -3
  287. package/src/styles/model-selection.css +2 -0
  288. package/src/styles/plugin-theme.css +80 -0
  289. package/src/styles/plugin.css +17 -2
@@ -7,13 +7,14 @@
7
7
  // any entrypoint no longer resolves. Run after `pnpm build`.
8
8
 
9
9
  import { createRequire } from "node:module";
10
- import { existsSync, readFileSync } from "node:fs";
10
+ import { existsSync, readFileSync, statSync } from "node:fs";
11
11
  import { fileURLToPath } from "node:url";
12
12
  import { dirname, resolve } from "node:path";
13
13
 
14
14
  const require = createRequire(import.meta.url);
15
15
  const here = dirname(fileURLToPath(import.meta.url));
16
16
  const dist = resolve(here, "..", "dist");
17
+ const packageRoot = resolve(here, "..");
17
18
 
18
19
  const fail = (msg) => {
19
20
  console.error(`✗ ${msg}`);
@@ -25,6 +26,105 @@ if (!existsSync(dist)) {
25
26
  process.exit(1);
26
27
  }
27
28
 
29
+ // The lightweight root must not re-export specialized dependency graphs.
30
+ const rootEntries = ["index.js", "index.cjs", "index.d.ts", "index.d.cts"];
31
+ const forbiddenRootImports = [
32
+ "@sero-ai/ui/ai-elements",
33
+ "@sero-ai/ui/model-selection",
34
+ "@sero-ai/ui/components/context-editor",
35
+ "components/ai-elements",
36
+ "components/model-selection",
37
+ "components/context-editor",
38
+ "mermaid",
39
+ "shiki",
40
+ "react-jsx-parser",
41
+ "streamdown",
42
+ "unified",
43
+ ];
44
+
45
+ const importPatterns = [
46
+ /(?:from\s+|import\s*)["'](\.[^"']+)["']/g,
47
+ /(?:require|import)\(\s*["'](\.[^"']+)["']\s*\)/g,
48
+ ];
49
+
50
+ function localImports(contents) {
51
+ return importPatterns.flatMap((pattern) =>
52
+ [...contents.matchAll(pattern)].map((match) => match[1]),
53
+ );
54
+ }
55
+
56
+ function emittedExtension(file) {
57
+ if (file.endsWith(".d.cts")) return ".d.cts";
58
+ if (file.endsWith(".d.ts")) return ".d.ts";
59
+ if (file.endsWith(".cjs")) return ".cjs";
60
+ return ".js";
61
+ }
62
+
63
+ function resolveLocalImport(fromFile, specifier) {
64
+ const base = resolve(dirname(fromFile), specifier);
65
+ const extension = emittedExtension(fromFile);
66
+ const candidates = [];
67
+
68
+ if (extension.startsWith(".d.") && specifier.endsWith(".js")) {
69
+ candidates.push(base.replace(/\.js$/, extension));
70
+ }
71
+ candidates.push(base, `${base}${extension}`, resolve(base, `index${extension}`));
72
+
73
+ return candidates.find(
74
+ (candidate) => existsSync(candidate) && statSync(candidate).isFile(),
75
+ );
76
+ }
77
+
78
+ function inspectRootGraph(entry) {
79
+ const pending = [resolve(dist, entry)];
80
+ const visited = new Set();
81
+
82
+ while (pending.length > 0) {
83
+ const file = pending.pop();
84
+ if (visited.has(file)) continue;
85
+ visited.add(file);
86
+
87
+ const contents = readFileSync(file, "utf8");
88
+ const relativeFile = file.slice(dist.length + 1);
89
+ const leak = forbiddenRootImports.find(
90
+ (dependency) =>
91
+ relativeFile.includes(dependency) || contents.includes(dependency),
92
+ );
93
+ if (leak) fail(`${relativeFile} exposes unrelated dependency ${leak}`);
94
+
95
+ for (const specifier of localImports(contents)) {
96
+ const dependency = resolveLocalImport(file, specifier);
97
+ if (dependency) pending.push(dependency);
98
+ else fail(`${relativeFile} has unresolved local import ${specifier}`);
99
+ }
100
+ }
101
+ }
102
+
103
+ for (const file of rootEntries) {
104
+ inspectRootGraph(file);
105
+ }
106
+
107
+ // Specialized components remain available through stable public subpaths.
108
+ const packageJson = JSON.parse(
109
+ readFileSync(resolve(packageRoot, "package.json"), "utf8"),
110
+ );
111
+ for (const [subpath, output] of [
112
+ ["./ai-elements/*", "components/ai-elements/message.js"],
113
+ ["./model-selection/*", "components/model-selection/available-model-picker.js"],
114
+ ]) {
115
+ if (!packageJson.publishConfig.exports[subpath]) {
116
+ fail(`publishConfig is missing ${subpath}`);
117
+ }
118
+ if (!existsSync(resolve(dist, output))) fail(`${output} not emitted to dist`);
119
+ }
120
+ for (const style of [
121
+ "styles/ai-elements.css",
122
+ "styles/model-selection.css",
123
+ "styles/context-editor.css",
124
+ ]) {
125
+ if (!existsSync(resolve(dist, style))) fail(`${style} not emitted to dist`);
126
+ }
127
+
28
128
  // 1. Reference entrypoint resolves as ESM and exposes the example widgets.
29
129
  const EXPECTED = [
30
130
  "StarterExample",
@@ -64,5 +164,7 @@ else {
64
164
  if (process.exitCode) {
65
165
  console.error("Smoke test failed.");
66
166
  } else {
67
- console.log("✓ dist entrypoints resolve (reference esm+cjs, catalog json)");
167
+ console.log(
168
+ "✓ dist entrypoints resolve and the root excludes specialized dependencies",
169
+ );
68
170
  }
@@ -41,7 +41,7 @@ export const AgentHeader = memo(
41
41
  >
42
42
  <div className="flex items-center gap-2">
43
43
  <BotIcon className="size-4 text-muted-foreground" />
44
- <span className="font-medium text-sm">{name}</span>
44
+ <span className="font-medium text-base">{name}</span>
45
45
  {model && (
46
46
  <Badge className="font-mono text-xs" variant="secondary">
47
47
  {model}
@@ -67,10 +67,10 @@ export type AgentInstructionsProps = ComponentProps<"div"> & {
67
67
  export const AgentInstructions = memo(
68
68
  ({ className, children, ...props }: AgentInstructionsProps) => (
69
69
  <div className={cn("space-y-2", className)} {...props}>
70
- <span className="font-medium text-muted-foreground text-sm">
70
+ <span className="font-medium text-muted-foreground text-base">
71
71
  Instructions
72
72
  </span>
73
- <div className="rounded-md bg-muted/50 p-3 text-muted-foreground text-sm">
73
+ <div className="rounded-md bg-muted/50 p-3 text-muted-foreground text-base">
74
74
  <p>{children}</p>
75
75
  </div>
76
76
  </div>
@@ -81,7 +81,7 @@ export type AgentToolsProps = ComponentProps<typeof Accordion>;
81
81
 
82
82
  export const AgentTools = memo(({ className, ...props }: AgentToolsProps) => (
83
83
  <div className={cn("space-y-2", className)}>
84
- <span className="font-medium text-muted-foreground text-sm">Tools</span>
84
+ <span className="font-medium text-muted-foreground text-base">Tools</span>
85
85
  <Accordion className="rounded-md border" {...props} />
86
86
  </div>
87
87
  ));
@@ -103,7 +103,7 @@ export const AgentTool = memo(
103
103
  value={value}
104
104
  {...props}
105
105
  >
106
- <AccordionTrigger className="px-3 py-2 text-sm hover:no-underline">
106
+ <AccordionTrigger className="px-3 py-2 text-base hover:no-underline">
107
107
  {tool.description ?? "No description"}
108
108
  </AccordionTrigger>
109
109
  <AccordionContent className="px-3 pb-3">
@@ -123,7 +123,7 @@ export type AgentOutputProps = ComponentProps<"div"> & {
123
123
  export const AgentOutput = memo(
124
124
  ({ className, schema, ...props }: AgentOutputProps) => (
125
125
  <div className={cn("space-y-2", className)} {...props}>
126
- <span className="font-medium text-muted-foreground text-sm">
126
+ <span className="font-medium text-muted-foreground text-base">
127
127
  Output Schema
128
128
  </span>
129
129
  <div className="rounded-md bg-muted/50">
@@ -68,7 +68,7 @@ export type ArtifactTitleProps = HTMLAttributes<HTMLParagraphElement>;
68
68
 
69
69
  export const ArtifactTitle = ({ className, ...props }: ArtifactTitleProps) => (
70
70
  <p
71
- className={cn("font-medium text-foreground text-sm", className)}
71
+ className={cn("font-medium text-foreground text-base", className)}
72
72
  {...props}
73
73
  />
74
74
  );
@@ -79,7 +79,7 @@ export const ArtifactDescription = ({
79
79
  className,
80
80
  ...props
81
81
  }: ArtifactDescriptionProps) => (
82
- <p className={cn("text-muted-foreground text-sm", className)} {...props} />
82
+ <p className={cn("text-muted-foreground text-base", className)} {...props} />
83
83
  );
84
84
 
85
85
  export type ArtifactActionsProps = HTMLAttributes<HTMLDivElement>;
@@ -209,7 +209,7 @@ export const Attachment = ({
209
209
  variant === "inline" && [
210
210
  "flex h-8 cursor-pointer select-none items-center gap-1.5",
211
211
  "rounded-md border border-border px-1.5",
212
- "font-medium text-sm transition-all",
212
+ "font-medium text-base transition-all",
213
213
  "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
214
214
  ],
215
215
  variant === "list" && [
@@ -417,7 +417,7 @@ export const AttachmentEmpty = ({
417
417
  }: AttachmentEmptyProps) => (
418
418
  <div
419
419
  className={cn(
420
- "flex items-center justify-center p-4 text-muted-foreground text-sm",
420
+ "flex items-center justify-center p-4 text-muted-foreground text-base",
421
421
  className
422
422
  )}
423
423
  {...props}
@@ -81,7 +81,7 @@ export const ChainOfThoughtHeader = memo(
81
81
  <Collapsible onOpenChange={setIsOpen} open={isOpen}>
82
82
  <CollapsibleTrigger
83
83
  className={cn(
84
- "flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",
84
+ "flex w-full items-center gap-2 text-muted-foreground text-base transition-colors hover:text-foreground",
85
85
  className
86
86
  )}
87
87
  {...props}
@@ -127,7 +127,7 @@ export const ChainOfThoughtStep = memo(
127
127
  }: ChainOfThoughtStepProps) => (
128
128
  <div
129
129
  className={cn(
130
- "flex gap-2 text-sm",
130
+ "flex gap-2 text-base",
131
131
  stepStatusStyles[status],
132
132
  "fade-in-0 slide-in-from-top-2 animate-in",
133
133
  className
@@ -276,14 +276,14 @@ const CodeBlockBody = memo(
276
276
  return (
277
277
  <pre
278
278
  className={cn(
279
- "dark:!bg-[var(--shiki-dark-bg)] dark:!text-[var(--shiki-dark)] m-0 p-4 text-sm",
279
+ "dark:!bg-[var(--shiki-dark-bg)] dark:!text-[var(--shiki-dark)] m-0 p-4 text-base",
280
280
  className
281
281
  )}
282
282
  style={preStyle}
283
283
  >
284
284
  <code
285
285
  className={cn(
286
- "font-mono text-sm",
286
+ "font-mono",
287
287
  showLineNumbers && "[counter-increment:line_0] [counter-reset:line]"
288
288
  )}
289
289
  >
@@ -380,10 +380,12 @@ export const CodeBlockContent = ({
380
380
  code,
381
381
  language,
382
382
  showLineNumbers = false,
383
+ className
383
384
  }: {
384
385
  code: string;
385
386
  language: BundledLanguage;
386
387
  showLineNumbers?: boolean;
388
+ className?: string
387
389
  }) => {
388
390
  // Memoized raw tokens for immediate display
389
391
  const rawTokens = useMemo(() => createRawTokens(code), [code]);
@@ -413,7 +415,7 @@ export const CodeBlockContent = ({
413
415
 
414
416
  return (
415
417
  <div className="relative overflow-auto">
416
- <CodeBlockBody showLineNumbers={showLineNumbers} tokenized={tokenized} />
418
+ <CodeBlockBody showLineNumbers={showLineNumbers} tokenized={tokenized} className={className} />
417
419
  </div>
418
420
  );
419
421
  };
@@ -436,6 +438,7 @@ export const CodeBlock = ({
436
438
  code={code}
437
439
  language={language}
438
440
  showLineNumbers={showLineNumbers}
441
+ className={className}
439
442
  />
440
443
  </CodeBlockContainer>
441
444
  </CodeBlockContext.Provider>
@@ -70,7 +70,7 @@ export const CommitMessage = ({
70
70
  children,
71
71
  ...props
72
72
  }: CommitMessageProps) => (
73
- <span className={cn("font-medium text-sm", className)} {...props}>
73
+ <span className={cn("font-medium text-base", className)} {...props}>
74
74
  {children}
75
75
  </span>
76
76
  );
@@ -291,7 +291,7 @@ export const CommitFile = ({
291
291
  }: CommitFileProps) => (
292
292
  <div
293
293
  className={cn(
294
- "flex items-center justify-between gap-2 rounded px-2 py-1 text-sm hover:bg-muted/50",
294
+ "flex items-center justify-between gap-2 rounded px-2 py-1 text-base hover:bg-muted/50",
295
295
  className
296
296
  )}
297
297
  {...props}
@@ -169,5 +169,5 @@ export const ConfirmationActions = ({
169
169
  export type ConfirmationActionProps = ComponentProps<typeof Button>;
170
170
 
171
171
  export const ConfirmationAction = (props: ConfirmationActionProps) => (
172
- <Button className="h-8 px-3 text-sm" type="button" {...props} />
172
+ <Button className="h-8 px-3 text-base" type="button" {...props} />
173
173
  );
@@ -59,9 +59,9 @@ export const ConversationEmptyState = ({
59
59
  <>
60
60
  {icon && <div className="text-muted-foreground">{icon}</div>}
61
61
  <div className="space-y-1">
62
- <h3 className="font-medium text-sm">{title}</h3>
62
+ <h3 className="font-medium text-base">{title}</h3>
63
63
  {description && (
64
- <p className="text-muted-foreground text-sm">{description}</p>
64
+ <p className="text-muted-foreground text-base">{description}</p>
65
65
  )}
66
66
  </div>
67
67
  </>
@@ -100,7 +100,7 @@ export const EnvironmentVariablesTitle = ({
100
100
  children,
101
101
  ...props
102
102
  }: EnvironmentVariablesTitleProps) => (
103
- <h3 className={cn("font-medium text-sm", className)} {...props}>
103
+ <h3 className={cn("font-medium text-base", className)} {...props}>
104
104
  {children ?? "Environment Variables"}
105
105
  </h3>
106
106
  );
@@ -209,7 +209,7 @@ export const EnvironmentVariableName = ({
209
209
  const { name } = use(EnvironmentVariableContext);
210
210
 
211
211
  return (
212
- <span className={cn("font-mono text-sm", className)} {...props}>
212
+ <span className={cn("font-mono text-base", className)} {...props}>
213
213
  {children ?? name}
214
214
  </span>
215
215
  );
@@ -232,7 +232,7 @@ export const EnvironmentVariableValue = ({
232
232
  return (
233
233
  <span
234
234
  className={cn(
235
- "font-mono text-muted-foreground text-sm",
235
+ "font-mono text-muted-foreground text-base",
236
236
  !showValues && "select-none",
237
237
  className
238
238
  )}
@@ -83,7 +83,7 @@ export const FileTree = ({
83
83
  <FileTreeContext.Provider value={contextValue}>
84
84
  <div
85
85
  className={cn(
86
- "rounded-lg border bg-background font-mono text-sm",
86
+ "rounded-lg border bg-background font-mono text-base",
87
87
  className
88
88
  )}
89
89
  role="tree"
@@ -261,13 +261,13 @@ export const InlineCitationSource = ({
261
261
  }: InlineCitationSourceProps) => (
262
262
  <div className={cn("space-y-1", className)} {...props}>
263
263
  {title && (
264
- <h4 className="truncate font-medium text-sm leading-tight">{title}</h4>
264
+ <h4 className="truncate font-medium text-base leading-tight">{title}</h4>
265
265
  )}
266
266
  {url && (
267
267
  <p className="truncate break-all text-muted-foreground text-xs">{url}</p>
268
268
  )}
269
269
  {description && (
270
- <p className="line-clamp-3 text-muted-foreground text-sm leading-relaxed">
270
+ <p className="line-clamp-3 text-muted-foreground text-base leading-relaxed">
271
271
  {description}
272
272
  </p>
273
273
  )}
@@ -284,7 +284,7 @@ export const InlineCitationQuote = ({
284
284
  }: InlineCitationQuoteProps) => (
285
285
  <blockquote
286
286
  className={cn(
287
- "border-muted border-l-2 pl-3 text-muted-foreground text-sm italic",
287
+ "border-muted border-l-2 pl-3 text-muted-foreground text-base italic",
288
288
  className
289
289
  )}
290
290
  {...props}
@@ -229,7 +229,7 @@ export const JSXPreviewError = memo(
229
229
  return (
230
230
  <div
231
231
  className={cn(
232
- "flex items-center gap-2 rounded-md border border-destructive/50 bg-destructive/10 p-3 text-destructive text-sm",
232
+ "flex items-center gap-2 rounded-md border border-destructive/50 bg-destructive/10 p-3 text-destructive text-base",
233
233
  className
234
234
  )}
235
235
  {...props}
@@ -55,7 +55,7 @@ export const MessageContent = ({
55
55
  }: MessageContentProps) => (
56
56
  <div
57
57
  className={cn(
58
- "is-user:dark flex w-fit min-w-0 max-w-full flex-col gap-2 overflow-hidden text-sm",
58
+ "is-user:dark flex w-fit min-w-0 max-w-full flex-col gap-2 overflow-hidden text-base",
59
59
  "group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground",
60
60
  "group-[.is-assistant]:text-foreground",
61
61
  className
@@ -83,7 +83,7 @@ export const PackageInfoName = ({
83
83
  return (
84
84
  <div className={cn("flex items-center gap-2", className)} {...props}>
85
85
  <PackageIcon className="size-4 text-muted-foreground" />
86
- <span className="font-medium font-mono text-sm">{children ?? name}</span>
86
+ <span className="font-medium font-mono text-base">{children ?? name}</span>
87
87
  </div>
88
88
  );
89
89
  };
@@ -150,7 +150,7 @@ export const PackageInfoVersion = ({
150
150
  return (
151
151
  <div
152
152
  className={cn(
153
- "mt-2 flex items-center gap-2 font-mono text-muted-foreground text-sm",
153
+ "mt-2 flex items-center gap-2 font-mono text-muted-foreground text-base",
154
154
  className
155
155
  )}
156
156
  {...props}
@@ -177,7 +177,7 @@ export const PackageInfoDescription = ({
177
177
  children,
178
178
  ...props
179
179
  }: PackageInfoDescriptionProps) => (
180
- <p className={cn("mt-2 text-muted-foreground text-sm", className)} {...props}>
180
+ <p className={cn("mt-2 text-muted-foreground text-base", className)} {...props}>
181
181
  {children}
182
182
  </p>
183
183
  );
@@ -222,7 +222,7 @@ export const PackageInfoDependency = ({
222
222
  ...props
223
223
  }: PackageInfoDependencyProps) => (
224
224
  <div
225
- className={cn("flex items-center justify-between text-sm", className)}
225
+ className={cn("flex items-center justify-between text-base", className)}
226
226
  {...props}
227
227
  >
228
228
  {children ?? (
@@ -245,8 +245,9 @@ export const PromptInputActionAddAttachments = ({
245
245
  );
246
246
 
247
247
  return (
248
- <DropdownMenuItem {...props} onSelect={handleSelect}>
249
- <ImageIcon className="mr-2 size-4" /> {label}
248
+ <DropdownMenuItem {...props} onSelect={handleSelect} className="text-sm">
249
+ <ImageIcon className="size-4" />
250
+ {label}
250
251
  </DropdownMenuItem>
251
252
  );
252
253
  };
@@ -37,7 +37,7 @@ export type QueueItemProps = ComponentProps<"li">;
37
37
  export const QueueItem = ({ className, ...props }: QueueItemProps) => (
38
38
  <li
39
39
  className={cn(
40
- "group flex flex-col gap-1 rounded-md px-3 py-1 text-sm transition-colors hover:bg-muted",
40
+ "group flex flex-col gap-1 rounded-md px-3 py-1 text-base transition-colors hover:bg-muted",
41
41
  className
42
42
  )}
43
43
  {...props}
@@ -216,7 +216,7 @@ export const QueueSectionTrigger = ({
216
216
  <CollapsibleTrigger asChild>
217
217
  <button
218
218
  className={cn(
219
- "group flex w-full items-center justify-between rounded-md bg-muted/40 px-3 py-2 text-left font-medium text-muted-foreground text-sm transition-colors hover:bg-muted",
219
+ "group flex w-full items-center justify-between rounded-md bg-muted/40 px-3 py-2 text-left font-medium text-muted-foreground text-base transition-colors hover:bg-muted",
220
220
  className
221
221
  )}
222
222
  type="button"
@@ -177,7 +177,7 @@ export const ReasoningTrigger = memo(
177
177
  return (
178
178
  <CollapsibleTrigger
179
179
  className={cn(
180
- "flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",
180
+ "flex w-full items-center gap-2 text-muted-foreground text-base transition-colors hover:text-foreground",
181
181
  className
182
182
  )}
183
183
  {...props}
@@ -211,7 +211,7 @@ export const ReasoningContent = memo(
211
211
  ({ className, children, ...props }: ReasoningContentProps) => (
212
212
  <CollapsibleContent
213
213
  className={cn(
214
- "mt-4 text-sm",
214
+ "mt-4 text-base",
215
215
  "data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",
216
216
  className
217
217
  )}
@@ -53,7 +53,7 @@ export const SandboxHeader = ({
53
53
  >
54
54
  <div className="flex items-center gap-2">
55
55
  <Code className="size-4 text-muted-foreground" />
56
- <span className="font-medium text-sm">{title}</span>
56
+ <span className="font-medium text-base">{title}</span>
57
57
  {getStatusBadge(state)}
58
58
  </div>
59
59
  <ChevronDownIcon className="size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180" />
@@ -116,7 +116,7 @@ export const SandboxTabsTrigger = ({
116
116
  }: SandboxTabsTriggerProps) => (
117
117
  <TabsTrigger
118
118
  className={cn(
119
- "rounded-none border-0 border-transparent border-b-2 px-4 py-2 font-medium text-muted-foreground text-sm transition-colors data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none",
119
+ "rounded-none border-0 border-transparent border-b-2 px-4 py-2 font-medium text-muted-foreground text-base transition-colors data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none",
120
120
  className
121
121
  )}
122
122
  {...props}
@@ -129,5 +129,5 @@ export const SandboxTabContent = ({
129
129
  className,
130
130
  ...props
131
131
  }: SandboxTabContentProps) => (
132
- <TabsContent className={cn("mt-0 text-sm", className)} {...props} />
132
+ <TabsContent className={cn("mt-0 text-base", className)} {...props} />
133
133
  );
@@ -174,7 +174,7 @@ export const SchemaDisplayPath = ({
174
174
 
175
175
  return (
176
176
  <span
177
- className={cn("font-mono text-sm", className)}
177
+ className={cn("font-mono text-base", className)}
178
178
  // biome-ignore lint/security/noDangerouslySetInnerHtml: "needed for parameter highlighting"
179
179
  // oxlint-disable-next-line eslint-plugin-react(no-danger)
180
180
  dangerouslySetInnerHTML={{ __html: children ?? highlightedPath }}
@@ -196,7 +196,7 @@ export const SchemaDisplayDescription = ({
196
196
  return (
197
197
  <p
198
198
  className={cn(
199
- "border-b px-4 py-3 text-muted-foreground text-sm",
199
+ "border-b px-4 py-3 text-muted-foreground text-base",
200
200
  className
201
201
  )}
202
202
  {...props}
@@ -231,7 +231,7 @@ export const SchemaDisplayParameters = ({
231
231
  <Collapsible className={cn(className)} defaultOpen {...props}>
232
232
  <CollapsibleTrigger className="group flex w-full items-center gap-2 px-4 py-3 text-left transition-colors hover:bg-muted/50">
233
233
  <ChevronRightIcon className="size-4 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90" />
234
- <span className="font-medium text-sm">Parameters</span>
234
+ <span className="font-medium text-base">Parameters</span>
235
235
  <Badge className="ml-auto text-xs" variant="secondary">
236
236
  {parameters?.length}
237
237
  </Badge>
@@ -262,7 +262,7 @@ export const SchemaDisplayParameter = ({
262
262
  }: SchemaDisplayParameterProps) => (
263
263
  <div className={cn("px-4 py-3 pl-10", className)} {...props}>
264
264
  <div className="flex items-center gap-2">
265
- <span className="font-mono text-sm">{name}</span>
265
+ <span className="font-mono text-base">{name}</span>
266
266
  <Badge className="text-xs" variant="outline">
267
267
  {type}
268
268
  </Badge>
@@ -281,7 +281,7 @@ export const SchemaDisplayParameter = ({
281
281
  )}
282
282
  </div>
283
283
  {description && (
284
- <p className="mt-1 text-muted-foreground text-sm">{description}</p>
284
+ <p className="mt-1 text-muted-foreground text-base">{description}</p>
285
285
  )}
286
286
  </div>
287
287
  );
@@ -299,7 +299,7 @@ export const SchemaDisplayRequest = ({
299
299
  <Collapsible className={cn(className)} defaultOpen {...props}>
300
300
  <CollapsibleTrigger className="group flex w-full items-center gap-2 px-4 py-3 text-left transition-colors hover:bg-muted/50">
301
301
  <ChevronRightIcon className="size-4 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90" />
302
- <span className="font-medium text-sm">Request Body</span>
302
+ <span className="font-medium text-base">Request Body</span>
303
303
  </CollapsibleTrigger>
304
304
  <CollapsibleContent>
305
305
  <div className="border-t">
@@ -326,7 +326,7 @@ export const SchemaDisplayResponse = ({
326
326
  <Collapsible className={cn(className)} defaultOpen {...props}>
327
327
  <CollapsibleTrigger className="group flex w-full items-center gap-2 px-4 py-3 text-left transition-colors hover:bg-muted/50">
328
328
  <ChevronRightIcon className="size-4 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90" />
329
- <span className="font-medium text-sm">Response</span>
329
+ <span className="font-medium text-base">Response</span>
330
330
  </CollapsibleTrigger>
331
331
  <CollapsibleContent>
332
332
  <div className="border-t">
@@ -382,7 +382,7 @@ export const SchemaDisplayProperty = ({
382
382
  style={{ paddingLeft }}
383
383
  >
384
384
  <ChevronRightIcon className="size-4 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90" />
385
- <span className="font-mono text-sm">{name}</span>
385
+ <span className="font-mono text-base">{name}</span>
386
386
  <Badge className="text-xs" variant="outline">
387
387
  {type}
388
388
  </Badge>
@@ -397,7 +397,7 @@ export const SchemaDisplayProperty = ({
397
397
  </CollapsibleTrigger>
398
398
  {description && (
399
399
  <p
400
- className="pb-2 text-muted-foreground text-sm"
400
+ className="pb-2 text-muted-foreground text-base"
401
401
  style={{ paddingLeft: paddingLeft + 24 }}
402
402
  >
403
403
  {description}
@@ -434,7 +434,7 @@ export const SchemaDisplayProperty = ({
434
434
  <div className="flex items-center gap-2">
435
435
  {/* Spacer for alignment */}
436
436
  <span className="size-4" />
437
- <span className="font-mono text-sm">{name}</span>
437
+ <span className="font-mono text-base">{name}</span>
438
438
  <Badge className="text-xs" variant="outline">
439
439
  {type}
440
440
  </Badge>
@@ -448,7 +448,7 @@ export const SchemaDisplayProperty = ({
448
448
  )}
449
449
  </div>
450
450
  {description && (
451
- <p className="mt-1 pl-6 text-muted-foreground text-sm">{description}</p>
451
+ <p className="mt-1 pl-6 text-muted-foreground text-base">{description}</p>
452
452
  )}
453
453
  </div>
454
454
  );
@@ -463,7 +463,7 @@ export const SchemaDisplayExample = ({
463
463
  }: SchemaDisplayExampleProps) => (
464
464
  <pre
465
465
  className={cn(
466
- "mx-4 mb-4 overflow-auto rounded-md bg-muted p-4 font-mono text-sm",
466
+ "mx-4 mb-4 overflow-auto rounded-md bg-muted p-4 font-mono text-base",
467
467
  className
468
468
  )}
469
469
  {...props}