Merge commit '9b2f675702' as 'ai-context/context-graph-demo'

This commit is contained in:
elpresidank 2026-04-05 21:08:35 -05:00
commit ecaf3489f1
54 changed files with 10078 additions and 0 deletions

View file

@ -0,0 +1 @@
export { getLocalName } from "./uri";

View file

@ -0,0 +1,9 @@
/**
* Extract the local name from a URI by taking the fragment after # or the last path segment
*/
export function getLocalName(uri: string): string {
const hashIndex = uri.lastIndexOf("#");
const slashIndex = uri.lastIndexOf("/");
const index = Math.max(hashIndex, slashIndex);
return index >= 0 ? uri.substring(index + 1) : uri;
}