(guide)
| 108 | } |
| 109 | |
| 110 | function 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 | |
| 137 | function renderNextAction(nextAction) { |
| 138 | if (!nextAction) { |
no test coverage detected