fix: agent articles
This commit is contained in:
parent
17712b21c0
commit
c34e56e727
2 changed files with 4 additions and 4 deletions
|
|
@ -148,7 +148,7 @@ Prompt content
|
|||
const toolsOnlyExample = `
|
||||
---
|
||||
name: Tools Only Agent File
|
||||
description: A agent file that uses tools but no rules
|
||||
description: An agent file that uses tools but no rules
|
||||
tools: git, filesystem, search
|
||||
---
|
||||
This agent file uses tools but doesn't define any rules.
|
||||
|
|
@ -157,7 +157,7 @@ This agent file uses tools but doesn't define any rules.
|
|||
const result = parseAgentFile(toolsOnlyExample);
|
||||
expect(result).toEqual({
|
||||
name: "Tools Only Agent File",
|
||||
description: "A agent file that uses tools but no rules",
|
||||
description: "An agent file that uses tools but no rules",
|
||||
tools: "git, filesystem, search",
|
||||
prompt: "This agent file uses tools but doesn't define any rules.",
|
||||
});
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export interface ParsedAgentTools {
|
|||
}
|
||||
|
||||
/**
|
||||
* Parses and validates a agent file from markdown content
|
||||
* Parses and validates an agent file from markdown content
|
||||
* Agent files must have frontmatter with at least a name
|
||||
*/
|
||||
export function parseAgentFile(content: string): AgentFile {
|
||||
|
|
@ -70,7 +70,7 @@ export function parseAgentFile(content: string): AgentFile {
|
|||
}
|
||||
|
||||
/**
|
||||
* Serializes a Agent file back to markdown with YAML frontmatter
|
||||
* Serializes an Agent file back to markdown with YAML frontmatter
|
||||
*/
|
||||
export function serializeAgentFile(agentFile: AgentFile): string {
|
||||
const { prompt, ...frontmatter } = agentFile;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue