@finos/legend-lego 2.0.211 → 2.0.213
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/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/legend-ai/LegendAIDocEnrichment.d.ts +12 -12
- package/lib/legend-ai/LegendAIDocEnrichment.d.ts.map +1 -1
- package/lib/legend-ai/LegendAIDocEnrichment.js +317 -86
- package/lib/legend-ai/LegendAIDocEnrichment.js.map +1 -1
- package/lib/legend-ai/LegendAIHostIntegration.d.ts +31 -0
- package/lib/legend-ai/LegendAIHostIntegration.d.ts.map +1 -0
- package/lib/legend-ai/LegendAIHostIntegration.js +50 -0
- package/lib/legend-ai/LegendAIHostIntegration.js.map +1 -0
- package/lib/legend-ai/LegendAIServiceRetrieval.d.ts.map +1 -1
- package/lib/legend-ai/LegendAIServiceRetrieval.js +34 -35
- package/lib/legend-ai/LegendAIServiceRetrieval.js.map +1 -1
- package/lib/legend-ai/LegendAITypes.d.ts +85 -7
- package/lib/legend-ai/LegendAITypes.d.ts.map +1 -1
- package/lib/legend-ai/LegendAITypes.js +99 -1
- package/lib/legend-ai/LegendAITypes.js.map +1 -1
- package/lib/legend-ai/LegendAI_LegendApplicationPlugin_Extension.d.ts +36 -3
- package/lib/legend-ai/LegendAI_LegendApplicationPlugin_Extension.d.ts.map +1 -1
- package/lib/legend-ai/LegendAI_LegendApplicationPlugin_Extension.js +29 -0
- package/lib/legend-ai/LegendAI_LegendApplicationPlugin_Extension.js.map +1 -1
- package/lib/legend-ai/__test-utils__/LegendAITestUtils.d.ts.map +1 -1
- package/lib/legend-ai/__test-utils__/LegendAITestUtils.js +7 -0
- package/lib/legend-ai/__test-utils__/LegendAITestUtils.js.map +1 -1
- package/lib/legend-ai/components/LegendAICharts.d.ts.map +1 -1
- package/lib/legend-ai/components/LegendAICharts.js +6 -10
- package/lib/legend-ai/components/LegendAICharts.js.map +1 -1
- package/lib/legend-ai/components/LegendAIChat.d.ts.map +1 -1
- package/lib/legend-ai/components/LegendAIChat.js +263 -41
- package/lib/legend-ai/components/LegendAIChat.js.map +1 -1
- package/lib/legend-ai/components/LegendAIChatInput.d.ts +1 -1
- package/lib/legend-ai/components/LegendAIChatInput.d.ts.map +1 -1
- package/lib/legend-ai/components/LegendAIChatInput.js +2 -1
- package/lib/legend-ai/components/LegendAIChatInput.js.map +1 -1
- package/lib/legend-ai/index.d.ts +5 -2
- package/lib/legend-ai/index.d.ts.map +1 -1
- package/lib/legend-ai/index.js +5 -2
- package/lib/legend-ai/index.js.map +1 -1
- package/lib/legend-ai/stores/LegendAIChatProcessors.d.ts +9 -3
- package/lib/legend-ai/stores/LegendAIChatProcessors.d.ts.map +1 -1
- package/lib/legend-ai/stores/LegendAIChatProcessors.js +794 -220
- package/lib/legend-ai/stores/LegendAIChatProcessors.js.map +1 -1
- package/lib/legend-ai/stores/LegendAIChatState.d.ts.map +1 -1
- package/lib/legend-ai/stores/LegendAIChatState.js +47 -21
- package/lib/legend-ai/stores/LegendAIChatState.js.map +1 -1
- package/lib/legend-ai/stores/LegendAIJoinAnalysis.d.ts +29 -0
- package/lib/legend-ai/stores/LegendAIJoinAnalysis.d.ts.map +1 -0
- package/lib/legend-ai/stores/LegendAIJoinAnalysis.js +124 -0
- package/lib/legend-ai/stores/LegendAIJoinAnalysis.js.map +1 -0
- package/lib/legend-ai/stores/LegendAISqlHelpers.d.ts +25 -0
- package/lib/legend-ai/stores/LegendAISqlHelpers.d.ts.map +1 -0
- package/lib/legend-ai/stores/LegendAISqlHelpers.js +64 -0
- package/lib/legend-ai/stores/LegendAISqlHelpers.js.map +1 -0
- package/lib/legend-ai/stores/LegendAISqlJoinSanitizers.d.ts +22 -0
- package/lib/legend-ai/stores/LegendAISqlJoinSanitizers.d.ts.map +1 -0
- package/lib/legend-ai/stores/LegendAISqlJoinSanitizers.js +411 -0
- package/lib/legend-ai/stores/LegendAISqlJoinSanitizers.js.map +1 -0
- package/package.json +6 -6
- package/src/legend-ai/LegendAIDocEnrichment.ts +435 -97
- package/src/legend-ai/LegendAIHostIntegration.tsx +80 -0
- package/src/legend-ai/LegendAIServiceRetrieval.ts +50 -35
- package/src/legend-ai/LegendAITypes.ts +169 -5
- package/src/legend-ai/LegendAI_LegendApplicationPlugin_Extension.ts +73 -1
- package/src/legend-ai/__test-utils__/LegendAITestUtils.ts +10 -0
- package/src/legend-ai/components/LegendAICharts.tsx +30 -33
- package/src/legend-ai/components/LegendAIChat.tsx +555 -91
- package/src/legend-ai/components/LegendAIChatInput.tsx +6 -2
- package/src/legend-ai/index.ts +22 -3
- package/src/legend-ai/stores/LegendAIChatProcessors.ts +1286 -322
- package/src/legend-ai/stores/LegendAIChatState.ts +73 -28
- package/src/legend-ai/stores/LegendAIJoinAnalysis.ts +165 -0
- package/src/legend-ai/stores/LegendAISqlHelpers.ts +82 -0
- package/src/legend-ai/stores/LegendAISqlJoinSanitizers.ts +515 -0
- package/tsconfig.json +4 -0
|
@@ -23,7 +23,11 @@ import {
|
|
|
23
23
|
CheckIcon,
|
|
24
24
|
clsx,
|
|
25
25
|
} from '@finos/legend-art';
|
|
26
|
-
import
|
|
26
|
+
import {
|
|
27
|
+
type LegendAIChatState,
|
|
28
|
+
type LegendAIScopeItem,
|
|
29
|
+
LEGEND_AI_DEFAULT_MODEL_LABEL,
|
|
30
|
+
} from '../LegendAITypes.js';
|
|
27
31
|
import { LegendAIScopeSelector } from './LegendAIScopeSelector.js';
|
|
28
32
|
|
|
29
33
|
const MAX_TEXTAREA_HEIGHT = 160;
|
|
@@ -38,7 +42,7 @@ export const LegendAIChatInput = (props: {
|
|
|
38
42
|
const [isModelDropdownOpen, setIsModelDropdownOpen] = useState(false);
|
|
39
43
|
|
|
40
44
|
const modelLabel = useMemo(() => {
|
|
41
|
-
const modelName = state.selectedModelName ??
|
|
45
|
+
const modelName = state.selectedModelName ?? LEGEND_AI_DEFAULT_MODEL_LABEL;
|
|
42
46
|
return modelName.length > 18 ? `${modelName.slice(0, 17)}...` : modelName;
|
|
43
47
|
}, [state.selectedModelName]);
|
|
44
48
|
|
package/src/legend-ai/index.ts
CHANGED
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
|
|
17
17
|
export * from './LegendAITypes.js';
|
|
18
18
|
export * from './LegendAI_LegendApplicationPlugin_Extension.js';
|
|
19
|
+
export {
|
|
20
|
+
bridgeLegendAIServices,
|
|
21
|
+
useLegendAIChatTelemetryLogger,
|
|
22
|
+
} from './LegendAIHostIntegration.js';
|
|
19
23
|
export {
|
|
20
24
|
LegendAIChat,
|
|
21
25
|
LEGEND_AI_ANCHOR_ID,
|
|
@@ -38,6 +42,7 @@ export {
|
|
|
38
42
|
finishWithThinkingError,
|
|
39
43
|
classifyError,
|
|
40
44
|
buildConversationHistory,
|
|
45
|
+
filterHistoryForAccessPoints,
|
|
41
46
|
buildGenerationFailureMessage,
|
|
42
47
|
buildExecutionErrorMessage,
|
|
43
48
|
generateAndJudgeSql,
|
|
@@ -55,8 +60,6 @@ export {
|
|
|
55
60
|
analyzeOrchestratorResults,
|
|
56
61
|
cleanLlmSqlResponse,
|
|
57
62
|
isValidSqlCorrection,
|
|
58
|
-
sanitizeJoinOrderBy,
|
|
59
|
-
sanitizeJoinSameKeyColumns,
|
|
60
63
|
sanitizeLiteralColumns,
|
|
61
64
|
stripGuessedNonDateServiceParams,
|
|
62
65
|
ensureDateParameters,
|
|
@@ -75,6 +78,18 @@ export {
|
|
|
75
78
|
type LegendAIOperationContext,
|
|
76
79
|
type MissingParamInfo,
|
|
77
80
|
} from './stores/LegendAIChatProcessors.js';
|
|
81
|
+
export {
|
|
82
|
+
buildCrossJoinZeroRowExplanation,
|
|
83
|
+
buildJoinablePairSuggestions,
|
|
84
|
+
parseSampleValueSet,
|
|
85
|
+
} from './stores/LegendAIJoinAnalysis.js';
|
|
86
|
+
export {
|
|
87
|
+
boundCrossAccessPointJoinDrivingSide,
|
|
88
|
+
sanitizeJoinDuplicateColumns,
|
|
89
|
+
sanitizeJoinOrderBy,
|
|
90
|
+
sanitizeJoinSameKeyColumns,
|
|
91
|
+
wrapBareJoinAccessPoints,
|
|
92
|
+
} from './stores/LegendAISqlJoinSanitizers.js';
|
|
78
93
|
export {
|
|
79
94
|
preFilterServicesByRelevance,
|
|
80
95
|
isFuzzyMatch,
|
|
@@ -101,12 +116,16 @@ export {
|
|
|
101
116
|
enrichColumnsFromElementDocs,
|
|
102
117
|
inferServiceRelationshipsFromAssociations,
|
|
103
118
|
extractLambdaPreFilters,
|
|
104
|
-
formatPreFiltersForContext,
|
|
105
119
|
extractModelContext,
|
|
106
120
|
buildEnrichedBusinessContext,
|
|
107
121
|
buildModelContextEnrichmentText,
|
|
108
122
|
findBestAlternateRoot,
|
|
109
123
|
resolveEntitiesDeterministic,
|
|
124
|
+
rankEntities,
|
|
110
125
|
buildSemanticPropertyIndex,
|
|
111
126
|
splitIdentifierTokens,
|
|
127
|
+
buildDataQueryApproachText,
|
|
128
|
+
relaxExactStringFilters,
|
|
129
|
+
extractFilteredColumns,
|
|
130
|
+
buildProbedValueHints,
|
|
112
131
|
} from './LegendAIDocEnrichment.js';
|