@epam/statgpt-conversation-view 0.7.0-dev.16 → 0.7.0-dev.18

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/package.json CHANGED
@@ -1,35 +1,34 @@
1
1
  {
2
2
  "name": "@epam/statgpt-conversation-view",
3
- "version": "0.7.0-dev.16",
3
+ "version": "0.7.0-dev.18",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
- "classnames": "^2.5.1",
6
+ "@epam/statgpt-conversation-list": "0.7.0-dev.18",
7
+ "@epam/statgpt-dial-toolkit": "0.7.0-dev.18",
8
+ "@epam/statgpt-sdmx-toolkit": "0.7.0-dev.18",
9
+ "@epam/statgpt-shared-toolkit": "0.7.0-dev.18",
10
+ "@epam/statgpt-ui-components": "0.7.0-dev.18"
11
+ },
12
+ "peerDependencies": {
7
13
  "@epam/ai-dial-shared": "^0.43.3",
14
+ "@floating-ui/react": "^0.27.14",
15
+ "@monaco-editor/react": "^4.7.0",
8
16
  "@tabler/icons-react": "^3.34.1",
9
- "@epam/statgpt-shared-toolkit": "0.7.0-dev.16",
10
- "@epam/statgpt-ui-components": "0.7.0-dev.16",
11
- "@epam/statgpt-sdmx-toolkit": "0.7.0-dev.16",
12
- "react-window": "^1.8.11",
13
- "react-virtualized-auto-sizer": "^1.0.26",
14
17
  "ag-grid-community": "33.3.2",
15
18
  "ag-grid-react": "^33.3.2",
16
- "@floating-ui/react": "^0.27.14",
19
+ "classnames": "^2.5.1",
20
+ "date-fns": "^4.1.0",
17
21
  "echarts": "^5.6.0",
18
22
  "echarts-for-react": "^3.0.2",
19
- "@epam/statgpt-dial-toolkit": "0.7.0-dev.16",
20
- "react-markdown": "^10.1.0",
21
- "remark-gfm": "^4.0.1",
22
- "@epam/statgpt-conversation-list": "0.7.0-dev.16",
23
23
  "flatpickr": "4.6.13",
24
- "react-flatpickr": "^4.0.11",
25
- "date-fns": "^4.1.0",
26
24
  "lodash": "^4.17.23",
27
- "tailwind-merge": "^3.4.0",
28
- "@monaco-editor/react": "^4.7.0",
29
- "@testing-library/jest-dom": "^6.6.3"
30
- },
31
- "peerDependencies": {
32
- "react": "^19.2.1"
25
+ "react": "^19.2.1",
26
+ "react-flatpickr": "^4.0.11",
27
+ "react-markdown": "^10.1.0",
28
+ "react-virtualized-auto-sizer": "^1.0.26",
29
+ "react-window": "^1.8.11",
30
+ "remark-gfm": "^4.0.1",
31
+ "tailwind-merge": "^3.4.0"
33
32
  },
