Compare commits
3 Commits
123e7d3b3a
...
polecat/ru
| Author | SHA1 | Date | |
|---|---|---|---|
| c3ed6c0a26 | |||
|
|
53fa89b2e9 | ||
| 3acf9d2796 |
12
flake.lock
generated
12
flake.lock
generated
@@ -47,11 +47,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769329593,
|
||||
"narHash": "sha256-u5PSA+8TUYF/13ziBcnoE67nkDwpjAdecKh3srcJJm0=",
|
||||
"lastModified": 1769848312,
|
||||
"narHash": "sha256-ggBocPd1L4l5MFNV0Fw9aSGZZO4aGzCfgh4e6hQ77RE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "776dc33d735af583a14cc56b406ea658398964a7",
|
||||
"rev": "be0b4f4f28f69be61e9174807250e3235ee11d50",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -206,11 +206,11 @@
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769330679,
|
||||
"narHash": "sha256-X7rw5ouiAYKmbbKLtkEc/Kqcg6DxKgOtgaftzuchy/M=",
|
||||
"lastModified": 1769849328,
|
||||
"narHash": "sha256-BjH1Ge6O8ObN6Z97un2U87pl4POO99Q8RSsgIuTZq8Q=",
|
||||
"owner": "marienz",
|
||||
"repo": "nix-doom-emacs-unstraightened",
|
||||
"rev": "0c2d527055f448c8856129c6d063535e06aeff4d",
|
||||
"rev": "fc1d7190c49558cdc6af20d7657075943a500a93",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -55,9 +55,9 @@ let
|
||||
./gastown-fix-town-root-detection.patch
|
||||
# Fix copyDir to handle symlinks (broken symlinks cause "no such file" errors)
|
||||
./gastown-fix-copydir-symlinks.patch
|
||||
# TODO: Statusline optimization patch needs regenerating against current gastown source
|
||||
# Reduces Dolt CPU from ~70% to ~20% by avoiding beads queries for sessions nobody is watching
|
||||
# ./gastown-statusline-optimization.patch
|
||||
# Statusline optimization: skip expensive beads queries for detached sessions
|
||||
# Reduces Dolt CPU from ~70% to ~20% by caching and early-exit
|
||||
./gastown-statusline-optimization.patch
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
|
||||
index 2edf1be8..00253eea 100644
|
||||
--- a/internal/cmd/statusline.go
|
||||
+++ b/internal/cmd/statusline.go
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
@@ -10,10 +10,10 @@ diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/steveyegge/gastown/internal/beads"
|
||||
@@ -15,6 +16,43 @@ import (
|
||||
@@ -14,6 +15,37 @@ import (
|
||||
"github.com/steveyegge/gastown/internal/tmux"
|
||||
"github.com/steveyegge/gastown/internal/workspace"
|
||||
)
|
||||
|
||||
+// statusLineCacheTTL is how long cached status output remains valid.
|
||||
+const statusLineCacheTTL = 10 * time.Second
|
||||
+
|
||||
@@ -45,10 +45,10 @@ diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
|
||||
+ _ = os.WriteFile(path, []byte(status), 0644)
|
||||
+}
|
||||
+
|
||||
|
||||
var (
|
||||
statusLineSession string
|
||||
)
|
||||
@@ -32,6 +70,20 @@ func init() {
|
||||
@@ -34,6 +66,19 @@ func init() {
|
||||
func runStatusLine(cmd *cobra.Command, args []string) error {
|
||||
t := tmux.NewTmux()
|
||||
|
||||
@@ -68,7 +68,7 @@ diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
|
||||
// Get session environment
|
||||
var rigName, polecat, crew, issue, role string
|
||||
|
||||
@@ -149,7 +201,12 @@ func runWorkerStatusLine(t *tmux.Tmux, session, rigName, polecat, crew, issue st
|
||||
@@ -150,7 +195,11 @@ func runWorkerStatusLine(t *tmux.Tmux, session, rigName, polecat, crew, issue st
|
||||
|
||||
// Output
|
||||
if len(parts) > 0 {
|
||||
@@ -81,7 +81,7 @@ diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -389,7 +446,12 @@ func runMayorStatusLine(t *tmux.Tmux) error {
|
||||
@@ -389,7 +438,11 @@ func runMayorStatusLine(t *tmux.Tmux) error {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -458,7 +520,12 @@ func runDeaconStatusLine(t *tmux.Tmux) error {
|
||||
@@ -458,7 +511,11 @@ func runDeaconStatusLine(t *tmux.Tmux) error {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -526,7 +593,12 @@ func runWitnessStatusLine(t *tmux.Tmux, rigName string) error {
|
||||
@@ -526,7 +583,11 @@ func runWitnessStatusLine(t *tmux.Tmux, rigName string) error {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -617,7 +689,12 @@ func runRefineryStatusLine(t *tmux.Tmux, rigName string) error {
|
||||
@@ -617,7 +678,11 @@ func runRefineryStatusLine(t *tmux.Tmux, rigName string) error {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user