feat(tui): add compact command to mini (#38251)

This commit is contained in:
Simon Klee 2026-07-22 07:03:46 +02:00 committed by GitHub
commit 691a7d93c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 109 additions and 6 deletions

View file

@ -53,6 +53,11 @@ export function isNewCommand(input: string): boolean {
return input.trim().toLowerCase() === "/new"
}
export function isCompactCommand(input: string): boolean {
const text = input.trim().toLowerCase()
return text === "/compact" || text === "/summarize"
}
export function createPromptHistory(items?: RunPrompt[]): PromptHistoryState {
const list = (items ?? []).filter((item) => item.text.trim().length > 0).map(promptCopy)
const next: RunPrompt[] = []