34
33
  "exports": {
35
34
  ".": {
@@ -3,6 +3,14 @@ import { Attachment } from '@epam/ai-dial-shared';
3
3
  import { DataQuery } from '../../../../shared-toolkit/src/index';
4
4
  import { CustomCodeAttachment } from '../../models/attachments';
5
5
  import { GetPythonAttachment } from '../../types/actions';
6
+ /**
7
+ * Resolves the title for a single dataset's persisted python markdown attachment.
8
+ *
9
+ * Reuses the dataset's existing python attachment title — matched by the dataset
10
+ * urn appearing in the title — so the regenerated sample stays scoped to that
11
+ * dataset; falls back to the dataset urn when no matching sample exists.
12
+ */
13
+ export declare function resolveSingleDatasetPythonTitle(rawAttachments: Attachment[] | undefined, dataQuery: DataQuery): string;
6
14
  /**
7
15
  * Calls the python attachment API with stale-request protection and applies
8
16
  * the result to local state and the persisted conversation.
@@ -14,6 +22,7 @@ import { GetPythonAttachment } from '../../types/actions';
14
22
  * @param options.markdownTitle - Title for the raw markdown attachment written back to the conversation.
15
23
  * @param options.setCodeAttachments - State setter that replaces the current code attachment list.
16
24
  * @param options.onCodeAttachmentUpdated - Optional callback to persist the updated markdown attachment.
25
+ * @param options.datasetUrn - Optional dataset URN forwarded to onCodeAttachmentUpdated to scope persistence to one dataset.
17
26
  */
18
27
  export declare function invokePythonAttachment(options: {
19
28
  getPythonAttachment: GetPythonAttachment;
@@ -21,6 +30,7 @@ export declare function invokePythonAttachment(options: {
21
30
  requestIdRef: RefObject<number>;
22
31
  codeTitle: string;
23
32
  markdownTitle: string;
33
+ datasetUrn?: string;
24
34
  setCodeAttachments: (attachments: CustomCodeAttachment[]) => void;
25
- onCodeAttachmentUpdated?: (attachment: Attachment) => void;
35
+ onCodeAttachmentUpdated?: (attachment: Attachment, datasetUrn?: string) => void;
26
36
  }): void;
@@ -4,7 +4,10 @@ import { Message } from '../../../../dial-toolkit/src/index';
4
4
  * Replaces the python code-sample attachment in a message's attachment list.
5
5
  * When messageId is provided the matching message is targeted; otherwise the
6
6
  * latest system message is used (AdvancedView path, which has no id).
7
+ * When datasetUrn is provided, only the python attachment whose title includes
8
+ * that URN is replaced and other python attachments are preserved; otherwise
9
+ * all python attachments are replaced by the single new one.
7
10
  * Returns the updated messages array, or null when the target message is not
8
11
  * found or is not a System message.
9
12
  */
10
- export declare function replacePythonAttachment(messages: Message[], newAttachment: Attachment, messageId?: string): Message[] | null;
13
+ export declare function replacePythonAttachment(messages: Message[], newAttachment: Attachment, messageId?: string, datasetUrn?: string): Message[] | null;
@@ -4,6 +4,16 @@ import { Filter } from '../models/filters';
4
4
  export declare const getQueryTimeSeriesFilters: (filters: Filter[]) => QueryFilter[];
5
5
  export declare const getTimeQueryFilterFromAttachment: (dataQuery: DataQuery, dimensions?: DimensionList) => string | null;
6
6
  export declare const getQueryFilters: (filters: Filter[], dimensions?: Dimension[], datasetUrn?: string) => DatasetQueryFilters;
7
- export declare const buildDataQueryWithMergedFilters: (dataQuery: DataQuery, uiFilters: Filter[]) => DataQuery;
7
+ /**
8
+ * Merges the UI filter selection into a DataQuery for the python attachment.
9
+ *
10
+ * `scopeToDatasetUrn` selects how UI filters are resolved to this dataset:
11
+ * - cross-dataset mode keeps the default `true`, so filters are resolved per
12
+ * dataset by URN (shared filters expanded, picked via `buildFiltersMap`);
13
+ * - single-dataset mode passes `false`, so the filters are used as-is
14
+ * (mirroring the grid's `getQueryFilters(filters, dimensions)` call). Single-
15
+ * dataset filters carry no `datasetUrn`, so URN scoping would drop them.
16
+ */
17
+ export declare const buildDataQueryWithMergedFilters: (dataQuery: DataQuery, uiFilters: Filter[], scopeToDatasetUrn?: boolean) => DataQuery;
8
18
  export declare const setDataQueryFilters: (filters: Filter[], datasetUrn?: string) => QueryFilter[];
9
19
  export declare const buildQueryFiltersForPythonAttachment: (filters: Filter[], datasetUrn?: string) => QueryFilter[];