Skip to content

Commit 6083c12

Browse files
committed
docs: improve executable command example
Replace generic /context example with /todo - finds TODO/FIXME comments and asks the model to help address them. More practical demonstration of dynamic content.
1 parent 4c74127 commit 6083c12

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

docs/hooks/slash-commands.mdx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,15 @@ For dynamic content, use an executable:
8484

8585
```bash
8686
#!/usr/bin/env bash
87-
# .mux/commands/context
88-
# usage: /context - show current git context
87+
# .mux/commands/todo
88+
# usage: /todo - find all TODO/FIXME comments and ask for help
8989

90-
echo "Current directory: $(pwd)"
91-
echo "Git branch: $(git branch --show-current)"
92-
echo "Recent commits:"
93-
git log --oneline -5
90+
echo "Here are the TODO and FIXME comments in this project. Help me address them:"
91+
echo ""
92+
grep -rn --include="*.ts" --include="*.tsx" --include="*.js" -E "(TODO|FIXME):" . 2>/dev/null | head -30
9493
```
9594

96-
**Usage:** `/context`
95+
**Usage:** `/todo`
9796

9897
### Level 3: Using Arguments
9998

src/browser/stories/App.slashCommands.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const WithCustomCommands: AppStory = {
7575
[
7676
{ name: "dry", description: "/dry - do a dry run without making changes" },
7777
{ name: "review", description: "/review - review changes before committing" },
78-
{ name: "context", description: "/context - summarize project context" },
78+
{ name: "todo", description: "/todo - find TODO/FIXME comments" },
7979
{ name: "pr-summary", description: "/pr-summary - generate a PR description" },
8080
],
8181
],
@@ -128,7 +128,7 @@ export const FilteredCommands: AppStory = {
128128
[
129129
{ name: "dry", description: "/dry - do a dry run" },
130130
{ name: "review" },
131-
{ name: "context", description: "/context - summarize project context" },
131+
{ name: "todo", description: "/todo - find TODO/FIXME comments" },
132132
],
133133
],
134134
]),

0 commit comments

Comments
 (0)