@atlaskit/rovo-triggers 2.16.0 → 3.0.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
  # @atlaskit/rovo-triggers
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#172185](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/172185)
8
+ [`b8c6a37095ab9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b8c6a37095ab9) -
9
+ Support setting AI Feature Context using pubsub
10
+
11
+ ## 2.17.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#169814](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/169814)
16
+ [`40e4575b749e0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/40e4575b749e0) -
17
+ Added insertPrompt query param
18
+
3
19
  ## 2.16.0
4
20
 
5
21
  ### Minor Changes
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.ROVO_VALID_PARAMS = exports.ROVO_PARAM_PREFIX = void 0;
7
7
  var ROVO_PARAM_PREFIX = exports.ROVO_PARAM_PREFIX = 'rovoChat';
8
- var ROVO_VALID_PARAMS = exports.ROVO_VALID_PARAMS = ['pathway', 'agentId', 'conversationId', 'prompt', 'cloudId', 'triggerOpen'];
8
+ var ROVO_VALID_PARAMS = exports.ROVO_VALID_PARAMS = ['pathway', 'agentId', 'conversationId', 'prompt', 'cloudId', 'triggerOpen', 'insertPrompt'];
@@ -1,2 +1,2 @@
1
1
  export const ROVO_PARAM_PREFIX = 'rovoChat';
2
- export const ROVO_VALID_PARAMS = ['pathway', 'agentId', 'conversationId', 'prompt', 'cloudId', 'triggerOpen'];
2
+ export const ROVO_VALID_PARAMS = ['pathway', 'agentId', 'conversationId', 'prompt', 'cloudId', 'triggerOpen', 'insertPrompt'];
@@ -1,2 +1,2 @@
1
1
  export var ROVO_PARAM_PREFIX = 'rovoChat';
2
- export var ROVO_VALID_PARAMS = ['pathway', 'agentId', 'conversationId', 'prompt', 'cloudId', 'triggerOpen'];
2
+ export var ROVO_VALID_PARAMS = ['pathway', 'agentId', 'conversationId', 'prompt', 'cloudId', 'triggerOpen', 'insertPrompt'];
@@ -3,5 +3,5 @@ export type ChatContextState = {
3
3
  };
4
4
  export type ChatContextPayload = {
5
5
  contextKey: string;
6
- context: <T>(chatContext: T) => T;
6
+ setContext: <T>(chatContext: T) => T;
7
7
  };
@@ -7,6 +7,7 @@ export interface BaseRovoChatParams {
7
7
  cloudId: string;
8
8
  triggerOpen: boolean;
9
9
  initiator: string;
10
+ insertPrompt: 'highlight-action';
10
11
  }
11
12
  export type ValidPrefix = 'rovoChat';
12
13
  export type ValidParam = keyof BaseRovoChatParams;
@@ -1,4 +1,5 @@
1
1
  import type { DocNode } from '@atlaskit/adf-schema';
2
+ import type { ChatContextPayload } from './common/utils/chat-context';
2
3
  export declare const Topics: {
3
4
  readonly AI_MATE: "ai-mate";
4
5
  };
@@ -98,7 +99,7 @@ export type InsertPromptPayload = PayloadCore<'insert-prompt', {
98
99
  /**
99
100
  * Overrides the default placeholder type
100
101
  */
101
- placeholderType?: 'person' | 'link' | 'generic' | 'highlight-action';
102
+ placeholderType?: 'person' | 'link' | 'generic';
102
103
  }>;
103
104
  export type TransitionId = string;
104
105
  export type StatusId = string;
@@ -206,7 +207,8 @@ export type JiraIssueWorkBreakdownAction = {
206
207
  export type JiraIssueWorkBreakdownActionPayload = PayloadCore<'jira-issue-work-breakdown-actions', {
207
208
  operations: JiraIssueWorkBreakdownAction;
208
209
  }>;
209
- export type Payload = MessageSendPayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | JiraIssueWorkBreakdownActionPayload | DashboardInsightsActionsPayload;
210
+ export type SetChatContextPayload = PayloadCore<'set-message-context', ChatContextPayload>;
211
+ export type Payload = MessageSendPayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | JiraIssueWorkBreakdownActionPayload | DashboardInsightsActionsPayload | SetChatContextPayload;
210
212
  export type Callback = (payload: Payload) => void;
211
213
  export type TopicEvents = {
212
214
  [key in Topic]?: Array<{
@@ -3,5 +3,5 @@ export type ChatContextState = {
3
3
  };
4
4
  export type ChatContextPayload = {
5
5
  contextKey: string;
6
- context: <T>(chatContext: T) => T;
6
+ setContext: <T>(chatContext: T) => T;
7
7
  };
@@ -7,6 +7,7 @@ export interface BaseRovoChatParams {
7
7
  cloudId: string;
8
8
  triggerOpen: boolean;
9
9
  initiator: string;
10
+ insertPrompt: 'highlight-action';
10
11
  }
11
12
  export type ValidPrefix = 'rovoChat';
12
13
  export type ValidParam = keyof BaseRovoChatParams;
@@ -1,4 +1,5 @@
1
1
  import type { DocNode } from '@atlaskit/adf-schema';
2
+ import type { ChatContextPayload } from './common/utils/chat-context';
2
3
  export declare const Topics: {
3
4
  readonly AI_MATE: "ai-mate";
4
5
  };
@@ -98,7 +99,7 @@ export type InsertPromptPayload = PayloadCore<'insert-prompt', {
98
99
  /**
99
100
  * Overrides the default placeholder type
100
101
  */
101
- placeholderType?: 'person' | 'link' | 'generic' | 'highlight-action';
102
+ placeholderType?: 'person' | 'link' | 'generic';
102
103
  }>;
103
104
  export type TransitionId = string;
104
105
  export type StatusId = string;
@@ -206,7 +207,8 @@ export type JiraIssueWorkBreakdownAction = {
206
207
  export type JiraIssueWorkBreakdownActionPayload = PayloadCore<'jira-issue-work-breakdown-actions', {
207
208
  operations: JiraIssueWorkBreakdownAction;
208
209
  }>;
209
- export type Payload = MessageSendPayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | JiraIssueWorkBreakdownActionPayload | DashboardInsightsActionsPayload;
210
+ export type SetChatContextPayload = PayloadCore<'set-message-context', ChatContextPayload>;
211
+ export type Payload = MessageSendPayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | JiraIssueWorkBreakdownActionPayload | DashboardInsightsActionsPayload | SetChatContextPayload;
210
212
  export type Callback = (payload: Payload) => void;
211
213
  export type TopicEvents = {
212
214
  [key in Topic]?: Array<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-triggers",
3
- "version": "2.16.0",
3
+ "version": "3.0.0",
4
4
  "description": "Provides various trigger events to drive Rovo Chat functionality, such as a publish-subscribe and URL parameter hooks",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -42,8 +42,8 @@
42
42
  "devDependencies": {
43
43
  "@af/integration-testing": "workspace:^",
44
44
  "@af/visual-regression": "workspace:^",
45
- "@atlaskit/css": "^0.10.0",
46
- "@atlaskit/primitives": "^14.8.0",
45
+ "@atlaskit/css": "^0.11.0",
46
+ "@atlaskit/primitives": "^14.9.0",
47
47
  "@atlaskit/ssr": "workspace:^",
48
48
  "@atlaskit/visual-regression": "workspace:^",
49
49
  "@atlassian/feature-flags-test-utils": "^0.3.0",