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

Function appsSupported

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

Source from the content-addressed store, hash-verified

1672 * any capabilities exist.
1673 */
1674 const appsSupported = (): boolean => {
1675 const live = server.server.getClientCapabilities();
1676 if (!live) return appsEnabled;
1677 const uiCapability = getUiCapability(
1678 live as ClientCapabilities & { extensions?: Record<string, unknown> },
1679 );
1680 const supported = Boolean(uiCapability?.mimeTypes?.includes(RESOURCE_MIME_TYPE));
1681 // Reconcile the tools too: a restore that re-established capabilities
1682 // without firing `oninitialized` would otherwise render inline while
1683 // `execute-action` — the tool that rendered app calls back into — stayed
1684 // hidden, leaving the widget unable to do anything.
1685 if (supported !== appsEnabled) applyAppsEnabled(supported);
1686 return supported;
1687 };
1688
1689 const deliverArtifact = (input: {
1690 readonly code: string;

Callers 1

deliverArtifactFunction · 0.85

Calls 1

applyAppsEnabledFunction · 0.85

Tested by

no test coverage detected