-
Notifications
You must be signed in to change notification settings - Fork 1.5k
visual display of handoffs on readme #434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -331,6 +331,26 @@ function generatePromptsSection(promptsDir) { | |||||||||||||||||||||||||||||||||||||||||
| return `${TEMPLATES.promptsSection}\n${TEMPLATES.promptsUsage}\n\n${promptsContent}`; | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||
| * Get handoff information from an agent | ||||||||||||||||||||||||||||||||||||||||||
| * @param {string} filePath - Path to the agent file | ||||||||||||||||||||||||||||||||||||||||||
| * @returns {Array|null} - Array of handoff objects with label and agent, or null if no handoffs | ||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||
| function getHandoffs(filePath) { | ||||||||||||||||||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||||||||||||||||||
| const frontmatter = parseFrontmatter(filePath); | ||||||||||||||||||||||||||||||||||||||||||
| if (frontmatter && Array.isArray(frontmatter.handoffs) && frontmatter.handoffs.length > 0) { | ||||||||||||||||||||||||||||||||||||||||||
| return frontmatter.handoffs.map(h => ({ | ||||||||||||||||||||||||||||||||||||||||||
| label: h.label || 'Unknown handoff', | ||||||||||||||||||||||||||||||||||||||||||
| agent: h.agent || 'unknown' | ||||||||||||||||||||||||||||||||||||||||||
| })); | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| return null; | ||||||||||||||||||||||||||||||||||||||||||
| } catch (error) { | ||||||||||||||||||||||||||||||||||||||||||
| return null; | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+340
to
+351
|
||||||||||||||||||||||||||||||||||||||||||
| try { | |
| const frontmatter = parseFrontmatter(filePath); | |
| if (frontmatter && Array.isArray(frontmatter.handoffs) && frontmatter.handoffs.length > 0) { | |
| return frontmatter.handoffs.map(h => ({ | |
| label: h.label || 'Unknown handoff', | |
| agent: h.agent || 'unknown' | |
| })); | |
| } | |
| return null; | |
| } catch (error) { | |
| return null; | |
| } | |
| const frontmatter = parseFrontmatter(filePath); | |
| if (frontmatter && Array.isArray(frontmatter.handoffs) && frontmatter.handoffs.length > 0) { | |
| return frontmatter.handoffs.map(h => ({ | |
| label: h.label || 'Unknown handoff', | |
| agent: h.agent || 'unknown' | |
| })); | |
| } | |
| return null; |
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The arrow function parameter should use parentheses for consistency with the rest of the codebase. Change h => to (h) => to match the style used in other .map() calls throughout this file (see lines 63, 106, 235, 294, 388, 475, 546, 623).
| const handoffLabels = handoffs.map(h => h.label).join(', '); | |
| const handoffLabels = handoffs.map((h) => h.label).join(', '); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The arrow function parameter should use parentheses for consistency with the rest of the codebase. Change
h =>to(h) =>to match the style used in other.map()calls throughout this file (see lines 63, 106, 235, 294, 388, 475, 546, 623).