@gooddata/sdk-ui-gen-ai 11.61.0-alpha.0 → 11.61.0-alpha.1

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.
@@ -90,8 +90,8 @@ const getItemUrl = (workspaceId, id, objectType, enableShellApplication_dashboar
90
90
  case "metric":
91
91
  return `/workspace/${workspaceId}/metrics/metric/${id}`;
92
92
  case "report":
93
- // Encoded like the Reports app's own route builder, so an id with a slash stays one segment.
94
- return `/workspace/${workspaceId}/reports/report/${encodeURIComponent(id)}`;
93
+ // Encoded like the Publisher app's own route builder, so an id with a slash stays one segment.
94
+ return `/workspace/${workspaceId}/publisher/report/${encodeURIComponent(id)}`;
95
95
  default:
96
96
  return null;
97
97
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useSaveCheck.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/useSaveCheck.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,mBAAmB,CAAC;AAE7E,wBAAgB,YAAY,CACxB,IAAI,EAAE,mCAAmC,EACzC,aAAa,EAAE,QAAQ,GAAG,SAAS,EACnC,GAAG,EAAE,OAAO;;;EAyBf"}
1
+ {"version":3,"file":"useSaveCheck.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/useSaveCheck.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,mBAAmB,CAAC;AAE7E,wBAAgB,YAAY,CACxB,IAAI,EAAE,mCAAmC,EACzC,aAAa,EAAE,QAAQ,GAAG,SAAS,EACnC,GAAG,EAAE,OAAO;;;EA+Bf"}
@@ -5,16 +5,22 @@ export function useSaveCheck(part, visualization, run) {
5
5
  const workspaceId = useWorkspaceStrict();
6
6
  const { result, status, error } = useCancelablePromise({
7
7
  promise: async () => {
8
- if (!workspaceId || !visualization || !run) {
8
+ const saveInProgress = part.saving?.started && !part.saving?.completed;
9
+ if (!workspaceId || !visualization || !run || saveInProgress) {
9
10
  return false;
10
11
  }
11
- const res = await backend.workspace(workspaceId).insights().getInsight({
12
- type: "insight",
13
- identifier: visualization.insight.identifier,
14
- });
15
- return Boolean(res);
12
+ // A chart the user has not saved yet does not exist in metadata. The filtered list
13
+ // answers that with an empty result instead of a 404, which the backend would log
14
+ // to the console as an error.
15
+ const res = await backend
16
+ .workspace(workspaceId)
17
+ .insights()
18
+ .getInsightsQuery()
19
+ .withFilter({ id: [visualization.insight.identifier] })
20
+ .query();
21
+ return res.items.length > 0;
16
22
  },
17
- }, [workspaceId, visualization?.insight.identifier, part.saving?.completed, run]);
23
+ }, [workspaceId, visualization?.insight.identifier, part.saving?.started, part.saving?.completed, run]);
18
24
  const visualisationSaved = Boolean(result && !error);
19
25
  const visualisationCheckLoading = status === "loading";
20
26
  return { visualisationSaved, visualisationCheckLoading };
@@ -1 +1 @@
1
- {"version":3,"file":"addContextReference.d.ts","sourceRoot":"","sources":["../../src/context/addContextReference.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAG1E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,CAAC,EAAE,mBAAmB,GAAG,YAAY,CA6DxG"}
1
+ {"version":3,"file":"addContextReference.d.ts","sourceRoot":"","sources":["../../src/context/addContextReference.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAG1E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,CAAC,EAAE,mBAAmB,GAAG,YAAY,CA8DxG"}
@@ -43,6 +43,7 @@ export function addContextReference(context, reference) {
43
43
  ref: reference.ref,
44
44
  title: reference.title,
45
45
  type: convertGenAiTypeToReferenceType(reference.type),
46
+ visualizationUrl: reference.visualizationUrl,
46
47
  });
47
48
  return {
48
49
  ...context,
@@ -1 +1 @@
1
- {"version":3,"file":"collectContextReferences.d.ts","sourceRoot":"","sources":["../../src/context/collectContextReferences.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,iBAAiB,EAIzB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAG7E,wBAAgB,wBAAwB,CACpC,WAAW,EAAE,iBAAiB,GAAG,SAAS,EAC1C,eAAe,EAAE,eAAe,GAAG,SAAS,EAC5C,gBAAgB,CAAC,EAAE,MAAM,GAC1B,mBAAmB,EAAE,CA0CvB;AAED,wBAAgB,0BAA0B,CACtC,OAAO,EAAE,iBAAiB,GAAG,SAAS,EACtC,gBAAgB,CAAC,EAAE,MAAM,GAC1B,mBAAmB,EAAE,CAuFvB"}
1
+ {"version":3,"file":"collectContextReferences.d.ts","sourceRoot":"","sources":["../../src/context/collectContextReferences.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,iBAAiB,EAIzB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAG7E,wBAAgB,wBAAwB,CACpC,WAAW,EAAE,iBAAiB,GAAG,SAAS,EAC1C,eAAe,EAAE,eAAe,GAAG,SAAS,EAC5C,gBAAgB,CAAC,EAAE,MAAM,GAC1B,mBAAmB,EAAE,CA2CvB;AAED,wBAAgB,0BAA0B,CACtC,OAAO,EAAE,iBAAiB,GAAG,SAAS,EACtC,gBAAgB,CAAC,EAAE,MAAM,GAC1B,mBAAmB,EAAE,CAuFvB"}
@@ -34,6 +34,7 @@ export function collectContextReferences(userContext, selectedContext, placehold
34
34
  where: "referencedObjects",
35
35
  title: item.title || placeholderTitle || id,
36
36
  type: convertReferenceTypeToGenAiType(item.type),
37
+ visualizationUrl: item.visualizationUrl,
37
38
  });
38
39
  });
39
40
  });
