forked from phodal/auto-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Background
The current IdeaFileSearchPopup implementation needs to be enhanced to match the full context menu design (see screenshot) and integrate features from RelatedFileWorkspaceManager.
Current State
IdeaFileSearchPopup.kt currently has:
- Files submenu (search files)
- Folders submenu (search folders)
- Recently Opened Files submenu
- Clear Context option
- Bottom search field
Target Design

Default Context
Files >
Folders >
Recently Opened Files >
Rules >
Clear Context
─────────────────────────
[ Focus context ]
Required Changes
1. New Menu Items
- Default Context: Add option to set/clear default context
- Rules: Add submenu for context rules (TBD: what rules?)
2. UI Improvements
- Path display format: Show truncated paths like
...cc/unitmesh/devins/idea/editor - File item layout:
FileName.kt ...path/to/file(name bold, path gray) - History icon: Add
IdeaComposeIcons.Historyfor Recently Opened Files
3. Integration with RelatedFileWorkspaceManager Pattern
- Auto-add current file: Listen to
FileEditorManagerListenerto auto-add current file to context - Related classes: Listen to
LookupManagerListenerto suggest related classes - Workspace panel: Create equivalent of
WorkspaceFilePanelfor managing selected files - File list visualization: Show selected files as chips/tags in toolbar
4. Technical Implementation
// New structure needed:
class IdeaContextManager(project: Project) {
// State management for selected files
val selectedFiles: StateFlow<List<VirtualFile>>
// Auto-add current editor file
fun setupEditorListener()
// Related classes from lookup
fun setupRelatedClassesListener()
// Clear all context
fun clearContext()
// Set default context
fun setDefaultContext(files: List<VirtualFile>)
}Questions to Clarify
- Default Context: What should this do? Save a preset of files?
- Rules: What kind of rules? File patterns? Include/exclude rules?
- Integration scope: Should this replace or complement the existing file selection in
IdeaTopToolbar?
Related Files
mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/editor/IdeaFileSearchPopup.ktmpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/editor/IdeaTopToolbar.ktcore/src/main/kotlin/cc/unitmesh/devti/gui/chat/ui/file/RelatedFileWorkspaceManager.ktcore/src/main/kotlin/cc/unitmesh/devti/gui/chat/ui/file/WorkspaceFilePanel.kt
References
- PR feat(mpp-idea): add file search popup and fix MCP config button #28: Initial file search popup implementation
RelatedFileWorkspaceManager: Pattern for auto-adding related files
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels