We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1feb557 commit a8dba8dCopy full SHA for a8dba8d
1 file changed
site/src/clientModules/webmcp.ts
@@ -2,7 +2,7 @@
2
// https://webmachinelearning.github.io/webmcp/
3
let controller: AbortController | null = null;
4
5
-export function onRouteDidUpdate(): void {
+function registerMcpTools(): void {
6
if (typeof navigator === 'undefined' || !('modelContext' in navigator)) {
7
return;
8
}
@@ -67,3 +67,9 @@ export function onRouteDidUpdate(): void {
67
signal,
68
});
69
70
+
71
+// Run immediately when the module loads and on every route change.
72
+registerMcpTools();
73
+export function onRouteDidUpdate(): void {
74
+ registerMcpTools();
75
+}
0 commit comments