@atlaskit/rovo-triggers 10.11.0 → 10.13.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,87 @@
1
1
  # @atlaskit/rovo-triggers
2
2
 
3
+ ## 10.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`a1e550aeb47f4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a1e550aeb47f4) -
8
+ Add an experiment-gated "Search conversations" entry point next to New chat in the Rovo chat side
9
+ navigation (both the full-page chat sidebar and the appified Home "Your chats" section) that opens
10
+ the All Conversations view. Clicking it deselects any active space so the conversation list is
11
+ shown, opens the list via the live navigation handler (so it works even when the chat app is
12
+ already mounted), and sets a one-shot intent that focuses the All Conversations search input the
13
+ next time it mounts. The entry point is behind the `townsquare_rovo_chat_search_button_exp`
14
+ Statsig experiment, read via `expVal(..., 'isEnabled', false)` so exposure is recorded on
15
+ evaluation; only the Search conversations entry point and its focus intent are enabled for
16
+ treatment.
17
+
18
+ This adds new public API to four published packages (hence `minor`):
19
+ - `@atlassian/rovo-navigation` — new optional `onSearchChatsClick` prop on the side navigation.
20
+ When provided, a search `IconButton` is rendered next to the "New chat" action on the Chats
21
+ header; when omitted, nothing changes.
22
+ - `@atlassian/conversation-assistant-store` — new exported `useShouldFocusChatSearchSelector` hook
23
+ for reading the one-shot "focus the All Conversations search input" intent.
24
+ - `@atlaskit/rovo-triggers` — new `all-conversations` `RovoChatPathway` value and matching
25
+ `AllConversationsParams` member of `RovoChatParams`, allowing callers to deep-link to All
26
+ Conversations.
27
+ - `@atlassian/conversation-assistant` — new `openAllConversations` navigation action, allowing
28
+ distinct entry points to retain their own telemetry.
29
+
30
+ Usage:
31
+
32
+ ```tsx
33
+ import { RovoSideNavigation } from '@atlassian/rovo-navigation';
34
+ import { useRovoNavigation } from '@atlassian/conversation-assistant';
35
+ import {
36
+ useShouldFocusChatSearchSelector,
37
+ useUIStoreActions,
38
+ } from '@atlassian/conversation-assistant-store/controllers/ui-store';
39
+ import type { RovoChatParams } from '@atlaskit/rovo-triggers/params-types';
40
+
41
+ const { openAllConversations } = useRovoNavigation({ assistanceServiceParams });
42
+ const { setShouldFocusChatSearch } = useUIStoreActions();
43
+ const handleSearchChats = () => {
44
+ setShouldFocusChatSearch(true);
45
+ openAllConversations();
46
+ };
47
+
48
+ // Render the Search conversations entry point next to New chat:
49
+ <RovoSideNavigation onSearchChatsClick={handleSearchChats} />;
50
+
51
+ // Consume the one-shot focus intent where the search input mounts:
52
+ const [{ shouldFocusChatSearch }] = useShouldFocusChatSearchSelector();
53
+
54
+ // Deep-link into All Conversations:
55
+ const params: RovoChatParams = { pathway: 'all-conversations' };
56
+ ```
57
+
58
+ ## 10.12.0
59
+
60
+ ### Minor Changes
61
+
62
+ - [`6b25a30a1f55f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6b25a30a1f55f) -
63
+ Add the agent-mention run-state bridge (EDITOR-8549): a store, keyed by the run's
64
+ `conversationId`, that makes live Rovo agent run-state readable outside chat and ties it back to
65
+ the invoking agent-mention node (whose `localId` rides on the record). It is fed from the existing
66
+ chat/message stream, with no new connection. A run is only tracked once it has been seeded at send
67
+ time, which happens only for mention-invoked runs behind the `platform_editor_agent_state_bridge`
68
+ experiment, so it stays inert otherwise. Adds an optional `invokedByNodeLocalId` to the `chat-new`
69
+ trigger payload.
70
+
71
+ Read run-state from `@atlassian/conversation-assistant-store/controllers/agent-mention-run-state`,
72
+ keyed by conversation (the run's identity) or by the invoking mention node:
73
+
74
+ ```tsx
75
+ import {
76
+ useAgentRunStateForConversation,
77
+ useAgentRunStateForNode,
78
+ } from '@atlassian/conversation-assistant-store/controllers/agent-mention-run-state';
79
+
80
+ const byConversation = useAgentRunStateForConversation(conversationId);
81
+ const byNode = useAgentRunStateForNode(nodeLocalId);
82
+ // 'thinking' | 'working' | 'editing' | 'needs-input' | 'done' | 'failed' | 'blocked' | undefined
83
+ ```
84
+
3
85
  ## 10.11.0
4
86
 
5
87
  ### Minor Changes
@@ -1,4 +1,4 @@
1
- export type RovoChatPathway = 'chat' | 'agents-browse' | 'agents-create' | 'pulse' | 'remix';
1
+ export type RovoChatPathway = 'chat' | 'agents-browse' | 'agents-create' | 'pulse' | 'remix' | 'all-conversations';
2
2
  export type RovoChatOpenMode = 'sidebar' | 'mini-modal' | 'full-screen-modal';
3
3
  export interface BaseRovoChatParams {
4
4
  pathway: RovoChatPathway;
@@ -25,5 +25,6 @@ type AgentBrowseParams = RovoParams<'agents-browse'>;
25
25
  type AgentCreateParams = RovoParams<'agents-create'>;
26
26
  type PulseParams = RovoParams<'pulse'>;
27
27
  type RemixParams = RovoParams<'remix'>;
28
- export type RovoChatParams = Partial<ChatParams | AgentCreateParams | AgentBrowseParams | PulseParams | RemixParams>;
28
+ type AllConversationsParams = RovoParams<'all-conversations'>;
29
+ export type RovoChatParams = Partial<ChatParams | AgentCreateParams | AgentBrowseParams | PulseParams | RemixParams | AllConversationsParams>;
29
30
  export {};
@@ -143,6 +143,11 @@ export type ChatNewPayload = PayloadCore<'chat-new', {
143
143
  agentIdentityAccountId?: string;
144
144
  /** Identifies the product surface that launched the conversation for analytics attribution. */
145
145
  chatEntryPoint?: ChatEntryPoint;
146
+ /**
147
+ * The `localId` of the agent-mention node that invoked this run. Threaded through so the
148
+ * agent-run-state bridge can key live run-state back to the node.
149
+ */
150
+ invokedByNodeLocalId?: string;
146
151
  } & Partial<TargetAgentParam> & PlaceholderParam>;
147
152
  export type RovoSpaceEntryPoint = 'leftNav' | 'sidebar' | 'zeroQuery' | 'typeahead' | 'inChatRecommendation';
148
153
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-triggers",
3
- "version": "10.11.0",
3
+ "version": "10.13.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": {