-
Notifications
You must be signed in to change notification settings - Fork 43
feat: Add interactive shell support and improve VM management #264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds interactive shell support and improves VM management by introducing a comprehensive command-line interface. The changes enable dynamic VM management and provide an alternative to the traditional static configuration approach.
- Interactive shell with command history and navigation support
- VM management commands (create, start, stop, list, show, etc.)
- File system utilities and basic shell commands
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/vmm/mod.rs | Exposes modules and RUNNING_VM_COUNT for shell access |
src/vmm/config.rs | Refactors VM initialization to support dynamic creation |
src/shell/mod.rs | Implements interactive shell with input handling and terminal control |
src/shell/command/vm.rs | Provides comprehensive VM management commands |
src/shell/command/mod.rs | Core command parsing and execution framework |
src/shell/command/history.rs | Command history management and terminal redraw utilities |
src/shell/command/base.rs | Basic filesystem and system commands |
src/main.rs | Integrates shell initialization |
configs/vms_bkp/arceos-aarch64.toml | Updates VM config to use filesystem images |
configs/vms/arceos-aarch64-e2000-smp2.toml | Updates kernel path configuration |
auto_interrupt.sh | Script for automated testing with shell integration |
Cargo.toml | Adds lazy_static dependency for command tree |
.github/workflows/test.yml | Updates CI to use auto interrupt script |
Comments suppressed due to low confidence (1)
src/shell/command/vm.rs:1
- This code appears to be attempting to extract a filename from the source path but is incorrectly reading the destination directory. The logic should extract the filename from the source path directly using Path::file_name() or similar.
use core::sync::atomic::Ordering;
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 13 out of 14 changed files in this pull request and generated 7 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 16 out of 17 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 17 out of 18 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 17 out of 18 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (3)
src/shell/command/base.rs:1
- [nitpick] The
#[allow(unused_must_use)]
attribute on this function is concerning since it performs I/O operations that can fail. Consider either handling the Result properly by returning it to the caller, or document why ignoring the results is acceptable in this context.
use std::collections::BTreeMap;
src/shell/command/vm.rs:1
- This code appears to be incorrect. It's reading the destination directory to get a filename, but it should extract the filename from the source path instead. This will cause the move operation to fail or behave unexpectedly.
use std::{
src/shell/command/vm.rs:1
- This logic is flawed. It's trying to read the source path as a directory and extract a filename, but the source should be the path to move, not a directory to read. This should extract the filename from the source path using path manipulation functions instead.
use std::{
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.