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

Function detectSectionIdFromPrompt

extensions/site-studio/extension.mjs:788–798  ·  view source on GitHub ↗
(prompt)

Source from the content-addressed store, hash-verified

786}
787
788function detectSectionIdFromPrompt(prompt) {
789 const normalized = prompt.toLowerCase();
790 if (normalized.includes("design system") || normalized.includes("design-system")) return "design-system";
791 if (normalized.includes("hero")) return "hero";
792 if (normalized.includes("navigation") || normalized.includes(" nav ")) return "nav";
793 if (normalized.includes("about")) return "about";
794 if (normalized.includes("talk")) return "talks";
795 if (normalized.includes("video")) return "videos";
796 if (normalized.includes("contact")) return "contact";
797 return null;
798}
799
800const INTERACTIVE_FILL_CONTEXT = [
801 "When users ask to fill Site Studio section content interactively:",

Callers 1

extension.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected