API Reference > ui-framework > Notification > MessageManager MessageManager Class The MessageManager class manages messages and prompts. It is used by the AppNotificationManager class. Methods Name Description constructor(): MessageManager addMessage(message: NotifyMessageDetailsType): void Static Output a message and/or alert to the user. addToMessageCenter(message: NotifyMessageDetailsType): void Static Add a message to the Message Center. clearMessages(): void Static Clear the message list. displayInputFieldMessage(target: HTMLElement, messageText: MessageType, detailedMessage: MessageType = "", priority: OutputMessagePriority = OutputMessagePriority.Error): void Static Displays an input field message near target element. endActivityMessage(isCompleted: boolean): boolean Static Dismisses current ActivityMessage and ends activity if canceled. getIconClassName(details: NotifyMessageDetailsType): string Static Gets an icon CSS class name based on a given NotifyMessageDetailsType. getIconType(details: NotifyMessageDetailsType): MessageBoxIconType Static Gets a MessageBoxIconType based on a given NotifyMessageDetailsType. getSeverity(details: NotifyMessageDetailsType): MessageSeverity Static Gets a MessageSeverity based on a given NotifyMessageDetailsType. hideInputFieldMessage(): void Static Hides the currently displayed input field message. openMessageBox(mbType: MessageBoxType, message: MessageType, icon: MessageBoxIconType): Promise<MessageBoxValue> Static Output a MessageBox and wait for response from the user. openMessageCenter(): void Static Opens message center. openToolTip(htmlElement: HTMLElement, message: MessageType, location?: Readonly<WritableXAndY>, options?: ToolTipOptions): void Static Show a tooltip window. outputActivityMessage(message: MessageType, percentComplete: number): boolean Static Output an activity message to the user. outputMessage(message: NotifyMessageDetailsType): void Static Output a message and/or alert to the user. outputPrompt(prompt: string): void Static Output a prompt to the user. setMaxCachedMessages(max: number): void Static Set the maximum number of cached message. setToolAssistance(instructions: undefined | ToolAssistanceInstructions): void Static Setup tool assistance instructions for a tool. setupActivityMessageDetails(details: ActivityMessageDetails): boolean Static Sets details for setting up an Activity message. setupActivityMessageValues(message: MessageType, percentage: number, restored?: boolean): boolean Static Sets values on _OngoingActivityMessage to be referenced when displaying updateMessages(): void Static Update the message list. Properties Name Type Description activeMessageManager Accessor StaticReadOnly Manager of active messages. maxDisplayedStickyMessages Accessor Static number The maximum number of displayed Sticky messages. messages Accessor StaticReadOnly undefined List of messages as NotifyMessageDetailsType. onActivityMessageCancelledEvent StaticReadonly ActivityMessageCancelledEvent The ActivityMessageCancelledEvent is fired when an Activity message is cancelled via onActivityMessageUpdatedEvent StaticReadonly ActivityMessageUpdatedEvent The ActivityMessageUpdatedEvent is fired when an Activity message updates via outputActivityMessage(). onInputFieldMessageAddedEvent StaticReadonly InputFieldMessageAddedEvent onInputFieldMessageRemovedEvent StaticReadonly InputFieldMessageRemovedEvent onMessageAddedEvent StaticReadonly MessageAddedEvent The MessageAddedEvent is fired when a message is added via outputMessage(). onMessagesUpdatedEvent StaticReadonly MessagesUpdatedEvent The MessagesUpdatedEvent is fired when a message is added or the messages are cleared. onOpenMessageCenterEvent StaticReadonly OpenMessageCenterEvent onToolAssistanceChangedEvent StaticReadonly ToolAssistanceChangedEvent The ToolAssistanceChangedEvent is fired when a tool calls IModelApp.notifications.setToolAssistance(). Defined in ui/framework/src/ui-framework/messages/MessageManager.tsx Line 139 Last Updated: 12 June, 2024