claw: fix skill dispatch and rename /skill to /skills#104
Merged
Conversation
Previously, dispatch_command tried ai_skill_try_command for any unrecognized /command. When the skill didn't exist, it returned CLAW_ERROR and fell through to "Unknown command", but ai_skill_try_command internally called ai_skill_execute which could produce confusing output before failing. Now dispatch_command explicitly checks ai_skill_find() first. If the skill exists, it executes and returns (even on failure). If the skill does not exist, it falls through to "Unknown command" without attempting execution. This ensures only NVS-persisted or built-in skills are treated as commands. Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ai_skill_find()before attempting execution. Unregistered skill names fall through to "Unknown command" without triggering AI calls./skill→/skills: consistent plural naming.Changes (2 commits)
claw: fix skill dispatch to only execute registered skillsai_skill_find()in all 3 shellsclaw: rename /skill command to /skillsTest plan
make build-linux— zero warningsmake build-zynq-a9-qemu— zero warningsmake test-unit-zynq— all suites passmake build-esp32c3-qemu(CI)/nonexistent→ "Unknown command"/skills→ lists registered skills/greet→ executes built-in skill