@vertesia/ui 1.6.0-dev.20261008.064737Z → 1.6.0-dev.20261009.095813Z

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 (147) hide show
  1. package/README.md +24 -0
  2. package/lib/core/components/shadcn/button.d.ts +1 -0
  3. package/lib/core/components/shadcn/button.d.ts.map +1 -1
  4. package/lib/core/components/shadcn/button.js +2 -2
  5. package/lib/core/components/shadcn/button.js.map +1 -1
  6. package/lib/core/components/shadcn/selectBox.d.ts.map +1 -1
  7. package/lib/core/components/shadcn/selectBox.js +2 -2
  8. package/lib/core/components/shadcn/selectBox.js.map +1 -1
  9. package/lib/env/index.d.ts +1 -1
  10. package/lib/env/index.d.ts.map +1 -1
  11. package/lib/env/index.js +1 -1
  12. package/lib/env/index.js.map +1 -1
  13. package/lib/features/agent/chat/AskUserWidget.d.ts.map +1 -1
  14. package/lib/features/agent/chat/AskUserWidget.js +2 -1
  15. package/lib/features/agent/chat/AskUserWidget.js.map +1 -1
  16. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
  17. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +2 -253
  18. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
  19. package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.d.ts +1 -3
  20. package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.d.ts.map +1 -1
  21. package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.js +2 -8
  22. package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.js.map +1 -1
  23. package/lib/features/agent/chat/ModernAgentOutput/agentMarkdownStyles.d.ts +4 -0
  24. package/lib/features/agent/chat/ModernAgentOutput/agentMarkdownStyles.d.ts.map +1 -0
  25. package/lib/features/agent/chat/ModernAgentOutput/agentMarkdownStyles.js +248 -0
  26. package/lib/features/agent/chat/ModernAgentOutput/agentMarkdownStyles.js.map +1 -0
  27. package/lib/i18n/locales/ar.json +1 -0
  28. package/lib/i18n/locales/de.json +1 -0
  29. package/lib/i18n/locales/en.json +1 -0
  30. package/lib/i18n/locales/es.json +1 -0
  31. package/lib/i18n/locales/fr.json +1 -0
  32. package/lib/i18n/locales/it.json +1 -0
  33. package/lib/i18n/locales/ja.json +1 -0
  34. package/lib/i18n/locales/ko.json +1 -0
  35. package/lib/i18n/locales/pt.json +1 -0
  36. package/lib/i18n/locales/ru.json +1 -0
  37. package/lib/i18n/locales/tr.json +1 -0
  38. package/lib/i18n/locales/zh-TW.json +1 -0
  39. package/lib/i18n/locales/zh.json +1 -0
  40. package/lib/session/auth/composable.d.ts +1 -5
  41. package/lib/session/auth/composable.d.ts.map +1 -1
  42. package/lib/session/auth/composable.js +1 -10
  43. package/lib/session/auth/composable.js.map +1 -1
  44. package/lib/session/auth/firebase.d.ts.map +1 -1
  45. package/lib/session/auth/firebase.js +8 -5
  46. package/lib/session/auth/firebase.js.map +1 -1
  47. package/lib/session/auth/oauth.d.ts.map +1 -1
  48. package/lib/session/auth/oauth.js +38 -14
  49. package/lib/session/auth/oauth.js.map +1 -1
  50. package/lib/session/auth/vertesiaHosts.d.ts +0 -40
  51. package/lib/session/auth/vertesiaHosts.d.ts.map +1 -1
  52. package/lib/session/auth/vertesiaHosts.js +2 -45
  53. package/lib/session/auth/vertesiaHosts.js.map +1 -1
  54. package/lib/session/index.d.ts +1 -1
  55. package/lib/session/index.d.ts.map +1 -1
  56. package/lib/session/index.js +1 -1
  57. package/lib/session/index.js.map +1 -1
  58. package/lib/session/scopeSelection.d.ts +4 -0
  59. package/lib/session/scopeSelection.d.ts.map +1 -1
  60. package/lib/session/scopeSelection.js +11 -0
  61. package/lib/session/scopeSelection.js.map +1 -1
  62. package/lib/vertesia-ui-core.js +2 -2
  63. package/lib/vertesia-ui-core.js.map +1 -1
  64. package/lib/vertesia-ui-env.js +1 -1
  65. package/lib/vertesia-ui-env.js.map +1 -1
  66. package/lib/vertesia-ui-features.js +242 -257
  67. package/lib/vertesia-ui-features.js.map +1 -1
  68. package/lib/vertesia-ui-i18n.1NWiB6fw.chunk.js +5 -0
  69. package/lib/vertesia-ui-i18n.1NWiB6fw.chunk.js.map +1 -0
  70. package/lib/vertesia-ui-i18n.6Ozlf6Ks.chunk.js +5 -0
  71. package/lib/vertesia-ui-i18n.6Ozlf6Ks.chunk.js.map +1 -0
  72. package/lib/vertesia-ui-i18n.AttJpg8U.chunk.js +5 -0
  73. package/lib/vertesia-ui-i18n.AttJpg8U.chunk.js.map +1 -0
  74. package/lib/vertesia-ui-i18n.BI_xdp49.chunk.js +5 -0
  75. package/lib/vertesia-ui-i18n.BI_xdp49.chunk.js.map +1 -0
  76. package/lib/vertesia-ui-i18n.C-2EEX6w.chunk.js +5 -0
  77. package/lib/vertesia-ui-i18n.C-2EEX6w.chunk.js.map +1 -0
  78. package/lib/vertesia-ui-i18n.CAmo54FO.chunk.js +5 -0
  79. package/lib/vertesia-ui-i18n.CAmo54FO.chunk.js.map +1 -0
  80. package/lib/vertesia-ui-i18n.CbBzmHNP.chunk.js +5 -0
  81. package/lib/vertesia-ui-i18n.CbBzmHNP.chunk.js.map +1 -0
  82. package/lib/vertesia-ui-i18n.DZgTzkIg.chunk.js +5 -0
  83. package/lib/vertesia-ui-i18n.DZgTzkIg.chunk.js.map +1 -0
  84. package/lib/vertesia-ui-i18n.DZsITxq5.chunk.js +5 -0
  85. package/lib/vertesia-ui-i18n.DZsITxq5.chunk.js.map +1 -0
  86. package/lib/vertesia-ui-i18n.Dbf2GHth.chunk.js +5 -0
  87. package/lib/vertesia-ui-i18n.Dbf2GHth.chunk.js.map +1 -0
  88. package/lib/vertesia-ui-i18n.js +2 -2
  89. package/lib/vertesia-ui-i18n.lleWnH5n.chunk.js +5 -0
  90. package/lib/vertesia-ui-i18n.lleWnH5n.chunk.js.map +1 -0
  91. package/lib/vertesia-ui-i18n.wG_XSkbr.chunk.js +5 -0
  92. package/lib/vertesia-ui-i18n.wG_XSkbr.chunk.js.map +1 -0
  93. package/lib/vertesia-ui-session.js +1 -1
  94. package/lib/vertesia-ui-session.js.map +1 -1
  95. package/package.json +7 -7
  96. package/src/core/components/shadcn/button.tsx +3 -2
  97. package/src/core/components/shadcn/selectBox.tsx +12 -4
  98. package/src/css/index.css +1 -1
  99. package/src/css/typography.css +111 -88
  100. package/src/env/index.ts +0 -2
  101. package/src/features/agent/chat/AskUserWidget.tsx +3 -1
  102. package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +2 -253
  103. package/src/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.tsx +2 -8
  104. package/src/features/agent/chat/ModernAgentOutput/agentMarkdownStyles.ts +248 -0
  105. package/src/i18n/locales/ar.json +1 -0
  106. package/src/i18n/locales/de.json +1 -0
  107. package/src/i18n/locales/en.json +1 -0
  108. package/src/i18n/locales/es.json +1 -0
  109. package/src/i18n/locales/fr.json +1 -0
  110. package/src/i18n/locales/it.json +1 -0
  111. package/src/i18n/locales/ja.json +1 -0
  112. package/src/i18n/locales/ko.json +1 -0
  113. package/src/i18n/locales/pt.json +1 -0
  114. package/src/i18n/locales/ru.json +1 -0
  115. package/src/i18n/locales/tr.json +1 -0
  116. package/src/i18n/locales/zh-TW.json +1 -0
  117. package/src/i18n/locales/zh.json +1 -0
  118. package/src/session/auth/composable.ts +1 -11
  119. package/src/session/auth/firebase.ts +9 -6
  120. package/src/session/auth/oauth.ts +39 -13
  121. package/src/session/auth/vertesiaHosts.ts +2 -47
  122. package/src/session/index.ts +1 -1
  123. package/src/session/scopeSelection.ts +13 -0
  124. package/lib/vertesia-ui-i18n.B0orbJb6.chunk.js +0 -5
  125. package/lib/vertesia-ui-i18n.B0orbJb6.chunk.js.map +0 -1
  126. package/lib/vertesia-ui-i18n.BChwIQVA.chunk.js +0 -5
  127. package/lib/vertesia-ui-i18n.BChwIQVA.chunk.js.map +0 -1
  128. package/lib/vertesia-ui-i18n.BTEcAVQm.chunk.js +0 -5
  129. package/lib/vertesia-ui-i18n.BTEcAVQm.chunk.js.map +0 -1
  130. package/lib/vertesia-ui-i18n.BeJQKbv7.chunk.js +0 -5
  131. package/lib/vertesia-ui-i18n.BeJQKbv7.chunk.js.map +0 -1
  132. package/lib/vertesia-ui-i18n.BpGr0-5g.chunk.js +0 -5
  133. package/lib/vertesia-ui-i18n.BpGr0-5g.chunk.js.map +0 -1
  134. package/lib/vertesia-ui-i18n.Bs8x-1wI.chunk.js +0 -5
  135. package/lib/vertesia-ui-i18n.Bs8x-1wI.chunk.js.map +0 -1
  136. package/lib/vertesia-ui-i18n.BymQoOm0.chunk.js +0 -5
  137. package/lib/vertesia-ui-i18n.BymQoOm0.chunk.js.map +0 -1
  138. package/lib/vertesia-ui-i18n.CNT_wabV.chunk.js +0 -5
  139. package/lib/vertesia-ui-i18n.CNT_wabV.chunk.js.map +0 -1
  140. package/lib/vertesia-ui-i18n.Cxh1iVk0.chunk.js +0 -5
  141. package/lib/vertesia-ui-i18n.Cxh1iVk0.chunk.js.map +0 -1
  142. package/lib/vertesia-ui-i18n.DLYCM9fV.chunk.js +0 -5
  143. package/lib/vertesia-ui-i18n.DLYCM9fV.chunk.js.map +0 -1
  144. package/lib/vertesia-ui-i18n.QvAVguDs.chunk.js +0 -5
  145. package/lib/vertesia-ui-i18n.QvAVguDs.chunk.js.map +0 -1
  146. package/lib/vertesia-ui-i18n.smozeSmI.chunk.js +0 -5
  147. package/lib/vertesia-ui-i18n.smozeSmI.chunk.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertesia/ui",
