Implement chain roles and templates management in Mindnet plugin
- Added support for loading and reloading chain roles and templates from specified YAML configuration files, enhancing the plugin's flexibility. - Introduced new settings for defining paths to chain roles and templates, improving user configurability. - Implemented commands for debugging loaded chain roles and templates, providing users with insights into their configurations. - Enhanced the Mindnet settings interface to include options for managing chain roles and templates paths, improving user experience with clear descriptions and validation features.
This commit is contained in:
1 parent
15385b0129
commit
b0efa32c66
21 files changed
+3226
No files matched your search
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Loader for chain_roles.yaml dictionary config.
|
||||
*/
|
||||
|
||||
import type { App } from "obsidian";
|
||||
import { DictionaryLoader } from "./DictionaryLoader";
|
||||
import { parseChainRoles } from "./parseChainRoles";
|
||||
import type { ChainRolesConfig, DictionaryLoadResult } from "./types";
|
||||
|
||||
export class ChainRolesLoader {
|
||||
/**
|
||||
* Load chain roles config with last-known-good fallback.
|
||||
*/
|
||||
static async load(
|
||||
app: App,
|
||||
vaultRelativePath: string,
|
||||
lastKnownGood: { data: ChainRolesConfig | null; loadedAt: number | null } | null = null
|
||||
): Promise<DictionaryLoadResult<ChainRolesConfig>> {
|
||||
return DictionaryLoader.load(app, vaultRelativePath, parseChainRoles, lastKnownGood);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user