/*
# ExcaliAI
Generate HTML, Mermaid, mind maps, editable SVG strokes and images from a canvas selection and a prompt. Includes an editable task library, image transforms, mask edits, aspect-ratio previews and response token overrides.
Uses **Excalidraw AI** provider profiles and model preferences, including OpenAI reasoning effort. Configure keys in the plugin (obfuscated vault settings or device-local Obsidian SecretStorage); this script never stores API keys. Your chosen task sends its prompt and, when enabled, selected canvas image to that provider.
Requires Excalidraw 2.29.2 or newer. Open a drawing and run **ExcaliAI**. Preserve that script filename when replacing an older copy so its task library and preferences remain under the same Script Engine settings key.
The migration preserves legacy settings and task IDs. Existing JavaScript modal/export orchestration remains in run.js, with import-safe task helpers and typed request helpers. New script UI strings and default prompts are in lang/en.ts; maintained locale files use English fallback for untranslated advanced content.
Build: npm run build. Deploy build/excali-ai/excali-ai.md as ea-scripts/ExcaliAI.md in the plugin repository.
Validation uses fake providers and keys. Verify live providers, mask edits and generated content separately with your own API access.
Tutorial: https://www.youtube.com/watch?v=A1vrSGBbWgo
Maintained source: https://github.com/zsviczian/ea-scripts/tree/main/src/scripts/excali-ai
Build version: 2026-11-17T17:24:59.281Z
```javascript
*/
// Script bundle
/* EA Script — excali-ai | ea-scripts v1.0.0 */
(() => {
// src/scripts/excali-ai/tasks.ts
var createTaskHelpers = (t) => {
const EXCALIAI_SETTINGS_VERSION = 1;
const DEFAULT_IMAGE_SIZE = "1024x1024";
const TASK_EXECUTION_MODES = {
TEXT_RESULT: "text-result",
IMAGE_PROMPT: "image-prompt",
IMAGE_DIRECT: "image-direct",
IMAGE_EDIT: "image-edit"
};
const TASK_RESULT_TYPES = {
HTML: "html",
MINDMAP: "mindmap",
MERMAID: "mermaid",
SVG: "svg",
IMAGE: "image",
IMAGE_SILENT: "image-silent"
};
const TASK_INPUT_RULES = {
DISABLED: "disabled",
OPTIONAL: "optional",
REQUIRED: "required"
};
const TASK_MASK_MODES = {
DISABLED: "disabled",
OPTIONAL: "optional",
REQUIRED: "required"
};
const TASK_RUNTIME_APIS = {
NONE: "",
MINDMAP_BUILDER: "mindmap-builder"
};
const VALID_TASK_EXECUTION_MODES = Object.values(TASK_EXECUTION_MODES);
const VALID_TASK_RESULT_TYPES = Object.values(TASK_RESULT_TYPES);
const VALID_TASK_INPUT_RULES = Object.values(TASK_INPUT_RULES);
const VALID_TASK_MASK_MODES = Object.values(TASK_MASK_MODES);
const VALID_TASK_RUNTIME_APIS = Object.values(TASK_RUNTIME_APIS);
const TASK_EXECUTION_MODE_META = {
[TASK_EXECUTION_MODES.TEXT_RESULT]: {
label: t("textResponse"),
description: t("usesTheTextOrMultimodalModelAnd")
},
[TASK_EXECUTION_MODES.IMAGE_PROMPT]: {
label: t("writePromptThenGenerateImage"),
description: t("usesTheTextModelToWriteAn")
},
[TASK_EXECUTION_MODES.IMAGE_DIRECT]: {
label: t("sendPromptStraightToImageModel"),
description: t("sendsOnlyTheUserSPromptTo")
},
[TASK_EXECUTION_MODES.IMAGE_EDIT]: {
label: t("editSelectedImage"),
description: t("usesTheSelectedImageAsTheSource")
}
};
const TASK_RESULT_TYPE_META = {
[TASK_RESULT_TYPES.HTML]: {
label: "HTML",
description: t("embedsTheResponseAsASingleHtml")
},
[TASK_RESULT_TYPES.MINDMAP]: {
label: t("mindMap"),
description: t("importsTheResponseIntoMindmapBuilder"),
runtimeRequirement: TASK_RUNTIME_APIS.MINDMAP_BUILDER
},
[TASK_RESULT_TYPES.MERMAID]: {
label: t("mermaid"),
description: t("createsAMermaidDiagram")
},
[TASK_RESULT_TYPES.SVG]: {
label: t("excalidrawStrokes"),
description: t("usesSvgBehindTheScenesToGenerate")
},
[TASK_RESULT_TYPES.IMAGE]: {
label: t("imagePromptNote"),
description: t("generatesAnImageAndAddsTheModel")
},
[TASK_RESULT_TYPES.IMAGE_SILENT]: {
label: t("imageOnly"),
description: t("generatesOnlyTheImageWithoutAddingThe")
}
};
const getTaskExecutionModeMeta = (mode) => TASK_EXECUTION_MODE_META[mode] ?? TASK_EXECUTION_MODE_META[TASK_EXECUTION_MODES.TEXT_RESULT];
const getTaskExecutionModeLabel = (mode) => getTaskExecutionModeMeta(mode).label;
const getTaskExecutionModeDescription = (mode) => getTaskExecutionModeMeta(mode).description;
const getTaskResultTypeMeta = (resultType) => TASK_RESULT_TYPE_META[resultType] ?? TASK_RESULT_TYPE_META[TASK_RESULT_TYPES.HTML];
const getTaskResultTypeLabel = (resultType) => getTaskResultTypeMeta(resultType).label;
const getTaskResultTypeDescription = (resultType) => getTaskResultTypeMeta(resultType).description;
const getTaskRuntimeRequirement = (taskConfig) => getTaskResultTypeMeta(taskConfig?.execution?.resultType ?? TASK_RESULT_TYPES.HTML).runtimeRequirement ?? TASK_RUNTIME_APIS.NONE;
const getTaskRuntimeRequirementLabel = (runtimeRequirement) => {
switch (runtimeRequirement) {
case TASK_RUNTIME_APIS.MINDMAP_BUILDER:
return t("mindmapBuilder");
default:
return t("none");
}
};
const normalizeEnumValue = (value, validValues, fallbackValue) => typeof value === "string" && validValues.includes(value) ? value : fallbackValue;
const cloneJSON = (value) => {
if (value === null || value === void 0) {
return value;
}
return JSON.parse(JSON.stringify(value));
};
const createTaskIdFromName = (value = "") => {
const normalizedValue = String(value ?? "").trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
return normalizedValue || "task";
};
const getDefaultOutputInstruction = (resultType) => {
switch (resultType) {
case TASK_RESULT_TYPES.HTML:
return t("turnThisIntoASingleHtmlFile");
case TASK_RESULT_TYPES.MINDMAP:
return t("returnOnlyTheMindMapAsPlain");
case TASK_RESULT_TYPES.MERMAID:
return t("returnASingleMessageContainingOnlyThe");
case TASK_RESULT_TYPES.SVG:
return t("returnASingleMessageContainingOnlyThe2");
case TASK_RESULT_TYPES.IMAGE:
case TASK_RESULT_TYPES.IMAGE_SILENT:
return t("returnASingleMessageWithTheGenerated");
default:
return "";
}
};
const getDefaultResultTypeForMode = (mode) => {
switch (mode) {
case TASK_EXECUTION_MODES.IMAGE_PROMPT:
case TASK_EXECUTION_MODES.IMAGE_DIRECT:
case TASK_EXECUTION_MODES.IMAGE_EDIT:
return TASK_RESULT_TYPES.IMAGE;
default:
return TASK_RESULT_TYPES.HTML;
}
};
const normalizeTaskConfig = (task = {}, index = 0) => {
const execution = task.execution ?? {};
const mode = normalizeEnumValue(
execution.mode,
VALID_TASK_EXECUTION_MODES,
TASK_EXECUTION_MODES.TEXT_RESULT
);
const resultType = normalizeEnumValue(
execution.resultType,
VALID_TASK_RESULT_TYPES,
getDefaultResultTypeForMode(mode)
);
const imageInputFallback = mode === TASK_EXECUTION_MODES.IMAGE_DIRECT ? TASK_INPUT_RULES.DISABLED : mode === TASK_EXECUTION_MODES.IMAGE_EDIT ? TASK_INPUT_RULES.REQUIRED : TASK_INPUT_RULES.OPTIONAL;
return {
id: createTaskIdFromName(task.id ?? task.name ?? `task-${index + 1}`),
name: String(task.name ?? "").trim() || t("task", { value1: index + 1 }),
help: String(task.help ?? "").trim(),
systemPrompt: task.systemPrompt === null || task.systemPrompt === void 0 ? null : String(task.systemPrompt),
outputInstruction: String(task.outputInstruction ?? getDefaultOutputInstruction(resultType)),
execution: {
mode,
resultType,
userPrompt: normalizeEnumValue(
execution.userPrompt,
VALID_TASK_INPUT_RULES,
TASK_INPUT_RULES.OPTIONAL
),
imageInput: normalizeEnumValue(
execution.imageInput,
VALID_TASK_INPUT_RULES,
imageInputFallback
),
maskMode: normalizeEnumValue(
execution.maskMode,
VALID_TASK_MASK_MODES,
mode === TASK_EXECUTION_MODES.IMAGE_EDIT ? TASK_MASK_MODES.OPTIONAL : TASK_MASK_MODES.DISABLED
),
requiresApi: getTaskResultTypeMeta(resultType).runtimeRequirement ?? TASK_RUNTIME_APIS.NONE
}
};
};
const normalizeTaskConfigs = (tasks, { fallbackToDefaults = false } = {}) => {
if (!Array.isArray(tasks)) {
return fallbackToDefaults ? normalizeTaskConfigs(createDefaultTaskConfigs()) : [];
}
const usedIds = /* @__PURE__ */ new Set();
return tasks.map((task, index) => {
const normalizedTask = normalizeTaskConfig(task, index);
if (normalizedTask.execution.mode !== TASK_EXECUTION_MODES.IMAGE_EDIT) {
normalizedTask.execution.maskMode = TASK_MASK_MODES.DISABLED;
}
let nextId = normalizedTask.id || createTaskIdFromName(normalizedTask.name) || `task-${index + 1}`;
let duplicateCount = 2;
while (usedIds.has(nextId)) {
nextId = `${normalizedTask.id}-${duplicateCount++}`;
}
usedIds.add(nextId);
normalizedTask.id = nextId;
return normalizedTask;
});
};
const createDefaultTaskConfigs = () => [
{
id: "challenge-my-thinking",
name: t("challengeMyThinking"),
help: t("turnTheSelectedImageAndOptionalPrompt"),
systemPrompt: t("yourTaskIsToInterpretAScreenshot"),
outputInstruction: getDefaultOutputInstruction(TASK_RESULT_TYPES.MERMAID),
execution: {
mode: TASK_EXECUTION_MODES.TEXT_RESULT,
resultType: TASK_RESULT_TYPES.MERMAID,
userPrompt: TASK_INPUT_RULES.OPTIONAL,
imageInput: TASK_INPUT_RULES.OPTIONAL,
maskMode: TASK_MASK_MODES.DISABLED,
requiresApi: TASK_RUNTIME_APIS.NONE
}
},
{
id: "convert-sketch-to-shapes",
name: t("convertSketchToShapes"),
help: t("convertSelectedSketchesIntoExcalidrawStrokesWorks"),
systemPrompt: t("givenAnImageFeaturingVariousGeometricShapes"),
outputInstruction: getDefaultOutputInstruction(TASK_RESULT_TYPES.SVG),
execution: {
mode: TASK_EXECUTION_MODES.TEXT_RESULT,
resultType: TASK_RESULT_TYPES.SVG,
userPrompt: TASK_INPUT_RULES.OPTIONAL,
imageInput: TASK_INPUT_RULES.OPTIONAL,
maskMode: TASK_MASK_MODES.DISABLED,
requiresApi: TASK_RUNTIME_APIS.NONE
}
},
{
id: "create-a-simple-excalidraw-icon",
name: t("createASimpleExcalidrawIcon"),
help: t("turnATextPromptIntoASimple"),
systemPrompt: t("givenADescriptionOfAnSvgImage"),
outputInstruction: getDefaultOutputInstruction(TASK_RESULT_TYPES.SVG),
execution: {
mode: TASK_EXECUTION_MODES.TEXT_RESULT,
resultType: TASK_RESULT_TYPES.SVG,
userPrompt: TASK_INPUT_RULES.OPTIONAL,
imageInput: TASK_INPUT_RULES.DISABLED,
maskMode: TASK_MASK_MODES.DISABLED,
requiresApi: TASK_RUNTIME_APIS.NONE
}
},
{
id: "create-a-stick-figure",
name: t("createAStickFigure"),
help: t("sendOnlyTheTextPromptToThe"),
systemPrompt: t("youWillReceiveAPromptFromThe"),
outputInstruction: getDefaultOutputInstruction(TASK_RESULT_TYPES.IMAGE),
execution: {
mode: TASK_EXECUTION_MODES.IMAGE_PROMPT,
resultType: TASK_RESULT_TYPES.IMAGE,
userPrompt: TASK_INPUT_RULES.OPTIONAL,
imageInput: TASK_INPUT_RULES.DISABLED,
maskMode: TASK_MASK_MODES.DISABLED,
requiresApi: TASK_RUNTIME_APIS.NONE
}
},
{
id: "edit-an-image",
name: t("editAnImage"),
help: t("imageElementsAreUsedAsTheSource"),
systemPrompt: null,
outputInstruction: "",
execution: {
mode: TASK_EXECUTION_MODES.IMAGE_EDIT,
resultType: TASK_RESULT_TYPES.IMAGE,
userPrompt: TASK_INPUT_RULES.REQUIRED,
imageInput: TASK_INPUT_RULES.REQUIRED,
maskMode: TASK_MASK_MODES.OPTIONAL,
requiresApi: TASK_RUNTIME_APIS.NONE
}
},
{
id: "generate-an-image-from-image-and-prompt",
name: t("generateAnImageFromImageAndPrompt"),
help: t("generateAnImageFromTheSelectedImage"),
systemPrompt: t("yourTaskInvolvesReceivingAnImageAnd"),
outputInstruction: getDefaultOutputInstruction(TASK_RESULT_TYPES.IMAGE),
execution: {
mode: TASK_EXECUTION_MODES.IMAGE_PROMPT,
resultType: TASK_RESULT_TYPES.IMAGE,
userPrompt: TASK_INPUT_RULES.OPTIONAL,
imageInput: TASK_INPUT_RULES.OPTIONAL,
maskMode: TASK_MASK_MODES.DISABLED,
requiresApi: TASK_RUNTIME_APIS.NONE
}
},
{
id: "generate-an-image-from-prompt",
name: t("generateAnImageFromPrompt"),
help: t("sendOnlyTheTextPromptToThe"),
systemPrompt: null,
outputInstruction: getDefaultOutputInstruction(TASK_RESULT_TYPES.IMAGE),
execution: {
mode: TASK_EXECUTION_MODES.IMAGE_DIRECT,
resultType: TASK_RESULT_TYPES.IMAGE,
userPrompt: TASK_INPUT_RULES.OPTIONAL,
imageInput: TASK_INPUT_RULES.DISABLED,
maskMode: TASK_MASK_MODES.DISABLED,
requiresApi: TASK_RUNTIME_APIS.NONE
}
},
{
id: "generate-an-image-to-illustrate-a-quote",
name: t("generateAnImageToIllustrateAQuote"),
help: t("turnAQuoteIntoAnIllustratedScene"),
systemPrompt: t("yourTaskInvolvesTransformingAUserProvided"),
outputInstruction: getDefaultOutputInstruction(TASK_RESULT_TYPES.IMAGE),
execution: {
mode: TASK_EXECUTION_MODES.IMAGE_PROMPT,
resultType: TASK_RESULT_TYPES.IMAGE,
userPrompt: TASK_INPUT_RULES.OPTIONAL,
imageInput: TASK_INPUT_RULES.DISABLED,
maskMode: TASK_MASK_MODES.DISABLED,
requiresApi: TASK_RUNTIME_APIS.NONE
}
},
{
id: "generate-4-icon-variants-based-on-input-image",
name: t("generateIconVariantsBasedOnInputImage"),
help: t("generateAXSheetOfFourIcon"),
systemPrompt: t("givenASimpleSketchAndAnOptional"),
outputInstruction: getDefaultOutputInstruction(TASK_RESULT_TYPES.IMAGE_SILENT),
execution: {
mode: TASK_EXECUTION_MODES.IMAGE_PROMPT,
resultType: TASK_RESULT_TYPES.IMAGE_SILENT,
userPrompt: TASK_INPUT_RULES.OPTIONAL,
imageInput: TASK_INPUT_RULES.OPTIONAL,
maskMode: TASK_MASK_MODES.DISABLED,
requiresApi: TASK_RUNTIME_APIS.NONE
}
},
{
id: "visual-brainstorm",
name: t("visualBrainstorm"),
help: t("generateAnImageFromTheSelectedImage2"),
systemPrompt: t("yourObjectiveIsToInterpretAScreenshot"),
outputInstruction: getDefaultOutputInstruction(TASK_RESULT_TYPES.IMAGE),
execution: {
mode: TASK_EXECUTION_MODES.IMAGE_PROMPT,
resultType: TASK_RESULT_TYPES.IMAGE,
userPrompt: TASK_INPUT_RULES.OPTIONAL,
imageInput: TASK_INPUT_RULES.OPTIONAL,
maskMode: TASK_MASK_MODES.DISABLED,
requiresApi: TASK_RUNTIME_APIS.NONE
}
},
{
id: "wireframe-to-code",
name: t("wireframeToCode"),
help: t("interpretTheSelectedWireframeAndGenerateA"),
systemPrompt: t("youAreAnExpertTailwindDeveloperA"),
outputInstruction: getDefaultOutputInstruction(TASK_RESULT_TYPES.HTML),
execution: {
mode: TASK_EXECUTION_MODES.TEXT_RESULT,
resultType: TASK_RESULT_TYPES.HTML,
userPrompt: TASK_INPUT_RULES.OPTIONAL,
imageInput: TASK_INPUT_RULES.OPTIONAL,
maskMode: TASK_MASK_MODES.DISABLED,
requiresApi: TASK_RUNTIME_APIS.NONE
}
},
{
id: "create-mindmap",
name: t("createMindmap"),
help: t("createAHierarchicalMindMapFromThe"),
systemPrompt: t("youWillReceiveATextPromptAnd"),
outputInstruction: getDefaultOutputInstruction(TASK_RESULT_TYPES.MINDMAP),
execution: {
mode: TASK_EXECUTION_MODES.TEXT_RESULT,
resultType: TASK_RESULT_TYPES.MINDMAP,
userPrompt: TASK_INPUT_RULES.OPTIONAL,
imageInput: TASK_INPUT_RULES.OPTIONAL,
maskMode: TASK_MASK_MODES.DISABLED,
requiresApi: TASK_RUNTIME_APIS.MINDMAP_BUILDER
}
}
];
const DEFAULT_TASK_CONFIGS = normalizeTaskConfigs(createDefaultTaskConfigs());
const DEFAULT_TASK_ID = DEFAULT_TASK_CONFIGS.find((task) => task.id === "wireframe-to-code")?.id ?? DEFAULT_TASK_CONFIGS[0]?.id ?? "";
const createDefaultState = (taskConfigs = []) => ({
selectedTaskId: taskConfigs.find((task) => task.id === DEFAULT_TASK_ID)?.id ?? taskConfigs[0]?.id ?? "",
userPrompt: "",
maskEdit: true,
textModel: "",
imageModel: "",
maxTokens: "",
imageSize: DEFAULT_IMAGE_SIZE
});
const normalizeState = (state = {}, taskConfigs = []) => {
const defaultState = createDefaultState(taskConfigs);
const knownTaskIds = new Set(taskConfigs.map((task) => task.id));
const selectedTaskId = String(state.selectedTaskId ?? defaultState.selectedTaskId).trim();
return {
selectedTaskId: knownTaskIds.has(selectedTaskId) ? selectedTaskId : defaultState.selectedTaskId,
userPrompt: String(state.userPrompt ?? defaultState.userPrompt),
maskEdit: state.maskEdit !== false,
textModel: String(state.textModel ?? defaultState.textModel),
imageModel: String(state.imageModel ?? defaultState.imageModel),
maxTokens: String(state.maxTokens ?? defaultState.maxTokens).trim(),
imageSize: String(state.imageSize ?? defaultState.imageSize).trim() || defaultState.imageSize
};
};
const createDefaultExcaliAISettings = () => ({
schemaVersion: EXCALIAI_SETTINGS_VERSION,
config: {
tasks: cloneJSON(DEFAULT_TASK_CONFIGS)
},
state: createDefaultState(DEFAULT_TASK_CONFIGS)
});
const LEGACY_TASK_NAME_TO_ID = Object.fromEntries(
DEFAULT_TASK_CONFIGS.map((task) => [task.name, task.id])
);
const loadExcaliAISettings = (rawSettings) => {
const sourceSettings = rawSettings && typeof rawSettings === "object" ? rawSettings : {};
const normalizedSettings = createDefaultExcaliAISettings();
normalizedSettings.config.tasks = normalizeTaskConfigs(sourceSettings.config?.tasks, {
fallbackToDefaults: true
});
const legacyState = {
selectedTaskId: LEGACY_TASK_NAME_TO_ID[String(sourceSettings["Agent's Task"] ?? "").trim()] ?? normalizedSettings.state.selectedTaskId,
userPrompt: sourceSettings["User Prompt"] ?? normalizedSettings.state.userPrompt,
maskEdit: sourceSettings["Mask Edit"] !== false,
textModel: sourceSettings["Text Model"] ?? normalizedSettings.state.textModel,
imageModel: sourceSettings["Image Model"] ?? normalizedSettings.state.imageModel,
maxTokens: sourceSettings["Max Tokens"] ?? normalizedSettings.state.maxTokens,
imageSize: sourceSettings["Image Size"] ?? normalizedSettings.state.imageSize
};
normalizedSettings.state = normalizeState(
{
...legacyState,
...sourceSettings.state ?? {}
},
normalizedSettings.config.tasks
);
return {
settings: normalizedSettings,
needsSave: JSON.stringify(sourceSettings) !== JSON.stringify(normalizedSettings)
};
};
return {
EXCALIAI_SETTINGS_VERSION,
DEFAULT_IMAGE_SIZE,
TASK_EXECUTION_MODES,
TASK_RESULT_TYPES,
TASK_INPUT_RULES,
TASK_MASK_MODES,
TASK_RUNTIME_APIS,
VALID_TASK_EXECUTION_MODES,
VALID_TASK_RESULT_TYPES,
VALID_TASK_INPUT_RULES,
VALID_TASK_MASK_MODES,
VALID_TASK_RUNTIME_APIS,
TASK_EXECUTION_MODE_META,
TASK_RESULT_TYPE_META,
getTaskExecutionModeMeta,
getTaskExecutionModeLabel,
getTaskExecutionModeDescription,
getTaskResultTypeMeta,
getTaskResultTypeLabel,
getTaskResultTypeDescription,
getTaskRuntimeRequirement,
getTaskRuntimeRequirementLabel,
normalizeEnumValue,
cloneJSON,
createTaskIdFromName,
getDefaultOutputInstruction,
getDefaultResultTypeForMode,
normalizeTaskConfig,
normalizeTaskConfigs,
createDefaultTaskConfigs,
DEFAULT_TASK_CONFIGS,
DEFAULT_TASK_ID,
createDefaultState,
normalizeState,
createDefaultExcaliAISettings,
LEGACY_TASK_NAME_TO_ID,
loadExcaliAISettings
};
};
// src/sharedUtils/i18n.ts
function interpolateTranslation(template, params = {}) {
return Object.entries(params).reduce(
(result, [key, value]) => result.split(`{${key}}`).join(String(value)),
template
);
}
function createTranslator(requestedLocale, catalogs, fallbackLocale = "en") {
const locale = requestedLocale.toLowerCase().replaceAll("_", "-");
const baseLocale = locale.split("-")[0] ?? locale;
return (key, params = {}) => {
const template = catalogs[locale]?.[key] ?? catalogs[baseLocale]?.[key] ?? catalogs[fallbackLocale]?.[key] ?? key;
return interpolateTranslation(template, params);
};
}
// src/scripts/excali-ai/lang/en.ts
var en = {
scriptFailed: "ExcaliAI could not start. Check that your drawing is open and the selected images are available.",
requestFailed: "ExcaliAI could not complete this task. Check your model settings and try again.",
errorTitle: "Error",
thisScriptRequiresExcalidrawOrLaterPlease: "This script requires Excalidraw 2.23.0 or later. Please update the plugin.",
textResponse: "Text response",
usesTheTextOrMultimodalModelAnd: "Uses the text or multimodal model and returns structured output such as HTML, Mermaid, a mind map, or Excalidraw strokes.",
writePromptThenGenerateImage: "Write prompt, then generate image",
usesTheTextModelToWriteAn: "Uses the text model to write an image prompt from the canvas selection and/or user prompt, then sends that prompt to the image model.",
sendPromptStraightToImageModel: "Send prompt straight to image model",
sendsOnlyTheUserSPromptTo: "Sends only the user's prompt to the image model. No text-model prompt writing step and no canvas image input.",
editSelectedImage: "Edit selected image",
usesTheSelectedImageAsTheSource: "Uses the selected image as the source and applies either a mask edit or a prompt-based transform.",
embedsTheResponseAsASingleHtml: "Embeds the response as a single HTML result.",
mindMap: "Mind Map",
importsTheResponseIntoMindmapBuilder: "Imports the response into MindMap Builder.",
mermaid: "Mermaid",
createsAMermaidDiagram: "Creates a Mermaid diagram.",
excalidrawStrokes: "Excalidraw Strokes",
usesSvgBehindTheScenesToGenerate: "Uses SVG behind the scenes to generate Excalidraw strokes.",
imagePromptNote: "Image + prompt note",
generatesAnImageAndAddsTheModel: "Generates an image and adds the model's revised prompt underneath when available.",
imageOnly: "Image only",
generatesOnlyTheImageWithoutAddingThe: "Generates only the image, without adding the revised prompt underneath.",
mindmapBuilder: "MindMap Builder",
none: "None",
turnThisIntoASingleHtmlFile: "Turn this into a single html file using tailwind. Return a single message containing only the html file in a codeblock.",
returnOnlyTheMindMapAsPlain: "Return only the mind map as plain text. Use one # heading for the central node, then nested - bullets for branches. Do not use bold, italics, code fences, tables, or explanatory text.",
returnASingleMessageContainingOnlyThe: "Return a single message containing only the mermaid diagram in a codeblock.",
returnASingleMessageContainingOnlyThe2: "Return a single message containing only the SVG code in an html codeblock.",
returnASingleMessageWithTheGenerated: "Return a single message with the generated image prompt in a codeblock",
task: "Task {value1}",
challengeMyThinking: "Challenge my thinking",
turnTheSelectedImageAndOptionalPrompt: "Turn the selected image and optional prompt into a Mermaid mind map. If conversion fails, open More Tools > Mermaid to Excalidraw and edit the generated script.",
yourTaskIsToInterpretAScreenshot: "Your task is to interpret a screenshot of a whiteboard, translating its ideas into a Mermaid graph. The whiteboard will encompass thoughts on a subject. Within the mind map, distinguish ideas that challenge, dispute, or contradict the whiteboard content. Additionally, include concepts that expand, complement, or advance the user's thinking. Utilize the Mermaid graph diagram type and present the resulting Mermaid diagram within a code block. Ensure the Mermaid script excludes the use of parentheses ().",
convertSketchToShapes: "Convert sketch to shapes",
convertSelectedSketchesIntoExcalidrawStrokesWorks: "Convert selected sketches into Excalidraw strokes. Works best with a small number of simple shapes. Experimental.",
givenAnImageFeaturingVariousGeometricShapes: "Given an image featuring various geometric shapes drawn by the user, your objective is to analyze the input and generate SVG code that accurately represents these shapes. Your output will be the SVG code enclosed in an HTML code block.",
createASimpleExcalidrawIcon: "Create a simple Excalidraw icon",
turnATextPromptIntoASimple: "Turn a text prompt into a simple icon and insert it into Excalidraw as strokes. Text prompt only. Experimental.",
givenADescriptionOfAnSvgImage: "Given a description of an SVG image from the user, your objective is to generate the corresponding SVG code. Avoid incorporating textual elements within the generated SVG. Your output should be the resulting SVG code enclosed in an HTML code block.",
createAStickFigure: "Create a stick figure",
sendOnlyTheTextPromptToThe: "Send only the text prompt to the configured image model. Be specific. To keep the prompt unchanged, start with: 'DO NOT add any detail, just use it AS-IS:'",
youWillReceiveAPromptFromThe: "You will receive a prompt from the user. Your task involves drawing a simple stick figure or a scene involving a few stick figures based on the user's prompt. Create the stick figure based on the following style description. DO NOT add any detail, just use it AS-IS: Create a simple stick figure character with a large round head and a face in the style of sketchy caricatures. The stick figure should have a rudimentary body composed of straight lines representing the arms and legs. Hands and toes should be represented with round shapes, do not add details such as fingers or toes. Use fine lines, smooth curves, rounded shapes. The stick figure should retain a playful and childlike simplicity, reminiscent of a doodle someone might draw on the corner of a notebook page. Create a black and white drawing, a hand-drawn figure on white background.",
editAnImage: "Edit an image",
imageElementsAreUsedAsTheSource: "Image elements are used as the source image. In mask mode, shapes on top become the mask. Turn mask edit off to flatten non-image elements into the source image and apply a prompt-based transform.",
generateAnImageFromImageAndPrompt: "Generate an image from image and prompt",
generateAnImageFromTheSelectedImage: "Generate an image from the selected image and your prompt. Add context in the prompt to guide how the image should be interpreted.",
yourTaskInvolvesReceivingAnImageAnd: "Your task involves receiving an image and a textual prompt from the user. Your goal is to craft a detailed, accurate, and descriptive narrative of the image, tailored for effective image generation. Utilize the user-provided text prompt to inform and guide your depiction of the image. Ensure the resulting image remains text-free.",
generateAnImageFromPrompt: "Generate an image from prompt",
generateAnImageToIllustrateAQuote: "Generate an image to illustrate a quote",
turnAQuoteIntoAnIllustratedScene: "Turn a quote into an illustrated scene. Include the author's name if you want the result to reference them.",
yourTaskInvolvesTransformingAUserProvided: "Your task involves transforming a user-provided quote into a detailed and imaginative illustration. Craft a visual representation that captures the essence of the quote and resonates well with a broad audience. If the Author's name is provided, aim to establish a connection between the illustration and the Author. This can be achieved by referencing a well-known story from the Author, situating the image in the Author's era or setting, or employing other creative methods of association. Additionally, provide preferences for styling, such as the chosen medium and artistic direction, to guide the image creation process. Ensure the resulting image remains text-free. Your task output should comprise a descriptive and detailed narrative aimed at facilitating the creation of a captivating illustration from the quote.",
generateIconVariantsBasedOnInputImage: "Generate 4 icon-variants based on input image",
generateAXSheetOfFourIcon: "Generate a 2x2 sheet of four icon variations from the selected sketch. Add a prompt if you want to steer the result.",
givenASimpleSketchAndAnOptional: "Given a simple sketch and an optional text prompt from the user, your task is to generate a descriptive narrative tailored for effective image generation, capturing the style of the sketch. Utilize the text prompt to guide the description. Your objective is to instruct DALL-E to create a collage of four minimalist black and white hand-drawn pencil sketches in a 2x2 matrix format. Each sketch should convert the user's sketch into simple artistic SVG icons with transparent backgrounds. Ensure the resulting images remain text-free, maintaining a minimalist, easy-to-understand style, and omit framing borders. Only include a pencil in the drawing if it is explicitly mentioned in the user prompt or included in the sketch.",
visualBrainstorm: "Visual brainstorm",
generateAnImageFromTheSelectedImage2: "Generate an image from the selected image and prompt to spark new ideas.",
yourObjectiveIsToInterpretAScreenshot: "Your objective is to interpret a screenshot of a whiteboard, creating an image aimed at sparking further thoughts on the subject. The whiteboard will present diverse ideas about a specific topic. Your generated image should achieve one of two purposes: highlighting concepts that challenge, dispute, or contradict the whiteboard content, or introducing ideas that expand, complement, or enrich the user's thinking. You have the option to include multiple tiles in the resulting image, resembling a sequence akin to a comic strip. Ensure that the image remains devoid of text.",
wireframeToCode: "Wireframe to code",
interpretTheSelectedWireframeAndGenerateA: "Interpret the selected wireframe and generate a web app as a single HTML file. You can copy the result from the embeddable menu.",
youAreAnExpertTailwindDeveloperA: "You are an expert tailwind developer. A user will provide you with a low-fidelity wireframe of an application and you will return a single html file that uses tailwind to create the website. Use creative license to make the application more fleshed out. Write the necessary javascript code. If you need to insert an image, use placehold.co to create a placeholder image.",
createMindmap: "Create Mindmap",
createAHierarchicalMindMapFromThe: "Create a hierarchical mind map from the selected image, if any, and your prompt, then import it into MindMap Builder. Requires MindMap Builder to be available.",
youWillReceiveATextPromptAnd: "You will receive a text prompt and may also receive an image. Create a mind map as a hierarchical plain-text outline based on the image content, if provided, and the text prompt. Return only the mind map. Use exactly one markdown H1 heading for the central node, then - bullets for branches and indented - bullets for sub-branches. Do not use bold, italics, code fences, numbering, commentary, or any markdown formatting other than the heading and bullet list.",
excalidrawAiIsDisabledOrUnavailableEnable: "Excalidraw AI is disabled or unavailable. Enable it in plugin settings.",
noRunnableAiTasksAreConfiguredOpen: "No runnable AI tasks are configured. Open Task Editor to add a task or reset the shipped presets.",
taskUsesAnImageResultWithUse: 'Task "{value1}" uses an image result with {value2}. Use {value3} or {value4} instead.',
taskMustUseAnImageResultWhen: 'Task "{value1}" must use an image result when {value2} is selected.',
taskCannotSendACanvasImageWhen: 'Task "{value1}" cannot send a canvas image when {value2} is selected.',
taskMustUseTheImageResultWhen: 'Task "{value1}" must use the image result when {value2} is selected.',
taskCanOnlyEnableMaskModeWhen: 'Task "{value1}" can only enable mask mode when {value2} is selected.',
noTextOrMultimodalModelsAreReady: "No text or multimodal models are ready to use. Add an API key to a provider profile and assign at least one text model in Excalidraw AI settings.",
noImageModelsAreReadyToUse: "No image models are ready to use. Add an API key to a provider profile and assign at least one image model in Excalidraw AI settings.",
theSelectedTextModelIsnTConfigured: "The selected text model ({value1}) isn't configured in Excalidraw AI settings.",
theProviderProfileForTextModelIs: "The provider profile ({value1}) for text model {value2} is missing from Excalidraw AI settings.",
theSelectedProviderProfileDoesnTHave: "The selected provider profile ({value1}) doesn't have an API key configured.",
theSelectedTextModelIsSetTo: "The selected text model ({value1}) is set to text-only. Choose a multimodal model for image analysis tasks.",
theProviderProfileForImageModelIs: "The provider profile ({value1}) for image model {value2} is missing from Excalidraw AI settings.",
theSelectedImageModelDoesnTSupport: "The selected image model ({value1}) doesn't support prompt-based transforms in Excalidraw AI settings.",
theSelectedImageModelDoesnTSupport2: "The selected image model ({value1}) doesn't support mask-based edits in Excalidraw AI settings.",
theImageRequestFailed: "The image request failed.",
somethingWentWrongCheckDeveloperConsoleFor: "Something went wrong! Check developer console for more.",
localstorageSetitemError: "localStorage.setItem error: {value1}",
selectContentBeforeRunningExcaliai: "Select content before running ExcaliAI.",
enterAPromptBeforeRunningExcaliai: "Enter a prompt before running ExcaliAI.",
enterAPromptOrSelectContentBefore: "Enter a prompt or select content before running ExcaliAI.",
enterInstructionsForHowTheImageShould: "Enter instructions for how the image should be changed.",
selectAnImage: "Select an image.",
selectCanvasContentBeforeRunningThisTask: "Select canvas content before running this task.",
selectOrCreateAMask: "Select or create a mask.",
unexpectedExcalidrawautomateError: "Unexpected ExcalidrawAutomate error.",
theModelHitTheTokenLimitBefore: "The model hit the token limit before it finished the HTML output. Increase 'Text max token override' in ExcaliAI or raise the default AI response token limit in plugin settings.",
mindmapBuilderIsNotAvailable: "MindMap Builder is not available.",
couldNotConnectToMindmapBuilder: "Could not connect to MindMap Builder.",
couldNotCreateTheMindMap: "Could not create the mind map.",
mindMapCreatedInMindmapBuilder: "Mind map created in MindMap Builder.",
openMoreToolsMermaidToExcalidrawTo: "Open [More Tools > Mermaid to Excalidraw] to review and fix the generated Mermaid script.
",
openMoreToolsMermaidToExcalidrawTo2: "Open More Tools > Mermaid to Excalidraw to review or edit the generated diagram.",
newTask: "New Task {value1}",
describeWhatThisTaskDoes: "Describe what this task does.",
thisTaskIgnoresTheCurrentCanvasSelection: "This task ignores the current canvas selection and uses only the text prompt.",
maskEditIsOffNonImageElements: "Mask edit is off. Non-image elements are flattened into the preview image and sent as a prompt-based transform.",
thisModelDoesnTSupportMaskEdits: "This model doesn't support mask edits. Non-image elements are flattened into the preview image and sent as a prompt-based transform.",
determinesHowTheTaskRuns: "Determines how the task runs.",
controlsHowExcaliaiInterpretsTheModelResponse: "Controls how ExcaliAI interprets the model response.",
validationNoTasksConfiguredAddATask: "Validation: No tasks configured. Add a task or reset the shipped presets.",
validation: "Validation: {value1}",
validationTaskConfigurationIsValid: "Validation: Task configuration is valid.",
excaliaiTaskEditor: '{value1}