Add Markdown import and code block copy to vault notes.

Support bulk .md/.txt import into the current notebook folder and add hover copy buttons on note code blocks in edit and preview modes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
bincxzandCursor committed 2026-06-23 09:51:32 +08:00
1 parent 6304608114
commit a493fbfea8
12 files changed
+407 -33

No files matched your search

+10
View File
@@ -212,9 +212,19 @@ test("NotesManager renders empty state", () => {
assert.match(markup, /No notes yet/);
assert.match(markup, /New Note/);
assert.match(markup, /Import Markdown/);
assert.doesNotMatch(markup, /data-notes-drop-zone="root"/);
});
test("NotesManager exposes markdown import controls", () => {
const source = readFileSync(new URL("./NotesManager.tsx", import.meta.url), "utf8");
assert.match(source, /notes\.action\.importMarkdown/);
assert.match(source, /importMarkdownFilesToVaultNotes/);
assert.match(source, /accept="\.md,\.markdown,\.txt,text\/markdown,text\/plain"/);
assert.match(source, /multiple/);
});
test("NotesManager sidebar mode renders list without editor by default", () => {
const markup = renderNotes([note()], "sidebar");