MCPcopy Create free account
hub / github.com/error311/FileRise / createShareCopilotCard

Function createShareCopilotCard

public/js/sharedFolderView.js:389–422  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

387 }
388
389 function createShareCopilotCard() {
390 const host = document.createElement('section');
391 host.className = 'fr-share-ai-launcher';
392 host.innerHTML = [
393 '<div class="fr-share-ai-launcher-copy">',
394 '<div class="fr-share-kicker">AI Assistant</div>',
395 '<div class="fr-share-ai-launcher-title">Ask AI about this share</div>',
396 '<div class="fr-share-ai-launcher-subtitle"></div>',
397 '</div>',
398 '<button type="button" class="fr-share-btn fr-share-ai-open">Ask AI</button>',
399 '<div class="fr-share-ai-backdrop" hidden>',
400 '<section class="fr-share-card fr-share-copilot fr-share-ai-dialog" role="dialog" aria-modal="true" aria-labelledby="frShareAiDialogTitle">',
401 '<div class="fr-share-copilot-head">',
402 '<div>',
403 '<div class="fr-share-kicker">AI Assistant</div>',
404 '<div class="fr-share-title fr-share-copilot-title" id="frShareAiDialogTitle">Ask about this share</div>',
405 '<div class="fr-share-subtitle fr-share-copilot-subtitle"></div>',
406 '</div>',
407 '<button type="button" class="fr-share-btn fr-share-btn-ghost fr-share-ai-close">Close</button>',
408 '</div>',
409 '<div class="fr-share-copilot-suggestions" hidden></div>',
410 '<div class="fr-share-copilot-log" aria-live="polite"></div>',
411 '<form class="fr-share-copilot-form">',
412 '<textarea class="fr-share-copilot-input" rows="3" placeholder="Ask about files, uploads, or access in this share"></textarea>',
413 '<div class="fr-share-copilot-actions">',
414 '<div class="fr-share-copilot-meta"></div>',
415 '<button type="submit" class="fr-share-btn">Send</button>',
416 '</div>',
417 '</form>',
418 '</section>',
419 '</div>'
420 ].join('');
421 return host;
422 }
423
424 async function mountShareCopilot() {
425 if (!token || !shareAiEnabled) return;

Callers 1

mountShareCopilotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected