MCPcopy
hub / github.com/github/awesome-copilot / addNote

Function addNote

extensions/site-studio/extension.mjs:646–657  ·  view source on GitHub ↗
(sectionId, text, author)

Source from the content-addressed store, hash-verified

644}
645
646function addNote(sectionId, text, author) {
647 const section = findSectionOrThrow(sectionId);
648 const note = {
649 text: safeString(text),
650 author: author === "human" ? "human" : "agent",
651 timestamp: nowIso(),
652 };
653 section.notes.push(note);
654 section.lastModified = note.timestamp;
655 stateCache.lastUpdated = note.timestamp;
656 return note;
657}
658
659function updateSectionStatus(sectionId, status, message, author = "agent") {
660 if (!VALID_STATUS.has(status)) {

Callers 6

applyTemplatePackFunction · 0.85
updateSectionStatusFunction · 0.85
upsertSectionContentFunction · 0.85
deleteSectionContentFunction · 0.85
handleApiFunction · 0.85
extension.mjsFile · 0.85

Calls 3

findSectionOrThrowFunction · 0.85
safeStringFunction · 0.85
nowIsoFunction · 0.85

Tested by

no test coverage detected