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

Function setSuggestions

public/js/sharedFolderView.js:502–522  ·  view source on GitHub ↗
(items)

Source from the content-addressed store, hash-verified

500 }
501
502 function setSuggestions(items) {
503 if (!suggestionsEl) return;
504 suggestionsEl.textContent = '';
505 const list = Array.isArray(items) ? items.filter(Boolean).slice(0, 4) : [];
506 if (!list.length) {
507 suggestionsEl.hidden = true;
508 return;
509 }
510 suggestionsEl.hidden = false;
511 list.forEach((item) => {
512 const btn = document.createElement('button');
513 btn.type = 'button';
514 btn.className = 'fr-share-pill';
515 btn.textContent = String(item);
516 btn.addEventListener('click', function () {
517 if (inputEl) inputEl.value = String(item);
518 if (inputEl) inputEl.focus();
519 });
520 suggestionsEl.appendChild(btn);
521 });
522 }
523
524 async function sendMessage(message) {
525 const text = String(message || '').trim();

Callers 2

sendMessageFunction · 0.70
mountShareCopilotFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected