Skip to content

feat(ai): add bash-tool for ai assistant#13

Merged
dubscode merged 2 commits intomainfrom
feat/dub-stack
Feb 21, 2026
Merged

feat(ai): add bash-tool for ai assistant#13
dubscode merged 2 commits intomainfrom
feat/dub-stack

Conversation

@dubscode
Copy link
Copy Markdown
Contributor

@dubscode dubscode commented Feb 21, 2026


🥞 DubStack

Copilot AI review requested due to automatic review settings February 21, 2026 20:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-tool sandbox implementation with command/file access guards.
  • Wire the bash tool into askAi() and limit tool iterations via stopWhen.
  • 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.

Comment thread src/lib/ai-bash-sandbox.ts Outdated
Comment thread src/lib/ai-bash-sandbox.ts Outdated
Comment thread src/lib/ai-bash-sandbox.ts Outdated
Comment thread src/commands/ai.ts Outdated
Comment thread README.md Outdated
Comment thread QUICKSTART.md Outdated
@dubscode dubscode merged commit 52b5f85 into main Feb 21, 2026
3 checks passed
@dubscode dubscode deleted the feat/dub-stack branch February 21, 2026 21:47
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.

2 participants