Skip to content

fix: handle advertised github commands#411

Open
nijanthanvijayakumar wants to merge 2 commits into
CortexLM:mainfrom
nijanthanvijayakumar:fix/github-advertised-commands
Open

fix: handle advertised github commands#411
nijanthanvijayakumar wants to merge 2 commits into
CortexLM:mainfrom
nijanthanvijayakumar:fix/github-advertised-commands

Conversation

@nijanthanvijayakumar
Copy link
Copy Markdown

Summary

  • handle the /cortex explain and /cortex test commands listed by /cortex help
  • keep the existing placeholder style, but stop returning unknown-command responses
  • add a small response helper so command output is unit-tested without GitHub calls

Bounty issue: PlatformNetwork/bounty-challenge#45894

Validation

  • cargo fmt --package cortex-cli --check
  • cargo test -p cortex-cli github_cmd::tests -- --nocapture
  • cargo check -p cortex-cli --lib
  • git diff --check
  • Docker Desktop:
docker run --rm -v "$PWD":/work -w /work -e CARGO_TARGET_DIR=/tmp/cortex-target rust:1.95-bookworm bash -lc 'export PATH=/usr/local/cargo/bin:$PATH; apt-get update; apt-get install -y pkg-config libasound2-dev; rustup component add rustfmt; cargo fmt --package cortex-cli --check; cargo test -p cortex-cli github_cmd::tests -- --nocapture'

test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 975 filtered out; finished in 0.01s

Notes

  • existing unrelated warnings remain in cortex-tui/src/external_editor.rs and cortex-cli/src/utils/notification.rs

Import the shared file helper directly so cortex-cli tests compile on main.
Return clear responses for the explain and test commands listed by github help.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant