Interface MynahUIProps

interface MynahUIProps {
    config?: Partial<ConfigModel>;
    defaults?: MynahUITabStoreTab;
    onBeforeTabRemove?: ((tabId, eventId?) => boolean);
    onChatItemEngagement?: ((tabId, messageId, engagement) => void);
    onChatPrompt?: ((tabId, prompt, eventId?) => void);
    onChatPromptProgressActionButtonClicked?: ((tabId, action, eventId?) => void);
    onCodeBlockActionClicked?: ((tabId, messageId, actionId, data?, code?, type?, referenceTrackerInformation?, eventId?, codeBlockIndex?, totalCodeBlocks?) => void);
    onCodeInsertToCursorPosition?: ((tabId, messageId, code?, type?, referenceTrackerInformation?, eventId?, codeBlockIndex?, totalCodeBlocks?, data?) => void);
    onContextSelected?: ((contextItem, tabId, eventId?) => boolean);
    onCopyCodeToClipboard?: ((tabId, messageId, code?, type?, referenceTrackerInformation?, eventId?, codeBlockIndex?, totalCodeBlocks?, data?) => void);
    onCustomFormAction?: ((tabId, action, eventId?) => void);
    onFileActionClick?: ((tabId, messageId, filePath, actionName, eventId?) => void);
    onFileClick?: ((tabId, filePath, deleted, messageId?, eventId?) => void);
    onFocusStateChanged?: ((focusState) => void);
    onFollowUpClicked?: ((tabId, messageId, followUp, eventId?) => void);
    onFormChange?: ((formData, isValid, tabId) => void);
    onFormLinkClick?: ((link, mouseEvent?, eventId?) => void);
    onFormModifierEnterPress?: ((formData, tabId, eventId?) => void);
    onFormTextualItemKeyPress?: ((event, formData, itemId, tabId, eventId?) => boolean);
    onInBodyButtonClicked?: ((tabId, messageId, action, eventId?) => void);
    onInfoLinkClick?: ((tabId, link, mouseEvent?, eventId?) => void);
    onLinkClick?: ((tabId, messageId, link, mouseEvent?, eventId?) => void);
    onOpenDiff?: ((tabId, filePath, deleted, messageId?, eventId?) => void);
    onPromptInputOptionChange?: ((tabId, optionsValues, eventId?) => void);
    onQuickCommandGroupActionClick?: ((tabId, action, eventId?) => void);
    onReady?: (() => void);
    onResetStore?: ((tabId) => void);
    onSendFeedback?: ((tabId, feedbackPayload, eventId?) => void);
    onShowMoreWebResultsClick?: ((tabId, messageId, eventId?) => void);
    onSourceLinkClick?: ((tabId, messageId, link, mouseEvent?, eventId?) => void);
    onStopChatResponse?: ((tabId, eventId?) => void);
    onTabAdd?: ((tabId, eventId?) => void);
    onTabBarButtonClick?: ((tabId, buttonId, eventId?) => void);
    onTabChange?: ((tabId, eventId?) => void);
    onTabRemove?: ((tabId, eventId?) => void);
    onTabbedContentTabChange?: ((tabId, messageId, contentTabId, eventId?) => void);
    onVote?: ((tabId, messageId, vote, eventId?) => void);
    rootSelector?: string;
    splashScreenInitialStatus?: {
        text: string;
        visible: boolean;
    };
    tabs?: MynahUITabStoreModel;
}

Properties

config?: Partial<ConfigModel>
onBeforeTabRemove?: ((tabId, eventId?) => boolean)

Type declaration

    • (tabId, eventId?): boolean
    • Parameters

      • tabId: string

        tabId which the close button triggered

      • Optional eventId: string

      Returns boolean

Returns

boolean -> If you want to close the tab immediately send true

onChatItemEngagement?: ((tabId, messageId, engagement) => void)

Type declaration

    • (tabId, messageId, engagement): void
    • Parameters

      • tabId: string
      • messageId: string
      • engagement: Engagement

      Returns void

onChatPrompt?: ((tabId, prompt, eventId?) => void)

Type declaration

    • (tabId, prompt, eventId?): void
    • Parameters

      • tabId: string
      • prompt: ChatPrompt
      • Optional eventId: string

      Returns void

onChatPromptProgressActionButtonClicked?: ((tabId, action, eventId?) => void)

Type declaration

    • (tabId, action, eventId?): void
    • Parameters

      • tabId: string
      • action: {
            id: string;
            text?: string;
        }
        • id: string
        • Optional text?: string
      • Optional eventId: string

      Returns void

onCodeBlockActionClicked?: ((tabId, messageId, actionId, data?, code?, type?, referenceTrackerInformation?, eventId?, codeBlockIndex?, totalCodeBlocks?) => void)

