Skip to content

feat: allow goose askai bot to search goose codebase#7508

Merged
The-Best-Codes merged 2 commits intomainfrom
best/askai-bot-codebase
Feb 26, 2026
Merged

feat: allow goose askai bot to search goose codebase#7508
The-Best-Codes merged 2 commits intomainfrom
best/askai-bot-codebase

Conversation

@The-Best-Codes
Copy link
Copy Markdown
Collaborator

Summary

Allows goose Ask AI Discord bot to search the goose codebase (currently limited to crates/ and ui/).

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

AI Assistance

  • This PR was created or reviewed with 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.

@The-Best-Codes The-Best-Codes self-assigned this Feb 25, 2026
@The-Best-Codes The-Best-Codes added the enhancement New feature or request label Feb 25, 2026
Copy link
Copy Markdown
Collaborator Author

@The-Best-Codes The-Best-Codes left a comment

Choose a reason for hiding this comment

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

Ready for review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Copy link
Copy Markdown
Contributor

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

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, and list_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]>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

@The-Best-Codes The-Best-Codes added this pull request to the merge queue Feb 26, 2026
Merged via the queue into main with commit 85c7f97 Feb 26, 2026
26 of 28 checks passed
@The-Best-Codes The-Best-Codes deleted the best/askai-bot-codebase branch February 26, 2026 21:04
benthecarman pushed a commit to benthecarman/goose that referenced this pull request Feb 27, 2026
tlongwell-block added a commit that referenced this pull request Feb 27, 2026
…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
tlongwell-block added a commit that referenced this pull request Feb 27, 2026
…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
craigwalkeruk pushed a commit to craigwalkeruk/custom-goose that referenced this pull request Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants