MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / appsSupported

Function appsSupported

packages/hosts/mcp/src/tool-server.ts:2322–2335  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2320 * any capabilities exist.
2321 */
2322 const appsSupported = (): boolean => {
2323 const live = server.server.getClientCapabilities();
2324 if (!live) return appsEnabled;
2325 const uiCapability = getUiCapability(
2326 live as ClientCapabilities & { extensions?: Record<string, unknown> },
2327 );
2328 const supported = Boolean(uiCapability?.mimeTypes?.includes(RESOURCE_MIME_TYPE));
2329 // Reconcile the tools too: a restore that re-established capabilities
2330 // without firing `oninitialized` would otherwise render inline while
2331 // `execute-action` — the tool that rendered app calls back into — stayed
2332 // hidden, leaving the widget unable to do anything.
2333 if (supported !== appsEnabled) applyAppsEnabled(supported);
2334 return supported;
2335 };
2336
2337 const deliverArtifact = (input: {
2338 readonly code: string;

Callers 1

deliverArtifactFunction · 0.85

Calls 1

applyAppsEnabledFunction · 0.85

Tested by

no test coverage detected