@finos/legend-lego 2.0.196 → 2.0.198

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 (71) hide show
  1. package/lib/code-editor/CodeEditor.d.ts.map +1 -1
  2. package/lib/code-editor/CodeEditor.js +14 -1
  3. package/lib/code-editor/CodeEditor.js.map +1 -1
  4. package/lib/index.css +2 -2
  5. package/lib/index.css.map +1 -1
  6. package/lib/legend-ai/LegendAIDocEnrichment.d.ts +60 -0
  7. package/lib/legend-ai/LegendAIDocEnrichment.d.ts.map +1 -0
  8. package/lib/legend-ai/LegendAIDocEnrichment.js +429 -0
  9. package/lib/legend-ai/LegendAIDocEnrichment.js.map +1 -0
  10. package/lib/legend-ai/LegendAITypes.d.ts +127 -1
  11. package/lib/legend-ai/LegendAITypes.d.ts.map +1 -1
  12. package/lib/legend-ai/LegendAITypes.js +111 -2
  13. package/lib/legend-ai/LegendAITypes.js.map +1 -1
  14. package/lib/legend-ai/LegendAI_LegendApplicationPlugin_Extension.d.ts +14 -1
  15. package/lib/legend-ai/LegendAI_LegendApplicationPlugin_Extension.d.ts.map +1 -1
  16. package/lib/legend-ai/LegendAI_LegendApplicationPlugin_Extension.js.map +1 -1
  17. package/lib/legend-ai/__test-utils__/LegendAITestUtils.d.ts +2 -1
  18. package/lib/legend-ai/__test-utils__/LegendAITestUtils.d.ts.map +1 -1
  19. package/lib/legend-ai/__test-utils__/LegendAITestUtils.js +37 -2
  20. package/lib/legend-ai/__test-utils__/LegendAITestUtils.js.map +1 -1
  21. package/lib/legend-ai/components/LegendAIAnalysisPanel.d.ts.map +1 -1
  22. package/lib/legend-ai/components/LegendAIAnalysisPanel.js +11 -12
  23. package/lib/legend-ai/components/LegendAIAnalysisPanel.js.map +1 -1
  24. package/lib/legend-ai/components/LegendAIAnalysisUtils.d.ts +7 -0
  25. package/lib/legend-ai/components/LegendAIAnalysisUtils.d.ts.map +1 -1
  26. package/lib/legend-ai/components/LegendAIAnalysisUtils.js +106 -41
  27. package/lib/legend-ai/components/LegendAIAnalysisUtils.js.map +1 -1
  28. package/lib/legend-ai/components/LegendAIChat.d.ts +1 -5
  29. package/lib/legend-ai/components/LegendAIChat.d.ts.map +1 -1
  30. package/lib/legend-ai/components/LegendAIChat.js +168 -109
  31. package/lib/legend-ai/components/LegendAIChat.js.map +1 -1
  32. package/lib/legend-ai/components/LegendAIChatHelpers.d.ts +21 -0
  33. package/lib/legend-ai/components/LegendAIChatHelpers.d.ts.map +1 -0
  34. package/lib/legend-ai/components/LegendAIChatHelpers.js +85 -0
  35. package/lib/legend-ai/components/LegendAIChatHelpers.js.map +1 -0
  36. package/lib/legend-ai/components/LegendAIChatInput.d.ts +21 -0
  37. package/lib/legend-ai/components/LegendAIChatInput.d.ts.map +1 -0
  38. package/lib/legend-ai/components/LegendAIChatInput.js +78 -0
  39. package/lib/legend-ai/components/LegendAIChatInput.js.map +1 -0
  40. package/lib/legend-ai/components/LegendAIScopeSelector.d.ts +25 -0
  41. package/lib/legend-ai/components/LegendAIScopeSelector.d.ts.map +1 -0
  42. package/lib/legend-ai/components/LegendAIScopeSelector.js +85 -0
  43. package/lib/legend-ai/components/LegendAIScopeSelector.js.map +1 -0
  44. package/lib/legend-ai/index.d.ts +8 -3
  45. package/lib/legend-ai/index.d.ts.map +1 -1
  46. package/lib/legend-ai/index.js +8 -3
  47. package/lib/legend-ai/index.js.map +1 -1
  48. package/lib/legend-ai/stores/LegendAIChatProcessors.d.ts +105 -0
  49. package/lib/legend-ai/stores/LegendAIChatProcessors.d.ts.map +1 -0
  50. package/lib/legend-ai/stores/LegendAIChatProcessors.js +1482 -0
  51. package/lib/legend-ai/stores/LegendAIChatProcessors.js.map +1 -0
  52. package/lib/legend-ai/stores/LegendAIChatState.d.ts +2 -35
  53. package/lib/legend-ai/stores/LegendAIChatState.d.ts.map +1 -1
  54. package/lib/legend-ai/stores/LegendAIChatState.js +114 -949
  55. package/lib/legend-ai/stores/LegendAIChatState.js.map +1 -1
  56. package/package.json +5 -5
  57. package/src/code-editor/CodeEditor.tsx +19 -0
  58. package/src/legend-ai/LegendAIDocEnrichment.ts +572 -0
  59. package/src/legend-ai/LegendAITypes.ts +213 -5
  60. package/src/legend-ai/LegendAI_LegendApplicationPlugin_Extension.ts +25 -0
  61. package/src/legend-ai/__test-utils__/LegendAITestUtils.ts +55 -1
  62. package/src/legend-ai/components/LegendAIAnalysisPanel.tsx +14 -34
  63. package/src/legend-ai/components/LegendAIAnalysisUtils.ts +157 -47
  64. package/src/legend-ai/components/LegendAIChat.tsx +389 -206
  65. package/src/legend-ai/components/LegendAIChatHelpers.ts +117 -0
  66. package/src/legend-ai/components/LegendAIChatInput.tsx +209 -0
  67. package/src/legend-ai/components/LegendAIScopeSelector.tsx +199 -0
  68. package/src/legend-ai/index.ts +31 -4
  69. package/src/legend-ai/stores/LegendAIChatProcessors.ts +2563 -0
  70. package/src/legend-ai/stores/LegendAIChatState.ts +161 -1697
  71. package/tsconfig.json +5 -0
