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

Function appsSupported

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

Source from the content-addressed store, hash-verified

1762 * any capabilities exist.
1763 */
1764 const appsSupported = (): boolean => {
1765 const live = server.server.getClientCapabilities();
1766 if (!live) return appsEnabled;
1767 const uiCapability = getUiCapability(
1768 live as ClientCapabilities & { extensions?: Record<string, unknown> },
1769 );
1770 const supported = Boolean(uiCapability?.mimeTypes?.includes(RESOURCE_MIME_TYPE));
1771 // Reconcile the tools too: a restore that re-established capabilities
1772 // without firing `oninitialized` would otherwise render inline while
1773 // `execute-action` — the tool that rendered app calls back into — stayed
1774 // hidden, leaving the widget unable to do anything.
1775 if (supported !== appsEnabled) applyAppsEnabled(supported);
1776 return supported;
1777 };
1778
1779 const deliverArtifact = (input: {
1780 readonly code: string;

Callers 1

deliverArtifactFunction · 0.85

Calls 1

applyAppsEnabledFunction · 0.85

Tested by

no test coverage detected