Sync local ena planner updates and presets

This commit is contained in:
2026-02-25 13:19:43 +08:00
parent 8cee239bf5
commit 5272799b15
4 changed files with 989 additions and 1100 deletions

View File

@@ -4,6 +4,7 @@ import { getStorySummaryForEna } from '../story-summary/story-summary.js';
import { extensionFolderPath } from '../../core/constants.js';
import { EnaPlannerStorage } from '../../core/server-storage.js';
import { postToIframe, isTrustedIframeEvent } from '../../core/iframe-messaging.js';
import { DEFAULT_PROMPT_BLOCKS, BUILTIN_TEMPLATES } from './ena-planner-presets.js';
const EXT_NAME = 'ena-planner';
const OVERLAY_ID = 'xiaobaix-ena-planner-overlay';
@@ -33,23 +34,9 @@ function getDefaultSettings() {
plotCount: 2,
// Planner prompts (designer)
promptBlocks: [
{
id: crypto?.randomUUID?.() ?? String(Date.now()),
role: 'system',
name: 'Ena Planner System',
content: `(把你的"规划的提示词.txt"粘贴到这里)
要求:输出 <plot>...</plot> 与 <note>...</note>,如有思考请放在 <think>...</think>(会被自动剔除)。`
},
{
id: crypto?.randomUUID?.() ?? String(Date.now() + 1),
role: 'assistant',
name: 'Assistant Seed (optional)',
content: ''
}
],
promptBlocks: structuredClone(DEFAULT_PROMPT_BLOCKS),
// Saved prompt templates: { name: promptBlocks[] }
promptTemplates: {},
promptTemplates: structuredClone(BUILTIN_TEMPLATES),
// Planner API
api: {