Skip to content

Conversation

@Abhijay007
Copy link
Collaborator

Closes: #5054

Pull Request Description

This PR aims to fix the "@" fuzzy/reference search functionality in Goose Desktop to show files relative to the current working directory instead of the entire system, and adds proper scrolling to display all available files without artificial limits.

Type of Change

  • Feature
  • Bug fix
  • Performance improvement

Changes made:

  • File Search Scope: Changed "@" fuzzy search to start from the current working directory GOOSE_WORKING_DIR instead of user's home directory, and enhanced scoring algorithm to prioritize files closer to current working directory.

  • Scrolling Support and UI Improvements: Removed artificial 8-file limit and added full scrolling functionality with max-height: 280px and smooth scroll behavior also added file count indicator and improved keyboard navigation with proper scroll-into-view behavior

Testing

Tested it in the Goose desktop by using the change

Screenshots/Demos (for UX changes)

gooseSearch

let startPath = window.appConfig.get('GOOSE_WORKING_DIR') as string;

if (!startPath) {
startPath = '/Users'; // Default to macOS
Copy link
Collaborator

Choose a reason for hiding this comment

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

put this in the else

if (fullPathMatch.score > bestMatch.score) {
bestMatch = fullPathMatch;
matchedText = file.path;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should probably do this with some reduce

? 1
: -1
: a.name.localeCompare(b.name);
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

the two arms are rather similar can we cut down on that? like have something like:

const compareByType = (a, b) => 
  a.isDirectory !== b.isDirectory ? (a.isDirectory ? 1 : -1) : 0;

matches: [],
matchedText: file.name,
})); // Show first 15 files when no query
const currentWorkingDir = window.appConfig.get('GOOSE_WORKING_DIR') as string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

you are using this twice, once defaulting to OS specifc. extract that and if you can be sure you have a value, get rid off 999

@taniandjerry
Copy link
Contributor

Thank you for your contribution, @Abhijay007 !

@Abhijay007 Abhijay007 requested a review from DOsinga October 8, 2025 18:53
@taniandjerry
Copy link
Contributor

I see this is approved, but wanted to check that your earlier comments are resolved @DOsinga ! Wanted to make sure before squash & merge :)

@DOsinga DOsinga merged commit 0baca17 into block:main Oct 11, 2025
10 checks passed
zanesq added a commit that referenced this pull request Oct 13, 2025
…sion-streaming

* 'main' of github.com:block/goose: (37 commits)
  Clear deeplinks after use (#5128)
  Revert "Fix gpt-5 input context limit (#4619)" (#5135)
  fix: missing cmake and protobuf for windows build, deduplicate sh/pws… (#5028)
  Fix bedrock tool input schema (#5064)
  Add self-test recipe for goose validation (#5111)
  fix: modifies openai request logic for reasoning models (#4221) (#4294)
  Fix race condition threat when set_param and set_secret of c… (#5109)
  Clean room implementation of the chat process (#5079)
  Bump rmcp (#5096)
  set version in an env variable for testing (#5100)
  fix : enhance fuzzy file search in goose desktop (#5071)
  Make async (#5126)
  docs: unlist tutorials for extensions with archived or moved servers (#5116)
  Add API Documentation Generator prompt (#5001)
  Add flag for enabling eleven labs voice dictation (#5095)
  force re-render fields to pick up custom params usage in instructions (#5112)
  Remove isUserInputDisabled (#5115)
  Improve Rust analysis output for `analyze` tool (#5072)
  Remove duplicate prepare_reply_context call (#5063)
  install react dev tools in development (#4979)
  ...

# Conflicts:
#	ui/desktop/src/components/BaseChat2.tsx
#	ui/desktop/src/hooks/useChatStream.ts
katzdave added a commit that referenced this pull request Oct 15, 2025
* 'main' of github.com:block/goose: (49 commits)
  fixing video embed (#5171)
  chore: clean up random unused files (#5166)
  fix: adjust download_cli.sh to tolerate no OS variable (#5169)
  mcp tutorial page for firecrawl (#5152)
  Remove orphaned tool calls before compaction (#5059)
  feat: add copy as markdown button to documentation pages (#5158)
  chore: include vendored node executable (#5160)
  remove extra whitespace from message (#5159)
  Clear deeplinks after use (#5128)
  Revert "Fix gpt-5 input context limit (#4619)" (#5135)
  fix: missing cmake and protobuf for windows build, deduplicate sh/pws… (#5028)
  Fix bedrock tool input schema (#5064)
  Add self-test recipe for goose validation (#5111)
  fix: modifies openai request logic for reasoning models (#4221) (#4294)
  Fix race condition threat when set_param and set_secret of c… (#5109)
  Clean room implementation of the chat process (#5079)
  Bump rmcp (#5096)
  set version in an env variable for testing (#5100)
  fix : enhance fuzzy file search in goose desktop (#5071)
  Make async (#5126)
  ...
michaelneale added a commit that referenced this pull request Oct 16, 2025
* main: (35 commits)
  fix: include apple silicon build of the desktop app in build artifacts (#5174)
  fixing video embed (#5171)
  chore: clean up random unused files (#5166)
  fix: adjust download_cli.sh to tolerate no OS variable (#5169)
  mcp tutorial page for firecrawl (#5152)
  Remove orphaned tool calls before compaction (#5059)
  feat: add copy as markdown button to documentation pages (#5158)
  chore: include vendored node executable (#5160)
  remove extra whitespace from message (#5159)
  Clear deeplinks after use (#5128)
  Revert "Fix gpt-5 input context limit (#4619)" (#5135)
  fix: missing cmake and protobuf for windows build, deduplicate sh/pws… (#5028)
  Fix bedrock tool input schema (#5064)
  Add self-test recipe for goose validation (#5111)
  fix: modifies openai request logic for reasoning models (#4221) (#4294)
  Fix race condition threat when set_param and set_secret of c… (#5109)
  Clean room implementation of the chat process (#5079)
  Bump rmcp (#5096)
  set version in an env variable for testing (#5100)
  fix : enhance fuzzy file search in goose desktop (#5071)
  ...
@alexhancock alexhancock mentioned this pull request Oct 17, 2025
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.

Fuzzy File Search in Goose Desktop Doesn't Work

3 participants