Skip to content

Conversation

@Adictya
Copy link
Contributor

@Adictya Adictya commented May 15, 2025

Demo:
pr-demo-sst

  • Adds completions menu for files and folders. You can press "@" to bring this up and fuzzy find any file in the working directory.

  • Built to be extensible so we can add more providers for things like git, lsp symbols etc given we also build the tools.

  • Adds a minimal reusable list component since I had found myself reusing a lot of code from commands dialog.

Let me know if this looks good and if the ux feels good and if its line with what you guys think this feature should look like. Also feel free to be as pedantic as you want, I want to strictly adhere to the repo coding style so if any naming/folder convention doesn't match or if any variable name is not ideal.

@adamdotdevin
Copy link
Contributor

will look at this first thing today; looks great! just to be clear, there are two features at play here: the @file/folder/symbol feature is a mechanism for explicitly adding content to the context (a la cursor, and others), is this that? or is this file path completion? both are great, we'd just want to switch to having the / character initiate it if it's the latter.

@Adictya
Copy link
Contributor Author

Adictya commented May 15, 2025

I modeled it more for the cursor like mechanism as you will see in the implementation, but since the view tool is able to pick up file paths just from the text it works like the latter for now. If needed I can add the file contents statically to the context as well. Whichever way you feel works best with the project. It can be / now and then when we add git or lsp support it can become @ with all the changes to ui that accompany adding another completion provider

@adamdotdevin
Copy link
Contributor

@Adictya this is incredible, seriously, thank you so much for going out of your way to make the codebase better. ❤️

my only two thoughts/questions:

  • bubbletea "bubbles" has a list component, does it accomplish the same thing as the simple-list component? fwiw, i'm not opposed to having this in the opencode repo, it works great, just wanted to see if you had considered using it and if there were tradeoffs.
  • the @ vs / thing; i'd really like to fast follow this PR (happy to help) with a PR to enable the @ feature in whole, where you can @ a file/folder/symbol (we've got an LSP workspaceSymbols tool now that forms the basis for looking up symbols). i think having both features is where we want to land, so i'm inclined to have you switch the trigger to / for this feature, and then work on the second (@). related, i also want to have / commands as a concept, maybe replacing the command palette or supplementing; could extend this file path completion to also include commands (like claude code). all of that is outside the scope of this PR, just bringing it up for context.

@Adictya
Copy link
Contributor Author

Adictya commented May 15, 2025

Hey thanks a lot @adamdottv , it was a great experience. Always a joy to simplify code.

  • For the list thing, yes I did consider it I read through the source code of the list component even and the bubbletea file picker component as well and these were the first things I tried using for the dialog but its too opinionated on its styling of list elements and the feature set it provides. I then looked at how other parts of the code were doing it and concluded that this must be the reason other components opted out of it. Extremely open to suggestions if you wanna take a look and see if simple list is still better, happy to change the implementation.

  • Makes sense, I can follow up with the pr for that and the command thing . And for now switch this to /.

@adamdotdevin
Copy link
Contributor

on the bubbles thing, you made the right call, and i suspected their list might not be configurable enough! your version is perfect, fits the needs of the app exactly

@Adictya
Copy link
Contributor Author

Adictya commented May 15, 2025

@adamdottv Changed the initiation key to '/'

@adamdotdevin adamdotdevin merged commit a203fb8 into anomalyco:dev May 15, 2025
burgercrisis added a commit to burgercrisis/opencode that referenced this pull request Jan 8, 2026
…d dank

Windows Command Execution Fixes:
- Add detectCommandShell() and parseCommand() functions for shell detection
- Implement direct PowerShell execution bypassing cmd.exe wrapper
- Add shell built-ins detection and needsShellExecution function
- Fix stream draining to prevent race conditions (Promise.all)
- Remove duplicate abort listeners

Edit Tool Improvements:
- Add newString validation guard (handles undefined/null/empty)
- Add UnicodeNormalizedReplacer for smart quotes and em-dashes
- Fix multi-line pattern matching with empty lines (Issue anomalyco#26)
- Add unique match identification for replaceFirst functionality
- Improve block anchor matching with variable gap handling

Documentation:
- Add verified-fixes-summary.md documenting all fixed issues
- Add windows-command-execution-issues.md comprehensive analysis
- Add linux-unix-mac-compatibility-analysis.md for cross-platform impact

Fixes: Issues anomalyco#2, anomalyco#3, anomalyco#4, anomalyco#5, anomalyco#7, anomalyco#8, anomalyco#9, anomalyco#15, anomalyco#19, anomalyco#26
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