Conversation
- Add file operations to Cache for script management: - Make add_new_script take &self instead of &mut self - Implement actual file creation and writing in add_new_script - Add delete_script method with error handling - Initialize Cache in main execution flow - Add shell script execution module with platform-specific handling - Integrate script search in main command processing - Support script execution context (script directory or current working directory)
- Add enable_cache flag to Configurations with default implementation - Implement cache lookup and script execution in main.rs - Add save_to_shell_in_cache helper function - Refactor shell.rs to simplify script execution - Reorganize imports and reformat code for consistency - Add proper error handling for cache operations
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new cross-platform shell execution helper and adds optional script caching to the CLI flow.
- Adds
execute_shell_scriptAPI for running arbitrary shell snippets on Windows and Unix. - Integrates
Cache(withenable_cacheflag inConfigurations) intomain.rsand helper flows to save and reuse generated scripts. - Extends
ConfigurationsandCachemodules with new fields and methods to support caching behavior.
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/shell.rs | Implements execute_shell_script for OS-specific command runs |
| src/main.rs | Loads and uses cache in the Run command path |
| src/helpers.rs | Expanded helper functions to optionally save scripts to cache |
| src/configurations.rs | Added enable_cache field with serde default and Default impl |
| src/cache.rs | New add_new_script and delete_script methods in Cache |
| Cargo.toml | Bumped version to 0.1.90 |
- Add `list` and `remove` subcommands to CLI arguments - Implement `list_scripts()` and enhanced `delete_script()` in Cache - Add helper functions `process_list_cached_scripts()` and `process_remove_cached_script()` - Update main command handling to support new operations - Document project structure in new PROJECT_STRUCTURE_AND_DESIGN.md
Owner
Author
Translate your natural language into executable command(s)
Usage: you <COMMAND>
Commands:
run Run a command that is described in natural langauge. The LLM will breakdown the task and executes them
explain Explain a given command
list List all saved scripts in the cache
remove Remove a specified script from the cache
version, -v Display the version of `you`
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print versionThe |
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.
No description provided.