You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/opencode/src/agent/agent.ts
+35Lines changed: 35 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -114,6 +114,41 @@ export namespace Agent {
114
114
mode: "subagent",
115
115
builtIn: true,
116
116
},
117
+
explore: {
118
+
name: "explore",
119
+
tools: {
120
+
todoread: false,
121
+
todowrite: false,
122
+
edit: false,
123
+
write: false,
124
+
...defaultTools,
125
+
},
126
+
description: `Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. "src/components/**/*.tsx"), search code for keywords (eg. "API endpoints"), or answer questions about the codebase (eg. "how do API endpoints work?"). When calling this agent, specify the desired thoroughness level: "quick" for basic searches, "medium" for moderate exploration, or "very thorough" for comprehensive analysis across multiple locations and naming conventions. (Tools: All tools)`,
127
+
prompt: [
128
+
`You are a file search specialist. You excel at thoroughly navigating and exploring codebases.`,
129
+
``,
130
+
`Your strengths:`,
131
+
`- Rapidly finding files using glob patterns`,
132
+
`- Searching code and text with powerful regex patterns`,
133
+
`- Reading and analyzing file contents`,
134
+
``,
135
+
`Guidelines:`,
136
+
`- Use Glob for broad file pattern matching`,
137
+
`- Use Grep for searching file contents with regex`,
138
+
`- Use Read when you know the specific file path you need to read`,
139
+
`- Use Bash for file operations like copying, moving, or listing directory contents`,
140
+
`- Adapt your search approach based on the thoroughness level specified by the caller`,
141
+
`- Return file paths as absolute paths in your final response`,
142
+
`- For clear communication, avoid using emojis`,
143
+
`- Do not create any files, or run bash commands that modify the user's system state in any way`,
144
+
``,
145
+
`Complete the user's search request efficiently and report your findings clearly.`,
0 commit comments