Skip to content

Commit 7142397

Browse files
committed
Update file lister to grok 4.1 fast
1 parent 2b69989 commit 7142397

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

agents/file-explorer/file-lister.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import { publisher } from '../constants'
22
import { type SecretAgentDefinition } from '../types/secret-agent-definition'
33

4-
const definition: SecretAgentDefinition = {
5-
id: 'file-lister',
4+
export const createFileLister = (): Omit<SecretAgentDefinition, 'id'> => ({
65
displayName: 'Liszt the File Lister',
76
publisher,
8-
model: 'x-ai/grok-4-fast',
7+
model: 'x-ai/grok-4.1-fast',
98
spawnerPrompt:
109
'Lists up to 12 files that are relevant to the prompt within the given directories. Unless you know which directories are relevant, omit the directories parameter. This agent is great for finding files that could be relevant to the prompt.',
1110
inputSchema: {
@@ -33,11 +32,12 @@ const definition: SecretAgentDefinition = {
3332

3433
systemPrompt: `You are an expert at finding relevant files in a codebase and listing them out.`,
3534
instructionsPrompt: `Instructions:
35+
- List out the full paths of 12 files that are relevant to the prompt, separated by newlines. Each file path is relative to the project root. Don't forget to include all the subdirectories in the path -- sometimes you have forgotten to include 'src' in the path. Make sure that the file paths are exactly correct.
3636
- Do not write any introductory commentary.
3737
- Do not write any analysis or any English text at all.
3838
- Do not use any more tools. Do not call read_subtree again.
39-
- List out the full paths of up to 12 files that are relevant to the prompt, separated by newlines. Each file path is relative to the project root. Don't forget to include all the subdirectories in the path -- sometimes you have forgotten to include 'src' in the path.
4039
40+
Here's an example response with made up file paths (these are not real file paths, just an example):
4141
<example_response>
4242
packages/core/src/index.ts
4343
packages/core/src/api/server.ts
@@ -53,7 +53,7 @@ package.json
5353
README.md
5454
</example_response>
5555
56-
Again: Do not write anything else other than the file paths on new lines.
56+
Again: Do not call any tools or write anything else other than the chosen file paths on new lines. Go.
5757
`.trim(),
5858

5959
handleSteps: function* ({ params }) {
@@ -66,8 +66,13 @@ Again: Do not write anything else other than the file paths on new lines.
6666
},
6767
}
6868

69-
yield 'STEP_ALL'
69+
yield 'STEP'
7070
},
71+
})
72+
73+
const definition: SecretAgentDefinition = {
74+
id: 'file-lister',
75+
...createFileLister(),
7176
}
7277

7378
export default definition

0 commit comments

Comments
 (0)