2025-07-21 12:38:08 +00:00
|
|
|
|
require("icon")
|
|
|
|
|
|
|
2026-02-23 16:18:14 +00:00
|
|
|
|
--[[
|
|
|
|
|
|
This sample assistant shows how plugin authors map Lua tables into UI components.
|
|
|
|
|
|
Each component declares a `UserPrompt` which is prepended as a `context` block, followed
|
|
|
|
|
|
by the actual component value in `user prompt`. See
|
|
|
|
|
|
`app/MindWork AI Studio/Plugins/assistants/README.md` for the full data-model reference.
|
|
|
|
|
|
]]
|
2025-09-29 18:58:01 +00:00
|
|
|
|
|
2025-07-21 12:38:08 +00:00
|
|
|
|
-- The ID for this plugin:
|
2025-09-29 18:58:01 +00:00
|
|
|
|
ID = "00000000-0000-0000-0000-000000000000"
|
2025-07-21 12:38:08 +00:00
|
|
|
|
|
|
|
|
|
|
-- The icon for the plugin:
|
|
|
|
|
|
ICON_SVG = SVG
|
|
|
|
|
|
|
|
|
|
|
|
-- The name of the plugin:
|
2025-09-29 18:58:01 +00:00
|
|
|
|
NAME = "<Company Name> - Configuration for <Department Name>"
|
2025-07-21 12:38:08 +00:00
|
|
|
|
|
|
|
|
|
|
-- The description of the plugin:
|
2025-09-29 18:58:01 +00:00
|
|
|
|
DESCRIPTION = "This is a pre-defined configuration of <Company Name>"
|
2025-07-21 12:38:08 +00:00
|
|
|
|
|
|
|
|
|
|
-- The version of the plugin:
|
|
|
|
|
|
VERSION = "1.0.0"
|
|
|
|
|
|
|
|
|
|
|
|
-- The type of the plugin:
|
2025-09-29 18:58:01 +00:00
|
|
|
|
TYPE = "ASSISTANT"
|
2025-07-21 12:38:08 +00:00
|
|
|
|
|
|
|
|
|
|
-- The authors of the plugin:
|
2025-09-29 18:58:01 +00:00
|
|
|
|
AUTHORS = {"<Company Name>"}
|
2025-07-21 12:38:08 +00:00
|
|
|
|
|
|
|
|
|
|
-- The support contact for the plugin:
|
2025-09-29 18:58:01 +00:00
|
|
|
|
SUPPORT_CONTACT = "<IT Department of Company Name>"
|
2025-07-21 12:38:08 +00:00
|
|
|
|
|
|
|
|
|
|
-- The source URL for the plugin:
|
2025-09-29 18:58:01 +00:00
|
|
|
|
SOURCE_URL = "<Any internal Git repository>"
|
2025-07-21 12:38:08 +00:00
|
|
|
|
|
|
|
|
|
|
-- The categories for the plugin:
|
2025-09-29 18:58:01 +00:00
|
|
|
|
CATEGORIES = { "CORE" }
|
2025-07-21 12:38:08 +00:00
|
|
|
|
|
|
|
|
|
|
-- The target groups for the plugin:
|
|
|
|
|
|
TARGET_GROUPS = { "EVERYONE" }
|
|
|
|
|
|
|
|
|
|
|
|
-- The flag for whether the plugin is maintained:
|
|
|
|
|
|
IS_MAINTAINED = true
|
|
|
|
|
|
|
|
|
|
|
|
-- When the plugin is deprecated, this message will be shown to users:
|
|
|
|
|
|
DEPRECATION_MESSAGE = ""
|
|
|
|
|
|
|
2025-09-29 18:58:01 +00:00
|
|
|
|
ASSISTANT = {
|
|
|
|
|
|
["Title"] = "<Title of your assistant>",
|
|
|
|
|
|
["Description"] = "<Description presented to the users, explaining your assistant>",
|
|
|
|
|
|
["UI"] = {
|
|
|
|
|
|
["Type"] = "FORM",
|
|
|
|
|
|
["Children"] = {}
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-11-11 19:01:22 +00:00
|
|
|
|
-- usage example with the full feature set:
|
2025-07-21 12:38:08 +00:00
|
|
|
|
ASSISTANT = {
|
2025-11-11 19:01:22 +00:00
|
|
|
|
["Title"] = "<main title of assistant>", -- required
|
2026-02-23 14:01:00 +00:00
|
|
|
|
["Description"] = "<assistant description>", -- required
|
|
|
|
|
|
["SystemPrompt"] = "<prompt that fundamentally changes behaviour, personality and task focus of your assistant. Invisible to the user>", -- required
|
2025-11-11 19:01:22 +00:00
|
|
|
|
["SubmitText"] = "<label for submit button>", -- required
|
|
|
|
|
|
["AllowProfiles"] = true, -- if true, allows AiStudios profiles; required
|
2025-07-22 18:15:36 +00:00
|
|
|
|
["UI"] = {
|
|
|
|
|
|
["Type"] = "FORM",
|
|
|
|
|
|
["Children"] = {
|
2025-07-21 12:38:08 +00:00
|
|
|
|
{
|
2025-11-11 19:01:22 +00:00
|
|
|
|
["Type"] = "TEXT_AREA", -- required
|
2025-07-22 18:15:36 +00:00
|
|
|
|
["Props"] = {
|
2025-11-11 19:01:22 +00:00
|
|
|
|
["Name"] = "<unique identifier of this component>", -- required
|
|
|
|
|
|
["Label"] = "<heading of your component>", -- required
|
|
|
|
|
|
["UserPrompt"] = "<direct input of instructions, questions, or tasks by a user>",
|
|
|
|
|
|
["PrefillText"] = "<text to show in the field initially>",
|
|
|
|
|
|
["IsSingleLine"] = false, -- if true, shows a text field instead of an area
|
|
|
|
|
|
["ReadOnly"] = false -- if true, deactivates user input (make sure to provide a PrefillText)
|
2025-07-21 12:38:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-11-11 19:01:22 +00:00
|
|
|
|
["Type"] = "DROPDOWN", -- required
|
2025-07-22 18:15:36 +00:00
|
|
|
|
["Props"] = {
|
2025-11-11 19:01:22 +00:00
|
|
|
|
["Name"] = "<unique identifier of this component>", -- required
|
|
|
|
|
|
["Label"] = "<heading of your component>", -- required
|
|
|
|
|
|
["UserPrompt"] = "<direct input of instructions, questions, or tasks by a user>",
|
|
|
|
|
|
["ValueType"] = "<data type of item values>", -- required
|
|
|
|
|
|
["Default"] = { ["Value"] = "<internal data>", ["Display"] = "<user readable representation>" }, -- required
|
|
|
|
|
|
["Items"] = {
|
|
|
|
|
|
{ ["Value"] = "<internal data>", ["Display"] = "<user readable representation>" },
|
|
|
|
|
|
{ ["Value"] = "<internal data>", ["Display"] = "<user readable representation>" },
|
|
|
|
|
|
} -- required
|
2025-07-21 12:38:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-11-11 19:01:22 +00:00
|
|
|
|
["Type"] = "SWITCH",
|
2025-07-22 18:15:36 +00:00
|
|
|
|
["Props"] = {
|
2025-11-11 19:01:22 +00:00
|
|
|
|
["Name"] = "<unique identifier of this component>", -- required
|
|
|
|
|
|
["Label"] = "<heading of your component>", -- required
|
2026-02-23 14:01:00 +00:00
|
|
|
|
["Value"] = true, -- initial switch state
|
2025-11-11 19:01:22 +00:00
|
|
|
|
["UserPrompt"] = "<direct input of instructions, questions, or tasks by a user>",
|
|
|
|
|
|
["LabelOn"] = "<text if state is true>", -- required
|
|
|
|
|
|
["LabelOff"] = "<text if state is false>" -- required
|
2025-07-21 12:38:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-11-11 19:01:22 +00:00
|
|
|
|
["Type"] = "PROVIDER_SELECTION", -- required
|
2025-07-22 18:15:36 +00:00
|
|
|
|
["Props"] = {
|
2026-02-23 14:01:00 +00:00
|
|
|
|
["Name"] = "Provider",
|
|
|
|
|
|
["Label"] = "Choose LLM"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
-- If you add a PROFILE_SELECTION component, AI Studio will hide the footer selection and use this block instead:
|
|
|
|
|
|
{
|
|
|
|
|
|
["Type"] = "PROFILE_SELECTION",
|
|
|
|
|
|
["Props"] = {
|
|
|
|
|
|
["ValidationMessage"] = "<warning message that is shown when the user has not picked a profile>"
|
2025-07-21 12:38:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2026-02-10 15:12:59 +00:00
|
|
|
|
{
|
|
|
|
|
|
["Type"] = "HEADING", -- descriptive component for headings
|
|
|
|
|
|
["Props"] = {
|
2026-02-10 16:06:45 +00:00
|
|
|
|
["Text"] = "<heading content>", -- required
|
2026-02-10 15:12:59 +00:00
|
|
|
|
["Level"] = 2 -- Heading level, 1 - 3
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
["Type"] = "TEXT", -- descriptive component for normal text
|
|
|
|
|
|
["Props"] = {
|
2026-02-10 16:06:45 +00:00
|
|
|
|
["Content"] = "<text content>"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
["Type"] = "LIST", -- descriptive list component
|
|
|
|
|
|
["Props"] = {
|
|
|
|
|
|
["Items"] = {
|
|
|
|
|
|
{
|
|
|
|
|
|
["Type"] = "LINK", -- required
|
|
|
|
|
|
["Text"] = "<user readable link text>",
|
|
|
|
|
|
["Href"] = "<link>" -- required
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
["Type"] = "TEXT", -- required
|
|
|
|
|
|
["Text"] = "<user readable text>"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-02-10 15:12:59 +00:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2026-02-24 10:31:16 +00:00
|
|
|
|
{
|
|
|
|
|
|
["Type"] = "IMAGE",
|
|
|
|
|
|
["Props"] = {
|
|
|
|
|
|
["Src"] = "plugin://assets/example.png",
|
|
|
|
|
|
["Alt"] = "SVG-inspired placeholder",
|
|
|
|
|
|
["Caption"] = "Static illustration via the IMAGE component."
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2026-02-23 15:13:28 +00:00
|
|
|
|
{
|
|
|
|
|
|
["Type"] = "WEB_CONTENT_READER", -- allows the user to fetch a URL and clean it
|
|
|
|
|
|
["Props"] = {
|
|
|
|
|
|
["Name"] = "<unique identifier of this component>", -- required
|
|
|
|
|
|
["UserPrompt"] = "<help text that explains the purpose of this reader>",
|
|
|
|
|
|
["Preselect"] = false, -- automatically show the reader when the assistant opens
|
|
|
|
|
|
["PreselectContentCleanerAgent"] = true -- run the content cleaner by default
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2026-02-23 15:33:24 +00:00
|
|
|
|
{
|
|
|
|
|
|
["Type"] = "FILE_CONTENT_READER", -- allows the user to load local files
|
|
|
|
|
|
["Props"] = {
|
|
|
|
|
|
["Name"] = "<unique identifier of this component>", -- required
|
|
|
|
|
|
["UserPrompt"] = "<help text reminding the user what kind of file they should load>"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2026-03-09 12:23:35 +00:00
|
|
|
|
{
|
|
|
|
|
|
["Type"] = "COLOR_PICKER",
|
|
|
|
|
|
["Props"] = {
|
|
|
|
|
|
["Name"] = "<unique identifier of this component>", -- required
|
|
|
|
|
|
["Label"] = "<heading of your component>", -- required
|
|
|
|
|
|
["Placeholder"] = "<use this as a default color property with HEX code (e.g '#FFFF12') or just show hints to the user>",
|
|
|
|
|
|
["ShowAlpha"] = true, -- weather alpha channels are shown
|
|
|
|
|
|
["ShowToolbar"] = true, -- weather the toolbar to toggle between picker, grid or palette is shown
|
|
|
|
|
|
["ShowModeSwitch"] = true, -- weather switch to toggle between RGB(A), HEX or HSL color mode is shown
|
|
|
|
|
|
["PickerVariant"] = "<DIALOG | INLINE | STATIC (default)>",
|
|
|
|
|
|
["UserPrompt"] = "<help text reminding the user what kind of file they should load>",
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-07-21 12:38:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2026-02-23 14:01:00 +00:00
|
|
|
|
}
|