Conversation
Distinguish this maintained fork from upstream Longform so it installs and updates independently via BRAT. Changes plugin id/name in both manifests; keeps the `longform` frontmatter key and CSS classes intact for drop-in compatibility with existing vaults. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Introduced an optional parameter `suppressOpenAfter` in the compile function to control whether the compiled result opens in a new pane, particularly useful during batch compilations. - Updated related components and types to accommodate this new functionality, enhancing user experience during multi-draft compilations. - Added new submission project files and structured metadata for a complete submission package example. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
同一 project 下的多个 draft 共享一个 workflow,而
write-to-note的输出文件名(target)是 workflow 里的单一静态字符串。切换 draft 时target不变,导致每次编译不同 draft 都要手动改导出文件名;也没有一次性编译整个 project 全部 draft 的方式。本 PR 提供两个互补能力,让用户在插件内自由快捷地编译所有相关 draft。
改动
A. 每个 draft 独立的文件名占位符
write-to-note的 Output path 新增$2→ 当前 draft 名(draftTitle,为空时回退到 index 文件名),并支持多次出现;$1(项目标题)保持不变。target改成一次compiled/$2.md,四个 draft 即各自导出到不同文件,无需再逐个改名。B. "Compile All Drafts" 按钮
selectedProjectHasMultipleDrafts)。calculateWorkflow校验,跳过无效的并提示)。suppressOpenAfter抑制逐个打开面板,避免一次弹出多个 pane;单个 Compile 仍遵循各自的 open-after 设置。CompileContext.suppressOpenAfter→compile(..., options)→compilecontext wrapper(同时改为returnpromise 以便 await)。测试数据
test-longform-vault/submission-project/:一个 project、四个 draft(正文四幕 / 补充材料两幕 / 审稿回复两幕 / cover letter 一幕),共享同一个metadata.json,用于复杂投稿场景测试。验证
svelte-check:0 errors;改动的.ts文件 eslint 通过;npm run build成功。test-longform-vault手动验证:占位符切 draft 编译各自成文件;Compile All Drafts 一次生成全部且不弹面板。🤖 Generated with Claude Code