mini: add turn summary visibility setting (#38153)

This commit is contained in:
Simon Klee 2026-07-21 21:01:47 +02:00 committed by GitHub
commit c4fa5e6619
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 38 additions and 9 deletions

View file

@ -130,6 +130,9 @@ export const Info = Schema.Struct({
shell_output: Schema.optional(Schema.Literals(["show", "hide"])).annotate({
description: "Show or hide raw shell tool output in Mini",
}),
turn_summary: Schema.optional(Schema.Literals(["show", "hide"])).annotate({
description: "Show or hide the agent, model, and duration summary in Mini scrollback",
}),
}),
).annotate({ description: "Mini transcript presentation settings" }),
hints: Schema.optional(

View file

@ -657,6 +657,14 @@ export function RunSettingsBody(props: {
keywords: `shell tool command output ${props.settings().shell_output}`,
key: "shell_output",
},
{
category: "Transcript",
display: "Turn summary",
description: "agent, model, and duration",
footer: saving() === "turn_summary" ? "saving" : props.settings().turn_summary,
keywords: `turn summary agent model duration ${props.settings().turn_summary}`,
key: "turn_summary",
},
])
const change = (item: SettingEntry) => {
if (saving()) return

View file

@ -384,6 +384,7 @@ export class RunFooter implements FooterApi {
}
if (next.type === "turn.duration") {
if (this.miniSettings().turn_summary === "hide") return
const current = this.currentModel()
this.flush()
this.flushing = this.flushing

View file

@ -88,5 +88,6 @@ export function resolveMiniSettings(config?: { mini?: Partial<MiniSettings> }):
return {
thinking: config?.mini?.thinking ?? "hide",
shell_output: config?.mini?.shell_output ?? "hide",
turn_summary: config?.mini?.turn_summary ?? "show",
}
}

View file

@ -396,6 +396,7 @@ export type RunTuiConfig = Pick<Config.Resolved, "keybinds" | "leader" | "theme"
export type MiniSettings = {
thinking: "show" | "hide"
shell_output: "show" | "hide"
turn_summary: "show" | "hide"
}
export type MiniSettingChange = {