Conversation
There was a problem hiding this comment.
Pull request overview
Adds a repository-scoped bash execution tool to the dub ai ask assistant so it can fetch real command output directly from the current repo while applying safety constraints.
Changes:
- Introduce a local
bash-toolsandbox implementation with command/file access guards. - Wire the bash tool into
askAi()and limit tool iterations viastopWhen. - Document the new bash tool behavior and update quickstart text.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/ai-context.ts | Updates system prompt guidance to prefer using the bash tool for obtaining command output and to require confirmation for destructive actions. |
| src/lib/ai-bash-sandbox.ts | Implements a local sandbox for bash-tool with blocked command patterns and repo-root path restrictions. |
| src/lib/ai-bash-sandbox.test.ts | Adds tests for sandbox execution location, blocked patterns, and path containment. |
| src/commands/ai.ts | Registers the bash tool with the AI runtime and adds a step limit for tool usage. |
| src/commands/ai.test.ts | Extends askAi tests to mock and assert bash tool wiring. |
| package.json | Adds bash-tool and just-bash dependencies. |
| pnpm-lock.yaml | Locks new dependencies and their transitive tree. |
| README.md | Documents that dub ai ask exposes a bash tool and blocks destructive patterns. |
| QUICKSTART.md | Notes dub ai ask now includes the repo bash tool. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
🥞 DubStack