3
- "version": "1.6.0-dev.20261008.064737Z",
3
+ "version": "1.6.0-dev.20261009.095813Z",
4
4
  "description": "Vertesia UI components and and hooks",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -47,11 +47,11 @@
47
47
  "@radix-ui/react-switch": "^1.3.7",
48
48
  "@radix-ui/react-tabs": "^1.1.21",
49
49
  "@radix-ui/react-tooltip": "^1.2.16",
50
- "@vertesia/client": "1.6.0-dev.20261008.064737Z",
51
- "@vertesia/common": "1.6.0-dev.20261008.064737Z",
52
- "@vertesia/fusion-ux": "1.6.0-dev.20261008.064737Z",
53
- "@vertesia/json": "1.6.0-dev.20261008.064737Z",
54
- "@vertesia/rich-text": "1.6.0-dev.20261008.064737Z",
50
+ "@vertesia/client": "1.6.0-dev.20261009.095813Z",
51
+ "@vertesia/common": "1.6.0-dev.20261009.095813Z",
52
+ "@vertesia/fusion-ux": "1.6.0-dev.20261009.095813Z",
53
+ "@vertesia/json": "1.6.0-dev.20261009.095813Z",
54
+ "@vertesia/rich-text": "1.6.0-dev.20261009.095813Z",
55
55
  "ajv": "^8.20.0",
