Skip to content

Commit b246b12

Browse files
committed
remove regular expressions as they don't encode into json.
1 parent b6ea4d8 commit b246b12

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

packages/agent/src/tools/interaction/subAgent.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,18 @@ const parameterSchema = z.object({
1515
.describe('The main objective that the sub-agent needs to achieve'),
1616
projectContext: z
1717
.string()
18-
.optional()
19-
.describe('Additional context about the project or environment'),
18+
.describe('Context about the problem or environment'),
2019
fileContext: z
2120
.object({
2221
workingDirectory: z
2322
.string()
2423
.optional()
2524
.describe('The directory where the sub-agent should operate'),
2625
relevantFiles: z
27-
.array(z.string())
26+
.string()
2827
.optional()
2928
.describe(
30-
'List of files or regular expressions that are relevant to the task',
29+
'A list of files, which may include ** or * wildcard characters',
3130
),
3231
})
3332
.describe(
@@ -77,15 +76,14 @@ export const subAgentTool: Tool<Parameters, ReturnType> = {
7776
const prompt = [
7877
`Description: ${description}`,
7978
`Goal: ${goal}`,
80-
projectContext ? `- Project Context: ${projectContext}` : '',
81-
79+
`Project Context: ${projectContext}`,
8280
fileContext
8381
? `\nContext:\n${[
8482
fileContext.workingDirectory
8583
? `- Working Directory: ${fileContext.workingDirectory}`
8684
: '',
87-
fileContext.relevantFiles?.length
88-
? `- Relevant Files:\n ${fileContext.relevantFiles.map((f) => `- ${f}`).join('\n ')}`
85+
fileContext.relevantFiles
86+
? `- Relevant Files:\n ${fileContext.relevantFiles}`
8987
: '',
9088
]
9189
.filter(Boolean)

0 commit comments

Comments
 (0)