Skip to main content

Intents

This document describes SDK intents and provides comprehensive documentation on them.

User Interface (UI) & interaction intents

1. DialogIntent (dialog)

Displays modal dialog boxes: confirmation questions, Info messages, Error notices, or dialogs containing embedded HTML frames.

2. FormIntent (form)

Presents a dynamically generated form based on JSON Schema and returns the user's filled inputs as an object/dictionary.

3. UiIntent (ui)

Opens a dedicated UI frame (Modal, Sidebar, Window, or ImageDetail) rendering an external/internal URL or raw inline HTML.

4. ImagesIntent (images)

Displays a grid of images / thumbnails to the user inside an interactive dialog.

5. ToastIntent (toast)

Displays a brief, non-intrusive toast notification in the application.

6. NotificationIntent (notification)

Sends a notification to the Picteus notification center or system desktop notification manager (isNative: true).


System & navigation intents

  • ShowIntent (show): navigates the Picteus client to a specific view:
    • IntentShowType.Image: open an image detail page.
    • IntentShowType.Sidebar: open a registered sidebar panel.
    • IntentShowType.ExtensionSettings: open this extension's settings page.
    • IntentShowType.Repository: open a repository view.
  • OpenBrowserIntent (openBrowser): opens an external URL in the user's default web browser.
  • ActionIntent (action): bundles an intent with an executable trigger button inside a dialog or notification.

File & bundle intents

  • ReadFileIntent (readFile): prompts the user with a native file picker to select a file (with optional extension filters) and returns the file content as a Buffer (TS) or bytearray (Python).
  • WriteFileIntent (writeFile): prompts the user to save a file with suggested name, extension, and binary content.
  • ServeBundleIntent (serveBundle): uploads and serves a zipped HTML/JS web application bundle from the extension to an iframe endpoint hosted by the Picteus server.