@atlaskit/rovo-triggers 10.1.0 → 10.3.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 +54 -0
- package/dist/types/types.d.ts +25 -9
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
# @atlaskit/rovo-triggers
|
|
2
2
|
|
|
3
|
+
## 10.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`a9757a562bdda`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a9757a562bdda) -
|
|
8
|
+
Add optional issue-type information (`id`, `name`, `iconUrl`) to the `jira-work-items-creating`
|
|
9
|
+
draft payload so subscribers can render the issue-type icon on optimistic rows immediately.
|
|
10
|
+
Populated behind the `aiwc_add_issuetype_icon_to_optimistic_updates` feature gate;
|
|
11
|
+
|
|
12
|
+
`@atlaskit/rovo-triggers`: `JiraWorkItemCreatingDraft` now carries an optional `issueType`.
|
|
13
|
+
Subscribers can read it to render the icon:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { useSubscribe } from '@atlaskit/rovo-triggers/main';
|
|
17
|
+
import { JIRA_WORK_ITEMS_CREATING_EVENT } from '@atlaskit/rovo-triggers/types';
|
|
18
|
+
|
|
19
|
+
useSubscribe({ topic: 'ai-mate' }, (payload) => {
|
|
20
|
+
if (payload.type === JIRA_WORK_ITEMS_CREATING_EVENT) {
|
|
21
|
+
payload.data.draftWorkItems.forEach((draft) => {
|
|
22
|
+
// `issueType` is only present when the gate is on; always guard for its absence.
|
|
23
|
+
if (draft.issueType) {
|
|
24
|
+
const { id, name, iconUrl } = draft.issueType;
|
|
25
|
+
renderOptimisticRow({
|
|
26
|
+
summary: draft.summary,
|
|
27
|
+
issueTypeName: name,
|
|
28
|
+
issueTypeIcon: iconUrl,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`@atlassian/jira-create-work-items`: `JiraDraftDataForCreateAllCommandResult.context` now also
|
|
37
|
+
exposes `issueTypeToFieldsConfigMap`, the issue-type metadata resolved during validation (keyed by
|
|
38
|
+
issue type id):
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
const result = await validateIssuesToCreate({ draftWorkItems });
|
|
42
|
+
const issueType = result.context.issueTypeToFieldsConfigMap[issueTypeId];
|
|
43
|
+
// issueType?.name, issueType?.avatarUrl — used to enrich the `creating` draft payload.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Patch Changes
|
|
47
|
+
|
|
48
|
+
- Updated dependencies
|
|
49
|
+
|
|
50
|
+
## 10.2.0
|
|
51
|
+
|
|
52
|
+
### Minor Changes
|
|
53
|
+
|
|
54
|
+
- [`e8b955947dd44`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e8b955947dd44) -
|
|
55
|
+
Add browser selection context support for Rovo Chat
|
|
56
|
+
|
|
3
57
|
## 10.1.0
|
|
4
58
|
|
|
5
59
|
### Minor Changes
|
package/dist/types/types.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ import type { SolutionArchitectAgentActivationFlowStoppedPayload, SolutionArchit
|
|
|
5
5
|
import type { ChatContextPayload } from './common/utils/chat-context/types';
|
|
6
6
|
import type { RovoChatOpenMode } from './common/utils/params/types';
|
|
7
7
|
export declare const Topics: {
|
|
8
|
-
readonly AI_MATE:
|
|
9
|
-
readonly AI_MATE_ACTIONS:
|
|
10
|
-
readonly AI_MATE_INSERT_URLS:
|
|
11
|
-
readonly AI_MATE_CHAT_INPUT_OVERLAY:
|
|
12
|
-
readonly AVP:
|
|
8
|
+
readonly AI_MATE: 'ai-mate';
|
|
9
|
+
readonly AI_MATE_ACTIONS: 'ai-mate-actions';
|
|
10
|
+
readonly AI_MATE_INSERT_URLS: 'ai-mate-chat-inserts';
|
|
11
|
+
readonly AI_MATE_CHAT_INPUT_OVERLAY: 'ai-mate-chat-input-overlay';
|
|
12
|
+
readonly AVP: 'avp';
|
|
13
13
|
};
|
|
14
14
|
export type Topic = (typeof Topics)[keyof typeof Topics];
|
|
15
15
|
export type PayloadCore<TKey extends string, TData = void> = {
|
|
@@ -124,6 +124,13 @@ export type ChatNewPayload = PayloadCore<'chat-new', {
|
|
|
124
124
|
* and comment:<commentId> so the backend can create a SessionAssociationPublic record.
|
|
125
125
|
*/
|
|
126
126
|
tags?: string[];
|
|
127
|
+
/**
|
|
128
|
+
* Optimistic agent metadata for the editor agent mention flow.
|
|
129
|
+
* Allows showing the agent avatar telepointer immediately during AI streaming
|
|
130
|
+
* without an extra network round-trip to fetch agent details.
|
|
131
|
+
*/
|
|
132
|
+
agentName?: string;
|
|
133
|
+
agentIdentityAccountId?: string;
|
|
127
134
|
} & Partial<TargetAgentParam> & PlaceholderParam>;
|
|
128
135
|
export type RovoSpaceEntryPoint = 'leftNav' | 'sidebar' | 'zeroQuery' | 'typeahead' | 'inChatRecommendation';
|
|
129
136
|
/**
|
|
@@ -219,6 +226,9 @@ export type BrowserContextPayloadData = {
|
|
|
219
226
|
browserUrl: string;
|
|
220
227
|
htmlBody?: string;
|
|
221
228
|
canvasText?: string;
|
|
229
|
+
selection?: {
|
|
230
|
+
content: string;
|
|
231
|
+
};
|
|
222
232
|
} | undefined;
|
|
223
233
|
};
|
|
224
234
|
export type WorkflowContextPayloadData = {
|
|
@@ -610,7 +620,7 @@ export type TaskModifyPlanSubmittedPayload = PayloadCore<'task-modify-plan-submi
|
|
|
610
620
|
invocationId: string;
|
|
611
621
|
prompt: DocNode;
|
|
612
622
|
}>;
|
|
613
|
-
export declare const JIRA_INLINE_AGENT_CREATION_AGENT_ASSIGNED_EVENT:
|
|
623
|
+
export declare const JIRA_INLINE_AGENT_CREATION_AGENT_ASSIGNED_EVENT: 'jira-inline-agent-creation-agent-assigned';
|
|
614
624
|
export type JiraInlineAgentCreationAgentAssignedPayload = PayloadCore<typeof JIRA_INLINE_AGENT_CREATION_AGENT_ASSIGNED_EVENT, {
|
|
615
625
|
issueId: string;
|
|
616
626
|
}>;
|
|
@@ -621,12 +631,18 @@ export type JiraInlineAgentCreationAgentAssignedPayload = PayloadCore<typeof JIR
|
|
|
621
631
|
* batch with the follow-up {@link JIRA_WORK_ITEMS_CREATED_EVENT} / {@link JIRA_WORK_ITEMS_CREATE_FAILED_EVENT}
|
|
622
632
|
* via `invocationId`.
|
|
623
633
|
*/
|
|
624
|
-
export declare const JIRA_WORK_ITEMS_CREATING_EVENT:
|
|
634
|
+
export declare const JIRA_WORK_ITEMS_CREATING_EVENT: 'jira-work-items-creating';
|
|
625
635
|
export type JiraWorkItemCreatingDraft = {
|
|
626
636
|
/** Skill invocation id of this draft; used as the optimistic row's stable id. */
|
|
627
637
|
invocationId: string;
|
|
628
638
|
/** Draft summary, used to render the optimistic row immediately. */
|
|
629
639
|
summary: string;
|
|
640
|
+
/** Optional Issue type of this draft, used to render the optimistic row's issue-type icon immediately. */
|
|
641
|
+
issueType?: {
|
|
642
|
+
id: string;
|
|
643
|
+
name: string;
|
|
644
|
+
iconUrl: string;
|
|
645
|
+
};
|
|
630
646
|
};
|
|
631
647
|
export type JiraWorkItemsCreatingPayload = PayloadCore<typeof JIRA_WORK_ITEMS_CREATING_EVENT, {
|
|
632
648
|
/**
|
|
@@ -639,7 +655,7 @@ export type JiraWorkItemsCreatingPayload = PayloadCore<typeof JIRA_WORK_ITEMS_CR
|
|
|
639
655
|
/** Draft work items submitted for creation (parents and their children, flattened). */
|
|
640
656
|
draftWorkItems: JiraWorkItemCreatingDraft[];
|
|
641
657
|
}>;
|
|
642
|
-
export declare const JIRA_WORK_ITEMS_CREATED_EVENT:
|
|
658
|
+
export declare const JIRA_WORK_ITEMS_CREATED_EVENT: 'jira-work-items-created';
|
|
643
659
|
export type JiraWorkItemsCreatedPayload = PayloadCore<typeof JIRA_WORK_ITEMS_CREATED_EVENT, {
|
|
644
660
|
/** Identifies the batch; matches the {@link JIRA_WORK_ITEMS_CREATING_EVENT} `invocationId`. */
|
|
645
661
|
invocationId: string;
|
|
@@ -651,7 +667,7 @@ export type JiraWorkItemsCreatedPayload = PayloadCore<typeof JIRA_WORK_ITEMS_CRE
|
|
|
651
667
|
* {@link JIRA_WORK_ITEMS_CREATING_EVENT}. Subscribers use `invocationId` to revert any optimistic
|
|
652
668
|
* rows they rendered for that batch.
|
|
653
669
|
*/
|
|
654
|
-
export declare const JIRA_WORK_ITEMS_CREATE_FAILED_EVENT:
|
|
670
|
+
export declare const JIRA_WORK_ITEMS_CREATE_FAILED_EVENT: 'jira-work-items-create-failed';
|
|
655
671
|
export type JiraWorkItemsCreateFailedPayload = PayloadCore<typeof JIRA_WORK_ITEMS_CREATE_FAILED_EVENT, {
|
|
656
672
|
/** Identifies the batch; matches the {@link JIRA_WORK_ITEMS_CREATING_EVENT} `invocationId` to revert its optimistic rows. */
|
|
657
673
|
invocationId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/rovo-triggers",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.3.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": {
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
],
|
|
29
29
|
"atlaskit:src": "src/index.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/adf-schema": "^56.
|
|
32
|
-
"@atlaskit/platform-feature-flags": "^2.
|
|
31
|
+
"@atlaskit/adf-schema": "^56.6.0",
|
|
32
|
+
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
33
33
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
34
34
|
"@babel/runtime": "^7.0.0",
|
|
35
35
|
"bind-event-listener": "^3.0.0"
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"@af/integration-testing": "workspace:^",
|
|
42
42
|
"@af/visual-regression": "workspace:^",
|
|
43
43
|
"@atlaskit/css": "^1.0.0",
|
|
44
|
-
"@atlaskit/primitives": "^22.
|
|
44
|
+
"@atlaskit/primitives": "^22.2.0",
|
|
45
45
|
"@atlaskit/ssr": "workspace:^",
|
|
46
|
-
"@atlassian/a11y-jest-testing": "^0.
|
|
46
|
+
"@atlassian/a11y-jest-testing": "^0.14.0",
|
|
47
47
|
"@atlassian/feature-flags-test-utils": "^1.2.0",
|
|
48
48
|
"@testing-library/react": "^16.3.0",
|
|
49
49
|
"react": "^18.2.0",
|