style(ui): redesign new menu (#18)

- 2 mode classic (the old one) and modern
a2a17cab3a4bdf27abd2a956f9d53a0c4a685909
- add icon 3a11c7a6beb1dcf11e89977f380376fdea9fba89
- fix some bugs
This commit is contained in:
VERSE
2026-07-03 11:50:35 +07:00
committed by GitHub
parent 24fddaccfe
commit ea82216dc9
11 changed files with 365 additions and 76 deletions
+4 -8
View File
@@ -1,7 +1,6 @@
package root
import (
"fmt"
"strings"
"github.com/versenilvis/iris/commands/core"
@@ -17,11 +16,8 @@ func MergeResults(query string, mode string) []core.Suggestion {
deduped := []core.Suggestion{}
// always call lookup to scan aliases and get spec suggestions
var cmdResults []core.Suggestion
if query != "" {
logger.Debugf("Merge Calling Lookup for '%s'", query)
cmdResults = core.Lookup(query)
}
logger.Debugf("Merge Calling Lookup for '%s'", query)
cmdResults := core.Lookup(query)
// search history if in history mode
var histResults []integration.HistResult
@@ -53,8 +49,8 @@ func MergeResults(query string, mode string) []core.Suggestion {
for _, h := range histResults {
addSuggestion(core.Suggestion{
Cmd: h.Cmd,
Desc: " history",
Icon: fmt.Sprintf("%d", h.ID),
Desc: "history",
Icon: "history",
})
}
for _, s := range cmdResults {