Type declaration

    • (tabId, messageId, actionId, data?, code?, type?, referenceTrackerInformation?, eventId?, codeBlockIndex?, totalCodeBlocks?): void
    • Parameters

      • tabId: string
      • messageId: string
      • actionId: string
      • Optional data: string
      • Optional code: string
      • Optional type: CodeSelectionType
      • Optional referenceTrackerInformation: ReferenceTrackerInformation[]
      • Optional eventId: string
      • Optional codeBlockIndex: number
      • Optional totalCodeBlocks: number

      Returns void

onCodeInsertToCursorPosition?: ((tabId, messageId, code?, type?, referenceTrackerInformation?, eventId?, codeBlockIndex?, totalCodeBlocks?, data?) => void)

Type declaration

    • (tabId, messageId, code?, type?, referenceTrackerInformation?, eventId?, codeBlockIndex?, totalCodeBlocks?, data?): void
    • Parameters

      • tabId: string
      • messageId: string
      • Optional code: string
      • Optional type: CodeSelectionType
      • Optional referenceTrackerInformation: ReferenceTrackerInformation[]
      • Optional eventId: string
      • Optional codeBlockIndex: number
      • Optional totalCodeBlocks: number
      • Optional data: any

      Returns void

Deprecated

since version 4.14.0. Will be dropped after version 5.x.x. Use onCodeBlockActionClicked instead

onContextSelected?: ((contextItem, tabId, eventId?) => boolean)

Type declaration

    • (contextItem, tabId, eventId?): boolean
    • Parameters

      Returns boolean

onCopyCodeToClipboard?: ((tabId, messageId, code?, type?, referenceTrackerInformation?, eventId?, codeBlockIndex?, totalCodeBlocks?, data?) => void)

Type declaration

    • (tabId, messageId, code?, type?, referenceTrackerInformation?, eventId?, codeBlockIndex?, totalCodeBlocks?, data?): void
    • Parameters

      • tabId: string
      • messageId: string
      • Optional code: string
      • Optional type: CodeSelectionType
      • Optional referenceTrackerInformation: ReferenceTrackerInformation[]
      • Optional eventId: string
      • Optional codeBlockIndex: number
      • Optional totalCodeBlocks: number
      • Optional data: any

      Returns void

Deprecated

since version 4.14.0. It will be only used for keyboard, context menu copy actions, not for button actions after version 5.x.x. Use onCodeBlockActionClicked instead

onCustomFormAction?: ((tabId, action, eventId?) => void)

Type declaration

    • (tabId, action, eventId?): void
    • Parameters

      • tabId: string
      • action: {
            formItemValues?: Record<string, string>;
            id: string;
            text?: string;
        }
        • Optional formItemValues?: Record<string, string>
        • id: string
        • Optional text?: string
      • Optional eventId: string

      Returns void

onFileActionClick?: ((tabId, messageId, filePath, actionName, eventId?) => void)

Type declaration

    • (tabId, messageId, filePath, actionName, eventId?): void
    • Parameters

      • tabId: string
      • messageId: string
      • filePath: string
      • actionName: string
      • Optional eventId: string

      Returns void

onFileClick?: ((tabId, filePath, deleted, messageId?, eventId?) => void)

Type declaration

    • (tabId, filePath, deleted, messageId?, eventId?): void
    • Parameters

      • tabId: string
      • filePath: string
      • deleted: boolean
      • Optional messageId: string
      • Optional eventId: string

      Returns void

onFocusStateChanged?: ((focusState) => void)

Type declaration

    • (focusState): void
    • Parameters

      • focusState: boolean

      Returns void

onFollowUpClicked?: ((tabId, messageId, followUp, eventId?) => void)

Type declaration

    • (tabId, messageId, followUp, eventId?): void
    • Parameters

      • tabId: string
      • messageId: string
      • followUp: ChatItemAction
      • Optional eventId: string

      Returns void

onFormChange?: ((formData, isValid, tabId) => void)

Type declaration

    • (formData, isValid, tabId): void
    • Parameters

      • formData: Record<string, any>
      • isValid: boolean
      • tabId: string

      Returns void

onFormLinkClick?: ((link, mouseEvent?, eventId?) => void)

Type declaration

    • (link, mouseEvent?, eventId?): void
    • Parameters

      • link: string
      • Optional mouseEvent: MouseEvent
      • Optional eventId: string

      Returns void

onFormModifierEnterPress?: ((formData, tabId, eventId?) => void)

Type declaration

    • (formData, tabId, eventId?): void
    • Parameters

      • formData: Record<string, string>
      • tabId: string
      • Optional eventId: string

      Returns void

onFormTextualItemKeyPress?: ((event, formData, itemId, tabId, eventId?) => boolean)

