MCPcopy Create free account
hub / github.com/CatMuse/HiNote / registerPluginVaultEvents

Function registerPluginVaultEvents

src/plugin/PluginBootstrap.ts:39–48  ·  view source on GitHub ↗
(plugin: CommentPlugin)

Source from the content-addressed store, hash-verified

37}
38
39export function registerPluginVaultEvents(plugin: CommentPlugin): void {
40 plugin.registerEvent(
41 plugin.app.vault.on('rename', async (file, oldPath) => {
42 const services = plugin.services;
43 if (services) {
44 await services.highlightManager.handleFileRename(oldPath, file.path);
45 }
46 })
47 );
48}

Callers 1

onloadMethod · 0.90

Calls 2

onMethod · 0.80
handleFileRenameMethod · 0.65

Tested by

no test coverage detected