Add Terminal Command Explainer agent - #751
Conversation
|
@KoderOP is attempting to deploy a commit to the aditthyass' projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Note
|
| Layer / File(s) | Summary |
|---|---|
Agent metadata, inputs, and prompt configuration src/agents/definitions/terminal-command-explainer.js |
Adds the new agent definition export with core metadata, example inputs, required command and experience-level fields, a structured markdown prompt, and markdown output formatting. |
Estimated code review effort: 1 (Trivial) | ~5 minutes
Possibly related PRs
- AditthyaSS/iloveAgents#710: Also adds a new agent definition module with structured markdown prompt instructions and agent metadata.
Suggested labels: level:beginner, gssoc:approved, type:feature
Suggested reviewers: AditthyaSS
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title clearly matches the main change: adding the Terminal Command Explainer agent. |
| Linked Issues check | ✅ Passed | The new agent definition covers the requested ID, category, icon, provider, inputs, markdown output, and warning behavior. |
| Out of Scope Changes check | ✅ Passed | The PR appears scoped to creating the requested agent definition file with no obvious unrelated changes. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Warning
There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.
🔧 Biome (2.5.1)
src/agents/definitions/terminal-command-explainer.js
File contains syntax errors that prevent linting: Line 94: expected , but instead found rm; Line 94: expected , but instead found ```; Line 94: Expected a property, a shorthand property, a getter, a setter, or a method but instead found 'dd'.; Line 94: Expected a property, a shorthand property, a getter, a setter, or a method but instead found '`chmod 777`'.; Line 94: expected `,` but instead found `other`; Line 94: expected `,` but instead found `destructive`; Line 94: expected `,` but instead found `operations`; Line 94: expected `,` but instead found `a`; Line 94: Unexpected token `!`; Line 94: Unexpected token `️`; Line 95: expected `,` but instead found `-`; Line 95: Expected a semicolon or an implicit semicolon after a statement, but found none; Line 95: Expected a semicolon or an implicit semicolon after a statement, but found none; Line 95: Expected a semicolon or an implicit semicolon after a statement, but found none; Line 95: Expected an identifier but instead found ','.; Line 95: expected `,` but instead found `for`; Line 96: Expected a semicolon or an implicit semicolon after a statement, but found none; Line 96: Expected a semicolon or an implicit semicolon after a statement, but found none; Line 96: Expected a semicolon or an implicit semicolon after a statement, but found none; Line 96: Expected a semicolon or an implicit semicolon after a statement, but found none; Line 96: Expected a semicolon or an implicit semicolon after a statement, but found none; Line 96: Expected a semicolon or an implicit semicolon after a statement, but found none; Line 96: unterminated template literal
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
Hey @KoderOP! 👋
|
|
hey @KoderOP! 👋 |
|
hey @KoderOP! 👋 |
|
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/agents/definitions/terminal-command-explainer.js`:
- Around line 93-96: The dangerous-command guidance in
terminal-command-explainer.js includes a bogus token that will trigger false
positives on harmless commands. Update the prompt text in the command-safety
instructions to remove the invalid `:/` entry, and keep the checks focused on
real destructive patterns handled by the explainer logic so `ALWAYS CHECK FOR
DANGEROUS COMMANDS` only mentions actual risky commands.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 0e9432b4-765f-477b-9d62-0b6b8319f2ac
📒 Files selected for processing (1)
src/agents/definitions/terminal-command-explainer.js
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/agents/definitions/terminal-command-explainer.js`:
- Around line 93-96: Escape the literal backticks inside the systemPrompt
template string in terminal-command-explainer.js so the prompt text does not
terminate the backtick-delimited literal early. Update the dangerous-commands
guidance near the ALWAYS CHECK FOR DANGEROUS COMMANDS section, and make sure the
symbols around the embedded command examples (`rm`, `dd`, `chmod 777`, and `rm
-i`) are all consistently escaped the same way as the other prompt text in this
file.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 2dc944a4-62e1-4eed-b158-ec72cc8cc92b
📒 Files selected for processing (1)
src/agents/definitions/terminal-command-explainer.js
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
❌ Build is failing on this PR.
Please fix before merging:
- Run
npm run buildlocally - Fix any errors shown
- Push your fix — the check will re-run automatically
Most common issue: broken registry import.
Replace:
import agents from '../agents/registry'
With:
import { useAgents } from '../lib/useAgents'
const { agents } = useAgents()
See CONTRIBUTING.md for help. 🙏
There was a problem hiding this comment.
❌ Build is failing on this PR.
Please fix before merging:
- Run
npm run buildlocally - Fix any errors shown
- Push your fix — the check will re-run automatically
Most common issue: broken registry import.
Replace:
import agents from '../agents/registry'
With:
import { useAgents } from '../lib/useAgents'
const { agents } = useAgents()
See CONTRIBUTING.md for help. 🙏
Closes #578 Add Terminal Command Explainer agent
What does this PR do?
Adds a new Terminal Command Explainer agent which takes any terminal/shell command and breaks it down in plain English — a summary, a part-by-part breakdown table, an example execution walkthrough, and flag-by-flag explanations, tailored to the user's selected experience level (Beginner / Intermediate / Expert). It also flags destructive commands (rm, dd, chmod 777, etc.) with a warning and a safer alternative.
Type of change
Checklist
npm run buildlocally and it passed ✅import agents from '../agents/registry'✅Screenshots
Summary by CodeRabbit
Summary by CodeRabbit