@atlaskit/rovo-triggers 10.2.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 +47 -0
- package/dist/types/types.d.ts +22 -9
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
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
|
+
|
|
3
50
|
## 10.2.0
|
|
4
51
|
|
|
5
52
|
### 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
|
/**
|
|
@@ -613,7 +620,7 @@ export type TaskModifyPlanSubmittedPayload = PayloadCore<'task-modify-plan-submi
|
|
|
613
620
|
invocationId: string;
|
|
614
621
|
prompt: DocNode;
|
|
615
622
|
}>;
|
|
616
|
-
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';
|
|
617
624
|
export type JiraInlineAgentCreationAgentAssignedPayload = PayloadCore<typeof JIRA_INLINE_AGENT_CREATION_AGENT_ASSIGNED_EVENT, {
|
|
618
625
|
issueId: string;
|
|
619
626
|
}>;
|
|
@@ -624,12 +631,18 @@ export type JiraInlineAgentCreationAgentAssignedPayload = PayloadCore<typeof JIR
|
|
|
624
631
|
* batch with the follow-up {@link JIRA_WORK_ITEMS_CREATED_EVENT} / {@link JIRA_WORK_ITEMS_CREATE_FAILED_EVENT}
|
|
625
632
|
* via `invocationId`.
|
|
626
633
|
*/
|
|
627
|
-
export declare const JIRA_WORK_ITEMS_CREATING_EVENT:
|
|
634
|
+
export declare const JIRA_WORK_ITEMS_CREATING_EVENT: 'jira-work-items-creating';
|
|
628
635
|
export type JiraWorkItemCreatingDraft = {
|
|
629
636
|
/** Skill invocation id of this draft; used as the optimistic row's stable id. */
|
|
630
637
|
invocationId: string;
|
|
631
638
|
/** Draft summary, used to render the optimistic row immediately. */
|
|
632
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
|
+
};
|
|
633
646
|
};
|
|
634
647
|
export type JiraWorkItemsCreatingPayload = PayloadCore<typeof JIRA_WORK_ITEMS_CREATING_EVENT, {
|
|
635
648
|
/**
|
|
@@ -642,7 +655,7 @@ export type JiraWorkItemsCreatingPayload = PayloadCore<typeof JIRA_WORK_ITEMS_CR
|
|
|
642
655
|
/** Draft work items submitted for creation (parents and their children, flattened). */
|
|
643
656
|
draftWorkItems: JiraWorkItemCreatingDraft[];
|
|
644
657
|
}>;
|
|
645
|
-
export declare const JIRA_WORK_ITEMS_CREATED_EVENT:
|
|
658
|
+
export declare const JIRA_WORK_ITEMS_CREATED_EVENT: 'jira-work-items-created';
|
|
646
659
|
export type JiraWorkItemsCreatedPayload = PayloadCore<typeof JIRA_WORK_ITEMS_CREATED_EVENT, {
|
|
647
660
|
/** Identifies the batch; matches the {@link JIRA_WORK_ITEMS_CREATING_EVENT} `invocationId`. */
|
|
648
661
|
invocationId: string;
|
|
@@ -654,7 +667,7 @@ export type JiraWorkItemsCreatedPayload = PayloadCore<typeof JIRA_WORK_ITEMS_CRE
|
|
|
654
667
|
* {@link JIRA_WORK_ITEMS_CREATING_EVENT}. Subscribers use `invocationId` to revert any optimistic
|
|
655
668
|
* rows they rendered for that batch.
|
|
656
669
|
*/
|
|
657
|
-
export declare const JIRA_WORK_ITEMS_CREATE_FAILED_EVENT:
|
|
670
|
+
export declare const JIRA_WORK_ITEMS_CREATE_FAILED_EVENT: 'jira-work-items-create-failed';
|
|
658
671
|
export type JiraWorkItemsCreateFailedPayload = PayloadCore<typeof JIRA_WORK_ITEMS_CREATE_FAILED_EVENT, {
|
|
659
672
|
/** Identifies the batch; matches the {@link JIRA_WORK_ITEMS_CREATING_EVENT} `invocationId` to revert its optimistic rows. */
|
|
660
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,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"atlaskit:src": "src/index.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/adf-schema": "^56.
|
|
31
|
+
"@atlaskit/adf-schema": "^56.6.0",
|
|
32
32
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
33
33
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
34
34
|
"@babel/runtime": "^7.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",
|