From 0fe94c16164f9db08a82511ff5ddd45b40cb80ad Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Fri, 22 Aug 2025 17:23:51 -0400 Subject: [PATCH] docs: add file names to code block titles in commands.mdx --- .../web/src/content/docs/docs/commands.mdx | 43 +++++++------------ 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/packages/web/src/content/docs/docs/commands.mdx b/packages/web/src/content/docs/docs/commands.mdx index 93be346c..d34f0ee3 100644 --- a/packages/web/src/content/docs/docs/commands.mdx +++ b/packages/web/src/content/docs/docs/commands.mdx @@ -13,7 +13,7 @@ Create markdown files in the `command/` directory to define custom commands. Create `.opencode/command/test.md`: -```md +```md title=".opencode/command/test.md" --- description: Run tests with coverage agent: build @@ -34,32 +34,13 @@ Use the command by typing `/` followed by the command name. --- -## Create command files - -For complex commands, create markdown files in the `command/` directory. - -Create `.opencode/command/test.md`: - -```md ---- -description: Run tests with coverage -agent: build -model: anthropic/claude-3-5-sonnet-20241022 ---- - -Run the full test suite with coverage report and show any failures. -Focus on the failing tests and suggest fixes. -``` - -The frontmatter defines command properties. The content becomes the template. - ---- - ## Use arguments Pass arguments to commands using the `$ARGUMENTS` placeholder. -```md +Create `.opencode/command/component.md`: + +```md title=".opencode/command/component.md" --- description: Create a new component --- @@ -80,7 +61,9 @@ Run the command with arguments: Use `!`command`` to inject shell command output into your prompt. -```md +Create `.opencode/command/analyze-coverage.md`: + +```md title=".opencode/command/analyze-coverage.md" --- description: Analyze test coverage --- @@ -91,7 +74,9 @@ Here are the current test results: Based on these results, suggest improvements to increase coverage. ``` -```md +Create `.opencode/command/review-changes.md`: + +```md title=".opencode/command/review-changes.md" --- description: Review recent changes --- @@ -110,7 +95,9 @@ Commands run in your project's root directory and their output becomes part of t Include files in your command using `@` followed by the filename. -```md +Create `.opencode/command/review-component.md`: + +```md title=".opencode/command/review-component.md" --- description: Review component --- @@ -131,7 +118,9 @@ Configure commands with these optional frontmatter properties: - **agent**: Agent to use (defaults to "build") - **model**: Specific model to use for this command -```md +Create `.opencode/command/code-review.md`: + +```md title=".opencode/command/code-review.md" --- description: Code review assistant agent: build