diff --git a/workbench-app/src/components/App/DialogControl.tsx b/workbench-app/src/components/App/DialogControl.tsx index a1882a0d..cabea4e7 100644 --- a/workbench-app/src/components/App/DialogControl.tsx +++ b/workbench-app/src/components/App/DialogControl.tsx @@ -33,19 +33,21 @@ export const DialogControl: React.FC = (props) => { return ( - {trigger} + {trigger} {title && {title}} {content && {content}} - - + + {additionalActions?.map((action, index) => ( - {action} + + {action} + ))} diff --git a/workbench-app/src/components/AssistantServiceRegistrations/AssistantServiceRegistrationApiKeyReset.tsx b/workbench-app/src/components/AssistantServiceRegistrations/AssistantServiceRegistrationApiKeyReset.tsx index 3c7a927c..eb1a16a7 100644 --- a/workbench-app/src/components/AssistantServiceRegistrations/AssistantServiceRegistrationApiKeyReset.tsx +++ b/workbench-app/src/components/AssistantServiceRegistrations/AssistantServiceRegistrationApiKeyReset.tsx @@ -73,7 +73,7 @@ export const AssistantServiceRegistrationApiKeyReset: React.FC + diff --git a/workbench-app/src/components/AssistantServiceRegistrations/AssistantServiceRegistrationCreate.tsx b/workbench-app/src/components/AssistantServiceRegistrations/AssistantServiceRegistrationCreate.tsx index 323e9f4a..ea973ad8 100644 --- a/workbench-app/src/components/AssistantServiceRegistrations/AssistantServiceRegistrationCreate.tsx +++ b/workbench-app/src/components/AssistantServiceRegistrations/AssistantServiceRegistrationCreate.tsx @@ -5,6 +5,7 @@ import { Checkbox, DialogOpenChangeData, DialogOpenChangeEvent, + DialogTrigger, Field, Input, makeStyles, @@ -161,9 +162,11 @@ export const AssistantServiceRegistrationCreate: React.FC } additionalActions={[ - , + + + , ]} closeLabel="Cancel" /> diff --git a/workbench-app/src/components/AssistantServiceRegistrations/AssistantServiceRegistrationRemove.tsx b/workbench-app/src/components/AssistantServiceRegistrations/AssistantServiceRegistrationRemove.tsx index f19686a8..cc59d15f 100644 --- a/workbench-app/src/components/AssistantServiceRegistrations/AssistantServiceRegistrationRemove.tsx +++ b/workbench-app/src/components/AssistantServiceRegistrations/AssistantServiceRegistrationRemove.tsx @@ -1,5 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. +import { DialogTrigger } from '@fluentui/react-components'; import { DeleteRegular } from '@fluentui/react-icons'; import React from 'react'; import { AssistantServiceRegistration } from '../../models/AssistantServiceRegistration'; @@ -42,12 +43,13 @@ export const AssistantServiceRegistrationRemove: React.FC} - label="Delete" - onClick={handleAssistantServiceRegistrationRemove} - />, + + } + label="Delete" + onClick={handleAssistantServiceRegistrationRemove} + /> + , ], }} /> diff --git a/workbench-app/src/components/Assistants/ApplyConfigButton.tsx b/workbench-app/src/components/Assistants/ApplyConfigButton.tsx index a16855de..c1b126a3 100644 --- a/workbench-app/src/components/Assistants/ApplyConfigButton.tsx +++ b/workbench-app/src/components/Assistants/ApplyConfigButton.tsx @@ -95,7 +95,7 @@ export const ApplyConfigButton: React.FC = (props) => { ), closeLabel: 'Cancel', additionalActions: [ - + diff --git a/workbench-app/src/components/Assistants/AssistantCreate.tsx b/workbench-app/src/components/Assistants/AssistantCreate.tsx index e7d09d7d..18ba6011 100644 --- a/workbench-app/src/components/Assistants/AssistantCreate.tsx +++ b/workbench-app/src/components/Assistants/AssistantCreate.tsx @@ -278,7 +278,7 @@ export const AssistantCreate: React.FC = (props) => { - + diff --git a/workbench-app/src/components/Assistants/AssistantDuplicate.tsx b/workbench-app/src/components/Assistants/AssistantDuplicate.tsx index bef5f216..dba85af1 100644 --- a/workbench-app/src/components/Assistants/AssistantDuplicate.tsx +++ b/workbench-app/src/components/Assistants/AssistantDuplicate.tsx @@ -40,7 +40,7 @@ export const AssistantDuplicate: React.FC = (props) => content:

Are you sure you want to duplicate this assistant?

, closeLabel: 'Cancel', additionalActions: [ - + diff --git a/workbench-app/src/components/Assistants/AssistantRemove.tsx b/workbench-app/src/components/Assistants/AssistantRemove.tsx index 5bd3a72b..827d0caf 100644 --- a/workbench-app/src/components/Assistants/AssistantRemove.tsx +++ b/workbench-app/src/components/Assistants/AssistantRemove.tsx @@ -1,5 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. +import { DialogTrigger } from '@fluentui/react-components'; import { PlugDisconnectedRegular } from '@fluentui/react-icons'; import React from 'react'; import { Conversation } from '../../models/Conversation'; @@ -52,12 +53,13 @@ export const AssistantRemove: React.FC = (props) => { ), closeLabel: 'Cancel', additionalActions: [ - } - label="Remove" - onClick={handleAssistantRemove} - />, + + } + label="Remove" + onClick={handleAssistantRemove} + /> + , ], }} /> diff --git a/workbench-app/src/components/Assistants/AssistantRename.tsx b/workbench-app/src/components/Assistants/AssistantRename.tsx index e111c116..f59e52b8 100644 --- a/workbench-app/src/components/Assistants/AssistantRename.tsx +++ b/workbench-app/src/components/Assistants/AssistantRename.tsx @@ -1,6 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. -import { Field, Input } from '@fluentui/react-components'; +import { DialogTrigger, Field, Input } from '@fluentui/react-components'; import { EditRegular } from '@fluentui/react-icons'; import React from 'react'; import { CommandButton } from '../App/CommandButton'; @@ -39,13 +39,14 @@ export const AssistantRename: React.FC = (props) => { ), closeLabel: 'Cancel', additionalActions: [ - , + + + , ], }} /> diff --git a/workbench-app/src/components/Conversations/ConversationCreate.tsx b/workbench-app/src/components/Conversations/ConversationCreate.tsx index 3848bb0c..a87cd221 100644 --- a/workbench-app/src/components/Conversations/ConversationCreate.tsx +++ b/workbench-app/src/components/Conversations/ConversationCreate.tsx @@ -4,6 +4,7 @@ import { Button, DialogOpenChangeData, DialogOpenChangeEvent, + DialogTrigger, Field, Input, makeStyles, @@ -91,9 +92,11 @@ export const ConversationCreate: React.FC = (props) => } closeLabel="Cancel" additionalActions={[ - , + + + , ]} /> ); diff --git a/workbench-app/src/components/Conversations/ConversationDuplicate.tsx b/workbench-app/src/components/Conversations/ConversationDuplicate.tsx index 31bdb0f3..b3fcc59b 100644 --- a/workbench-app/src/components/Conversations/ConversationDuplicate.tsx +++ b/workbench-app/src/components/Conversations/ConversationDuplicate.tsx @@ -29,7 +29,7 @@ const useConversationDuplicateControls = (ids: string[]) => { onDuplicate?: (conversationId: string) => void, onDuplicateError?: (error: Error) => void, ) => ( - + diff --git a/workbench-app/src/components/Conversations/ConversationRemove.tsx b/workbench-app/src/components/Conversations/ConversationRemove.tsx index b7ee3cd9..c34e64a0 100644 --- a/workbench-app/src/components/Conversations/ConversationRemove.tsx +++ b/workbench-app/src/components/Conversations/ConversationRemove.tsx @@ -31,7 +31,7 @@ const useConversationRemoveControls = () => { const removeConversationForm = () =>

Are you sure you want to remove this conversation from your list?

; const removeConversationButton = (conversationId: string, participantId: string, onRemove?: () => void) => ( - + diff --git a/workbench-app/src/components/Conversations/ConversationRename.tsx b/workbench-app/src/components/Conversations/ConversationRename.tsx index ba087763..9e18d7da 100644 --- a/workbench-app/src/components/Conversations/ConversationRename.tsx +++ b/workbench-app/src/components/Conversations/ConversationRename.tsx @@ -1,6 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. -import { Button, Field, Input } from '@fluentui/react-components'; +import { Button, DialogTrigger, Field, Input } from '@fluentui/react-components'; import { EditRegular } from '@fluentui/react-icons'; import React from 'react'; import { useUpdateConversationMutation } from '../../services/workbench'; @@ -40,9 +40,11 @@ export const useConversationRenameControls = (id: string, value: string) => { ); const renameConversationButton = (onRename?: (id: string, value: string) => Promise) => ( - + + + ); return { diff --git a/workbench-app/src/components/Conversations/ConversationShareCreate.tsx b/workbench-app/src/components/Conversations/ConversationShareCreate.tsx index e79726b6..ddd7e204 100644 --- a/workbench-app/src/components/Conversations/ConversationShareCreate.tsx +++ b/workbench-app/src/components/Conversations/ConversationShareCreate.tsx @@ -4,6 +4,7 @@ import { Button, DialogOpenChangeData, DialogOpenChangeEvent, + DialogTrigger, Field, Input, makeStyles, @@ -126,9 +127,11 @@ export const ConversationShareCreate: React.FC = ( } closeLabel="Cancel" additionalActions={[ - , + + + , ]} /> ); diff --git a/workbench-app/src/components/Conversations/FileItem.tsx b/workbench-app/src/components/Conversations/FileItem.tsx index 1bec17ec..f7b3bb16 100644 --- a/workbench-app/src/components/Conversations/FileItem.tsx +++ b/workbench-app/src/components/Conversations/FileItem.tsx @@ -144,7 +144,7 @@ export const FileItem: React.FC = (props) => { ), closeLabel: 'Cancel', additionalActions: [ - + diff --git a/workbench-app/src/components/Conversations/MessageDelete.tsx b/workbench-app/src/components/Conversations/MessageDelete.tsx index 37653d51..9a639a94 100644 --- a/workbench-app/src/components/Conversations/MessageDelete.tsx +++ b/workbench-app/src/components/Conversations/MessageDelete.tsx @@ -49,7 +49,7 @@ export const MessageDelete: React.FC = (props) => { ), closeLabel: 'Cancel', additionalActions: [ - + diff --git a/workbench-app/src/components/Conversations/RewindConversation.tsx b/workbench-app/src/components/Conversations/RewindConversation.tsx index eff6f859..c7d57ec9 100644 --- a/workbench-app/src/components/Conversations/RewindConversation.tsx +++ b/workbench-app/src/components/Conversations/RewindConversation.tsx @@ -111,12 +111,12 @@ export const RewindConversation: React.FC = (props) => ), closeLabel: 'Cancel', additionalActions: [ - + , - + , ], diff --git a/workbench-app/src/components/Conversations/ShareRemove.tsx b/workbench-app/src/components/Conversations/ShareRemove.tsx index ff57f3d5..c2850a9b 100644 --- a/workbench-app/src/components/Conversations/ShareRemove.tsx +++ b/workbench-app/src/components/Conversations/ShareRemove.tsx @@ -38,7 +38,7 @@ export const ShareRemove: React.FC = (props) => { content:

Are you sure you want to delete this share?

, closeLabel: 'Cancel', additionalActions: [ - + diff --git a/workbench-app/src/components/FrontDoor/Controls/NewConversationButton.tsx b/workbench-app/src/components/FrontDoor/Controls/NewConversationButton.tsx index 637f5e0b..7d65412d 100644 --- a/workbench-app/src/components/FrontDoor/Controls/NewConversationButton.tsx +++ b/workbench-app/src/components/FrontDoor/Controls/NewConversationButton.tsx @@ -16,7 +16,11 @@ export const NewConversationButton: React.FC = () => { title: 'New Conversation', content: createConversationForm(), closeLabel: 'Cancel', - additionalActions: [{createConversationSubmitButton()}], + additionalActions: [ + + {createConversationSubmitButton()} + , + ], }} /> ); diff --git a/workbench-app/src/components/FrontDoor/ConversationList.tsx b/workbench-app/src/components/FrontDoor/ConversationList.tsx index 77357224..d539f685 100644 --- a/workbench-app/src/components/FrontDoor/ConversationList.tsx +++ b/workbench-app/src/components/FrontDoor/ConversationList.tsx @@ -15,6 +15,7 @@ import { Tooltip, makeStyles, mergeClasses, + shorthands, tokens, } from '@fluentui/react-components'; import { @@ -48,6 +49,19 @@ dayjs.extend(timezone); dayjs.tz.guess(); const useClasses = makeStyles({ + actions: { + position: 'sticky', + top: 0, + zIndex: tokens.zIndexPriority, + backgroundColor: tokens.colorNeutralBackground2, + ...shorthands.padding(tokens.spacingVerticalS, tokens.spacingHorizontalM), + }, + content: { + display: 'flex', + flexDirection: 'column', + gap: tokens.spacingVerticalM, + ...shorthands.padding(0, tokens.spacingHorizontalM, tokens.spacingVerticalM, tokens.spacingHorizontalM), + }, conversationButton: { width: '250px', justifyContent: 'start', @@ -209,29 +223,33 @@ export const ConversationList: React.FC = () => { onCancel={() => setRemoveConversation(undefined)} /> )} - Conversations - } - contentAfter={ - filter && ( - , + + + , ]} /> ); diff --git a/workbench-app/src/components/Workflows/WorkflowDesigner/AssistantDefinitionCreate.tsx b/workbench-app/src/components/Workflows/WorkflowDesigner/AssistantDefinitionCreate.tsx index 7b203993..b36a7adc 100644 --- a/workbench-app/src/components/Workflows/WorkflowDesigner/AssistantDefinitionCreate.tsx +++ b/workbench-app/src/components/Workflows/WorkflowDesigner/AssistantDefinitionCreate.tsx @@ -5,6 +5,7 @@ import { Button, DialogOpenChangeData, DialogOpenChangeEvent, + DialogTrigger, Divider, Dropdown, Field, @@ -187,9 +188,11 @@ export const AssistantDefinitionCreate: React.FC = (props) } closeLabel="Cancel" additionalActions={[ - , + + + , ]} /> ); diff --git a/workbench-app/src/components/Workflows/WorkflowDesigner/WorkflowCanvas.tsx b/workbench-app/src/components/Workflows/WorkflowDesigner/WorkflowCanvas.tsx index c21c91f5..a1c3ddbf 100644 --- a/workbench-app/src/components/Workflows/WorkflowDesigner/WorkflowCanvas.tsx +++ b/workbench-app/src/components/Workflows/WorkflowDesigner/WorkflowCanvas.tsx @@ -445,7 +445,7 @@ export const WorkflowCanvas: React.FC = (props) => { content="Are you sure you want to delete the selected items?" closeLabel="Cancel" additionalActions={[ - + diff --git a/workbench-app/src/components/Workflows/WorkflowDesigner/WorkflowHelp.tsx b/workbench-app/src/components/Workflows/WorkflowDesigner/WorkflowHelp.tsx index 63209f1f..690d9f58 100644 --- a/workbench-app/src/components/Workflows/WorkflowDesigner/WorkflowHelp.tsx +++ b/workbench-app/src/components/Workflows/WorkflowDesigner/WorkflowHelp.tsx @@ -104,7 +104,7 @@ export const WorkflowHelp: React.FC = () => { } }} > - + } /> diff --git a/workbench-app/src/components/Workflows/WorkflowDesigner/WorkflowStateAssistants.tsx b/workbench-app/src/components/Workflows/WorkflowDesigner/WorkflowStateAssistants.tsx index d2119dd2..56a049e9 100644 --- a/workbench-app/src/components/Workflows/WorkflowDesigner/WorkflowStateAssistants.tsx +++ b/workbench-app/src/components/Workflows/WorkflowDesigner/WorkflowStateAssistants.tsx @@ -7,6 +7,7 @@ import { AccordionPanel, Button, Card, + DialogTrigger, Text, Tooltip, makeStyles, @@ -185,15 +186,18 @@ export const WorkflowStateAssistants: React.FC = ( ), closeLabel: 'Cancel', additionalActions: [ - , + + + , ], }} /> diff --git a/workbench-app/src/components/Workflows/WorkflowDesigner/WorkflowStateOutlets.tsx b/workbench-app/src/components/Workflows/WorkflowDesigner/WorkflowStateOutlets.tsx index 4c8492cc..9e15cab9 100644 --- a/workbench-app/src/components/Workflows/WorkflowDesigner/WorkflowStateOutlets.tsx +++ b/workbench-app/src/components/Workflows/WorkflowDesigner/WorkflowStateOutlets.tsx @@ -8,6 +8,7 @@ import { AccordionPanel, Button, Card, + DialogTrigger, Field, Input, Textarea, @@ -364,13 +365,14 @@ export const WorkflowStateOutlets: React.FC = (props) ), closeLabel: 'Cancel', additionalActions: [ - , + + + , ], }} /> diff --git a/workbench-app/src/components/Workflows/WorkflowRemove.tsx b/workbench-app/src/components/Workflows/WorkflowRemove.tsx index 2bbe9cc3..9cd4467a 100644 --- a/workbench-app/src/components/Workflows/WorkflowRemove.tsx +++ b/workbench-app/src/components/Workflows/WorkflowRemove.tsx @@ -39,7 +39,7 @@ export const WorkflowRemove: React.FC = (props) => { content:

Are you sure you want to remove this workflow?

, closeLabel: 'Cancel', additionalActions: [ - + diff --git a/workbench-app/src/components/Workflows/WorkflowRunCreate.tsx b/workbench-app/src/components/Workflows/WorkflowRunCreate.tsx index 4014a119..5dcbff8d 100644 --- a/workbench-app/src/components/Workflows/WorkflowRunCreate.tsx +++ b/workbench-app/src/components/Workflows/WorkflowRunCreate.tsx @@ -4,6 +4,7 @@ import { Button, DialogOpenChangeData, DialogOpenChangeEvent, + DialogTrigger, Field, Input, makeStyles, @@ -95,9 +96,11 @@ export const WorkflowRunCreate: React.FC = (props) => { } closeLabel="Cancel" additionalActions={[ - , + + + , ]} /> ); diff --git a/workbench-app/src/components/Workflows/WorkflowRunRemove.tsx b/workbench-app/src/components/Workflows/WorkflowRunRemove.tsx index 5552be8e..d98a2e90 100644 --- a/workbench-app/src/components/Workflows/WorkflowRunRemove.tsx +++ b/workbench-app/src/components/Workflows/WorkflowRunRemove.tsx @@ -35,7 +35,7 @@ export const WorkflowRunRemove: React.FC = (props) => { content:

Are you sure you want to remove this workflow run?

, closeLabel: 'Cancel', additionalActions: [ - + diff --git a/workbench-app/src/libs/useCreateConversation.ts b/workbench-app/src/libs/useCreateConversation.ts index e737c88b..ef772949 100644 --- a/workbench-app/src/libs/useCreateConversation.ts +++ b/workbench-app/src/libs/useCreateConversation.ts @@ -1,3 +1,4 @@ +import { useAccount } from '@azure/msal-react'; import React from 'react'; import { Constants } from '../Constants'; import { Assistant } from '../models/Assistant'; @@ -29,6 +30,7 @@ export const useCreateConversation = () => { isLoading: myAssistantServicesLoading, } = useGetAssistantServiceRegistrationsQuery({ userIds: ['me'] }); + const account = useAccount(); const [createAssistant] = useCreateAssistantMutation(); const [createConversation] = useCreateConversationMutation(); const [addConversationParticipant] = useAddConversationParticipantMutation(); @@ -93,6 +95,16 @@ export const useCreateConversation = () => { throw new Error('Assistant not found'); } + // send event to notify the conversation that the user has joined + const accountName = account?.name; + if (accountName) { + await createConversationMessage({ + conversationId: conversation.id, + content: `${accountName} created the conversation`, + messageType: 'notice', + }); + } + // send notice message first, to announce before assistant reacts to create event await createConversationMessage({ conversationId: conversation.id, diff --git a/workbench-app/src/routes/ShareRedeem.tsx b/workbench-app/src/routes/ShareRedeem.tsx index 2b6b62c9..6d0cb02c 100644 --- a/workbench-app/src/routes/ShareRedeem.tsx +++ b/workbench-app/src/routes/ShareRedeem.tsx @@ -131,8 +131,8 @@ export const ShareRedeem: React.FC = () => { const renderAppView = React.useCallback( (options: { dialogTitle?: string; - dialogContent?: JSX.Element; - dialogActions?: JSX.Element; + dialogContent?: React.ReactElement; + dialogActions?: React.ReactElement[]; dismissLabel?: string; }) => { const { dialogTitle, dialogContent, dialogActions, dismissLabel } = options; @@ -144,7 +144,7 @@ export const ShareRedeem: React.FC = () => { title={dialogTitle} content={dialogContent} closeLabel={dismissLabel ?? 'Close'} - additionalActions={dialogActions ? [dialogActions] : undefined} + additionalActions={dialogActions} /> ); @@ -159,7 +159,7 @@ export const ShareRedeem: React.FC = () => { onClick: () => void; }) => { return ( - +