@@ -0,0 +1,78 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright (c) 2026-present, Goldman Sachs
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { useRef, useLayoutEffect, useEffect, useState, useMemo } from 'react';
18
+ import { SendIcon, LoadingIcon, SquareIcon, SparkleStarsIcon, CheckIcon, clsx, } from '@finos/legend-art';
19
+ import { LegendAIScopeSelector } from './LegendAIScopeSelector.js';
20
+ const MAX_TEXTAREA_HEIGHT = 160;
21
+ export const LegendAIChatInput = (props) => {
22
+ const { state, scopes } = props;
23
+ const textareaRef = useRef(null);
24
+ const modelDropdownRef = useRef(null);
25
+ const [isModelDropdownOpen, setIsModelDropdownOpen] = useState(false);
26
+ const modelLabel = useMemo(() => {
27
+ const modelName = state.selectedModelName ?? 'Auto';
28
+ return modelName.length > 18 ? `${modelName.slice(0, 17)}...` : modelName;
29
+ }, [state.selectedModelName]);
30
+ const effectiveModelName = state.selectedModelName ?? state.availableModelNames[0];
31
+ useEffect(() => {
32
+ if (!isModelDropdownOpen) {
33
+ return undefined;
34
+ }
35
+ const handleClickOutside = (event) => {
36
+ if (modelDropdownRef.current &&
37
+ !modelDropdownRef.current.contains(event.target)) {
38
+ setIsModelDropdownOpen(false);
39
+ }
40
+ };
41
+ const handleEscape = (event) => {
42
+ if (event.key === 'Escape') {
43
+ setIsModelDropdownOpen(false);
44
+ }
45
+ };
46
+ document.addEventListener('mousedown', handleClickOutside);
47
+ document.addEventListener('keydown', handleEscape);
48
+ return () => {
49
+ document.removeEventListener('mousedown', handleClickOutside);
50
+ document.removeEventListener('keydown', handleEscape);
51
+ };
52
+ }, [isModelDropdownOpen]);
53
+ useLayoutEffect(() => {
54
+ const el = textareaRef.current;
55
+ if (el) {
56
+ el.style.height = 'auto';
57
+ const nextHeight = Math.min(el.scrollHeight, MAX_TEXTAREA_HEIGHT);
58
+ el.style.height = `${nextHeight}px`;
59
+ }
60
+ }, [state.questionText]);
61
+ return (_jsx("div", { className: "legend-ai__input-area", children: _jsxs("div", { className: "legend-ai__question-wrapper", children: [state.selectedScopes.length > 0 && (_jsx(LegendAIScopeSelector, { scopes: scopes, selectedScopes: state.selectedScopes, onToggleScope: state.toggleScope, onRemoveScope: state.removeScope, hideSelector: true })), _jsx("div", { className: "legend-ai__input-top", children: _jsx("textarea", { ref: textareaRef, className: "legend-ai__question", placeholder: "Ask anything about your data...", rows: 1, spellCheck: false, value: state.questionText, onChange: (e) => state.setQuestionText(e.target.value), onKeyDown: (e) => {
62
+ if (e.key === 'Enter' && !e.shiftKey) {
63
+ e.preventDefault();
64
+ if (!state.isSending && state.questionText.trim()) {
65
+ state.askQuestion();
66
+ }
67
+ }
68
+ } }) }), _jsxs("div", { className: "legend-ai__input-bottom", children: [_jsxs("div", { className: "legend-ai__input-bottom-left", children: [_jsx(LegendAIScopeSelector, { scopes: scopes, selectedScopes: state.selectedScopes, onToggleScope: state.toggleScope, onRemoveScope: state.removeScope, hidePills: true }), state.availableModelNames.length > 0 && (_jsxs("div", { className: "legend-ai__model-selector", ref: modelDropdownRef, children: [_jsxs("button", { type: "button", className: "legend-ai__model-btn", title: "Select model", "aria-label": "Select model", "aria-haspopup": "true", "aria-expanded": isModelDropdownOpen, onClick: () => setIsModelDropdownOpen((current) => !current), children: [_jsx("span", { className: "legend-ai__model-btn-icon", children: _jsx(SparkleStarsIcon, {}) }), _jsx("span", { className: "legend-ai__model-btn-label", children: modelLabel })] }), isModelDropdownOpen && (_jsx("div", { className: "legend-ai__model-dropdown", children: state.availableModelNames.map((modelName) => {
69
+ const isSelected = modelName === effectiveModelName;
70
+ return (_jsxs("button", { type: "button", "aria-pressed": isSelected, className: clsx('legend-ai__model-dropdown-item', {
71
+ 'legend-ai__model-dropdown-item--selected': isSelected,
72
+ }), onClick: () => {
73
+ state.setSelectedModelName(modelName);
74
+ setIsModelDropdownOpen(false);
75
+ }, children: [_jsx("span", { className: "legend-ai__model-dropdown-item-label", children: modelName }), _jsx("span", { className: "legend-ai__model-dropdown-item-check", children: isSelected ? _jsx(CheckIcon, {}) : null })] }, modelName));
76
+ }) }))] }))] }), _jsxs("div", { className: "legend-ai__input-bottom-right", children: [state.isSending && (_jsx("button", { type: "button", title: "Stop generation", "aria-label": "Stop generation", className: "legend-ai__stop-btn", onClick: () => state.stopGeneration(), children: _jsx(SquareIcon, {}) })), _jsx("button", { type: "button", title: "Send", "aria-label": "Send", className: "legend-ai__send-btn", disabled: state.isSending || !state.questionText.trim(), onClick: () => state.askQuestion(), children: state.isSending ? (_jsx(LoadingIcon, { isLoading: true })) : (_jsx(SendIcon, {})) })] })] })] }) }));
77
+ };
78
+ //# sourceMappingURL=LegendAIChatInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendAIChatInput.js","sourceRoot":"","sources":["../../../src/legend-ai/components/LegendAIChatInput.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EACL,QAAQ,EACR,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,SAAS,EACT,IAAI,GACL,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAGjC,EAAmB,EAAE;IACpB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAChC,MAAM,WAAW,GAAG,MAAM,CAAsB,IAAI,CAAC,CAAC;IACtD,MAAM,gBAAgB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IACtD,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEtE,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE;QAC9B,MAAM,SAAS,GAAG,KAAK,CAAC,iBAAiB,IAAI,MAAM,CAAC;QACpD,OAAO,SAAS,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5E,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAE9B,MAAM,kBAAkB,GACtB,KAAK,CAAC,iB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,+BAA+B,aAC3C,KAAK,CAAC,SAAS,IAAI,CAClB,iBACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,iBAAiB,gBACZ,iBAAiB,EAC5B,SAAS,EAAC,qBAAqB,EAC/B,OAAO,EAAE,GAAS,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,YAE3C,KAAC,UAAU,KAAG,GACP,CACV,EACD,iBACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,MAAM,gBACD,MAAM,EACjB,SAAS,EAAC,qBAAqB,EAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,EACvD,OAAO,EAAE,GAAS,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,YAEvC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CACjB,KAAC,WAAW,IAAC,SAAS,EAAE,IAAI,GAAI,CACjC,CAAC,CAAC,CAAC,CACF,KAAC,QAAQ,KAAG,CACb,GACM,IACL,IACF,IACF,GACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright (c) 2026-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { LegendAIScopeItem } from '../LegendAITypes.js';
17
+ export declare const LegendAIScopeSelector: (props: {
18
+ scopes: LegendAIScopeItem[];
19
+ selectedScopes: LegendAIScopeItem[];
20
+ onToggleScope: (scope: LegendAIScopeItem) => void;
21
+ onRemoveScope: (scopeId: string) => void;
22
+ hidePills?: boolean;
23
+ hideSelector?: boolean;
24
+ }) => React.ReactNode;
25
+ //# sourceMappingURL=LegendAIScopeSelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendAIScopeSelector.d.ts","sourceRoot":"","sources":["../../../src/legend-ai/components/LegendAIScopeSelector.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,eAAO,MAAM,qBAAqB,GAAI,OAAO;IAC3C,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,cAAc,EAAE,iBAAiB,EAAE,CAAC;IACpC,aAAa,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAClD,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,KAAG,KAAK,CAAC,SAsKT,CAAC"}
@@ -0,0 +1,85 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright (c) 2026-present, Goldman Sachs
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
18
+ import { PlusCircleIcon, SearchIcon, CheckIcon, TimesIcon, } from '@finos/legend-art';
19
+ export const LegendAIScopeSelector = (props) => {
20
+ const { scopes, selectedScopes, onToggleScope, onRemoveScope, hidePills, hideSelector, } = props;
21
+ const [dropdownOpen, setDropdownOpen] = useState(false);
22
+ const [searchText, setSearchText] = useState('');
23
+ const dropdownRef = useRef(null);
24
+ const btnRef = useRef(null);
25
+ const searchRef = useRef(null);
26
+ const filteredScopes = useMemo(() => searchText.trim()
27
+ ? scopes.filter((s) => s.label.toLowerCase().includes(searchText.toLowerCase()) ||
28
+ s.description?.toLowerCase().includes(searchText.toLowerCase()))
29
+ : scopes, [scopes, searchText]);
30
+ const closeDropdown = useCallback(() => {
31
+ setDropdownOpen(false);
32
+ setSearchText('');
33
+ btnRef.current?.focus();
34
+ }, []);
35
+ useEffect(() => {
36
+ if (!dropdownOpen) {
37
+ return undefined;
38
+ }
39
+ const handleClickOutside = (e) => {
40
+ if (dropdownRef.current &&
41
+ !dropdownRef.current.contains(e.target)) {
42
+ setDropdownOpen(false);
43
+ setSearchText('');
44
+ }
45
+ };
46
+ const handleEscape = (e) => {
47
+ if (e.key === 'Escape') {
48
+ closeDropdown();
49
+ }
50
+ };
51
+ document.addEventListener('mousedown', handleClickOutside);
52
+ document.addEventListener('keydown', handleEscape);
53
+ return () => {
54
+ document.removeEventListener('mousedown', handleClickOutside);
55
+ document.removeEventListener('keydown', handleEscape);
56
+ };
57
+ }, [dropdownOpen, closeDropdown]);
58
+ useEffect(() => {
59
+ if (dropdownOpen) {
60
+ requestAnimationFrame(() => searchRef.current?.focus());
61
+ }
62
+ }, [dropdownOpen]);
63
+ return (_jsxs(_Fragment, { children: [!hidePills && selectedScopes.length > 0 && (_jsx("div", { className: "legend-ai__scope-pills", children: selectedScopes.map((scope) => (_jsxs("span", { className: "legend-ai__scope-pill", children: [_jsx("span", { className: "legend-ai__scope-pill-label", children: scope.label }), _jsx("button", { type: "button", className: "legend-ai__scope-pill-remove", "aria-label": `Remove ${scope.label}`, onClick: () => onRemoveScope(scope.id), children: _jsx(TimesIcon, {}) })] }, scope.id))) })), !hideSelector && (_jsxs("div", { className: "legend-ai__scope-selector", ref: dropdownRef, children: [_jsx("button", { ref: btnRef, type: "button", className: "legend-ai__scope-btn", title: "Add scope", "aria-label": "Add scope", "aria-haspopup": "true", "aria-expanded": dropdownOpen, onClick: () => {
64
+ if (dropdownOpen) {
65
+ closeDropdown();
66
+ }
67
+ else {
68
+ setDropdownOpen(true);
69
+ setSearchText('');
70
+ }
71
+ }, children: _jsx(PlusCircleIcon, {}) }), dropdownOpen && (_jsxs("div", { className: "legend-ai__scope-dropdown", "aria-multiselectable": "true", children: [_jsxs("div", { className: "legend-ai__scope-dropdown-search", children: [_jsx(SearchIcon, {}), _jsx("input", { ref: searchRef, type: "text", className: "legend-ai__scope-dropdown-search-input", placeholder: "Search scopes...", value: searchText, onChange: (e) => setSearchText(e.target.value), onKeyDown: (e) => {
72
+ if (e.key === 'Escape') {
73
+ e.stopPropagation();
74
+ closeDropdown();
75
+ }
76
+ } })] }), _jsx("div", { className: "legend-ai__scope-dropdown-list", children: filteredScopes.length === 0 ? (_jsx("div", { className: "legend-ai__scope-dropdown-empty", children: "No matching scopes" })) : (filteredScopes.map((scope) => {
77
+ const isSelected = selectedScopes.some((s) => s.id === scope.id);
78
+ return (_jsxs("button", { type: "button", "aria-pressed": isSelected, className: `legend-ai__scope-dropdown-item${isSelected ? 'legend-ai__scope-dropdown-item--selected' : ''}`, onClick: () => {
79
+ onToggleScope(scope);
80
+ setDropdownOpen(false);
81
+ setSearchText('');
82
+ }, children: [_jsx("span", { className: "legend-ai__scope-dropdown-item-check", children: isSelected && _jsx(CheckIcon, {}) }), _jsx("span", { className: "legend-ai__scope-dropdown-item-label", children: scope.label })] }, scope.id));
83
+ })) })] }))] }))] }));
84
+ };
85
+ //# sourceMappingURL=LegendAIScopeSelector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendAIScopeSelector.js","sourceRoot":"","sources":["../../../src/legend-ai/components/LegendAIScopeSelector.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EA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,CAAC,CAAC,EAAQ,EAAE;4CACrB,IAAI,CAAC,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;gDACvB,CAAC,CAAC,eAAe,EAAE,CAAC;gDACpB,aAAa,EAAE,CAAC;4CAClB,CAAC;wCACH,CAAC,GACD,IACE,EACN,cAAK,SAAS,EAAC,gCAAgC,YAC5C,cAAc,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAC7B,cAAK,SAAS,EAAC,iCAAiC,mCAE1C,CACP,CAAC,CAAC,CAAC,CACF,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;oCAC3B,MAAM,UAAU,GAAG,cAAc,CAAC,IAAI,CACpC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,CACzB,CAAC;oCACF,OAAO,CACL,kBAEE,IAAI,EAAC,QAAQ,kBACC,UAAU,EACxB,SAAS,EAAE,iCAAiC,UAAU,CAAC,CAAC,CAAC,0CAA0C,CAAC,CAAC,CAAC,EAAE,EAAE,EAC1G,OAAO,EAAE,GAAS,EAAE;4CAClB,aAAa,CAAC,KAAK,CAAC,CAAC;4CACrB,eAAe,CAAC,KAAK,CAAC,CAAC;4CACvB,aAAa,CAAC,EAAE,CAAC,CAAC;wCACpB,CAAC,aAED,eAAM,SAAS,EAAC,sCAAsC,YACnD,UAAU,IAAI,KAAC,SAAS,KAAG,GACvB,EACP,eAAM,SAAS,EAAC,sCAAsC,YACnD,KAAK,CAAC,KAAK,GACP,KAfF,KAAK,CAAC,EAAE,CAgBN,CACV,CAAC;gCACJ,CAAC,CAAC,CACH,GACG,IACF,CACP,IACG,CACP,IACA,CACJ,CAAC;AACJ,CAAC,CAAC"}
@@ -15,11 +15,16 @@
15
15
  */
