@burdenoff/microfe-buildmyiq 2026.720.1 → 2026.720.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageContext.d.ts","sourceRoot":"","sources":["../../src/utils/pageContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,MAAM,WAAW,WAAW;IAE1B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"pageContext.d.ts","sourceRoot":"","sources":["../../src/utils/pageContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,MAAM,WAAW,WAAW;IAE1B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAwDD,wBAAgB,iBAAiB,IAAI,WAAW,CAoB/C"}
|
|
@@ -8,16 +8,21 @@ function t(t, n) {
|
|
|
8
8
|
[/^\/buildmyiq\/catalog\/([^/]+)$/, "BUILDMYIQ_COURSE"],
|
|
9
9
|
[/^\/buildmyiq\/learning\/([^/]+)$/, "BUILDMYIQ_ENROLLMENT"],
|
|
10
10
|
[/^\/buildmyiq\/paths\/([^/]+)$/, "BUILDMYIQ_PATH"],
|
|
11
|
+
[/^\/buildmyiq\/assessments\/([^/]+)\/take$/, "BUILDMYIQ_ASSESSMENT"],
|
|
11
12
|
[/^\/buildmyiq\/assessments\/([^/]+)$/, "BUILDMYIQ_ASSESSMENT"],
|
|
12
13
|
[/^\/buildmyiq\/skills\/([^/]+)$/, "BUILDMYIQ_SKILL"],
|
|
13
14
|
[/^\/buildmyiq\/certificates\/([^/]+)$/, "BUILDMYIQ_CERTIFICATE"],
|
|
14
|
-
[/^\/buildmyiq\/cohorts\/([^/]+)$/, "BUILDMYIQ_COHORT"]
|
|
15
|
+
[/^\/buildmyiq\/cohorts\/([^/]+)$/, "BUILDMYIQ_COHORT"],
|
|
16
|
+
[/^\/buildmyiq\/authoring\/([^/]+)$/, "BUILDMYIQ_COURSE"]
|
|
15
17
|
]) {
|
|
16
18
|
let i = e(n, t);
|
|
17
19
|
if (i) return {
|
|
18
20
|
entityType: r,
|
|
19
21
|
entityId: i[1],
|
|
20
|
-
metadata: {
|
|
22
|
+
metadata: {
|
|
23
|
+
routePattern: n.source,
|
|
24
|
+
...n.source.endsWith("\\/take$") ? { mode: "take" } : {}
|
|
25
|
+
}
|
|
21
26
|
};
|
|
22
27
|
}
|
|
23
28
|
let i = r.get("tab") ?? (() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageContext.js","names":[],"sources":["../../src/utils/pageContext.ts"],"sourcesContent":["/**\n * Page context gathering — captures the user's current browser context\n * to be sent alongside every assistant prompt for better AI awareness.\n */\n\ninterface ConversationContextShape {\n entityType?: string;\n entityId?: string;\n activeTab?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface PageContext {\n // `currentUrl` — must match the agent's allowed-context-key contract.\n currentUrl: string;\n currentPage: string;\n entityType?: string;\n entityId?: string;\n platform: string;\n version: string;\n viewportSize: string;\n userAgent: string;\n timestamp: string;\n}\n\nfunction matchPath(pattern: RegExp, pathname: string): RegExpMatchArray | null {\n return pathname.match(pattern);\n}\n\nfunction resolveBuildmyiqConversationContext(\n pathname: string,\n search: string\n): ConversationContextShape {\n const params = new URLSearchParams(search);\n const directMatches: Array<[RegExp, string]> = [\n [/^\\/buildmyiq\\/catalog\\/([^/]+)$/, 'BUILDMYIQ_COURSE'],\n [/^\\/buildmyiq\\/learning\\/([^/]+)$/, 'BUILDMYIQ_ENROLLMENT'],\n [/^\\/buildmyiq\\/paths\\/([^/]+)$/, 'BUILDMYIQ_PATH'],\n [/^\\/buildmyiq\\/assessments\\/([^/]+)$/, 'BUILDMYIQ_ASSESSMENT'],\n [/^\\/buildmyiq\\/skills\\/([^/]+)$/, 'BUILDMYIQ_SKILL'],\n [/^\\/buildmyiq\\/certificates\\/([^/]+)$/, 'BUILDMYIQ_CERTIFICATE'],\n [/^\\/buildmyiq\\/cohorts\\/([^/]+)$/, 'BUILDMYIQ_COHORT'],\n ];\n\n for (const [pattern, entityType] of directMatches) {\n const match = matchPath(pattern, pathname);\n if (match) {\n return {\n entityType,\n entityId: match[1],\n metadata: {\n routePattern: pattern.source,\n },\n };\n }\n }\n\n const activeTab =\n params.get('tab') ??\n (() => {\n const segments = pathname.split('/').filter(Boolean);\n return segments.length > 2 ? segments[segments.length - 1] : undefined;\n })();\n\n return {\n activeTab: activeTab ?? undefined,\n metadata: activeTab ? { activeTab } : {},\n };\n}\n\nexport function gatherPageContext(): PageContext {\n const url = window.location.href;\n const pathSegments = window.location.pathname.split('/').filter(Boolean);\n const currentPage = pathSegments.slice(0, 3).join('/') || 'home';\n const entity = resolveBuildmyiqConversationContext(\n window.location.pathname,\n window.location.search\n );\n\n return {\n currentUrl: url,\n currentPage,\n entityType: entity.entityType,\n entityId: entity.entityId,\n platform: 'buildmyiq',\n version: import.meta.env.VITE_APP_VERSION ?? '2026.709.2',\n viewportSize: `${window.innerWidth}x${window.innerHeight}`,\n userAgent: navigator.userAgent,\n timestamp: new Date().toISOString(),\n };\n}\n"],"mappings":";AAyBA,SAAS,EAAU,GAAiB,GAA2C;CAC7E,OAAO,EAAS,MAAM,CAAO;AAC/B;AAEA,SAAS,EACP,GACA,GAC0B;CAC1B,IAAM,IAAS,IAAI,gBAAgB,CAAM;
|
|
1
|
+
{"version":3,"file":"pageContext.js","names":[],"sources":["../../src/utils/pageContext.ts"],"sourcesContent":["/**\n * Page context gathering — captures the user's current browser context\n * to be sent alongside every assistant prompt for better AI awareness.\n */\n\ninterface ConversationContextShape {\n entityType?: string;\n entityId?: string;\n activeTab?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface PageContext {\n // `currentUrl` — must match the agent's allowed-context-key contract.\n currentUrl: string;\n currentPage: string;\n entityType?: string;\n entityId?: string;\n platform: string;\n version: string;\n viewportSize: string;\n userAgent: string;\n timestamp: string;\n}\n\nfunction matchPath(pattern: RegExp, pathname: string): RegExpMatchArray | null {\n return pathname.match(pattern);\n}\n\nfunction resolveBuildmyiqConversationContext(\n pathname: string,\n search: string\n): ConversationContextShape {\n const params = new URLSearchParams(search);\n const directMatches: Array<[RegExp, string]> = [\n [/^\\/buildmyiq\\/catalog\\/([^/]+)$/, 'BUILDMYIQ_COURSE'],\n [/^\\/buildmyiq\\/learning\\/([^/]+)$/, 'BUILDMYIQ_ENROLLMENT'],\n [/^\\/buildmyiq\\/paths\\/([^/]+)$/, 'BUILDMYIQ_PATH'],\n // Order matters: the more specific \"take\" route must be checked before\n // the bare assessment-detail route below, since both share the\n // `assessments/:id` prefix.\n [/^\\/buildmyiq\\/assessments\\/([^/]+)\\/take$/, 'BUILDMYIQ_ASSESSMENT'],\n [/^\\/buildmyiq\\/assessments\\/([^/]+)$/, 'BUILDMYIQ_ASSESSMENT'],\n [/^\\/buildmyiq\\/skills\\/([^/]+)$/, 'BUILDMYIQ_SKILL'],\n [/^\\/buildmyiq\\/certificates\\/([^/]+)$/, 'BUILDMYIQ_CERTIFICATE'],\n [/^\\/buildmyiq\\/cohorts\\/([^/]+)$/, 'BUILDMYIQ_COHORT'],\n // The course builder (authoring/:courseId) is the authoring-side view of\n // the same BUILDMYIQ_COURSE entity the learner sees at catalog/:id — the\n // assistant benefits from \"this course\" resolving on either surface.\n [/^\\/buildmyiq\\/authoring\\/([^/]+)$/, 'BUILDMYIQ_COURSE'],\n ];\n\n for (const [pattern, entityType] of directMatches) {\n const match = matchPath(pattern, pathname);\n if (match) {\n return {\n entityType,\n entityId: match[1],\n metadata: {\n routePattern: pattern.source,\n ...(pattern.source.endsWith('\\\\/take$') ? { mode: 'take' } : {}),\n },\n };\n }\n }\n\n const activeTab =\n params.get('tab') ??\n (() => {\n const segments = pathname.split('/').filter(Boolean);\n return segments.length > 2 ? segments[segments.length - 1] : undefined;\n })();\n\n return {\n activeTab: activeTab ?? undefined,\n metadata: activeTab ? { activeTab } : {},\n };\n}\n\nexport function gatherPageContext(): PageContext {\n const url = window.location.href;\n const pathSegments = window.location.pathname.split('/').filter(Boolean);\n const currentPage = pathSegments.slice(0, 3).join('/') || 'home';\n const entity = resolveBuildmyiqConversationContext(\n window.location.pathname,\n window.location.search\n );\n\n return {\n currentUrl: url,\n currentPage,\n entityType: entity.entityType,\n entityId: entity.entityId,\n platform: 'buildmyiq',\n version: import.meta.env.VITE_APP_VERSION ?? '2026.709.2',\n viewportSize: `${window.innerWidth}x${window.innerHeight}`,\n userAgent: navigator.userAgent,\n timestamp: new Date().toISOString(),\n };\n}\n"],"mappings":";AAyBA,SAAS,EAAU,GAAiB,GAA2C;CAC7E,OAAO,EAAS,MAAM,CAAO;AAC/B;AAEA,SAAS,EACP,GACA,GAC0B;CAC1B,IAAM,IAAS,IAAI,gBAAgB,CAAM;CAmBzC,KAAK,IAAM,CAAC,GAAS,MAAe;EAjBlC,CAAC,mCAAmC,kBAAkB;EACtD,CAAC,oCAAoC,sBAAsB;EAC3D,CAAC,iCAAiC,gBAAgB;EAIlD,CAAC,6CAA6C,sBAAsB;EACpE,CAAC,uCAAuC,sBAAsB;EAC9D,CAAC,kCAAkC,iBAAiB;EACpD,CAAC,wCAAwC,uBAAuB;EACh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