feat: allow goose askai bot to search goose codebase#7508
feat: allow goose askai bot to search goose codebase#7508The-Best-Codes merged 2 commits intomainfrom
Conversation
Signed-off-by: The-Best-Codes <[email protected]>
The-Best-Codes
left a comment
There was a problem hiding this comment.
Ready for review
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f99a7ce490
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR enables the Ask AI Discord bot to search and view the goose codebase, specifically within the ui/ and crates/ directories. This extends the bot's capabilities beyond documentation search to include code search, file viewing, and directory listing.
Changes:
- Adds three new AI tools:
search_codebase,view_codebase, andlist_codebase_files - Implements regex-based code search with support for scoping to specific directories
- Updates tool tracking and status messages to support the new codebase tools
- Increases MAX_STEPS from 10 to 15 to accommodate combined doc + code searches
- Copies source code (ui/ and crates/) into the Docker image for bot access
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| services/ask-ai-bot/utils/ai/tools/index.ts | Registers three new codebase tools with input schemas and execute handlers |
| services/ask-ai-bot/utils/ai/tools/codebase-search.ts | Implements regex-based code search with path traversal protection and configurable scope |
| services/ask-ai-bot/utils/ai/tools/codebase-viewer.ts | Implements file viewing with line numbers and GitHub URL generation |
| services/ask-ai-bot/utils/ai/tool-tracker.ts | Extends tracking to differentiate doc vs code searches and views |
| services/ask-ai-bot/utils/ai/system-prompt.ts | Updates system prompt with codebase tool usage guidance and increases MAX_STEPS |
| services/ask-ai-bot/utils/ai/index.ts | Adds status message updates and tracking for new codebase tools |
| services/ask-ai-bot/Dockerfile | Copies ui/ and crates/ directories into Docker image |
| services/ask-ai-bot/.env.example | Documents CODEBASE_PATH environment variable |
| services/ask-ai-bot/.dockerignore | Excludes build artifacts like crates/**/target |
Signed-off-by: The-Best-Codes <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a53ee8a9e8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: The-Best-Codes <[email protected]>
…patible * origin/main: (70 commits) feat: allow goose askai bot to search goose codebase (#7508) Revert "Reapply "fix: prevent crashes in long-running Electron sessions"" Reapply "fix: prevent crashes in long-running Electron sessions" Revert "fix: prevent crashes in long-running Electron sessions" fix: replace unwrap() with graceful error in scheduler execute_job (#7436) fix: Dictation API error message shows incorrect limit (#7423) fix(acp): Use ACP schema types for session/list (#7409) fix(desktop): make bundle and updater asset naming configurable (#7337) fix(openai): preserve order in Responses API history (#7500) Use the correct Goose emoji 🪿 instead of Swan in README.md (#7485) feat(ui): implement fullscreen and pip display modes for MCP Apps (#7312) fix: prevent crashes in long-running Electron sessions Disable tool pair summarization (#7481) fix: New Recipe Warning does not close on cancel (#7524) The client is not the source of truth (#7438) feat: support Anthropic adaptive thinking (#7356) copilot instructions: reword no prerelease docs (#7101) fix(acp): don't fail session creation when model listing is unavailable (#7484) feat: simplify developer extension (#7466) feat: add goose-powered release notes generator workflow (#7503) ... # Conflicts: # Cargo.lock
…m-extension-pr * origin/main: Update CODEOWNERS for team restructuring (#7574) Add snapshot test with platform extensions (#7573) Handle Bedrock 'prompt is too long' error (#7550) feat: make pctx/Code Mode an optional dependency via 'code-mode' feature (#7567) chore(release): release version 1.26.0 (minor) (#7512) feat: allow goose askai bot to search goose codebase (#7508) Revert "Reapply "fix: prevent crashes in long-running Electron sessions"" Reapply "fix: prevent crashes in long-running Electron sessions" Revert "fix: prevent crashes in long-running Electron sessions" fix: replace unwrap() with graceful error in scheduler execute_job (#7436) fix: Dictation API error message shows incorrect limit (#7423) fix(acp): Use ACP schema types for session/list (#7409) fix(desktop): make bundle and updater asset naming configurable (#7337) fix(openai): preserve order in Responses API history (#7500) Use the correct Goose emoji 🪿 instead of Swan in README.md (#7485) fix: prevent crashes in long-running Electron sessions
Signed-off-by: The-Best-Codes <[email protected]>
Summary
Allows goose Ask AI Discord bot to search the goose codebase (currently limited to crates/ and ui/).
Type of Change
AI Assistance
Testing
Manually tested locally. Can't confirm if there will be path issues in prod; if so an env var will fix it.