Skip to content

Malformed custom agents are not displayed in settings #391

Description

@wsxiaoys

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:

  1. Create a custom agent file with invalid YAML frontmatter in the .pochi/agents/ directory.
  2. Open the Pochi settings in VS Code.
  3. 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:

  1. 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.
  2. Update the CustomAgentFile type to include the status field.
  3. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions