diff --git a/panel.js b/panel.js index 752abdb..6b64c8c 100644 --- a/panel.js +++ b/panel.js @@ -7,6 +7,7 @@ import { cloneTaskProfile, createBuiltinPromptBlock, createCustomPromptBlock, + createLegacyPromptBlock, createLocalRegexRule, ensureTaskProfiles, exportTaskProfile as serializeTaskProfile, @@ -1680,6 +1681,15 @@ async function _handleTaskProfileWorkspaceClick(event) { return { selectBlockId: nextBlock.id }; }); return; + case "add-legacy-block": + _updateCurrentTaskProfile((draft, context) => { + const nextBlock = createLegacyPromptBlock(context.taskType, { + order: draft.blocks.length, + }); + draft.blocks.push(nextBlock); + return { selectBlockId: nextBlock.id }; + }); + return; case "add-builtin-block": { const select = document.getElementById("bme-task-builtin-select"); const sourceKey = String(select?.value || "").trim(); @@ -1947,6 +1957,9 @@ function _renderTaskPromptTab(state) { +