Type declaration

    • (event, formData, itemId, tabId, eventId?): boolean
    • Parameters

      • event: KeyboardEvent
      • formData: Record<string, string>
      • itemId: string
      • tabId: string
      • Optional eventId: string

      Returns boolean

onInBodyButtonClicked?: ((tabId, messageId, action, eventId?) => void)

Type declaration

    • (tabId, messageId, action, eventId?): void
    • Parameters

      • tabId: string
      • messageId: string
      • action: {
            formItemValues?: Record<string, string>;
            id: string;
            text?: string;
        }
        • Optional formItemValues?: Record<string, string>
        • id: string
        • Optional text?: string
      • Optional eventId: string

      Returns void

onInfoLinkClick?: ((tabId, link, mouseEvent?, eventId?) => void)

Type declaration

    • (tabId, link, mouseEvent?, eventId?): void
    • Parameters

      • tabId: string
      • link: string
      • Optional mouseEvent: MouseEvent
      • Optional eventId: string

      Returns void

onLinkClick?: ((tabId, messageId, link, mouseEvent?, eventId?) => void)

Type declaration

    • (tabId, messageId, link, mouseEvent?, eventId?): void
    • Parameters

      • tabId: string
      • messageId: string
      • link: string
      • Optional mouseEvent: MouseEvent
      • Optional eventId: string

      Returns void

onOpenDiff?: ((tabId, filePath, deleted, messageId?, eventId?) => void)

Type declaration

    • (tabId, filePath, deleted, messageId?, eventId?): void
    • Parameters

      • tabId: string
      • filePath: string
      • deleted: boolean
      • Optional messageId: string
      • Optional eventId: string

      Returns void

Deprecated

since version 4.6.3. Will be dropped after version 5.x.x. Use onFileClick instead

onPromptInputOptionChange?: ((tabId, optionsValues, eventId?) => void)

Type declaration

    • (tabId, optionsValues, eventId?): void
    • Parameters

      • tabId: string
      • optionsValues: Record<string, string>
      • Optional eventId: string

      Returns void

onQuickCommandGroupActionClick?: ((tabId, action, eventId?) => void)

Type declaration

    • (tabId, action, eventId?): void
    • Parameters

      • tabId: string
      • action: {
            id: string;
        }
        • id: string
      • Optional eventId: string

      Returns void

onReady?: (() => void)

Type declaration

    • (): void
    • Returns void

onResetStore?: ((tabId) => void)

Type declaration

    • (tabId): void
    • Parameters

      • tabId: string

      Returns void

onSendFeedback?: ((tabId, feedbackPayload, eventId?) => void)

Type declaration

    • (tabId, feedbackPayload, eventId?): void
    • Parameters

      Returns void

onShowMoreWebResultsClick?: ((tabId, messageId, eventId?) => void)

Type declaration

    • (tabId, messageId, eventId?): void
    • Parameters

      • tabId: string
      • messageId: string
      • Optional eventId: string

      Returns void

onSourceLinkClick?: ((tabId, messageId, link, mouseEvent?, eventId?) => void)

Type declaration

    • (tabId, messageId, link, mouseEvent?, eventId?): void
    • Parameters

      • tabId: string
      • messageId: string
      • link: string
      • Optional mouseEvent: MouseEvent
      • Optional eventId: string

      Returns void

onStopChatResponse?: ((tabId, eventId?) => void)

Type declaration

    • (tabId, eventId?): void
    • Parameters

      • tabId: string
      • Optional eventId: string

      Returns void

onTabAdd?: ((tabId, eventId?) => void)

Type declaration

    • (tabId, eventId?): void
    • Parameters

      • tabId: string
      • Optional eventId: string

      Returns void

onTabBarButtonClick?: ((tabId, buttonId, eventId?) => void)

Type declaration

    • (tabId, buttonId, eventId?): void
    • Parameters

      • tabId: string
      • buttonId: string
      • Optional eventId: string

      Returns void

onTabChange?: ((tabId, eventId?) => void)

Type declaration

    • (tabId, eventId?): void
    • Parameters

      • tabId: string
      • Optional eventId: string

      Returns void

onTabRemove?: ((tabId, eventId?) => void)

Type declaration

    • (tabId, eventId?): void
    • Parameters

      • tabId: string
      • Optional eventId: string

      Returns void

onTabbedContentTabChange?: ((tabId, messageId, contentTabId, eventId?) => void)

Type declaration

    • (tabId, messageId, contentTabId, eventId?): void
    • Parameters

      • tabId: string
      • messageId: string
      • contentTabId: string
      • Optional eventId: string

      Returns void

onVote?: ((tabId, messageId, vote, eventId?) => void)

Type declaration

    • (tabId, messageId, vote, eventId?): void
    • Parameters

      Returns void

rootSelector?: string
splashScreenInitialStatus?: {
    text: string;
    visible: boolean;
}

Type declaration

  • text: string
  • visible: boolean