@red-hat-developer-hub/backstage-plugin-intelligent-assistant 3.1.0 → 3.2.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @red-hat-developer-hub/backstage-plugin-intelligent-assistant
2
2
 
3
+ ## 3.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 81b7ed2: add saved prompts endpoint
8
+
9
+ ### Patch Changes
10
+
11
+ - 3d96cd5: Disable model selector during active chat sessions, show localized tooltip, and move attach button to the left
12
+ - e0d0986: Updated dependency `prettier` to `3.9.6`.
13
+ - 8966faf: Updated dependency `prettier` to `3.9.5`.
14
+ - Updated dependencies [81b7ed2]
15
+ - Updated dependencies [e0d0986]
16
+ - Updated dependencies [8966faf]
17
+ - @red-hat-developer-hub/backstage-plugin-intelligent-assistant-common@3.2.0
18
+
3
19
  ## 3.1.0
4
20
 
5
21
  ### Minor Changes
package/README.md CHANGED
@@ -49,6 +49,9 @@ p, role:default/team_a, intelligent-assistant.notebooks.use, update, allow
49
49
  p, role:default/team_a, intelligent-assistant.mcp.read, read, allow
50
50
  p, role:default/team_a, intelligent-assistant.mcp.manage, update, allow
51
51
 
52
+ # Required for saved prompts
53
+ p, role:default/team_a, intelligent-assistant.saved-prompts.manage, update, allow
54
+
52
55
  g, user:default/<your-user-name>, role:default/team_a
53
56
 
54
57
  ```
package/config.d.ts CHANGED
@@ -20,22 +20,24 @@ export interface Config {
20
20
  * @visibility frontend
21
21
  */
22
22
  'intelligent-assistant'?: {
23
- prompts?: Array</**
24
- * @visibility frontend
25
- */
26
- {
27
- /**
28
- * The title of the prompt.
29
- * Displayed as the heading of the prompt.
30
- * @visibility frontend
31
- */
32
- title: string;
23
+ prompts?: Array<
33
24
  /**
34
- * The main question or message shown in the prompt.
35
25
  * @visibility frontend
36
26
  */
37
- message: string;
38
- }>;
27
+ {
28
+ /**
29
+ * The title of the prompt.
30
+ * Displayed as the heading of the prompt.
31
+ * @visibility frontend
32
+ */
33
+ title: string;
34
+ /**
35
+ * The main question or message shown in the prompt.
36
+ * @visibility frontend
37
+ */
38
+ message: string;
39
+ }
40
+ >;
39
41
  /**
40
42
  * Configuration for AI Notebooks
41
43
  * @visibility frontend
package/dist/alpha.d.ts CHANGED
@@ -135,6 +135,7 @@ declare const intelligentAssistantTranslationRef: _backstage_frontend_plugin_api
135
135
  readonly 'chatbox.message.placeholder': string;
136
136
  readonly 'chatbox.fileUpload.failed': string;
137
137
  readonly 'chatbox.fileUpload.infoText': string;
138
+ readonly 'modelSelector.disabledTooltip': string;
138
139
  readonly 'aria.chatbotSelector': string;
139
140
  readonly 'aria.important': string;
140
141
  readonly 'aria.chatHistoryMenu': string;
@@ -1443,6 +1443,7 @@ const LightspeedChat = ({
1443
1443
  onSendMessage: sendMessage,
1444
1444
  isSendButtonDisabled,
1445
1445
  hasAttachButton: true,
1446
+ attachButtonPosition: "start",
1446
1447
  handleAttach,
1447
1448
  hasMicrophoneButton: true,
1448
1449
  value: draftMessage,
@@ -1471,14 +1472,9 @@ const LightspeedChat = ({
1471
1472
  {
1472
1473
  selectedModel,
1473
1474
  models,
1474
- onSelect: (item) => {
1475
- if (!isFullscreenMode) {
1476
- setIsMcpSettingsOpen(false);
1477
- }
1478
- onNewChat();
1479
- handleSelectedModel(item);
1480
- },
1481
- disabled: isSendButtonDisabled
1475
+ onSelect: handleSelectedModel,
1476
+ disabled: isSendButtonDisabled || messages.length > 0,
1477
+ disabledTooltip: t("modelSelector.disabledTooltip")
1482
1478
  }
1483
1479
  ),
1484
1480
  forceMultilineLayout: true,
@@ -1640,16 +1636,9 @@ const LightspeedChat = ({
1640
1636
  LightspeedChatBoxHeader,
1641
1637
  {
1642
1638
  selectedModel,
1643
- handleSelectedModel: (item) => {
1644
- if (!isFullscreenMode) {
1645
- setIsMcpSettingsOpen(false);
1646
- }
1647
- onNewChat();
1648
- handleSelectedModel(item);
1649
- },
1639
+ handleSelectedModel,
1650
1640
  models,
1651
1641
  isPinningChatsEnabled,
1652
- isModelSelectorDisabled: isSendButtonDisabled,
1653
1642
  hideModelSelector: true,
1654
1643
  showChatTabOptions: !showNotebooksPanel,
1655
1644
  setDisplayMode: setDisplayModeFromHeader,