16
16
  export * from './LegendAITypes.js';
17
17
  export * from './LegendAI_LegendApplicationPlugin_Extension.js';
18
- export { LegendAIChat, LEGEND_AI_ANCHOR_ID, isStringColumn, isNumericColumn, isDateColumn, buildSuggestedQueries, renderStepStatusIcon, } from './components/LegendAIChat.js';
18
+ export { LegendAIChat, LEGEND_AI_ANCHOR_ID, renderStepStatusIcon, } from './components/LegendAIChat.js';
19
+ export { isStringColumn, isNumericColumn, isDateColumn, buildSuggestedQueries, } from './components/LegendAIChatHelpers.js';
20
+ export { LegendAIScopeSelector } from './components/LegendAIScopeSelector.js';
21
+ export { LegendAIChatInput } from './components/LegendAIChatInput.js';
19
22
  export { LegendAIErrorBoundary } from './components/LegendAIErrorBoundary.js';
20
- export { useLegendAIChatState, updateLastAssistant, addThinkingStep, completeThinkingSteps, finishWithThinkingError, classifyError, buildConversationHistory, buildGenerationFailureMessage, buildExecutionErrorMessage, generateAndJudgeSql, executeSqlAndReport, executePureQueryAndReport, processQuestionViaOrchestrator, processQuestion, processQuestionWithIntent, handleMetadataQuestion, elapsedSeconds, createMessagePair, analyzeOrchestratorResults, type MessageSetter, type LegendAIOperationContext, } from './stores/LegendAIChatState.js';
23
+ export { useLegendAIChatState } from './stores/LegendAIChatState.js';
24
+ export { updateLastAssistant, addThinkingStep, completeThinkingSteps, finishWithThinkingError, classifyError, buildConversationHistory, buildGenerationFailureMessage, buildExecutionErrorMessage, generateAndJudgeSql, generateAndJudgeAccessPointSql, executeSqlAndReport, executePureQueryAndReport, processQuestionViaOrchestrator, processQuestion, processQuestionWithIntent, handleMetadataQuestion, buildMetadataOverview, attachMetadataOverview, elapsedSeconds, createMessagePair, analyzeOrchestratorResults, cleanLlmSqlResponse, isValidSqlCorrection, sanitizeJoinOrderBy, sanitizeLiteralColumns, stripGuessedNonDateServiceParams, ensureDateParameters, detectMissingServiceParams, buildMissingParamsWarning, ensureSafeLimit, preFilterServicesByRelevance, type MessageSetter, type LegendAIOperationContext, type MissingParamInfo, } from './stores/LegendAIChatProcessors.js';
21
25
  export { LegendAIResultGrid } from './components/LegendAIResultGrid.js';
