MCPcopy Create free account
hub / github.com/openai/plugins / renderWorkflowGuide

Function renderWorkflowGuide

plugins/plugin-eval/src/renderers/html.js:110–135  ·  view source on GitHub ↗
(guide)

Source from the content-addressed store, hash-verified

108}
109
110function renderWorkflowGuide(guide) {
111 if (!guide) {
112 return "<p>No chat workflow guidance available.</p>";
113 }
114
115 const startHere = guide.startHere || {
116 chatPrompt: guide.recommendedWorkflow.chatPrompt,
117 routingExplanation: guide.recommendedWorkflow.summary,
118 startCommand: guide.recommendedWorkflow.startCommand,
119 firstCommand: guide.recommendedWorkflow.firstCommand,
120 };
121
122 return [
123 `<p>${escapeHtml(guide.beginnerSummary)}</p>`,
124 `<p><strong>Start with this chat request:</strong> ${escapeHtml(`"${startHere.chatPrompt}"`)}</p>`,
125 `<p><strong>Why this path:</strong> ${escapeHtml(startHere.routingExplanation)}</p>`,
126 `<p><strong>Quick local entrypoint:</strong> <code>${escapeHtml(startHere.startCommand)}</code></p>`,
127 `<p><strong>Plugin Eval will run first:</strong> <code>${escapeHtml(startHere.firstCommand)}</code></p>`,
128 "<h3>Other chat requests you can use</h3>",
129 renderList(
130 guide.entrypoints.map(
131 (entry) => `${entry.label}: say "${entry.chatPrompt}" then run ${entry.firstCommand}`,
132 ),
133 ),
134 ].join("");
135}
136
137function renderNextAction(nextAction) {
138 if (!nextAction) {

Callers 1

renderHtmlFunction · 0.70

Calls 3

renderListFunction · 0.85
mapMethod · 0.80
escapeHtmlFunction · 0.70

Tested by

no test coverage detected