Implement findings fixing and template matching features in Mindnet plugin
- Added a new command to fix findings in the current section of a markdown file, enhancing user experience by automating issue resolution. - Introduced settings for configuring actions related to missing notes and headings, allowing for customizable behavior during the fixing process. - Enhanced the chain inspector to support template matching, providing users with insights into template utilization and potential gaps in their content. - Updated the analysis report to include detailed metadata about edges and role matches, improving the clarity and usefulness of inspection results. - Improved error handling and user notifications for fixing findings and template matching processes, ensuring better feedback during execution.
This commit is contained in:
1 parent
b0efa32c66
commit
90ccec5f7d
26 files changed
+4536
-32
No files matched your search
@@ -130,15 +130,30 @@ export async function buildNoteIndex(
|
||||
*/
|
||||
export async function loadNeighborNote(
|
||||
app: App,
|
||||
targetFile: string
|
||||
targetFile: string,
|
||||
sourceFile?: string
|
||||
): Promise<TFile | null> {
|
||||
try {
|
||||
// Try direct path first
|
||||
const file = app.vault.getAbstractFileByPath(targetFile);
|
||||
if (file instanceof TFile) {
|
||||
return file;
|
||||
}
|
||||
} catch {
|
||||
// File not found or not accessible
|
||||
// File not found via direct path
|
||||
}
|
||||
|
||||
// If not found and sourceFile provided, try resolving as wikilink
|
||||
if (sourceFile) {
|
||||
try {
|
||||
const resolved = app.metadataCache.getFirstLinkpathDest(targetFile, sourceFile);
|
||||
if (resolved && resolved instanceof TFile) {
|
||||
return resolved;
|
||||
}
|
||||
} catch {
|
||||
// Resolution failed
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
Reference in new issue
Block a user