22
26
  export { LegendAIAnalysisPanel } from './components/LegendAIAnalysisPanel.js';
23
27
  export { LegendAIBarChart, LegendAIDonutChart, } from './components/LegendAICharts.js';
24
- export { computeKeyMetrics, computeChartData, inferChartType, computeTopItems, findNumericColumnName, } from './components/LegendAIAnalysisUtils.js';
28
+ export { type LegendAIGridAnalysis, computeKeyMetrics, computeChartData, inferChartType, computeTopItems, findNumericColumnName, analyzeGridData, } from './components/LegendAIAnalysisUtils.js';
29
+ export { buildPropertyDocIndex, enrichColumnsFromElementDocs, inferServiceRelationshipsFromAssociations, extractLambdaPreFilters, formatPreFiltersForContext, } from './LegendAIDocEnrichment.js';
25
30
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/legend-ai/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,oBAAoB,CAAC;AACnC,cAAc,iDAAiD,CAAC;AAChE,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,EACb,wBAAwB,EACxB,6BAA6B,EAC7B,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,8BAA8B,EAC9B,eAAe,EACf,yBAAyB,EACzB,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,0BAA0B,EAC1B,KAAK,aAAa,EAClB,KAAK,wBAAwB,GAC9B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,qBAAqB,GACtB,MAAM,uCAAuC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/legend-ai/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,oBAAoB,CAAC;AACnC,cAAc,iDAAiD,CAAC;AAChE,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,cAAc,EACd,eAAe,EACf,YAAY,EACZ,qBAAqB,GACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,EACb,wBAAwB,EACxB,6BAA6B,EAC7B,0BAA0B,EAC1B,mBAAmB,EACnB,8BAA8B,EAC9B,mBAAmB,EACnB,yBAAyB,EACzB,8BAA8B,EAC9B,eAAe,EACf,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,gCAAgC,EAChC,oBAAoB,EACpB,0BAA0B,EAC1B,yBAAyB,EACzB,eAAe,EACf,4BAA4B,EAC5B,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,GACtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,KAAK,oBAAoB,EACzB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,eAAe,GAChB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,yCAAyC,EACzC,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,4BAA4B,CAAC"}
@@ -15,11 +15,16 @@
15
15
  */
