Description:
Currently, when a custom agent file is malformed (e.g., due to a YAML frontmatter parsing error), it is silently ignored and not displayed in the settings UI. This makes it difficult for users to identify and fix issues with their custom agents.
To Reproduce:
- Create a custom agent file with invalid YAML frontmatter in the
.pochi/agents/ directory.
- Open the Pochi settings in VS Code.
- The malformed agent will not be listed.
Expected Behavior:
All custom agent files should be displayed in the settings, with a clear warning for those that are malformed. This would allow users to easily identify and fix them.
Relevant Code:
Proposed Solution:
- Modify the
readAgentsFromDir function in packages/vscode/src/lib/custom-agent.ts to return all agent files, including those that fail to parse. A status field could be added to indicate whether the agent is valid or malformed.
- Update the
CustomAgentFile type to include the status field.
- Modify the
CustomAgentSection component in packages/vscode-webui/src/features/settings/components/sections/custom-agent-section.tsx to display a warning for malformed agents.
🤖 Generated with Pochi
Description:
Currently, when a custom agent file is malformed (e.g., due to a YAML frontmatter parsing error), it is silently ignored and not displayed in the settings UI. This makes it difficult for users to identify and fix issues with their custom agents.
To Reproduce:
.pochi/agents/directory.Expected Behavior:
All custom agent files should be displayed in the settings, with a clear warning for those that are malformed. This would allow users to easily identify and fix them.
Relevant Code:
readAgentsFromDirfunction silently ignores agents that fail to parse.Proposed Solution:
readAgentsFromDirfunction inpackages/vscode/src/lib/custom-agent.tsto return all agent files, including those that fail to parse. Astatusfield could be added to indicate whether the agent is valid or malformed.CustomAgentFiletype to include thestatusfield.CustomAgentSectioncomponent inpackages/vscode-webui/src/features/settings/components/sections/custom-agent-section.tsxto display a warning for malformed agents.🤖 Generated with Pochi