Merge remote-tracking branch 'origin/main' into feat/disk-cache
CI / Checks (pull_request) Successful in 23s
PR title / Conventional title (pull_request) Successful in 1s

# Conflicts:
#	internal/ui/app/app.go
This commit is contained in:
keb committed 2026-10-11 09:51:55 +02:00
commit 72003b2541
11 files changed
+446 -13

No files matched your search

+11 -1
View File
@@ -8,6 +8,7 @@ import (
"fmt"
"image/color"
"math"
"os"
"os/exec"
"strings"
"time"
@@ -162,6 +163,9 @@ type Model struct {
clip Clipboard
clipClear time.Duration
openURL func(string) error
getenv func(string) string
nvimOpen func(server, path string, line int) error // edit.go
now func() time.Time
// The cache file, whether the cache changed since it was saved, and
// when each provider's Sources list was loaded (persist.go).
cachePath string
@@ -169,7 +173,6 @@ type Model struct {
sourcesAt map[string]time.Time
placeDir string
savedPlace string // the link last saved as the place
now func() time.Time
// A pending clear of a copied value, counted down in the footer.
// clipToken identifies the latest copy so older ticks are ignored.
@@ -350,6 +353,8 @@ func New(providers []provider.Provider, opts Options) Model {
clip: opts.Clipboard,
clipClear: opts.ClipboardClear,
now: time.Now,
getenv: os.Getenv,
nvimOpen: nvimOpen,
cache: newCache(),
}
if m.clip == nil {
@@ -549,6 +554,9 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case commandDoneMsg:
m.handleCommandDone(msg)
case editDoneMsg:
cmds = append(cmds, m.handleEditDone(msg))
case persistTickMsg:
cmds = append(cmds, m.persistTick())
@@ -870,6 +878,8 @@ func (m *Model) handleKey(msg tea.KeyPressMsg) (cmd tea.Cmd, quit bool) {
}
case key.Matches(msg, k.Open):
return m.openSelected(), false
case key.Matches(msg, k.Edit):
return m.edit(), false
case key.Matches(msg, k.Login):
if m.auth != nil && len(m.auth.Login) > 0 {
c := exec.Command(m.auth.Login[0], m.auth.Login[1:]...)