16
16
  export * from './LegendAITypes.js';
17
17
  export * from './LegendAI_LegendApplicationPlugin_Extension.js';
18
- export { LegendAIChat, LEGEND_AI_ANCHOR_ID, isStringColumn, isNumericColumn, isDateColumn, buildSuggestedQueries, renderStepStatusIcon, } from './components/LegendAIChat.js';
18
+ export { LegendAIChat, LEGEND_AI_ANCHOR_ID, renderStepStatusIcon, } from './components/LegendAIChat.js';
19
+ export { isStringColumn, isNumericColumn, isDateColumn, buildSuggestedQueries, } from './components/LegendAIChatHelpers.js';
20
+ export { LegendAIScopeSelector } from './components/LegendAIScopeSelector.js';
21
+ export { LegendAIChatInput } from './components/LegendAIChatInput.js';
19
22
  export { LegendAIErrorBoundary } from './components/LegendAIErrorBoundary.js';
20
- export { useLegendAIChatState, updateLastAssistant, addThinkingStep, completeThinkingSteps, finishWithThinkingError, classifyError, buildConversationHistory, buildGenerationFailureMessage, buildExecutionErrorMessage, generateAndJudgeSql, executeSqlAndReport, executePureQueryAndReport, processQuestionViaOrchestrator, processQuestion, processQuestionWithIntent, handleMetadataQuestion, elapsedSeconds, createMessagePair, analyzeOrchestratorResults, } from './stores/LegendAIChatState.js';
23
+ export { useLegendAIChatState } from './stores/LegendAIChatState.js';
24
+ export { updateLastAssistant, addThinkingStep, completeThinkingSteps, finishWithThinkingError, classifyError, buildConversationHistory, buildGenerationFailureMessage, buildExecutionErrorMessage, generateAndJudgeSql, generateAndJudgeAccessPointSql, executeSqlAndReport, executePureQueryAndReport, processQuestionViaOrchestrator, processQuestion, processQuestionWithIntent, handleMetadataQuestion, buildMetadataOverview, attachMetadataOverview, elapsedSeconds, createMessagePair, analyzeOrchestratorResults, cleanLlmSqlResponse, isValidSqlCorrection, sanitizeJoinOrderBy, sanitizeLiteralColumns, stripGuessedNonDateServiceParams, ensureDateParameters, detectMissingServiceParams, buildMissingParamsWarning, ensureSafeLimit, preFilterServicesByRelevance, } from './stores/LegendAIChatProcessors.js';
21
25
  export { LegendAIResultGrid } from './components/LegendAIResultGrid.js';