56
56
  "ajv-formats": "^3.0.1",
57
57
  "aria-hidden": "^1.2.6",
@@ -193,7 +193,7 @@
193
193
  "url": "https://github.com/vertesia/composableai.git",
194
194
  "directory": "packages/ui"
195
195
  },
196
- "gitHead": "8ee3a33e9a7c3dbcd13937e971cbdcc5fad56717",
196
+ "gitHead": "e45bc09ecf2de4c8fe8a8d39fb52c1521980e7b9",
197
197
  "scripts": {
198
198
  "clean:lib": "rimraf ./lib ./tsconfig.tsbuildinfo",
199
199
  "clean": "rimraf ./node_modules ./lib ./tsconfig.tsbuildinfo",
@@ -188,6 +188,7 @@ interface CopyButtonProps {
188
188
  /** @deprecated use `aria-label` */
189
189
  alt?: string;
190
190
  'aria-label'?: string;
191
+ BtnIcon?: React.ReactNode;
191
192
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'icon';
192
193
  toast?: {
193
194
  toast: (options: { status: 'success' | 'error'; title: string; duration: number }) => void;
@@ -197,7 +198,7 @@ interface CopyButtonProps {
197
198
  }
198
199
 
199
200
  const CopyButton = React.forwardRef<HTMLButtonElement, CopyButtonProps>(
200
- ({ size, content, toast, className, alt, 'aria-label': ariaLabel, ...props }, ref) => {
201
+ ({ size, content, toast, className, alt, BtnIcon, 'aria-label': ariaLabel, ...props }, ref) => {
201
202
  const [isCopied, setIsCopied] = useState(false);
202
203
  const { t } = useUITranslation();
203
204
 
@@ -246,7 +247,7 @@ const CopyButton = React.forwardRef<HTMLButtonElement, CopyButtonProps>(
246
247
  {...props}
247
248
  title={label}
248
249
  >
249
- {isCopied ? <Check className="text-success" /> : <CopyIcon className="size-4" />}
250
+ {isCopied ? <Check className="text-success" /> : (BtnIcon ?? <CopyIcon className="size-4" />)}
250
251
  </Button>
251
252
  );
252
253
  },
@@ -287,7 +287,7 @@ export function SelectBox<T = unknown>({
287
287
  const renderOptionsContent = () => (
288
288
  <>
289
289
  {filterBy && (
290
- <div className="flex justify-start items-center mb-1">
290
+ <div className="flex justify-start items-center mb-1 shrink-0">
291
291
  <div className="mx-2">
292
292
  <SearchIcon className="size-4" />
293
293
  </div>
@@ -300,9 +300,9 @@ export function SelectBox<T = unknown>({
300
300
  />
301
301
  </div>
302
302
  )}
303
- <Command className="overflow-hidden">
303
+ <Command className={inline ? 'min-h-0 flex-1' : 'overflow-hidden'}>
304
304
  <CommandList
305
- className={inline ? 'max-h-full overflow-y-auto' : 'max-h-[200px] overflow-y-auto'}
305
+ className={inline ? 'min-h-0 flex-1 overflow-y-auto' : 'max-h-[200px] overflow-y-auto'}
306
306
  onWheel={(e) => {
307
307
  e.currentTarget.scrollTop += e.deltaY;
308
308
  }}
@@ -342,7 +342,15 @@ export function SelectBox<T = unknown>({
342
342
 
343
343
  if (inline) {
344
344
  return (
345
- <div className={clsx(className, border && 'border border-border rounded-md', 'bg-popover p-1', popupClass)}>
345
+ <div
346
+ className={clsx(
347
+ 'flex flex-col',
348
+ className,
349
+ border && 'border border-border rounded-md',
350
+ 'bg-popover p-1',
351
+ popupClass,
352
+ )}
353
+ >
346
354
  {isLoading ? (
347
355
  <div className="flex justify-center items-center p-2 text-muted text-sm">
348
356
  <LoaderCircle className="size-4 animate-spin" />
package/src/css/index.css CHANGED
@@ -15,7 +15,7 @@
15
15
  * @import "@vertesia/ui/css/theme.css";
16
16
  *
17
17
  * Typography (.vprose) is opt-in since it requires @tailwindcss/typography:
18
- * @import "@vertesia/ui/css/typography.css" layer(base);
18
+ * @import "@vertesia/ui/css/typography.css";
19
19
  */
20
20
 
21
21
  @import "./color.css" layer(base);
@@ -1,89 +1,112 @@
1
- .vprose {
2
- @apply prose text-foreground max-w-none;
3
- }
4
-
5
- .vprose p {
6
- @apply bg-transparent my-2;
7
- }
8
-
9
- .vprose a {
10
- @apply text-info hover:text-info/80;
11
- }
12
-
13
- .vprose pre,
14
- .vprose code {
15
- @apply !bg-muted text-muted my-2;
16
- }
17
-
18
- .vprose h1,
19
- .vprose h2,
20
- .vprose h3,
21
- .vprose h4,
22
- .vprose h5,
23
- .vprose h6 {
24
- @apply text-foreground;
25
- }
26
-
27
- .vprose strong {
28
- @apply text-foreground font-bold;
29
- }
30
-
31
- .vprose em {
32
- @apply italic;
33
- }
34
-
35
- .vprose ul {
36
- @apply my-3 ps-6 list-disc space-y-1;
37
- }
38
-
39
- .vprose ol {
40
- @apply my-3 ps-6 list-decimal space-y-1;
41
- }
42
-
43
- .vprose li {
44
- @apply text-mixer-foreground/50 my-2 ps-1;
45
- }
46
-
47
- .vprose blockquote {
48
- @apply border-s-4 border-muted/30 ps-4 italic text-muted my-3;
49
- }
50
-
51
- .vprose hr {
52
- @apply border-muted/30 my-4;
53
- }
54
-
55
- .vprose h1 {
56
- @apply font-bold text-2xl my-2;
57
- }
58
-
59
- .vprose h2 {
60
- @apply font-bold text-xl my-2;
61
- }
62
-
63
- .vprose h3 {
64
- @apply font-bold text-lg my-2;
65
- }
66
-
67
- .vprose table {
68
- @apply min-w-full border-collapse border border-muted/30 my-4;
69
- }
70
-
71
- .vprose th {
72
- @apply border border-muted/30 bg-mixer-muted/50 px-4 py-2 text-start text-muted font-bold;
73
- }
74
-
75
- .vprose td {
76
- @apply border border-muted/30 px-4 py-2 text-muted;
77
- }
78
-
79
- .vprose code {
80
- @apply font-mono text-sm;
81
- }
82
-
83
- .vprose :not(pre) > code {
84
- @apply px-1.5 py-0.5 rounded text-muted bg-muted/20;
85
- }
86
-
87
- .vprose .code-language-indicator {
88
- @apply text-xs px-3 py-1 rounded-t-md font-mono border-t border-s border-e -mb-2;
1
+ /* Typography is opt-in. Own the layer here so normal imports cannot accidentally put
2
+ theme colours below the typography plugin's prose utilities. */
3
+ @layer utilities {
4
+ .vprose {
5
+ @apply prose max-w-none;
6
+
7
+ /* Tailwind Typography's public palette interface. Use the active semantic tokens so
8
+ branding and dark mode share one source of truth; consumers do not need prose-invert.
9
+ https://github.com/tailwindlabs/tailwindcss-typography#adding-custom-color-themes */
10
+ --tw-prose-body: var(--foreground);
11
+ --tw-prose-headings: var(--foreground);
12
+ --tw-prose-lead: var(--muted);
13
+ --tw-prose-links: var(--info);
14
+ --tw-prose-bold: var(--foreground);
15
+ --tw-prose-counters: var(--muted);
16
+ --tw-prose-bullets: var(--muted);
17
+ --tw-prose-hr: var(--border);
18
+ --tw-prose-quotes: var(--muted);
19
+ --tw-prose-quote-borders: var(--border);
20
+ --tw-prose-captions: var(--muted);
21
+ --tw-prose-kbd: var(--foreground);
22
+ --tw-prose-kbd-shadows: var(--border);
23
+ --tw-prose-code: var(--muted);
24
+ --tw-prose-pre-code: var(--muted);
25
+ --tw-prose-pre-bg: var(--muted-background);
26
+ --tw-prose-th-borders: var(--border);
27
+ --tw-prose-td-borders: var(--border);
28
+ }
29
+
30
+ .vprose :where(p):not(:where(.not-prose, .not-prose *)) {
31
+ @apply bg-transparent my-2;
32
+ }
33
+
34
+ .vprose :where(a):not(:where(.not-prose, .not-prose *)) {
35
+ @variant hover {
36
+ color: color-mix(in oklab, var(--tw-prose-links) 80%, transparent);
37
+ }
38
+ }
39
+
40
+ .vprose :where(pre, code):not(:where(.not-prose, .not-prose *)) {
41
+ @apply my-2;
42
+ background-color: var(--tw-prose-pre-bg);
43
+ }
44
+
45
+ .vprose :where(strong):not(:where(.not-prose, .not-prose *)) {
46
+ @apply font-bold;
47
+ }
48
+
49
+ .vprose :where(em):not(:where(.not-prose, .not-prose *)) {
50
+ @apply italic;
51
+ }
52
+
53
+ .vprose :where(ul):not(:where(.not-prose, .not-prose *)) {
54
+ @apply my-3 ps-6 list-disc space-y-1;
55
+ }
56
+
57
+ .vprose :where(ol):not(:where(.not-prose, .not-prose *)) {
58
+ @apply my-3 ps-6 list-decimal space-y-1;
59
+ }
60
+
61
+ .vprose :where(li):not(:where(.not-prose, .not-prose *)) {
62
+ @apply my-2 ps-1;
63
+ }
64
+
65
+ .vprose :where(blockquote):not(:where(.not-prose, .not-prose *)) {
66
+ @apply border-s-4 ps-4 italic my-3;
67
+ }
68
+
69
+ .vprose :where(hr):not(:where(.not-prose, .not-prose *)) {
70
+ @apply my-4;
71
+ }
72
+
73
+ .vprose :where(h1):not(:where(.not-prose, .not-prose *)) {
74
+ @apply font-bold text-2xl my-2;
75
+ }
76
+
77
+ .vprose :where(h2):not(:where(.not-prose, .not-prose *)) {
78
+ @apply font-bold text-xl my-2;
79
+ }
80
+
81
+ .vprose :where(h3):not(:where(.not-prose, .not-prose *)) {
82
+ @apply font-bold text-lg my-2;
83
+ }
84
+
85
+ .vprose :where(table):not(:where(.not-prose, .not-prose *)) {
86
+ @apply min-w-full border-collapse border my-4;
87
+ border-color: var(--tw-prose-td-borders);
88
+ }
89
+
90
+ .vprose :where(th):not(:where(.not-prose, .not-prose *)) {
91
+ @apply border px-4 py-2 text-start font-bold;
92
+ border-color: var(--tw-prose-th-borders);
93
+ background-color: var(--muted-background);
94
+ }
95
+
96
+ .vprose :where(td):not(:where(.not-prose, .not-prose *)) {
97
+ @apply border px-4 py-2;
98
+ border-color: var(--tw-prose-td-borders);
99
+ }
100
+
101
+ .vprose :where(code):not(:where(.not-prose, .not-prose *)) {
102
+ @apply font-mono text-sm;
103
+ }
104
+
105
+ .vprose :where(:not(pre) > code):not(:where(.not-prose, .not-prose *)) {
106
+ @apply px-1.5 py-0.5 rounded;
107
+ }
108
+
109
+ .vprose :where(.code-language-indicator):not(:where(.not-prose, .not-prose *)) {
110
+ @apply text-xs px-3 py-1 rounded-t-md font-mono border-t border-s border-e -mb-2;
111
+ }
89
112
  }
package/src/env/index.ts CHANGED
@@ -1,8 +1,6 @@
1
1
  import { isTrustedAuthBrokerUrl } from '../session/auth/vertesiaHosts.js';
2
2
 
3
3
  export {
4
- FIRST_PARTY_HOST_PATTERNS,
5
- GATEWAY_HOST_PATTERNS,
6
4
  isLoopbackHostname,
7
5
  isTrustedAuthBrokerUrl,
8
6
  normalizeHostname,
@@ -169,7 +169,6 @@ export function AskUserWidget({
169
169
  submitButtonClassName,
170
170
  }: AskUserWidgetProps) {
171
171
  const { t } = useUITranslation();
172
- const resolvedPlaceholder = placeholder ?? t('agent.typeYourResponse');
173
172
  const resolvedSubmitLabel = submitLabel ?? t('agent.send');
174
173
  const [inputValue, setInputValue] = React.useState('');
175
174
  const [selectedOptions, setSelectedOptions] = React.useState<Set<string>>(new Set());
@@ -179,6 +178,9 @@ export function AskUserWidget({
179
178
  const DefaultIcon = VARIANT_ICONS[variant];
180
179
  const validOptions = isAskUserOptions(options);
181
180
  const safeOptions = validOptions ? options : [];
181
+ // Next to predefined options the input is an alternative to picking one, not the whole prompt.
182
+ const resolvedPlaceholder =
183
+ placeholder ?? (safeOptions.length > 0 ? t('agent.typeDifferentResponse') : t('agent.typeYourResponse'));
182
184
  const invalidOptionsReported = React.useRef(false);
183
185
 
184
186
  React.useEffect(() => {
@@ -43,6 +43,7 @@ import {
43
43
  } from '../workstreams.js';
44
44
  import { createAgentMarkdownAnchor } from './AgentMarkdownAnchor';
45
45
  import { AttachmentPreviewList, parseUserMessageAttachments } from './AttachmentPreview';
46
+ import { agentMarkdownStyles } from './agentMarkdownStyles.js';
46
47
  import BatchProgressPanel, { type BatchProgressPanelClassNames } from './BatchProgressPanel';
47
48
  import {
48
49
  AGENT_LINE_CLAMP_CLASS,
@@ -3118,259 +3119,7 @@ function AllMessagesMixedComponent({
3118
3119
  data-view-mode={viewMode}
3119
3120
  >
3120
3121
  {/* Global styles for vprose markdown content */}
3121
- <style>{`
3122
- /* Better vertical rhythm for markdown */
3123
- .vprose > * + * {
3124
- margin-top: 0.625rem;
3125
- }
3126
- .vprose > h1 + *,
3127
- .vprose > h2 + *,
3128
- .vprose > h3 + * {
3129
- margin-top: 0.375rem;
3130
- }
3131
- /* Tables should read like part of the conversation, not a separate app grid. */
3132
- .vprose table {
3133
- margin-top: 0.875rem;
3134
- margin-bottom: 0.875rem;
3135
- border-collapse: collapse;
3136
- width: 100%;
3137
- background: transparent;
3138
- }
3139
- .vprose th,
3140
- .vprose td {
3141
- padding: 0.5rem 0.625rem;
3142
- border: 0;
3143
- border-bottom: 1px solid color-mix(in oklch, var(--border) 70%, transparent);
3144
- background: transparent;
3145
- text-align: left;
3146
- }
3147
- .vprose thead th {
3148
- background: transparent;
3149
- font-weight: 600;
3150
- color: var(--muted);
3151
- font-size: 0.75rem;
3152
- text-transform: none;
3153
- letter-spacing: 0;
3154
- }
3155
- .vprose tbody tr:hover {
3156
- background: transparent;
3157
- }
3158
- /* Dark mode table styles */
3159
- .dark .vprose th,
3160
- .dark .vprose td {
3161
- border-color: color-mix(in oklch, var(--border) 70%, transparent);
3162
- }
3163
- .dark .vprose thead th {
3164
- background: transparent;
3165
- color: var(--muted);
3166
- }
3167
- .dark .vprose tbody tr:hover {
3168
- background: transparent;
3169
- }
3170
- /* Horizontal rules as section dividers */
3171
- .vprose hr {
3172
- margin-top: 1rem;
3173
- margin-bottom: 1rem;
3174
- border-color: var(--border);
3175
- }
3176
- /* Better blockquote styling */
3177
- .vprose blockquote {
3178
- margin-top: 0.875rem;
3179
- margin-bottom: 0.875rem;
3180
- padding-left: 1rem;
3181
- border-left-width: 3px;
3182
- border-left-color: var(--border);
3183
- color: var(--muted);
3184
- }
3185
- /* Code blocks */
3186
- .vprose pre {
3187
- margin-top: 0.75rem;
3188
- margin-bottom: 0.75rem;
3189
- padding: 0.75rem;
3190
- border-radius: 0.5rem;
3191
- overflow-x: auto;
3192
- background-color: var(--muted-background);
3193
- color: var(--foreground);
3194
- }
3195
- .vprose pre code {
3196
- color: inherit;
3197
- }
3198
- .dark .vprose pre {
3199
- color: var(--foreground);
3200
- }
3201
-
3202
- /* Summary chat markdown: keep structure, but match the app's quieter conversation surface. */
3203
- .agent-markdown {
3204
- color: color-mix(in oklch, var(--foreground) 78%, transparent);
3205
- font-size: 0.875rem;
3206
- line-height: 1.625;
3207
- overflow-x: auto;
3208
- }
3209
- .agent-markdown > * + * {
3210
- margin-top: 0.65rem;
3211
- }
3212
- .agent-markdown p {
3213
- margin-top: 0.5rem;
3214
- margin-bottom: 0.5rem;
3215
- }
3216
- .agent-markdown h1,
3217
- .agent-markdown h2,
3218
- .agent-markdown h3,
3219
- .agent-markdown h4 {
3220
- margin-top: 1.2rem;
3221
- margin-bottom: 0.45rem;
3222
- color: var(--foreground);
3223
- font-weight: 650;
3224
- letter-spacing: 0;
3225
- line-height: 1.3;
3226
- }
3227
- .agent-markdown h1 {
3228
- font-size: 1.2rem;
3229
- }
3230
- .agent-markdown h2 {
3231
- font-size: 1.05rem;
3232
- }
3233
- .agent-markdown h3,
3234
- .agent-markdown h4 {
3235
- font-size: 0.95rem;
3236
- }
3237
- .agent-markdown h1:first-child,
3238
- .agent-markdown h2:first-child,
3239
- .agent-markdown h3:first-child,
3240
- .agent-markdown h4:first-child {
3241
- margin-top: 0;
3242
- }
3243
- .agent-markdown hr {
3244
- margin: 1.15rem 0;
3245
- border: 0;
3246
- border-top: 1px solid var(--border);
3247
- opacity: 0.65;
3248
- }
3249
- .agent-markdown ul,
3250
- .agent-markdown ol {
3251
- margin-top: 0.55rem;
3252
- margin-bottom: 0.55rem;
3253
- padding-left: 1.25rem;
3254
- }
3255
- .agent-markdown li {
3256
- margin-top: 0.2rem;
3257
- margin-bottom: 0.2rem;
3258
- padding-left: 0.1rem;
3259
- color: inherit;
3260
- }
3261
- .agent-markdown li::marker {
3262
- color: var(--muted);
3263
- }
3264
- .agent-markdown strong {
3265
- color: var(--foreground);
3266
- font-weight: 600;
3267
- }
3268
- .agent-markdown em {
3269
- color: color-mix(in oklch, var(--foreground) 72%, transparent);
3270
- }
3271
- .agent-markdown a {
3272
- color: var(--foreground);
3273
- text-decoration-color: var(--muted);
3274
- text-underline-offset: 3px;
3275
- }
3276
- .agent-markdown blockquote {
3277
- margin-top: 0.85rem;
3278
- margin-bottom: 0.85rem;
3279
- padding-left: 0.875rem;
3280
- border-left: 2px solid var(--border);
3281
- color: var(--muted);
3282
- font-style: normal;
3283
- }
3284
- .agent-markdown :not(pre) > code {
3285
- border: 1px solid var(--border);
3286
- border-radius: 0.375rem;
3287
- background: var(--muted);
3288
- color: var(--foreground);
3289
- padding: 0.1rem 0.35rem;
3290
- font-size: 0.8125em;
3291
- font-weight: 500;
3292
- }
3293
- .agent-markdown pre {
3294
- margin-top: 0.85rem;
3295
- margin-bottom: 0.85rem;
3296
- max-height: 32rem;
3297
- overflow: auto;
3298
- border: 1px solid var(--border);
3299
- border-radius: 0.75rem;
3300
- background: var(--muted);
3301
- color: var(--foreground);
3302
- padding: 0.875rem;
3303
- font-size: 0.8125rem;
3304
- line-height: 1.55;
3305
- }
3306
- .agent-markdown pre code {
3307
- border: 0;
3308
- background: transparent;
3309
- color: inherit;
3310
- padding: 0;
3311
- font-size: inherit;
3312
- }
3313
- .agent-markdown table {
3314
- display: table;
3315
- width: 100%;
3316
- max-width: 100%;
3317
- margin: 0.9rem 0 1rem;
3318
- border: 0;
3319
- border-collapse: collapse;
3320
- border-spacing: 0;
3321
- font-size: 0.8125rem;
3322
- table-layout: fixed;
3323
- background: transparent;
3324
- }
3325
- .agent-markdown thead {
3326
- background: transparent;
3327
- }
3328
- .agent-markdown th,
3329
- .agent-markdown td {
3330
- border: 0;
3331
- border-bottom: 1px solid color-mix(in oklch, var(--border) 70%, transparent);
3332
- background: transparent;
3333
- padding: 0.55rem 0.75rem;
3334
- text-align: left;
3335
- vertical-align: top;
3336
- overflow-wrap: anywhere;
3337
- word-break: normal;
3338
- white-space: normal;
3339
- }
3340
- .agent-markdown th {
3341
- color: var(--muted);
3342
- font-size: 0.75rem;
3343
- font-weight: 600;
3344
- letter-spacing: 0;
3345
- text-transform: none;
3346
- white-space: nowrap;
3347
- }
3348
- .agent-markdown td {
3349
- color: inherit;
3350
- }
3351
- .agent-markdown th + th,
3352
- .agent-markdown td + td {
3353
- padding-inline-start: 1.75rem;
3354
- }
3355
- .agent-markdown th:first-child,
3356
- .agent-markdown td:first-child {
3357
- min-width: 0;
3358
- width: auto;
3359
- white-space: normal;
3360
- }
3361
- .agent-markdown col {
3362
- width: var(--agent-markdown-table-column-width);
3363
- }
3364
- .agent-markdown tr:last-child td {
3365
- border-bottom: 0;
3366
- }
3367
- .agent-markdown tbody tr:nth-child(even) {
3368
- background: transparent;
3369
- }
3370
- .agent-markdown tbody tr:hover {
3371
- background: transparent;
3372
- }
3373
- `}</style>
3122
+ <style>{agentMarkdownStyles}</style>
3374
3123
 
3375
3124
  {/* Workstream tabs are a debug affordance; Summary keeps the conversation surface quiet. */}
3376
3125
  {viewMode === 'stacked' && (
@@ -3,15 +3,9 @@ import { useUITranslation } from '@vertesia/ui/i18n';
3
3
  import { MarkdownRenderer, type MarkdownRendererProps } from '@vertesia/ui/widgets';
4
4
  import { ChevronDown } from 'lucide-react';
5
5
  import { useState } from 'react';
6
+ import { AGENT_PROSE_CLASS } from './agentMarkdownStyles.js';
6
7
 
7
- /** Prose styling used for agent/model message markdown, shared across the conversation UI. */
8
- export const AGENT_PROSE_CLASS = [
9
- 'agent-markdown vprose prose max-w-none break-words text-sm leading-6 text-foreground/80',
10
- 'prose-p:my-2 prose-p:leading-6 prose-li:my-0.5 prose-pre:my-3 prose-headings:tracking-normal',
11
- 'prose-headings:text-foreground prose-strong:text-foreground prose-code:text-foreground',
12
- 'prose-a:text-foreground prose-a:underline prose-a:decoration-muted prose-a:underline-offset-4',
13
- '[&_p]:text-foreground/80 [&_li]:text-foreground/80 [&_li::marker]:text-muted',
14
- ].join(' ');
8
+ export { AGENT_PROSE_CLASS } from './agentMarkdownStyles.js';
15
9
 
16
10
  /** Clamp applied to collapsed markdown. Kept as a literal so Tailwind emits the utility. */
17
11
  export const AGENT_LINE_CLAMP_CLASS =