@vertesia/ui 1.5.0-dev.20260725.083715Z → 1.5.0-dev.20260804.124748Z
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.
- package/lib/core/hooks/useScrollableSearch.d.ts +1 -1
- package/lib/core/hooks/useScrollableSearch.d.ts.map +1 -1
- package/lib/core/hooks/useScrollableSearch.js +15 -2
- package/lib/core/hooks/useScrollableSearch.js.map +1 -1
- package/lib/env/index.d.ts +4 -0
- package/lib/env/index.d.ts.map +1 -1
- package/lib/env/index.js.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.js +3 -8
- package/lib/features/agent/chat/AgentRequestInputOverlay.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.d.ts +8 -1
- package/lib/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js +53 -17
- package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.d.ts +2 -1
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.js +25 -10
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +24 -9
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js +15 -3
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.js +2 -2
- package/lib/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +2 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js +2 -2
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +2 -2
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts +9 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js +97 -2
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js.map +1 -1
- package/lib/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -1
- package/lib/features/agent/chat/hooks/useAgentStream.js +12 -3
- package/lib/features/agent/chat/hooks/useAgentStream.js.map +1 -1
- package/lib/features/agent/chat/index.d.ts +1 -1
- package/lib/features/agent/chat/index.d.ts.map +1 -1
- package/lib/features/agent/chat/index.js.map +1 -1
- package/lib/features/facets/PromptsFacetsNav.d.ts +8 -6
- package/lib/features/facets/PromptsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/PromptsFacetsNav.js +8 -3
- package/lib/features/facets/PromptsFacetsNav.js.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.js +4 -1
- package/lib/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/features/store/objects/components/useContentPanelHooks.d.ts +31 -3
- package/lib/features/store/objects/components/useContentPanelHooks.d.ts.map +1 -1
- package/lib/features/store/objects/search/DocumentSearchContext.d.ts +128 -6
- package/lib/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
- package/lib/features/store/objects/selection/ObjectsActionContext.d.ts +2 -2
- package/lib/features/store/objects/selection/ObjectsActionContext.d.ts.map +1 -1
- package/lib/features/store/objects/selection/ObjectsActionSpec.d.ts +2 -2
- package/lib/features/store/objects/selection/ObjectsActionSpec.d.ts.map +1 -1
- package/lib/features/store/objects/selection/SelectionActions.d.ts +2 -2
- package/lib/features/store/objects/selection/SelectionActions.d.ts.map +1 -1
- package/lib/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.d.ts +2 -2
- package/lib/features/store/types/IntakePolicyEditor.d.ts.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.js +5 -1
- package/lib/features/store/types/IntakePolicyEditor.js.map +1 -1
- package/lib/features/store/types/IntakePolicyForm.d.ts.map +1 -1
- package/lib/features/store/types/IntakePolicyForm.js +2 -2
- package/lib/features/store/types/IntakePolicyForm.js.map +1 -1
- package/lib/features/store/types/ObjectSchemaEditor.d.ts +2 -2
- package/lib/features/store/types/ObjectSchemaEditor.d.ts.map +1 -1
- package/lib/features/store/types/SelectContentType.d.ts +2 -2
- package/lib/features/store/types/SelectContentType.d.ts.map +1 -1
- package/lib/features/store/types/SelectContentType.js.map +1 -1
- package/lib/features/store/types/SelectContentTypeModal.d.ts +2 -2
- package/lib/features/store/types/SelectContentTypeModal.d.ts.map +1 -1
- package/lib/features/store/types/SelectContentTypeModal.js.map +1 -1
- package/lib/features/store/types/TableLayoutEditor.d.ts +2 -2
- package/lib/features/store/types/TableLayoutEditor.d.ts.map +1 -1
- package/lib/features/store/types/TypeRegistry.d.ts +1267 -6
- package/lib/features/store/types/TypeRegistry.d.ts.map +1 -1
- package/lib/features/store/types/TypeRegistry.js +5 -0
- package/lib/features/store/types/TypeRegistry.js.map +1 -1
- package/lib/features/store/types/intake-policy-editor.logic.d.ts +9 -1
- package/lib/features/store/types/intake-policy-editor.logic.d.ts.map +1 -1
- package/lib/features/store/types/intake-policy-editor.logic.js +9 -1
- package/lib/features/store/types/intake-policy-editor.logic.js.map +1 -1
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts +1251 -1
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts.map +1 -1
- package/lib/features/store/types/typeCatalogCache.d.ts +2 -2
- package/lib/features/store/types/typeCatalogCache.d.ts.map +1 -1
- package/lib/features/store/types/typeCatalogCache.js +4 -0
- package/lib/features/store/types/typeCatalogCache.js.map +1 -1
- package/lib/features/user/UserInfo.d.ts +118 -7
- package/lib/features/user/UserInfo.d.ts.map +1 -1
- package/lib/i18n/locales/ar.json +2 -1
- package/lib/i18n/locales/de.json +2 -1
- package/lib/i18n/locales/en.json +5 -1
- package/lib/i18n/locales/es.json +2 -1
- package/lib/i18n/locales/fr.json +2 -1
- package/lib/i18n/locales/it.json +2 -1
- package/lib/i18n/locales/ja.json +2 -1
- package/lib/i18n/locales/ko.json +2 -1
- package/lib/i18n/locales/pt.json +2 -1
- package/lib/i18n/locales/ru.json +2 -1
- package/lib/i18n/locales/tr.json +2 -1
- package/lib/i18n/locales/zh-TW.json +2 -1
- package/lib/i18n/locales/zh.json +2 -1
- package/lib/session/UserSession.d.ts +18 -4
- package/lib/session/UserSession.d.ts.map +1 -1
- package/lib/shell/apps/AppInstallationProvider.d.ts +222 -2
- package/lib/shell/apps/AppInstallationProvider.d.ts.map +1 -1
- package/lib/shell/login/InviteAcceptModal.js.map +1 -1
- package/lib/vertesia-ui-core.js +1 -1
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-features.js +34 -34
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.js +13 -13
- package/lib/vertesia-ui-widgets.js +18 -18
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/lib/widgets/monacoEditor/MonacoEditor.d.ts +7 -1
- package/lib/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
- package/lib/widgets/monacoEditor/MonacoEditor.js +62 -6
- package/lib/widgets/monacoEditor/MonacoEditor.js.map +1 -1
- package/package.json +31 -31
- package/src/core/hooks/useScrollableSearch.test.tsx +139 -0
- package/src/core/hooks/useScrollableSearch.tsx +17 -3
- package/src/env/index.ts +2 -0
- package/src/features/agent/chat/AgentChatPlaybackControls.test.tsx +2 -0
- package/src/features/agent/chat/AgentRequestInputOverlay.test.tsx +51 -6
- package/src/features/agent/chat/AgentRequestInputOverlay.tsx +5 -7
- package/src/features/agent/chat/ModernAgentConversation.test.tsx +195 -3
- package/src/features/agent/chat/ModernAgentConversation.tsx +106 -22
- package/src/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.tsx +75 -20
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +112 -0
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +62 -10
- package/src/features/agent/chat/ModernAgentOutput/AttachmentPreview.tsx +36 -4
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +2 -2
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.test.tsx +71 -0
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +3 -1
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +18 -4
- package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.test.ts +95 -0
- package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.ts +111 -1
- package/src/features/agent/chat/hooks/useAgentStream.test.tsx +57 -0
- package/src/features/agent/chat/hooks/useAgentStream.ts +12 -3
- package/src/features/agent/chat/index.ts +1 -0
- package/src/features/facets/PromptsFacetsNav.tsx +17 -9
- package/src/features/store/objects/components/ContentOverview.tsx +4 -1
- package/src/features/store/objects/selection/ObjectsActionContext.tsx +2 -2
- package/src/features/store/objects/selection/ObjectsActionSpec.ts +2 -2
- package/src/features/store/objects/selection/SelectionActions.tsx +2 -2
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +2 -2
- package/src/features/store/types/IntakePolicyEditor.tsx +12 -4
- package/src/features/store/types/IntakePolicyForm.tsx +25 -0
- package/src/features/store/types/ObjectSchemaEditor.tsx +2 -2
- package/src/features/store/types/SelectContentType.tsx +9 -9
- package/src/features/store/types/SelectContentTypeModal.tsx +5 -5
- package/src/features/store/types/TableLayoutEditor.tsx +2 -2
- package/src/features/store/types/TypeRegistry.ts +8 -3
- package/src/features/store/types/intake-policy-editor.logic.ts +10 -2
- package/src/features/store/types/typeCatalogCache.ts +10 -3
- package/src/i18n/locales/ar.json +2 -1
- package/src/i18n/locales/de.json +2 -1
- package/src/i18n/locales/en.json +5 -1
- package/src/i18n/locales/es.json +2 -1
- package/src/i18n/locales/fr.json +2 -1
- package/src/i18n/locales/it.json +2 -1
- package/src/i18n/locales/ja.json +2 -1
- package/src/i18n/locales/ko.json +2 -1
- package/src/i18n/locales/pt.json +2 -1
- package/src/i18n/locales/ru.json +2 -1
- package/src/i18n/locales/tr.json +2 -1
- package/src/i18n/locales/zh-TW.json +2 -1
- package/src/i18n/locales/zh.json +2 -1
- package/src/shell/login/InviteAcceptModal.tsx +4 -4
- package/src/widgets/markdown/ArtifactEditingSurface.test.tsx +13 -9
- package/src/widgets/monacoEditor/MonacoEditor.tsx +83 -7
|
@@ -40,6 +40,39 @@ export interface IEditorApi {
|
|
|
40
40
|
setValue(value?: string): void;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Registry of JSON schemas keyed by model path. Monaco's JSON language service is configured
|
|
45
|
+
* globally (per language, not per editor), so every mounted editor's schema must be re-applied
|
|
46
|
+
* together — each entry is scoped to its own model via `fileMatch`, so editors never see each
|
|
47
|
+
* other's schema.
|
|
48
|
+
*/
|
|
49
|
+
const jsonSchemaRegistry = new Map<string, object>();
|
|
50
|
+
let jsonSchemaModelCounter = 0;
|
|
51
|
+
|
|
52
|
+
/** The JSON language defaults API — present at runtime once monaco's JSON contribution is
|
|
53
|
+
* loaded, but typed as a deprecated stub in the bundled monaco-editor typings. */
|
|
54
|
+
interface JsonLanguageDefaults {
|
|
55
|
+
setDiagnosticsOptions(options: {
|
|
56
|
+
validate?: boolean;
|
|
57
|
+
enableSchemaRequest?: boolean;
|
|
58
|
+
schemas?: { uri: string; fileMatch?: string[]; schema?: object }[];
|
|
59
|
+
}): void;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function applyJsonSchemas(monacoInstance: typeof import('monaco-editor')) {
|
|
63
|
+
const jsonDefaults = (monacoInstance.languages as unknown as { json?: { jsonDefaults?: JsonLanguageDefaults } })
|
|
64
|
+
.json?.jsonDefaults;
|
|
65
|
+
jsonDefaults?.setDiagnosticsOptions({
|
|
66
|
+
validate: true,
|
|
67
|
+
enableSchemaRequest: false,
|
|
68
|
+
schemas: Array.from(jsonSchemaRegistry.entries()).map(([modelPath, schema]) => ({
|
|
69
|
+
uri: `vertesia://schemas/${encodeURIComponent(modelPath)}`,
|
|
70
|
+
fileMatch: [modelPath],
|
|
71
|
+
schema,
|
|
72
|
+
})),
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
43
76
|
// Define Monaco ViewUpdate interface
|
|
44
77
|
export interface ViewUpdate {
|
|
45
78
|
docChanged: boolean;
|
|
@@ -80,6 +113,12 @@ interface MonacoEditorProps {
|
|
|
80
113
|
onMount?: (editor: monaco.editor.IStandaloneCodeEditor, monaco: typeof import('monaco-editor')) => void;
|
|
81
114
|
defaultValue?: string;
|
|
82
115
|
useCustomFolding?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* JSON Schema applied to this editor's content (language must be 'json'). Drives
|
|
118
|
+
* completion, hover documentation, and validation squiggles. Scoped to this editor
|
|
119
|
+
* instance only — other JSON editors keep their own (or no) schema.
|
|
120
|
+
*/
|
|
121
|
+
jsonSchema?: object;
|
|
83
122
|
}
|
|
84
123
|
|
|
85
124
|
export function MonacoEditor({
|
|
@@ -95,10 +134,17 @@ export function MonacoEditor({
|
|
|
95
134
|
onMount,
|
|
96
135
|
defaultValue,
|
|
97
136
|
useCustomFolding = false,
|
|
137
|
+
jsonSchema,
|
|
98
138
|
}: MonacoEditorProps) {
|
|
99
139
|
const [editorValue, setEditorValue] = useState(value || defaultValue || '');
|
|
100
140
|
const editorInstanceRef = useRef<monaco.editor.IStandaloneCodeEditor | null>(null);
|
|
101
141
|
const monacoInstanceRef = useRef<typeof import('monaco-editor') | null>(null);
|
|
142
|
+
// Stable per-instance model path: required to scope a jsonSchema to THIS editor's model.
|
|
143
|
+
// Callers may pass an explicit `path`; otherwise one is generated when a schema is set.
|
|
144
|
+
const [generatedPath] = useState(() =>
|
|
145
|
+
jsonSchema ? `inmemory://vertesia/json/${++jsonSchemaModelCounter}.json` : undefined,
|
|
146
|
+
);
|
|
147
|
+
const modelPath = path ?? generatedPath;
|
|
102
148
|
const { theme } = useTheme();
|
|
103
149
|
const resolvedTheme =
|
|
104
150
|
theme === 'system' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme;
|
|
@@ -182,6 +228,11 @@ export function MonacoEditor({
|
|
|
182
228
|
editorInstanceRef.current = editor;
|
|
183
229
|
monacoInstanceRef.current = monacoInstance;
|
|
184
230
|
|
|
231
|
+
if (jsonSchema && modelPath && language === 'json') {
|
|
232
|
+
jsonSchemaRegistry.set(modelPath, jsonSchema);
|
|
233
|
+
applyJsonSchemas(monacoInstance);
|
|
234
|
+
}
|
|
235
|
+
|
|
185
236
|
if (useCustomFolding) {
|
|
186
237
|
registerCustomFoldingProviders(monacoInstance);
|
|
187
238
|
}
|
|
@@ -212,11 +263,29 @@ export function MonacoEditor({
|
|
|
212
263
|
// Call custom onMount if provided
|
|
213
264
|
onMount?.(editor, monacoInstance);
|
|
214
265
|
},
|
|
215
|
-
[onMount, resolvedTheme, useCustomFolding, foldAllCodeBlocks],
|
|
266
|
+
[onMount, resolvedTheme, useCustomFolding, foldAllCodeBlocks, jsonSchema, modelPath, language],
|
|
216
267
|
);
|
|
217
268
|
|
|
218
|
-
//
|
|
269
|
+
// Unregister this editor's schema on unmount so the global JSON diagnostics config
|
|
270
|
+
// doesn't accumulate schemas for dead models.
|
|
271
|
+
useEffect(() => {
|
|
272
|
+
return () => {
|
|
273
|
+
if (jsonSchema && modelPath && jsonSchemaRegistry.delete(modelPath) && monacoInstanceRef.current) {
|
|
274
|
+
applyJsonSchemas(monacoInstanceRef.current);
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
}, [jsonSchema, modelPath]);
|
|
278
|
+
|
|
279
|
+
// Apply external `value`/`defaultValue` changes to the model — but NEVER while the user is
|
|
280
|
+
// actively typing. If the editor has focus, an incoming value is almost always a stale echo of
|
|
281
|
+
// this editor's own (possibly debounced or reformatted) onChange output flowing back in through
|
|
282
|
+
// a controlled `value` prop. Re-applying it would jump the caret and drop the characters typed
|
|
283
|
+
// during the round-trip. We skip while focused; genuine external updates land once the editor is
|
|
284
|
+
// blurred. Explicit programmatic updates go through the editor ref (`setValue`) and are exempt.
|
|
219
285
|
useEffect(() => {
|
|
286
|
+
if (editorInstanceRef.current?.hasTextFocus()) {
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
220
289
|
setEditorValue((currentValue) => {
|
|
221
290
|
if (effectiveValue === currentValue) {
|
|
222
291
|
return currentValue;
|
|
@@ -228,9 +297,11 @@ export function MonacoEditor({
|
|
|
228
297
|
});
|
|
229
298
|
}, [effectiveValue]);
|
|
230
299
|
|
|
231
|
-
// Re-fold code blocks when value
|
|
300
|
+
// Re-fold code blocks when the value changes externally — same focus guard, so folding never
|
|
301
|
+
// moves the selection out from under an actively typing user.
|
|
232
302
|
useEffect(() => {
|
|
233
303
|
if (!effectiveValue || !useCustomFolding || !editorInstanceRef.current || !monacoInstanceRef.current) return;
|
|
304
|
+
if (editorInstanceRef.current.hasTextFocus()) return;
|
|
234
305
|
const editor = editorInstanceRef.current;
|
|
235
306
|
const monacoInstance = monacoInstanceRef.current;
|
|
236
307
|
const timer = setTimeout(() => foldAllCodeBlocks(editor, monacoInstance), 300);
|
|
@@ -259,7 +330,7 @@ export function MonacoEditor({
|
|
|
259
330
|
renderValidationDecorations: 'on', // Show error squiggles
|
|
260
331
|
renderLineHighlight: 'line', // Highlight entire line for errors
|
|
261
332
|
hover: {
|
|
262
|
-
enabled:
|
|
333
|
+
enabled: 'on',
|
|
263
334
|
delay: 100,
|
|
264
335
|
}, // Enable hover for error messages
|
|
265
336
|
quickSuggestions: {
|
|
@@ -277,13 +348,18 @@ export function MonacoEditor({
|
|
|
277
348
|
height="100%"
|
|
278
349
|
theme={resolvedTheme === 'dark' ? 'vs-dark' : 'light'}
|
|
279
350
|
language={language}
|
|
280
|
-
path={
|
|
281
|
-
value={editorValue}
|
|
351
|
+
path={modelPath}
|
|
282
352
|
onChange={handleEditorChange}
|
|
283
353
|
onMount={handleEditorDidMount}
|
|
284
354
|
beforeMount={beforeMount}
|
|
285
355
|
options={defaultOptions}
|
|
286
|
-
defaultValue
|
|
356
|
+
// Uncontrolled: seed the initial content once via `defaultValue` and never bind a
|
|
357
|
+
// reactive `value`. @monaco-editor/react re-applies a changed `value` prop through
|
|
358
|
+
// `executeEdits(..., forceMoveMarkers: true)` whenever it differs from the live
|
|
359
|
+
// model, snapping the caret to the END of the content — the cursor jump we are
|
|
360
|
+
// eliminating whenever a caller feeds its own onChange output back into `value`.
|
|
361
|
+
// All external updates instead flow through the focus-guarded sync effect above.
|
|
362
|
+
defaultValue={effectiveValue}
|
|
287
363
|
/>
|
|
288
364
|
</div>
|
|
289
365
|
);
|