22
26
  export { LegendAIAnalysisPanel } from './components/LegendAIAnalysisPanel.js';
23
27
  export { LegendAIBarChart, LegendAIDonutChart, } from './components/LegendAICharts.js';
24
- export { computeKeyMetrics, computeChartData, inferChartType, computeTopItems, findNumericColumnName, } from './components/LegendAIAnalysisUtils.js';
28
+ export { computeKeyMetrics, computeChartData, inferChartType, computeTopItems, findNumericColumnName, analyzeGridData, } from './components/LegendAIAnalysisUtils.js';
29
+ export { buildPropertyDocIndex, enrichColumnsFromElementDocs, inferServiceRelationshipsFromAssociations, extractLambdaPreFilters, formatPreFiltersForContext, } from './LegendAIDocEnrichment.js';
25
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/legend-ai/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,oBAAoB,CAAC;AACnC,cAAc,iDAAiD,CAAC;AAChE,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,EACb,wBAAwB,EACxB,6BAA6B,EAC7B,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,8BAA8B,EAC9B,eAAe,EACf,yBAAyB,EACzB,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,0BAA0B,GAG3B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,qBAAqB,GACtB,MAAM,uCAAuC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/legend-ai/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,oBAAoB,CAAC;AACnC,cAAc,iDAAiD,CAAC;AAChE,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,cAAc,EACd,eAAe,EACf,YAAY,EACZ,qBAAqB,GACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,EACb,wBAAwB,EACxB,6BAA6B,EAC7B,0BAA0B,EAC1B,mBAAmB,EACnB,8BAA8B,EAC9B,mBAAmB,EACnB,yBAAyB,EACzB,8BAA8B,EAC9B,eAAe,EACf,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,gCAAgC,EAChC,oBAAoB,EACpB,0BAA0B,EAC1B,yBAAyB,EACzB,eAAe,EACf,4BAA4B,GAI7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEL,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,eAAe,GAChB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,yCAAyC,EACzC,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Copyright (c) 2026-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type React from 'react';
17
+ import { type TDSServiceSchema, type LegendAIConfig, type LegendAIAssistantMessage, type LegendAIUserMessage, type LegendAIMessage, type LegendAIConversationTurn, type LegendAIProductMetadata, LegendAIQuestionIntent, LegendAIErrorType } from '../LegendAITypes.js';
18
+ import { type LegendAI_LegendApplicationPlugin_Extension, type LegendAIOrchestratorDataProductCoordinates, type LegendAISqlExecutionResultData, type LegendAIResolvedEntities } from '../LegendAI_LegendApplicationPlugin_Extension.js';
19
+ import { type QueryExplicitExecutionContextInfo } from '@finos/legend-graph';
20
+ export declare function elapsedSeconds(startTime: number, decimals?: 1 | 2): string;
21
+ export type MessageSetter = React.Dispatch<React.SetStateAction<LegendAIMessage[]>>;
22
+ export declare function createMessagePair(text: string): [LegendAIUserMessage, LegendAIAssistantMessage];
23
+ export interface LegendAIOperationContext {
24
+ config: LegendAIConfig;
25
+ plugin: LegendAI_LegendApplicationPlugin_Extension;
26
+ history: LegendAIConversationTurn[];
27
+ setMessages: MessageSetter;
28
+ }
29
+ interface LegendAIOrchestratorOptionsParam {
30
+ dataProductCoordinates: LegendAIOrchestratorDataProductCoordinates;
31
+ pureExecutionContext?: QueryExplicitExecutionContextInfo;
32
+ }
33
+ export declare function updateLastAssistant(setMessages: MessageSetter, updater: (msg: LegendAIAssistantMessage) => Partial<LegendAIAssistantMessage>): void;
34
+ export declare function addThinkingStep(setMessages: MessageSetter, label: string): void;
35
+ export declare function completeThinkingSteps(setMessages: MessageSetter): void;
36
+ export declare function classifyError(error: Error): LegendAIErrorType;
37
+ export declare function finishWithThinkingError(setMessages: MessageSetter, errorMsg: string, startTime: number, errorType?: LegendAIErrorType): void;
38
+ export declare function buildConversationHistory(messages: LegendAIMessage[]): LegendAIConversationTurn[];
39
+ export declare function buildGenerationFailureMessage(failure: string, suggestion: string | undefined, services: TDSServiceSchema[]): string;
40
+ export declare function buildExecutionErrorMessage(errStr: string, services: TDSServiceSchema[]): string;
41
+ export declare function buildMetadataOverview(question: string, metadata: LegendAIProductMetadata, context: LegendAIOperationContext): Promise<string>;
42
+ export declare function attachMetadataOverview(setMessages: MessageSetter, metadataOverview: string): void;
43
+ export declare function handleMetadataQuestion(question: string, metadata: LegendAIProductMetadata, context: LegendAIOperationContext, startTime: number, hasQueryableServices?: boolean): Promise<void>;
44
+ export declare function generateAndJudgeSql(question: string, services: TDSServiceSchema[], coordinates: string, context: LegendAIOperationContext, startTime: number, metadata?: LegendAIProductMetadata): Promise<string | null>;
45
+ /**
46
+ * Dedicated generate-and-judge loop for access point queries.
47
+ * Uses AP-specific prompts that focus on `p()` syntax and omit
48
+ * coordinates, parameters, and service()-related rules.
49
+ */
50
+ export declare function generateAndJudgeAccessPointSql(question: string, accessPoints: TDSServiceSchema[], context: LegendAIOperationContext, startTime: number): Promise<string | null>;
51
+ export declare function executeSqlAndReport(sql: string, services: TDSServiceSchema[], config: LegendAIConfig, plugin: LegendAI_LegendApplicationPlugin_Extension, setMessages: MessageSetter, startTime: number, dataProductCoordinates?: LegendAIOrchestratorDataProductCoordinates): Promise<LegendAISqlExecutionResultData | undefined>;
52
+ export declare function executePureQueryAndReport(pureQuery: string, pureExecutionContext: QueryExplicitExecutionContextInfo, dataProductCoordinates: LegendAIOrchestratorDataProductCoordinates, config: LegendAIConfig, plugin: LegendAI_LegendApplicationPlugin_Extension, setMessages: MessageSetter, startTime: number): Promise<LegendAISqlExecutionResultData>;
53
+ export declare function analyzeOrchestratorResults(question: string, query: string, execResult: LegendAISqlExecutionResultData, metadata: LegendAIProductMetadata, context: LegendAIOperationContext, startTime: number): Promise<void>;
54
+ export declare function processQuestionViaOrchestrator(question: string, dataProductCoordinates: LegendAIOrchestratorDataProductCoordinates, metadata: LegendAIProductMetadata, context: LegendAIOperationContext, pureExecutionContext?: QueryExplicitExecutionContextInfo, preResolvedEntities?: LegendAIResolvedEntities): Promise<void>;
55
+ export declare function cleanLlmSqlResponse(raw: string): string;
56
+ export declare function isValidSqlCorrection(trimmed: string, currentSql: string): boolean;
57
+ export declare function sanitizeJoinOrderBy(sql: string): string;
58
+ export declare function sanitizeLiteralColumns(sql: string): string;
59
+ /**
60
+ * Strips non-date service parameters whose values were NOT explicitly
61
+ * mentioned by the user in their question. Parameters with values that
62
+ * appear in the question text are kept, since those are user-intended.
63
+ */
64
+ export declare function stripGuessedNonDateServiceParams(sql: string, question: string): string;
65
+ /**
66
+ * Ensures all date-like parameters from the service schemas are present
67
+ * in EVERY service() call in the SQL. If the LLM omitted a mandatory date
68
+ * parameter, this injects it with today's date into each service() call
69
+ * that lacks it. Only applies to service() calls (not p() calls).
70
+ */
71
+ export declare function ensureDateParameters(sql: string, services: TDSServiceSchema[]): string;
72
+ export interface MissingParamInfo {
73
+ name: string;
74
+ hint?: string;
75
+ isDateLike: boolean;
76
+ }
77
+ /**
78
+ * Detects ALL service parameters required by the schema but missing from
79
+ * the generated SQL. Works for any parameter type — date, identifier, key,
80
+ * or anything else. Each result includes a hint (from schema column docs
81
+ * or sample values) and whether the param is date-like.
82
+ */
83
+ export declare function detectMissingServiceParams(sql: string, services: TDSServiceSchema[]): MissingParamInfo[];
84
+ /**
85
+ * Builds a user-facing warning message listing which service parameters
86
+ * are missing from the query and need to be provided by the user.
87
+ */
88
+ export declare function buildMissingParamsWarning(missingParams: MissingParamInfo[]): string;
89
+ /**
90
+ * Appends a safety LIMIT to queries that lack one, preventing unbounded
91
+ * result sets on large services. Skips aggregation queries since those
92
+ * naturally produce bounded output.
93
+ */
94
+ export declare function ensureSafeLimit(sql: string, limit?: number): string;
95
+ /**
96
+ * Scores each service against the user question by counting keyword
97
+ * overlap between the question tokens and the service title, description,
98
+ * column names, and parameter names. Returns services sorted by
99
+ * descending relevance score.
100
+ */
101
+ export declare function preFilterServicesByRelevance(question: string, services: TDSServiceSchema[], limit: number): TDSServiceSchema[];
102
+ export declare function processQuestion(question: string, services: TDSServiceSchema[], coordinates: string, metadata: LegendAIProductMetadata, context: LegendAIOperationContext, dataProductCoordinates?: LegendAIOrchestratorDataProductCoordinates, pureExecutionContext?: QueryExplicitExecutionContextInfo): Promise<void>;
103
+ export declare function processQuestionWithIntent(question: string, intent: LegendAIQuestionIntent, services: TDSServiceSchema[], coordinates: string, metadata: LegendAIProductMetadata, context: LegendAIOperationContext, orchestratorOptions?: LegendAIOrchestratorOptionsParam): Promise<void>;
104
+ export {};
105
+ //# sourceMappingURL=LegendAIChatProcessors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendAIChatProcessors.d.ts","sourceRoot":"","sources":["../../../src/legend-ai/stores/LegendAIChatProcessors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAE5B,sBAAsB,EAGtB,iBAAiB,EAMlB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,0CAA0C,EAC/C,KAAK,0CAA0C,EAC/C,KAAK,8BAA8B,EACnC,KAAK,wBAAwB,EAE9B,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EACL,KAAK,iCAAiC,EAEvC,MAAM,qBAAqB,CAAC;AA0C7B,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,GAAE,CAAC,GAAG,CAAK,GAAG,MAAM,CAE7E;AA4BD,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,QAAQ,CACxC,KAAK,CAAC,cAAc,CAAC,eAAe,EAAE,CAAC,CACxC,CAAC;AAEF,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,GACX,CAAC,mBAAmB,EAAE,wBAAwB,CAAC,CAsBjD;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,0CAA0C,CAAC;IACnD,OAAO,EAAE,wBAAwB,EAAE,CAAC;IACpC,WAAW,EAAE,aAAa,CAAC;CAC5B;AAED,UAAU,gCAAgC;IACxC,sBAAsB,EAAE,0CAA0C,CAAC;IACnE,oBAAoB,CAAC,EAAE,iCAAiC,CAAC;CAC1D;AAED,wBAAgB,mBAAmB,CACjC,WAAW,EAA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