Adds an event listener for your Highlight app.
The name of the event to listen for.
The listener Highlight will call when the event is emitted.
Rest
...args: any[]Adds an event listener for your Highlight app.
The name of the event to listen for.
The listener Highlight will call when the event is emitted.
Rest
...args: any[]A function to remove the listener when you are done with it
Get the hotkey the user should use to bring up the Highlight overlay window. This is useful when onboarding users to show them how to activate your app.
Check if the user has created a desktop shortcut for your app.
Open a Highlight app
The ID of the app to open
A promise that resolves when the app is opened
Prompt the user to create a desktop shortcut for your app.
Tell Highlight your app should run in the background. If you don't have permission to run in the background, this will throw an error.
Show a notification to the user.
The title of the notification.
The body of the notification.
A secure store for your app to save data.
Get an access token and refresh token that can be used to validate the user's session on your backend.
Adds a new conversation.
The conversation data to add.
A promise that resolves when the conversation is added.
Deletes all conversations.
A promise that resolves when all conversations are deleted.
Deletes a conversation by its ID.
The ID of the conversation to delete.
A promise that resolves when the conversation is deleted.
Gets all conversations.
A promise that resolves with an array of all conversation data.
Gets whether ASR should fallback to cloud if local ASR is unavailable.
A promise that resolves with the fallback setting.
Gets the ASR duration.
Gets the number of days after which conversations are automatically cleared.
A promise that resolves with the number of days.
Gets the auto-save time for conversations.
A promise that resolves with the auto-save time in milliseconds.
Gets a specific conversation by its ID.
The ID of the conversation to retrieve.
A promise that resolves with the conversation data.
Gets conversations within a time window.
The time window in days.
A promise that resolves with an array of conversation data within the time window.
Gets the current conversation.
A promise that resolves with the current conversation data.
Gets the elapsed time of the current conversation.
A promise that resolves with the elapsed time in milliseconds.
Gets conversations from the last 24 hours.
A promise that resolves with an array of conversation data from the last 24 hours.
Saves the current conversation.
A promise that resolves when the conversation is saved.
Sets whether ASR should fallback to cloud if local ASR is unavailable.
Whether to enable the fallback.
A promise that resolves when the setting is updated.
Sets the ASR duration.
The ASR duration in hours.
Sets the number of days after which conversations are automatically cleared.
The number of days.
A promise that resolves when the auto-clear days are set.
Sets the auto-save time for conversations.
The auto-save time in milliseconds.
A promise that resolves when the auto-save time is set.
Updates an existing conversation.
The updated conversation data.
A promise that resolves when the conversation is updated.
Updates multiple conversations at once.
An array of updated conversation data.
A promise that resolves when the conversations are updated.
Get an embedding from a locally running embedding model.
The text to embed.
An embedding.
Get a stream of text predictions from an LLM.
The messages to send to the LLM.
Optional
params: ChatOpenAIParamsA stream of text predictions.
Get a text prediction from a locally running Small Language Model(SLM).
The messages to send to the SLM.
Optional
grammar: stringThe grammar in GBNF format to send to the SLM.
A text prediction.
Get a stream of structured text predictions from an LLM.
The Zod structure the output should be in
Optional
params: ChatOpenAIParamsCheck if your app is running in Highlight.
Adds an event listener for your Highlight app that will only fire once.
Request permission to run your app in the background when Highlight starts.
Request permission to read the contents of the user's clipboard.
Request permission to capture screenshots of the user's displays and windows
Request permission to capture the contents of the user's windows
Removes an event listener that you previously registered.
Add a fact to the user's facts.
Delete a fact at a given index.
Get the audio captions from the user's device.
If you want to get the long audio captions. Fetch ASR text for the last 2 hours
Get the audio captions from the user's device for the specified duration.
The duration in seconds for which you want to get the audio captions.
Get the contents of the clipboard.
Fetches the context of the window (ignoring Highlight), the same as the eventListener "onContext". May be polled for repeated updates.
Optional
paneDetectionEnabled: booleanGet an email address for the user, for privacy, this address will forward to the user's real email address.
Get the facts the user has set for themselves. This could be "I only want concise responses", "my name is...", etc.
Get the microphone activity as a number from 0-5. 0 means no audio, 5 means absolute loudest.
specifies the duration in milliseconds for which you want to calculate the average energy of the mic input.
Get the microphone activity in decibels.
specifies the duration in milliseconds for which you want to calculate the average energy of the mic input.
Gets the titles, app names and PID's of the user's open windows - This will also return app names and PIDs
Get the context of a specific window
The title of the window to get the context of.
Optional
scope: WindowContextScopeGet a screenshot of a specific window.
The title of the window to screenshot. This is the same as the window title you get from getWindows.
Gets the titles and app icons of the user's open windows
Set the ASR to run in realtime (1.1 seconds). This will use about 10x more GPU processing than non realtime, so once you are finished needing realtime transcripton, you should also set this to false
Update a fact at a given index.
Create a table in the vector database.
Delete an item from a table in the vector database.
Delete a table from the vector database.
Get all items in a table in the vector database.
Insert an item into a table in the vector database.
DEPRECATED AND SHOULD BE REMOVED AFTER MIGRATIONS
Text search for items in a table in the vector database.
Update metadata for an item in a table in the vector database.
Update text for an item in a table in the vector database.
Vector search for items in a table in the vector database.
The entire exported Highlight API, available within your Highlight app.