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

Function appsSupported

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

Source from the content-addressed store, hash-verified

1646 * any capabilities exist.
1647 */
1648 const appsSupported = (): boolean => {
1649 const live = server.server.getClientCapabilities();
1650 if (!live) return appsEnabled;
1651 const uiCapability = getUiCapability(
1652 live as ClientCapabilities & { extensions?: Record<string, unknown> },
1653 );
1654 const supported = Boolean(uiCapability?.mimeTypes?.includes(RESOURCE_MIME_TYPE));
1655 // Reconcile the tools too: a restore that re-established capabilities
1656 // without firing `oninitialized` would otherwise render inline while
1657 // `execute-action` — the tool that rendered app calls back into — stayed
1658 // hidden, leaving the widget unable to do anything.
1659 if (supported !== appsEnabled) applyAppsEnabled(supported);
1660 return supported;
1661 };
1662
1663 const deliverArtifact = (input: {
1664 readonly code: string;

Callers 1

deliverArtifactFunction · 0.85

Calls 1

applyAppsEnabledFunction · 0.85

Tested by

no test coverage detected