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

Function appsSupported

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

Source from the content-addressed store, hash-verified

1623 * any capabilities exist.
1624 */
1625 const appsSupported = (): boolean => {
1626 const live = server.server.getClientCapabilities();
1627 if (!live) return appsEnabled;
1628 const uiCapability = getUiCapability(
1629 live as ClientCapabilities & { extensions?: Record<string, unknown> },
1630 );
1631 const supported = Boolean(uiCapability?.mimeTypes?.includes(RESOURCE_MIME_TYPE));
1632 // Reconcile the tools too: a restore that re-established capabilities
1633 // without firing `oninitialized` would otherwise render inline while
1634 // `execute-action` — the tool that rendered app calls back into — stayed
1635 // hidden, leaving the widget unable to do anything.
1636 if (supported !== appsEnabled) applyAppsEnabled(supported);
1637 return supported;
1638 };
1639
1640 const deliverArtifact = (input: {
1641 readonly code: string;

Callers 1

deliverArtifactFunction · 0.85

Calls 1

applyAppsEnabledFunction · 0.85

Tested by

no test coverage detected