mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-18 16:34:18 +01:00
1.0 KiB
1.0 KiB
IMPORTANT
- Try to keep things in one function unless composable or reusable
- DO NOT do unnecessary destructuring of variables
- DO NOT use
elsestatements unless necessary - DO NOT use
try/catchif it can be avoided - AVOID
try/catchwhere possible - AVOID
elsestatements - AVOID using
anytype - AVOID
letstatements - PREFER single word variable names where possible
- Use as many bun apis as possible like Bun.file()
Debugging
- To test opencode in the
packages/opencodedirectory you can runbun dev
Tool Calling
- ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE. Here is an example illustrating how to execute 3 parallel file reads in this chat environment:
json { "recipient_name": "multi_tool_use.parallel", "parameters": { "tool_uses": [ { "recipient_name": "functions.read", "parameters": { "filePath": "path/to/file.tsx" } }, { "recipient_name": "functions.read", "parameters": { "filePath": "path/to/file.ts" } }, { "recipient_name": "functions.read", "parameters": { "filePath": "path/to/file.md" } } ] } }