MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / getResolvedProjectDisplayName

Function getResolvedProjectDisplayName

src/utils/linkUtils.ts:137–151  ·  view source on GitHub ↗
(
	linkPath: string,
	app?: App,
	displayText?: string
)

Source from the content-addressed store, hash-verified

135}
136
137function getResolvedProjectDisplayName(
138 linkPath: string,
139 app?: App,
140 displayText?: string
141): string | null {
142 const resolved = app?.metadataCache.getFirstLinkpathDest(linkPath, "");
143 if (!resolved) return null;
144
145 const frontmatterTitle = getResolvedFileTitle(resolved, app);
146 if (frontmatterTitle && shouldUseResolvedTitle(displayText, resolved, linkPath)) {
147 return frontmatterTitle;
148 }
149
150 return displayText?.trim() || resolved.basename;
151}
152
153function getResolvedFileTitle(file: TFile, app?: App): string | null {
154 const cache =

Callers 1

getProjectDisplayNameFunction · 0.85

Calls 2

getResolvedFileTitleFunction · 0.85
shouldUseResolvedTitleFunction · 0.85

Tested by

no test coverage detected