[PR #8] [MERGED] Add completions menu for files and folders #9498

Closed
opened 2026-02-16 18:13:39 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/8
Author: @Adictya
Created: 5/14/2025
Status: Merged
Merged: 5/15/2025
Merged by: @adamdotdevin

Base: devHead: feat-completion-menu-for-file-paths


📝 Commits (4)

  • 1ffa978 feat(complete-module): add completions logic, dialog and providers
  • 4e7aa62 fix(complete-module): logging
  • 45c54a2 chore(complete-module): lint
  • 8b15ff2 fix(complete-module): change completion start key to slash

📊 Changes

11 files changed (+927 additions, -284 deletions)

View changed files

📝 go.mod (+1 -0)
📝 go.sum (+2 -0)
internal/completions/files-folders.go (+191 -0)
internal/fileutil/fileutil.go (+163 -0)
📝 internal/llm/tools/glob.go (+19 -142)
📝 internal/llm/tools/grep.go (+2 -1)
📝 internal/tui/components/chat/editor.go (+6 -0)
📝 internal/tui/components/dialog/commands.go (+61 -130)
internal/tui/components/dialog/complete.go (+263 -0)
internal/tui/components/util/simple-list.go (+159 -0)
📝 internal/tui/page/chat.go (+60 -11)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/8 **Author:** [@Adictya](https://github.com/Adictya) **Created:** 5/14/2025 **Status:** ✅ Merged **Merged:** 5/15/2025 **Merged by:** [@adamdotdevin](https://github.com/adamdotdevin) **Base:** `dev` ← **Head:** `feat-completion-menu-for-file-paths` --- ### 📝 Commits (4) - [`1ffa978`](https://github.com/anomalyco/opencode/commit/1ffa978c61acffb8970c418e0335ab9dee79e4b5) feat(complete-module): add completions logic, dialog and providers - [`4e7aa62`](https://github.com/anomalyco/opencode/commit/4e7aa62649f855c15769128662e8881f65f86b5f) fix(complete-module): logging - [`45c54a2`](https://github.com/anomalyco/opencode/commit/45c54a294d027fbbfbb45f17040210dc8eb2fa32) chore(complete-module): lint - [`8b15ff2`](https://github.com/anomalyco/opencode/commit/8b15ff29c00f5a86d993930e6c78a586cb960562) fix(complete-module): change completion start key to slash ### 📊 Changes **11 files changed** (+927 additions, -284 deletions) <details> <summary>View changed files</summary> 📝 `go.mod` (+1 -0) 📝 `go.sum` (+2 -0) ➕ `internal/completions/files-folders.go` (+191 -0) ➕ `internal/fileutil/fileutil.go` (+163 -0) 📝 `internal/llm/tools/glob.go` (+19 -142) 📝 `internal/llm/tools/grep.go` (+2 -1) 📝 `internal/tui/components/chat/editor.go` (+6 -0) 📝 `internal/tui/components/dialog/commands.go` (+61 -130) ➕ `internal/tui/components/dialog/complete.go` (+263 -0) ➕ `internal/tui/components/util/simple-list.go` (+159 -0) 📝 `internal/tui/page/chat.go` (+60 -11) </details> ### 📄 Description Demo: ![pr-demo-sst](https://github.com/user-attachments/assets/72c7e171-8bb9-472a-ad9f-3a1b09598f34) - 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:13:39 -05:00
yindo closed this issue 2026-02-16 18:13:39 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9498