@@ -326,7 +326,7 @@ export const en_US = {
326
326
  "crowdinContext": "Feedback reason option: Other reason not listed"
327
327
  },
328
328
  "gd.gen-ai.disclaimer": {
329
- "text": "AI assistants can make mistakes. Check before relying on these answers.",
329
+ "text": "AI can make mistakes. Verify results.",
330
330
  "crowdinContext": "Warning disclaimer about AI response accuracy shown to users"
331
331
  },
332
332
  "gd.gen-ai.dialog.label": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-gen-ai",
3
- "version": "11.61.0-alpha.0",
3
+ "version": "11.61.0-alpha.1",
4
4
  "description": "GoodData GenAI SDK",
5
5
  "license": "MIT",
6
6
  "author": "GoodData Corporation",
@@ -57,19 +57,19 @@
57
57
  "reselect": "5.1.1",
58
58
  "tslib": "2.8.1",
59
59
  "uuid": "11.1.1",
60
- "@gooddata/api-client-tiger": "11.61.0-alpha.0",
61
- "@gooddata/sdk-model": "11.61.0-alpha.0",
62
- "@gooddata/sdk-backend-spi": "11.61.0-alpha.0",
63
- "@gooddata/sdk-ui": "11.61.0-alpha.0",
64
- "@gooddata/sdk-ui-charts": "11.61.0-alpha.0",
65
- "@gooddata/sdk-ui-dashboard": "11.61.0-alpha.0",
66
- "@gooddata/sdk-ui-filters": "11.61.0-alpha.0",
67
- "@gooddata/sdk-ui-kit": "11.61.0-alpha.0",
68
- "@gooddata/sdk-ui-geo": "11.61.0-alpha.0",
69
- "@gooddata/sdk-ui-semantic-search": "11.61.0-alpha.0",
70
- "@gooddata/sdk-ui-theme-provider": "11.61.0-alpha.0",
71
- "@gooddata/sdk-ui-pivot": "11.61.0-alpha.0",
72
- "@gooddata/util": "11.61.0-alpha.0"
60
+ "@gooddata/api-client-tiger": "11.61.0-alpha.1",
61
+ "@gooddata/sdk-backend-spi": "11.61.0-alpha.1",
62
+ "@gooddata/sdk-model": "11.61.0-alpha.1",
63
+ "@gooddata/sdk-ui": "11.61.0-alpha.1",
64
+ "@gooddata/sdk-ui-charts": "11.61.0-alpha.1",
65
+ "@gooddata/sdk-ui-dashboard": "11.61.0-alpha.1",
66
+ "@gooddata/sdk-ui-filters": "11.61.0-alpha.1",
67
+ "@gooddata/sdk-ui-kit": "11.61.0-alpha.1",
68
+ "@gooddata/sdk-ui-geo": "11.61.0-alpha.1",
69
+ "@gooddata/sdk-ui-pivot": "11.61.0-alpha.1",
70
+ "@gooddata/sdk-ui-theme-provider": "11.61.0-alpha.1",
71
+ "@gooddata/sdk-ui-semantic-search": "11.61.0-alpha.1",
72
+ "@gooddata/util": "11.61.0-alpha.1"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@microsoft/api-documenter": "7.30.16",
@@ -108,12 +108,12 @@
108
108
  "typescript": "7.0.2",
109
109
  "vitest": "4.1.11",
110
110
  "vitest-dom": "0.1.1",
111
- "@gooddata/eslint-config": "11.61.0-alpha.0",
112
- "@gooddata/i18n-toolkit": "11.61.0-alpha.0",
113
- "@gooddata/oxlint-config": "11.61.0-alpha.0",
114
- "@gooddata/sdk-backend-mockingbird": "11.61.0-alpha.0",
115
- "@gooddata/reference-workspace": "11.61.0-alpha.0",
116
- "@gooddata/stylelint-config": "11.61.0-alpha.0"
111
+ "@gooddata/eslint-config": "11.61.0-alpha.1",
112
+ "@gooddata/i18n-toolkit": "11.61.0-alpha.1",
113
+ "@gooddata/oxlint-config": "11.61.0-alpha.1",
114
+ "@gooddata/reference-workspace": "11.61.0-alpha.1",
115
+ "@gooddata/sdk-backend-mockingbird": "11.61.0-alpha.1",
116
+ "@gooddata/stylelint-config": "11.61.0-alpha.1"
117
117
  },
118
118
  "peerDependencies": {
119
119
  "react": "^18.0.0 || ^19.0.0",
@@ -123,7 +123,7 @@
123
123
  }
124
124
  .gd-gen-ai-chat__input__agent-dropdown .gd-ui-kit-button__badge-text {
125
125
  color: var(--gd-palette-complementary-6);
126
- margin-left: 0;
126
+ margin-left: calc(var(--gd-spacing-10px) - var(--gd-spacing-5px));
127
127
  }
128
128
  .gd-gen-ai-chat__input__agent-dropdown--loading .gd-ui-kit-button__text {
129
129
  background: linear-gradient(90deg, var(--gd-palette-complementary-7, #6d7680) 0%, var(--gd-palette-complementary-7, #6d7680) 40%, var(--gd-palette-complementary-0, #fff) 50%, var(--gd-palette-complementary-7, #6d7680) 60%, var(--gd-palette-complementary-7, #6d7680) 100%);