MCPcopy Create free account
hub / github.com/dailydotdev/apps / renderMessage

Function renderMessage

packages/extension/src/frame/render.ts:177–195  ·  view source on GitHub ↗
(
  root: HTMLDivElement,
  title: string,
  body: string,
)

Source from the content-addressed store, hash-verified

175};
176
177export const renderMessage = (
178 root: HTMLDivElement,
179 title: string,
180 body: string,
181): void => {
182 root.replaceChildren();
183 const { shell, card } = createPromptShell();
184
185 const heading = document.createElement('h2');
186 heading.className = 'embedded-browsing-heading';
187 heading.textContent = title;
188
189 const paragraph = document.createElement('p');
190 paragraph.className = 'embedded-browsing-body';
191 paragraph.textContent = body;
192
193 card.append(heading, paragraph);
194 root.append(shell);
195};
196
197type PermissionRequestOutcome = 'granted' | 'dismissed' | 'failed';
198

Callers 2

index.tsFile · 0.90
prepareEmbeddingFunction · 0.90

Calls 1

createPromptShellFunction · 0.85

Tested by

no test coverage detected