Match Solo summary cadence options
This commit is contained in:
@@ -22,7 +22,10 @@ loosely follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
summaries, choose provider, edit provider model names, cycle cadence,
|
||||
test the selected summarizer (`patterm okay`), summarize the current
|
||||
top-level agent immediately, and explicitly save or cancel draft
|
||||
settings changes.
|
||||
settings changes. Cadence choices match Solo: `15s`, `30s`, and
|
||||
`1m`; the value is a minimum quiet/activity gap before another
|
||||
summary attempt for the same top-level agent, not a background
|
||||
periodic timer.
|
||||
|
||||
### Changed
|
||||
- Command palette UX overhaul. The single flat list grew section
|
||||
|
||||
@@ -1341,12 +1341,12 @@ func (p *paletteState) activateAutoSummaryRow() (paletteAction, bool, int) {
|
||||
p.mode = paletteModeSettingsInput
|
||||
case "cadence":
|
||||
switch p.settings.AutoSummary.Cadence {
|
||||
case "5m":
|
||||
p.settings.AutoSummary.Cadence = "15m"
|
||||
case "15m":
|
||||
p.settings.AutoSummary.Cadence = "30m"
|
||||
case "15s":
|
||||
p.settings.AutoSummary.Cadence = "30s"
|
||||
case "30s":
|
||||
p.settings.AutoSummary.Cadence = "1m"
|
||||
default:
|
||||
p.settings.AutoSummary.Cadence = "5m"
|
||||
p.settings.AutoSummary.Cadence = "15s"
|
||||
}
|
||||
case "test":
|
||||
return p.settingsAction("settings-test"), true, 1
|
||||
@@ -1472,7 +1472,7 @@ func (p *paletteState) renderAutoSummary(out writeFlusher, cols, rows int) {
|
||||
moveTo(&b, row, leftPad)
|
||||
b.WriteString(styleBorder + "├" + strings.Repeat("─", width-2) + "┤" + styleReset)
|
||||
row++
|
||||
footer := styleHint + "↵ edit/toggle · save row commits · esc cancel" + styleReset
|
||||
footer := styleHint + "↵ edit/toggle · cadence 15s/30s/1m · save row commits · esc cancel" + styleReset
|
||||
if visibleLen(footer) > content {
|
||||
footer = clipRunes(footer, content-1) + "…"
|
||||
}
|
||||
|
||||
@@ -321,6 +321,32 @@ func TestPaletteAltDigitQuickPick(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestAutoSummaryCadenceCyclesSoloValues(t *testing.T) {
|
||||
p := newPalette(nil, "", "", preset.Set{}, defaultSettings())
|
||||
p.mode = paletteModeAutoSummary
|
||||
for i, row := range autoSummaryRows() {
|
||||
if row.key == "cadence" {
|
||||
p.cursor = i
|
||||
break
|
||||
}
|
||||
}
|
||||
if p.settings.AutoSummary.Cadence != "1m" {
|
||||
t.Fatalf("initial cadence = %q", p.settings.AutoSummary.Cadence)
|
||||
}
|
||||
p.activateAutoSummaryRow()
|
||||
if p.settings.AutoSummary.Cadence != "15s" {
|
||||
t.Fatalf("first cycle cadence = %q", p.settings.AutoSummary.Cadence)
|
||||
}
|
||||
p.activateAutoSummaryRow()
|
||||
if p.settings.AutoSummary.Cadence != "30s" {
|
||||
t.Fatalf("second cycle cadence = %q", p.settings.AutoSummary.Cadence)
|
||||
}
|
||||
p.activateAutoSummaryRow()
|
||||
if p.settings.AutoSummary.Cadence != "1m" {
|
||||
t.Fatalf("third cycle cadence = %q", p.settings.AutoSummary.Cadence)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPaletteFormCtrlRTogglesRelaunchFromCommandField(t *testing.T) {
|
||||
p := newPalette(nil, "", "", preset.Set{})
|
||||
p.mode = paletteModeSpawnForm
|
||||
|
||||
@@ -36,7 +36,7 @@ func defaultSettings() settings {
|
||||
Enabled: true,
|
||||
Provider: defaultSummaryProvider,
|
||||
Models: defaultSummaryModels(),
|
||||
Cadence: "5m",
|
||||
Cadence: "1m",
|
||||
QuietWindowMS: 3000,
|
||||
MinInputChars: 4,
|
||||
MaxHistoryChars: 12000,
|
||||
|
||||
@@ -21,6 +21,9 @@ func TestLoadSettingsDefaults(t *testing.T) {
|
||||
if st.AutoSummary.Provider != "codex" {
|
||||
t.Fatalf("provider = %q want codex", st.AutoSummary.Provider)
|
||||
}
|
||||
if st.AutoSummary.Cadence != "1m" {
|
||||
t.Fatalf("cadence = %q want 1m", st.AutoSummary.Cadence)
|
||||
}
|
||||
if got := st.AutoSummary.modelFor("codex"); got != "gpt-5.4-mini" {
|
||||
t.Fatalf("codex model = %q", got)
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ func (m *summaryManager) maybeStart(ctx context.Context, now time.Time) {
|
||||
}
|
||||
cadence, err := time.ParseDuration(cfg.Cadence)
|
||||
if err != nil || cadence <= 0 {
|
||||
cadence = 5 * time.Minute
|
||||
cadence = time.Minute
|
||||
}
|
||||
quiet := time.Duration(cfg.QuietWindowMS) * time.Millisecond
|
||||
var startID string
|
||||
|
||||
Reference in New Issue
Block a user