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

Function appsSupported

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

Source from the content-addressed store, hash-verified

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

Callers 1

deliverArtifactFunction · 0.85

Calls 1

applyAppsEnabledFunction · 0.85

Tested by

no test coverage detected