Skip to content

Commit

Permalink
Enable Legend AI button for DataSpaceQuerySetupState also. (#3485)
Browse files Browse the repository at this point in the history
  • Loading branch information
pragyasri-gs authored Aug 29, 2024
1 parent 9cef2f8 commit 03ec0a3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/thin-trees-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@finos/legend-application-query': patch
---

Adding conditions for Legend AI button and exporting DataSpaceQuerySetupState.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import {
} from '../__lib__/LegendQueryNavigation.js';
import { ExistingQueryEditorStore } from '../stores/QueryEditorStore.js';
import { LegendQueryTelemetryHelper } from '../__lib__/LegendQueryTelemetryHelper.js';
import { DataSpaceQuerySetupState } from './../stores/data-space/DataSpaceQuerySetupState.js';
import {
LEGEND_APPLICATION_COLOR_THEME,
ReleaseLogManager,
Expand Down Expand Up @@ -687,8 +688,10 @@ export const QueryEditor = observer(() => {
{!isLoadingEditor &&
!editorStore.queryBuilderState?.config
?.TEMPORARY__disableQueryBuilderChat &&
editorStore.queryBuilderState instanceof
DataSpaceQueryBuilderState &&
(editorStore.queryBuilderState instanceof
DataSpaceQueryBuilderState ||
editorStore.queryBuilderState instanceof
DataSpaceQuerySetupState) &&
editorStore.queryBuilderState.canBuildQuery && (
<button
title="Open Query Chat."
Expand Down
2 changes: 2 additions & 0 deletions packages/legend-application-query/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export {
createViewProjectHandler,
createViewSDLCProjectHandler,
} from './stores/data-space/DataSpaceQueryBuilderHelper.js';
export { DataSpaceQuerySetupState } from './stores/data-space/DataSpaceQuerySetupState.js';

// components
export {
QueryEditorStoreContext,
Expand Down

0 comments on commit 03ec0a3

Please sign in to comment.