@atlaskit/rovo-triggers 2.17.0 → 3.1.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,22 @@
1
1
  # @atlaskit/rovo-triggers
2
2
 
3
+ ## 3.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#175516](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/175516)
8
+ [`7ac176c5546bf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7ac176c5546bf) -
9
+ Added support for a 'chat-close' payload within Rovo Triggers to allow users to remotely close the
10
+ Rovo chat.
11
+
12
+ ## 3.0.0
13
+
14
+ ### Major Changes
15
+
16
+ - [#172185](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/172185)
17
+ [`b8c6a37095ab9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b8c6a37095ab9) -
18
+ Support setting AI Feature Context using pubsub
19
+
3
20
  ## 2.17.0
4
21
 
5
22
  ### Minor Changes
@@ -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
  };
@@ -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
  };
@@ -15,6 +16,7 @@ export type PayloadCore<TKey extends string, TData = void> = {
15
16
  export type MessageSendPayload = PayloadCore<'message-send', {
16
17
  prompt: string;
17
18
  }>;
19
+ export type ChatClosePayload = PayloadCore<'chat-close', {}>;
18
20
  type TargetAgentParam = {
19
21
  agentId: string;
20
22
  agentExternalConfigReference?: never;
@@ -206,7 +208,8 @@ export type JiraIssueWorkBreakdownAction = {
206
208
  export type JiraIssueWorkBreakdownActionPayload = PayloadCore<'jira-issue-work-breakdown-actions', {
207
209
  operations: JiraIssueWorkBreakdownAction;
208
210
  }>;
209
- export type Payload = MessageSendPayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | JiraIssueWorkBreakdownActionPayload | DashboardInsightsActionsPayload;
211
+ export type SetChatContextPayload = PayloadCore<'set-message-context', ChatContextPayload>;
212
+ export type Payload = MessageSendPayload | ChatClosePayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | JiraIssueWorkBreakdownActionPayload | DashboardInsightsActionsPayload | SetChatContextPayload;
210
213
  export type Callback = (payload: Payload) => void;
211
214
  export type TopicEvents = {
212
215
  [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
  };
@@ -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
  };
@@ -15,6 +16,7 @@ export type PayloadCore<TKey extends string, TData = void> = {
15
16
  export type MessageSendPayload = PayloadCore<'message-send', {
16
17
  prompt: string;
17
18
  }>;
19
+ export type ChatClosePayload = PayloadCore<'chat-close', {}>;
18
20
  type TargetAgentParam = {
19
21
  agentId: string;
20
22
  agentExternalConfigReference?: never;
@@ -206,7 +208,8 @@ export type JiraIssueWorkBreakdownAction = {
206
208
  export type JiraIssueWorkBreakdownActionPayload = PayloadCore<'jira-issue-work-breakdown-actions', {
207
209
  operations: JiraIssueWorkBreakdownAction;
208
210
  }>;
209
- export type Payload = MessageSendPayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | JiraIssueWorkBreakdownActionPayload | DashboardInsightsActionsPayload;
211
+ export type SetChatContextPayload = PayloadCore<'set-message-context', ChatContextPayload>;
212
+ export type Payload = MessageSendPayload | ChatClosePayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | JiraIssueWorkBreakdownActionPayload | DashboardInsightsActionsPayload | SetChatContextPayload;
210
213
  export type Callback = (payload: Payload) => void;
211
214
  export type TopicEvents = {
212
215
  [key in Topic]?: Array<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-triggers",
3
- "version": "2.17.0",
3
+ "version": "3.1.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": {
@@ -8,7 +8,8 @@
8
8
  },
9
9
  "atlassian": {
10
10
  "team": "AI Mate",
11
- "runReact18": true
11
+ "runReact18": true,
12
+ "singleton": true
12
13
  },
13
14
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
14
15
  "license": "Apache-2.0",
@@ -42,8 +43,8 @@
42
43
  "devDependencies": {
43
44
  "@af/integration-testing": "workspace:^",
44
45
  "@af/visual-regression": "workspace:^",
45
- "@atlaskit/css": "^0.10.0",
46
- "@atlaskit/primitives": "^14.8.0",
46
+ "@atlaskit/css": "^0.11.0",
47
+ "@atlaskit/primitives": "^14.9.0",
47
48
  "@atlaskit/ssr": "workspace:^",
48
49
  "@atlaskit/visual-regression": "workspace:^",
49
50
  "@atlassian/feature-flags-test-utils": "^0.3.0",