opencode
opencode copied to clipboard
fix(command): validate model before executing slash command
Background
Slash commands with invalid model fails silently. It will be great if we can display the error message.
For example:
~/.config/opencode/command/hello.md
---
description: Greet the user warmly
model: anthropic/claude-haiku
---
You are a friendly assistant who greets the user warmly. Greet the user warmly and cheerfully.
Summary
- Validate model existence before executing slash commands
- Show friendly error message with fuzzy suggestions when model not found
Preview
/review
lgtm