AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
Classify infographic edit intent from semantics
tianma-if409eac0ec031
diff --git a/apps/web/src/components/InfographicEditorPane.tsx b/apps/web/src/components/InfographicEditorPane.tsxindex d0762cbb..3a5310f8 100644--- a/apps/web/src/components/InfographicEditorPane.tsx+++ b/apps/web/src/components/InfographicEditorPane.tsx@@ -7,7 +7,7 @@ import { Button } from "@/components/ui/button";import { MemoTitleInput } from "@/components/MemoTitleInput";import { api } from "@/lib/api";import { createLocalEditSession, requiresLocalEditSession } from "@/components/editor/editor-pane-helpers";-import { buildInfographicSyntax, buildOfficialInfographicSyntax, generatedInfographicSyntax, inferInfographicFamily, inferInfographicKind, infographicFamilyChoices, infographicTemplatePrompt, INFOGRAPHIC_TEMPLATES, officialTemplateFamily, parseGeneratedInfographicContent, parseGeneratedOfficialData, parseGeneratedOfficialSelection, parseInfographicFamilyDecision, requestsInfographicFamilyChange, requestsInfographicLayoutChange, resolveInfographicTemplateSelection, sampleOfficialData, shouldReplaceExistingInfographic, type InfographicItem, type OfficialTemplateFamily } from "@/lib/infographic-generation";+import { buildInfographicSyntax, buildOfficialInfographicSyntax, generatedInfographicSyntax, inferInfographicFamily, inferInfographicKind, infographicFamilyChoices, infographicTemplatePrompt, INFOGRAPHIC_TEMPLATES, officialTemplateFamily, parseGeneratedInfographicContent, parseGeneratedOfficialData, parseGeneratedOfficialSelection, parseInfographicEditDecision, parseInfographicFamilyDecision, resolveInfographicEditSelection, resolveInfographicTemplateSelection, sampleOfficialData, shouldReplaceExistingInfographic, type InfographicEditDecision, type InfographicItem, type OfficialTemplateFamily } from "@/lib/infographic-generation";import type { EdgeEverRepository } from "@/lib/repository";type Props = {@@ -175,7 +175,7 @@ export default function InfographicEditorPane({ memo, repository, readOnly, onBaconst [syntax, setSyntax] = useState(parsed?.syntax ?? "");const [history, setHistory] = useState<InfographicConversationTurn[]>(parsed?.history ?? []);const [prompt, setPrompt] = useState("");- const [familyChoice, setFamilyChoice] = useState<{ prompt: string; options: OfficialTemplateFamily[] } | null>(null);+ const [familyChoice, setFamilyChoice] = useState<{ prompt: string; options: Array<OfficialTemplateFamily | "keep"> } | null>(null);const [previousGeneration, setPreviousGeneration] = useState<{ title: string; syntax: string; turnId: string } | null>(null);const [generating, setGenerating] = useState(false);const [saving, setSaving] = useState(false);@@ -345,7 +345,7 @@ export default function InfographicEditorPane({ memo, repository, readOnly, onBareturn () => window.clearTimeout(timer);}, [dirty, ready, readOnly, saving, generating, renderError, previewReady, snapshot, syntax, historyDirty]);- const generate = async (familyOverride?: OfficialTemplateFamily) => {+ const generate = async (familyOverride?: OfficialTemplateFamily | "keep") => {if (!prompt.trim() || generating || readOnly) return;setGenerating(true); setError(null); setFamilyChoice(null);let output = "";@@ -356,40 +356,60 @@ export default function InfographicEditorPane({ memo, repository, readOnly, onBaconst existingOptions = parseSyntax(syntax).options;const existingTemplate = existingOptions.template;const currentKind = INFOGRAPHIC_TEMPLATES.find((item) => item.id === existingTemplate)?.kind;- const replaceExisting = shouldReplaceExistingInfographic(prompt, currentKind);- const requestedKind = inferInfographicKind(prompt) ?? (replaceExisting ? null : currentKind);- const currentContent = currentForm && !replaceExisting ? JSON.stringify({+ const currentContent = currentForm ? JSON.stringify({kind: currentKind, template: currentForm.template, title: currentForm.heading, description: currentForm.description,items: parseFormItems(currentForm.template, currentForm.items),}) : "";const referenceData = existingTemplate && existingOptions.data? JSON.stringify({ template: existingTemplate, data: existingOptions.data }) : currentContent;const referenceContent = referenceData.length <= 300_000 ? referenceData : syntax;- let selectedFamily = familyOverride;- if (!selectedFamily && !inferInfographicFamily(prompt)- && (!existingTemplate || (requestsInfographicLayoutChange(prompt) && requestsInfographicFamilyChange(prompt)))) {+ let selectedFamily = familyOverride && familyOverride !== "keep" ? familyOverride : undefined;+ let editIntent: "keep" | "layout" | "change" | undefined = familyOverride === "keep" ? "keep" : selectedFamily ? "change" : undefined;+ let editDecision: InfographicEditDecision | undefined;+ if (!familyOverride && (existingTemplate || !inferInfographicFamily(prompt))) {let classificationOutput = "";await api.streamAiGeneration({action: "custom", title: "", contentMarkdown: referenceContent, stream: true, attachments: [], locale: i18n.resolvedLanguage,- instruction: `Classify the user's desired infographic by its semantic data structure. User request: ${prompt.trim()}. Choose exactly one family: chart (numeric values or trends), comparison (two or more subjects or pros/cons), hierarchy (tree or taxonomy), list (unordered parallel items), quadrant (four cells on two axes), relation (entities connected by edges), sequence (ordered steps or time). Prioritize the relationship between items over decorative style. Return ONLY JSON: {"family":"one family ID","confidence":0.0,"ambiguous":false,"alternatives":["up to two other family IDs"]}. Mark ambiguous true and include alternatives when multiple families fit equally well. No Markdown.`,+ instruction: existingTemplate+ ? `Decide how to edit the existing infographic described in Note content. Current template family: ${officialTemplateFamily(existingTemplate)}. User request: ${prompt.trim()}. Classify intent as keep (only content, subjects, labels or values change), layout (visual arrangement changes but the data relationship remains), or change (the requested data relationship needs a different family). Replacing a compared company, such as ByteDance with Alibaba, is keep. Turning a comparison into a timeline or a list into a hierarchy is change. Infer intent from meaning, not only words like "change" or "diagram". For keep, use the current family. For layout, use the current family. For change, choose chart, comparison, hierarchy, list, quadrant, relation, or sequence. Return ONLY JSON: {"intent":"keep|layout|change","family":"family ID","confidence":0.0,"ambiguous":false,"alternatives":[]}. If a family change is uncertain, include up to two alternative family IDs. No Markdown.`+ : `Classify the user's desired infographic by its semantic data structure. User request: ${prompt.trim()}. Choose exactly one family: chart (numeric values or trends), comparison (two or more subjects or pros/cons), hierarchy (tree or taxonomy), list (unordered parallel items), quadrant (four cells on two axes), relation (entities connected by edges), sequence (ordered steps or time). Prioritize the relationship between items over decorative style. Return ONLY JSON: {"family":"one family ID","confidence":0.0,"ambiguous":false,"alternatives":["up to two other family IDs"]}. Mark ambiguous true and include alternatives when multiple families fit equally well. No Markdown.`,}, { onEvent: (event) => { if (event.type === "text-delta") classificationOutput += event.text; if (event.type === "error") throw new Error(event.message); } });- const decision = parseInfographicFamilyDecision(classificationOutput);- if (!decision) throw new Error(t("infographic.aiInvalidResponse"));- const choices = infographicFamilyChoices(decision);- if (choices.length > 1) {- setFamilyChoice({ prompt: prompt.trim(), options: choices });- return;+ if (existingTemplate) {+ const decision = parseInfographicEditDecision(classificationOutput);+ if (!decision) throw new Error(t("infographic.aiInvalidResponse"));+ editDecision = decision;+ editIntent = decision.intent;+ if (editIntent === "change" && (decision.ambiguous || decision.confidence < 0.65)) {+ const options: Array<OfficialTemplateFamily | "keep"> = ["keep", decision.family, ...decision.alternatives];+ setFamilyChoice({ prompt: prompt.trim(), options: [...new Set(options)].slice(0, 3) });+ return;+ }+ if (editIntent === "change") selectedFamily = decision.family;+ } else {+ const decision = parseInfographicFamilyDecision(classificationOutput);+ if (!decision) throw new Error(t("infographic.aiInvalidResponse"));+ const choices = infographicFamilyChoices(decision);+ if (choices.length > 1) {+ setFamilyChoice({ prompt: prompt.trim(), options: choices });+ return;+ }+ selectedFamily = decision.family;}- selectedFamily = decision.family;}- const selection = selectedFamily- ? resolveInfographicTemplateSelection(prompt, availableTemplates, existingTemplate, selectedFamily)- : resolveInfographicTemplateSelection(prompt, availableTemplates, existingTemplate);+ const replaceExisting = existingTemplate ? editIntent === "change" : shouldReplaceExistingInfographic(prompt, currentKind);+ const requestedKind = inferInfographicKind(prompt) ?? (replaceExisting ? null : currentKind);+ const selection = existingTemplate && editDecision+ ? resolveInfographicEditSelection(prompt, availableTemplates, existingTemplate, editDecision)+ : existingTemplate && editIntent === "keep"+ ? { template: existingTemplate, candidates: [] as string[] }+ : selectedFamily+ ? resolveInfographicTemplateSelection(prompt, availableTemplates, existingTemplate, selectedFamily)+ : resolveInfographicTemplateSelection(prompt, availableTemplates, existingTemplate);const officialTarget = selection.template;const catalogAvailable = availableTemplates.length > 0 && !officialTarget;const catalogCandidates = catalogAvailable ? selection.candidates.slice(0, 8) : [];- const officialInstruction = officialTarget ? `User request: ${prompt.trim()}. Use the exact AntV Infographic template "${officialTarget}" (${officialTemplateFamily(officialTarget)} family). ${referenceData && !replaceExisting ? "Revise the complete current data in Note content. Keep every unrequested subject, aspect, and value unchanged. Preserve its structure and update the title when a named subject changes." : `Create new data with this shape: ${JSON.stringify(sampleOfficialData(officialTarget))}.`} Return ONLY JSON with a "data" object. Binary comparisons require exactly two compares, each with matched children. Quadrants require four compares. Chart values must be finite numbers. Relation IDs must be unique and links valid. Keep text concise. No Markdown or commentary.` : "";- const catalogInstruction = catalogAvailable ? `User request: ${prompt.trim()}. Choose one AntV Infographic template from: ${catalogCandidates.join(", ")}. ${referenceData && !replaceExisting ? "Use the complete current infographic in Note content. Preserve its subjects and details unless the request changes them." : "Create new content."} Return ONLY JSON: {"template":"one exact candidate ID","data":{...}}. Data shape example: ${JSON.stringify(sampleOfficialData(catalogCandidates[0]))}. Binary comparisons need two compares with matched children; quadrants and SWOT need four compares. Chart values must be finite numbers. Keep text concise. No Markdown.` : "";+ const officialInstruction = officialTarget ? `User request: ${prompt.trim()}. Use the exact AntV Infographic template "${officialTarget}" (${officialTemplateFamily(officialTarget)} family). ${referenceData ? "Revise the complete current data in Note content. Keep every unrequested subject, aspect, and value unchanged. Preserve its structure and update the title when a named subject changes." : `Create new data with this shape: ${JSON.stringify(sampleOfficialData(officialTarget))}.`} Return ONLY JSON with a "data" object. Binary comparisons require exactly two compares, each with matched children. Quadrants require four compares. Chart values must be finite numbers. Relation IDs must be unique and links valid. Keep text concise. No Markdown or commentary.` : "";+ const catalogInstruction = catalogAvailable ? `User request: ${prompt.trim()}. Choose one AntV Infographic template from: ${catalogCandidates.join(", ")}. ${referenceData ? "Use the complete current infographic in Note content. Preserve its subjects and details unless the request changes them. If the family changes, reshape the data while retaining the information." : "Create new content."} Return ONLY JSON: {"template":"one exact candidate ID","data":{...}}. Data shape example: ${JSON.stringify(sampleOfficialData(catalogCandidates[0]))}. Binary comparisons need two compares with matched children; quadrants and SWOT need four compares. Chart values must be finite numbers. Keep text concise. No Markdown.` : "";await api.streamAiGeneration({action: "custom", title: "", contentMarkdown: referenceContent, stream: true, attachments: [], locale: i18n.resolvedLanguage,instruction: (officialTarget ? officialInstruction : catalogAvailable ? catalogInstruction : `${currentContent ? `Revise this existing infographic content according to the user request. Keep details and template the user did not ask to change. Current content: ${currentContent}\n` : "Create a new infographic for the user request. Choose its structure based on the new request, independently of any previous infographic.\n"}User request: ${prompt.trim()}\nReturn ONLY one valid JSON object, with keys: "kind", "template", "title", "description", "items". "kind" must be one of "steps", "list", "timeline", "comparison", "quadrant".${requestedKind ? ` The requested kind is "${requestedKind}"; use it.` : " Choose the best kind for this request."} Select "template" from these built-in AntV templates, matching its kind and the user's intent: ${infographicTemplatePrompt()}. Use a shorter layout for few items and a denser layout for many items. "items" must be a JSON array of objects; each object must have "label" and "description" strings. For "quadrant", return exactly four items. For "comparison", return exactly two items, one per thing being compared. Each comparison item must have a short description and a "children" array of two or three matched comparison aspects; each child needs a short "label" and "description". Keep every comparison description under 24 Chinese characters (or 48 Latin letters) so it fits a card. If the request has no detailed data, invent a useful, clearly generic example. Use the request's language. Do not return AntV syntax, Markdown fences, explanations, or comments.`).slice(0, 2000),@@ -460,7 +480,7 @@ export default function InfographicEditorPane({ memo, repository, readOnly, onBa<textarea id="infographic-prompt" maxLength={1000} className="min-h-24 w-full rounded-md border border-slate-200 bg-white p-3 text-sm outline-none focus-visible:ring-2 focus-visible:ring-emerald-500" placeholder={t(syntax.trim() ? "infographic.refinePrompt" : "infographic.prompt")} value={prompt} onChange={(event) => { setPrompt(event.target.value); setFamilyChoice(null); }} />{familyChoice?.prompt === prompt.trim() && <div className="mt-3 rounded-lg border border-emerald-200 bg-white p-3"><p className="mb-2 text-sm font-medium text-slate-800">{t("infographic.chooseCategory")}</p>- <div className="flex flex-wrap gap-2">{familyChoice.options.map((family) => <Button key={family} size="sm" variant="outline" disabled={generating} onClick={() => void generate(family)}>{t(`infographic.${family}Category`)}</Button>)}</div>+ <div className="flex flex-wrap gap-2">{familyChoice.options.map((family) => <Button key={family} size="sm" variant="outline" disabled={generating} onClick={() => void generate(family)}>{family === "keep" ? t("infographic.keepCategory") : t(`infographic.${family}Category`)}</Button>)}</div></div>}<div className="mt-2 flex flex-wrap items-center gap-2"><Button size="sm" disabled={!prompt.trim() || generating || Boolean(familyChoice)} onClick={() => void generate()}>{generating ? <LoaderCircle className="mr-1 h-4 w-4 animate-spin" /> : <Sparkles className="mr-1 h-4 w-4" />}{generating ? t("infographic.generating") : t(syntax.trim() ? "infographic.applyRefinement" : "infographic.generate")}</Button>{previousGeneration && <Button size="sm" variant="outline" onClick={undoGeneration}><Undo2 className="mr-1 h-4 w-4" />{t("infographic.undoGeneration")}</Button>}diff --git a/apps/web/src/lib/infographic-generation.test.mjs b/apps/web/src/lib/infographic-generation.test.mjsindex ac013f9f..579d8754 100644--- a/apps/web/src/lib/infographic-generation.test.mjs+++ b/apps/web/src/lib/infographic-generation.test.mjs@@ -11,7 +11,9 @@ import {parseGeneratedInfographicContent,parseGeneratedOfficialData,parseGeneratedOfficialSelection,+ parseInfographicEditDecision,parseInfographicFamilyDecision,+ resolveInfographicEditSelection,resolveInfographicTemplateSelection,requestsInfographicLayoutChange,requestsInfographicFamilyChange,@@ -193,4 +195,19 @@ describe("infographic generation", () => {expect(parseInfographicFamilyDecision('{"family":"list","confidence":1.4,"ambiguous":false,"alternatives":[]}')).toBeNull();expect(parseInfographicFamilyDecision('{"family":"list","confidence":0.4,"ambiguous":true,"alternatives":[]}')).toBeNull();});++ test("semantic edit decisions preserve a comparison subject edit and switch a timeline request", () => {+ const templates = getTemplates();+ const current = "compare-binary-horizontal-badge-card-vs";+ const keep = parseInfographicEditDecision('{"intent":"keep","family":"comparison","confidence":0.97,"ambiguous":false,"alternatives":[]}');+ expect(keep?.intent).toBe("keep");+ expect(resolveInfographicEditSelection("把字节跳动换成阿里巴巴", templates, current, keep).template).toBe(current);+ const change = parseInfographicEditDecision('{"intent":"change","family":"sequence","confidence":0.93,"ambiguous":false,"alternatives":[]}');+ expect(resolveInfographicEditSelection("按时间顺序展示发展历程", templates, current, change).candidates.every((id) => officialTemplateFamily(id) === "sequence")).toBe(true);+ const layout = parseInfographicEditDecision('{"intent":"layout","family":"list","confidence":0.82,"ambiguous":false,"alternatives":[]}');+ expect(resolveInfographicEditSelection("让画面更紧凑", templates, current, layout).candidates.every((id) => officialTemplateFamily(id) === "comparison")).toBe(true);+ expect(resolveInfographicEditSelection("让画面更紧凑", templates, current, layout).candidates).not.toContain(current);+ expect(resolveInfographicEditSelection("换成紧凑对比图版式", templates, current, layout).template).toBe("compare-binary-horizontal-compact-card-vs");+ expect(parseInfographicEditDecision('{"intent":"unknown","family":"sequence","confidence":1,"ambiguous":false,"alternatives":[]}')).toBeNull();+ });});diff --git a/apps/web/src/lib/infographic-generation.ts b/apps/web/src/lib/infographic-generation.tsindex 23b1d187..08d10223 100644--- a/apps/web/src/lib/infographic-generation.ts+++ b/apps/web/src/lib/infographic-generation.ts@@ -41,7 +41,21 @@ export type InfographicFamilyDecision = {ambiguous: boolean;};-export const parseInfographicFamilyDecision = (output: string): InfographicFamilyDecision | null => {+export type InfographicEditDecision = InfographicFamilyDecision & { intent: "keep" | "layout" | "change" };++export const parseInfographicEditDecision = (output: string): InfographicEditDecision | null => {+ const family = parseInfographicFamilyDecision(output, false);+ if (!family) return null;+ const first = output.indexOf("{");+ const last = output.lastIndexOf("}");+ try {+ const value: unknown = JSON.parse(output.slice(first, last + 1));+ if (!isRecord(value) || !["keep", "layout", "change"].includes(String(value.intent))) return null;+ return { ...family, intent: value.intent as InfographicEditDecision["intent"] };+ } catch { return null; }+};++export const parseInfographicFamilyDecision = (output: string, requireAlternatives = true): InfographicFamilyDecision | null => {const first = output.indexOf("{");const last = output.lastIndexOf("}");if (first < 0 || last <= first) return null;@@ -53,7 +67,7 @@ export const parseInfographicFamilyDecision = (output: string): InfographicFamil|| !Array.isArray(value.alternatives)) return null;const alternatives = value.alternatives.filter((family): family is OfficialTemplateFamily =>INFOGRAPHIC_FAMILIES.includes(family as OfficialTemplateFamily) && family !== value.family);- if ((value.ambiguous || value.confidence < 0.65) && alternatives.length === 0) return null;+ if (requireAlternatives && (value.ambiguous || value.confidence < 0.65) && alternatives.length === 0) return null;return { family: value.family as OfficialTemplateFamily, confidence: value.confidence,alternatives: [...new Set(alternatives)].slice(0, 2), ambiguous: value.ambiguous };} catch { return null; }@@ -313,6 +327,19 @@ export const resolveInfographicTemplateSelection = (request: string, templates:return { template: null, candidates: shortlistOfficialTemplates(request, templates, currentTemplate) };};+export const resolveInfographicEditSelection = (request: string, templates: string[], currentTemplate: string, decision: InfographicEditDecision) => {+ if (decision.intent === "keep") return { template: currentTemplate, candidates: [] as string[] };+ const family = decision.intent === "layout" ? officialTemplateFamily(currentTemplate) : decision.family;+ if (decision.intent === "layout") {+ const requested = resolveInfographicTemplateSelection(request, templates, currentTemplate);+ if (requested.template && requested.template !== currentTemplate && officialTemplateFamily(requested.template) === family) return requested;+ }+ const selection = resolveInfographicTemplateSelection(request, templates, currentTemplate, family);+ if (decision.intent !== "layout") return selection;+ const alternatives = selection.candidates.filter((id) => id !== currentTemplate);+ return { template: selection.template, candidates: alternatives.length ? alternatives : selection.candidates };+};+export const shouldReplaceExistingInfographic = (request: string, currentKind: InfographicKind | undefined) => {if (!currentKind) return /(生成|画|做|重做|重新|全新).{0,40}(图|信息图|对比|比较|时间线|流程)/i.test(request);const requestedKind = inferInfographicKind(request);diff --git a/packages/shared/src/i18n/en-US.ts b/packages/shared/src/i18n/en-US.tsindex 2c3089f2..f5ab6c20 100644--- a/packages/shared/src/i18n/en-US.ts+++ b/packages/shared/src/i18n/en-US.ts@@ -16,7 +16,7 @@ export const enUS = {saveError: "Could not save. Try again.", sessionError: "Could not start an editing session. Try again.", aiError: "Generation failed. Check your AI model settings and try again.", aiInvalidResponse: "The generated content could not make an infographic. Try again.",selectTemplate: "Choose template", simpleList: "Horizontal steps", numberedSteps: "Numbered steps", zigzagSteps: "Zigzag process", verticalList: "Vertical list", gridList: "Grid list", pyramidList: "Pyramid list", timeline: "Timeline", timelineChecklist: "Milestone timeline", roadmap: "Vertical roadmap", comparison: "Side-by-side comparison", compactComparison: "Compact comparison", arrowComparison: "Directional comparison", quadrant: "Quadrant", circularQuadrant: "Circular quadrant", themeDefault: "Default", themeDark: "Dark",stepsGroup: "Process", listGroup: "List", timelineGroup: "Time and roadmap", comparisonGroup: "Comparison", quadrantGroup: "Quadrant",- officialTemplates: "AntV templates ({{count}})", searchTemplates: "Search template IDs", templateCategory: "Template category", chooseCategory: "Which infographic type fits this content?", allCategories: "All categories", chartCategory: "Chart", comparisonCategory: "Comparison", hierarchyCategory: "Hierarchy", listCategory: "List", quadrantCategory: "Quadrant", relationCategory: "Relation", sequenceCategory: "Sequence",+ officialTemplates: "AntV templates ({{count}})", searchTemplates: "Search template IDs", templateCategory: "Template category", chooseCategory: "Which infographic type fits this content?", keepCategory: "Keep current type", allCategories: "All categories", chartCategory: "Chart", comparisonCategory: "Comparison", hierarchyCategory: "Hierarchy", listCategory: "List", quadrantCategory: "Quadrant", relationCategory: "Relation", sequenceCategory: "Sequence",sourceHelp: "The syntax is the editable source of this infographic. The preview updates as you edit.", readOnly: "Read only",},companion: {diff --git a/packages/shared/src/i18n/ja.ts b/packages/shared/src/i18n/ja.tsindex 556627ea..78ebf7f1 100644--- a/packages/shared/src/i18n/ja.ts+++ b/packages/shared/src/i18n/ja.ts@@ -16,7 +16,7 @@ export const ja = {saveError: "保存できませんでした。再試行してください。", sessionError: "編集セッションを開始できませんでした。", aiError: "生成に失敗しました。AI モデルの設定を確認してください。", aiInvalidResponse: "生成内容からインフォグラフィックを作成できません。再試行してください。",selectTemplate: "テンプレートを選択", simpleList: "横向きの手順", numberedSteps: "番号付き手順", zigzagSteps: "ジグザグ手順", verticalList: "縦向きのリスト", gridList: "グリッドリスト", pyramidList: "ピラミッドリスト", timeline: "タイムライン", timelineChecklist: "マイルストーン", roadmap: "縦型ロードマップ", comparison: "左右比較図", compactComparison: "コンパクト比較図", arrowComparison: "方向比較図", quadrant: "四象限図", circularQuadrant: "円形四象限", themeDefault: "標準", themeDark: "ダーク",stepsGroup: "手順", listGroup: "リスト", timelineGroup: "時間とロードマップ", comparisonGroup: "比較", quadrantGroup: "四象限",- officialTemplates: "AntV テンプレート({{count}})", searchTemplates: "テンプレート ID を検索", templateCategory: "テンプレート分類", chooseCategory: "この内容に合う図の種類を選んでください", allCategories: "すべての分類", chartCategory: "チャート", comparisonCategory: "比較", hierarchyCategory: "階層", listCategory: "リスト", quadrantCategory: "四象限", relationCategory: "関係", sequenceCategory: "順序",+ officialTemplates: "AntV テンプレート({{count}})", searchTemplates: "テンプレート ID を検索", templateCategory: "テンプレート分類", chooseCategory: "この内容に合う図の種類を選んでください", keepCategory: "現在の種類を維持", allCategories: "すべての分類", chartCategory: "チャート", comparisonCategory: "比較", hierarchyCategory: "階層", listCategory: "リスト", quadrantCategory: "四象限", relationCategory: "関係", sequenceCategory: "順序",sourceHelp: "構文が編集可能な元データです。変更するとプレビューが更新されます。", readOnly: "読み取り専用",},companion: {diff --git a/packages/shared/src/i18n/zh-CN.ts b/packages/shared/src/i18n/zh-CN.tsindex 2eddb630..fd558f2d 100644--- a/packages/shared/src/i18n/zh-CN.ts+++ b/packages/shared/src/i18n/zh-CN.ts@@ -16,7 +16,7 @@ export const zhCN = {saveError: "保存失败,请重试。", sessionError: "无法开启编辑会话,请重试。", aiError: "生成失败,请检查 AI 模型设置后重试。", aiInvalidResponse: "生成内容无法组成信息图,请重试。",selectTemplate: "选择模板", simpleList: "横向步骤", numberedSteps: "编号步骤", zigzagSteps: "交错流程", verticalList: "纵向清单", gridList: "网格清单", pyramidList: "金字塔清单", timeline: "时间线", timelineChecklist: "里程碑时间线", roadmap: "纵向路线图", comparison: "双栏对比图", compactComparison: "紧凑对比图", arrowComparison: "方向对比图", quadrant: "四象限图", circularQuadrant: "圆形四象限", themeDefault: "默认", themeDark: "深色",stepsGroup: "流程型", listGroup: "列表型", timelineGroup: "时间与路线", comparisonGroup: "对比型", quadrantGroup: "四象限型",- officialTemplates: "AntV 官方模板({{count}})", searchTemplates: "搜索模板 ID", templateCategory: "模板分类", chooseCategory: "这段内容适合哪类信息图?", allCategories: "全部分类", chartCategory: "图表型", comparisonCategory: "对比型", hierarchyCategory: "层级型", listCategory: "列表型", quadrantCategory: "四象限型", relationCategory: "关系型", sequenceCategory: "顺序型",+ officialTemplates: "AntV 官方模板({{count}})", searchTemplates: "搜索模板 ID", templateCategory: "模板分类", chooseCategory: "这段内容适合哪类信息图?", keepCategory: "保持当前类型", allCategories: "全部分类", chartCategory: "图表型", comparisonCategory: "对比型", hierarchyCategory: "层级型", listCategory: "列表型", quadrantCategory: "四象限型", relationCategory: "关系型", sequenceCategory: "顺序型",sourceHelp: "语法是此信息图的可编辑源文件;预览随更改更新。", readOnly: "只读",},companion: {