Skip to content

v1.6.3

Choose a tag to compare

@Wasabi2575 Wasabi2575 released this 25 Nov 07:29
· 11 commits to main since this release

中文更新说明

新功能(Closes #14)

  1. 允许 AI 查看、切换流程预设与启停画布(新增 canvas_preset 工具)
    • action: "list":返回当前画布状态(启停状态、当前预设名、节点概览、运行/待拍板态)以及全部跨会话用户预设与 5 个内置示例模板(tpl-swe、tpl-prd、tpl-ab、tpl-cond、tpl-loop);画布禁用时同样可调用。
    • action: "apply":支持按用户预设名、模板 ID 或唯一关键词切换画布(用户预设优先,多命中时列出候选项防止误切),支持顺带覆盖入口 task 与可选 enabled,并自动同步到右侧画布;运行中或待拍板时自动拦截保护。
    • action: "toggle":原地启用或禁用当前会话画布,不改动任何节点位置、布局或撤销栈。
    • 主对话不匹配纠偏:buildActiveCanvasContext 与 canvas_inspect 展示当前预设名称;若已启用工作流与本轮任务明显不符,提示 AI 先确认后再切换或停用,不再盲目执行错误流程。
    • 无感跨会话预设同步:前端 /canvas-sync 顺带同步用户自定义预设库与当前预设名并持久化至 .workflow-canvas-state.json(不产生额外命令刷屏)。

优化与修复

  1. 全插件工具 Schema 统一瘦身(新增工具后常驻 Token 反而更低)
    • 对 canvas_generate、canvas_patch、canvas_inspect、canvas_preset、canvas_workflow 与 SKILL_DESCRIPTION 全面精简描述(保留所有参数、枚举与核心规则,长篇文档留在按需加载的 SKILL.md),5 个工具定义总体积缩减约 35%(每轮对话净省数百 Token);预设超过 20 个时 list 自动切换紧凑摘要模式。
  2. 画布切换排版与状态细节修复
    • 修复横排(lr)模式下通过 canvas_preset 加载无坐标内置模板时未自动分层排版的问题;内置模板现在尊重用户当前横/竖排方向,自定义预设恢复其保存的方向。
    • 修复点击「✕ 清空画布」后未重置当前预设名(activePresetRef)的问题。

验证

  • npm run check:13/13 全部通过(含新增 lib/presets.js)
  • npm test:109/109 全部通过

English Release Notes

New Features (Closes #14)

  1. AI Workflow Preset Switching & Enable/Disable (canvas_preset tool)
    • action: "list": Returns current canvas status (enabled state, active preset name, node summary, running/paused flags), synced user presets, and all 5 built-in starter templates (tpl-swe, tpl-prd, tpl-ab, tpl-cond, tpl-loop) — usable even when the canvas is disabled.
    • action: "apply": Switches the current session canvas to a user preset or built-in template by exact name, template id, or unique partial match (lists candidates on ambiguity; supports optional task override & enabled flag; blocks while a run is active or paused at a Lead gate).
    • action: "toggle": Enables or disables the current session canvas in place without altering node positions, layout, or undo history.
    • Mismatch Awareness: buildActiveCanvasContext and canvas_inspect now expose the active preset name and remind the agent to check with the user before running a mismatched workflow.
    • Zero-Noise Preset Sync: User presets and active preset name piggyback on /canvas-sync and persist globally in .workflow-canvas-state.json across sessions.

Optimizations & Fixes

  1. Plugin-Wide Tool Schema Diet (Lower Per-Turn Token Cost Than v1.6.2)
    • Trimmed verbose descriptions across all 5 tools (canvas_generate, canvas_patch, canvas_inspect, canvas_preset, canvas_workflow) and SKILL_DESCRIPTION while keeping every parameter, enum, and invariant intact (~35% smaller total tool definitions; compact list output when >20 user presets exist).
  2. Layout & State Polish
    • Auto-layout now runs in both horizontal (lr) and vertical (tb) modes whenever an imported or AI-applied canvas lacks node coordinates; built-in templates respect the user's current lr/tb preference while saved user presets restore their saved direction.
    • Clearing the canvas now properly resets the tracked active preset name.

Verification

  • npm run check: 13/13 passed (including new lib/presets.js)
  • npm test: 109/109 passed