Skip to main content

Module: services

Table of contents

Interfaces

Type Aliases

Type Aliases

AudioPrompt

Ƭ AudioPrompt: Object

Represents an audio prompt for transcription.

Type declaration

NameTypeDescription
audioFilePathstringFile path to the audio file.
languagestringLanguage of the audio content.

Defined in

src/services/brainClientService.ts:144


BrainPrompt

Ƭ BrainPrompt: Object

Represents a prompt in a conversation with a brain.

Type declaration

NameTypeDescription
attachments?BrainPromptAttachment[]Optional array of attachments.
rolePromptRoleRole of the prompt (user, brain, or system).
sentAtDateDate and time when the prompt was sent.
valuestringContent of the prompt.

Defined in

src/services/brainClientService.ts:66


BrainPromptAttachment

Ƭ BrainPromptAttachment: Object

Represents an attachment in a brain prompt.

Type declaration

NameTypeDescription
mimeTypestringMIME type of the attachment.
originalFileName?stringOptional original file name of the attachment.
pathstringFile path of the attachment.
sizenumberSize of the attachment in bytes.

Defined in

src/services/brainClientService.ts:49


BrainResponse

Ƭ BrainResponse: Object

Represents a response from a brain.

Type declaration

NameTypeDescription
attachments?BrainResponseAttachment[]Optional array of attachments.
errorsstring[]Array of error messages, if any.
resultstringResult of the brain's processing.

Defined in

src/services/brainClientService.ts:114


BrainResponseAttachment

Ƭ BrainResponseAttachment: Object

Represents an attachment in a brain response.

Type declaration

NameTypeDescription
caption?stringOptional caption for the attachment.
dataBuffer | stringData of the attachment (Buffer or string).
fileName?stringOptional file name for the attachment.
fileTypestringFile type of the attachment.
mimeTypestringMIME type of the attachment.

Defined in

src/services/brainClientService.ts:94


BuiltInSettingsTabType

Ƭ BuiltInSettingsTabType: ReturnType\<() => IEditorTab\<{ language: string ; value: string }>>

Defined in

src/services/settingsService.ts:4


ChatAssistantContext

Ƭ ChatAssistantContext: Object

Type declaration

NameTypeDescription
appendToAuxiliaryBar(component: React.ReactNode) => voidAppends a component to the auxiliary bar.
chatChatInfoInformation about the current chat.
getSettings() => any | undefinedRetrieves the current chat settings.
sessionIChatSessionServiceSession service for the chat.
setSettings(settings: any) => voidFunction to set chat settings.

Defined in

src/services/chat.ts:59


DraggableDirection

Ƭ DraggableDirection: "x" | "y"

Defined in

src/services/toastService.ts:15


IGlobalShortcut

Ƭ IGlobalShortcut: Object

Represents a global keyboard shortcut.

Type declaration

NameTypeDescription
acceleratorstringThe keyboard accelerator for the global shortcut, e.g., "Ctrl+Shift+N". See https://www.electronjs.org/docs/latest/api/accelerator for more information.
enabledbooleanIndicates whether the global shortcut is enabled.

Defined in

src/services/globalShortcutService.ts:4


IGlobalShortcutRegistrationOptions

Ƭ IGlobalShortcutRegistrationOptions: Object

Options for registering a global shortcut.

Type declaration

NameTypeDescription
id?stringOptional identifier for the global shortcut registration.

Defined in

src/services/globalShortcutService.ts:18


IShortcutSubscription

Ƭ IShortcutSubscription: Object

Represents a subscription to a shortcut event, allowing for unsubscribing.

Type declaration

NameType
unsubscribe() => void

Defined in

src/services/userShortcutService.ts:22


IUserShortcut

Ƭ IUserShortcut: Object

Represents a user-defined shortcut.

Type declaration

NameTypeDescription
acceleratorstringKeyboard accelerator for the shortcut, e.g., "Ctrl+Shift+N". See https://www.electronjs.org/docs/latest/api/accelerator for more information.
idstringUnique identifier for the shortcut.
namestringName of the shortcut.

Defined in

src/services/userShortcutService.ts:4


IUserShortcutService

Ƭ IUserShortcutService: Object

Interface for managing user shortcuts.

Type declaration

NameType
getOrCreate(shortcut: string | IUserShortcut, defaultShortcut: IUserShortcut) => Promise\<IUserShortcut>
getShortcuts() => IUserShortcut[]
isRegistered(acceleratorOrShortcut: string | IUserShortcut) => boolean
onShortcutAdded(callback: (shortcut: IUserShortcut) => void) => IShortcutSubscription
onShortcutPressed(shortcut: string | IUserShortcut, callback: () => void) => IShortcutSubscription
onShortcutRemoved(callback: (shortcut: IUserShortcut) => void) => IShortcutSubscription
onShortcutUpdated(callback: (shortcut: IUserShortcut) => void) => IShortcutSubscription
register(shortcut: IUserShortcut) => Promise\<boolean>
unregister(id: string) => Promise\<boolean>
update(shortcut: IUserShortcut) => Promise\<boolean>
get(shortcutId: string) => undefined | IUserShortcut

Defined in

src/services/userShortcutService.ts:30


ImageGenerationBrainPrompt

Ƭ ImageGenerationBrainPrompt: BrainPrompt & { expectedResponseType: "base64" | "url" | "binary" }

Represents a brain prompt for image generation with expected response type.

Defined in

src/services/brainClientService.ts:171


LocalBrain

Ƭ LocalBrain: Object

Represents a local brain with various properties and capabilities.

Type declaration

NameTypeDescription
capabilitiesstring[]List of capabilities (as strings) supported by the local brain.
description?stringOptional description of the local brain.
disabled?booleanOptional flag indicating if the local brain is disabled.
displayNamestringDisplay name of the local brain.
icon?stringOptional icon representing the local brain.
iconUrl?stringOptional URL for the icon of the local brain.
idstringUnique identifier for the local brain.
namestringInternal name of the local brain.
publisher?stringPublisher id.
versionstringVersion of the local brain.

Defined in

src/services/brainClientService.ts:9


PromptOptions

Ƭ PromptOptions: Object

Represents options for a brain prompt.

Index signature

[key: string]: any

Dictionary of prompt options.

Type declaration

NameTypeDescription
settings?anyOptional settings for the prompt.

Defined in

src/services/brainClientService.ts:83


PromptRole

Ƭ PromptRole: "user" | "brain" | "system"

Represents the role of a prompt in a conversation with a brain.

Defined in

src/services/brainClientService.ts:44


SendChatMessageOptions

Ƭ SendChatMessageOptions: Object

Type declaration

NameTypeDescription
attachments?File[]File attachments for the message.
audio?BlobAudio content for the message.
hidden?booleanIndicates if the message is hidden.
isSystemMessage?booleanTrue if the message is a system message.
text?stringText of the message to be sent.

Defined in

src/services/chat.ts:113


ToastContent

Ƭ ToastContent\<T>: React.ReactNode | (props: ToastContentProps\<T>) => React.ReactNode

Type parameters

NameType
Tunknown

Defined in

src/services/toastService.ts:23


ToastIcon

Ƭ ToastIcon: boolean | string | number | React.ReactNode

Defined in

src/services/toastService.ts:13


ToastPosition

Ƭ ToastPosition: "top-right" | "top-center" | "top-left" | "bottom-right" | "bottom-center" | "bottom-left"

Defined in

src/services/toastService.ts:5


TypeOptions

Ƭ TypeOptions: "info" | "success" | "warning" | "error" | "default"

Defined in

src/services/toastService.ts:4