Support interactive add/stage input flow

This commit is contained in:
Joe Tretter
2026-05-13 19:12:06 -05:00
parent 482483deed
commit 3f6a764603
7 changed files with 150 additions and 5 deletions

View File

@@ -441,6 +441,7 @@ fun GitHugApp() {
val submittedText = commandInput.text
val raw = submittedText.trim()
if (raw.isBlank()) return
val isInteractiveInput = repo.interactiveAddSession != null
showHelpOverlay = false
showTerminalInputHint = false
@@ -448,7 +449,7 @@ fun GitHugApp() {
suppressedImeEcho = submittedText
clearCommandInput(recreateField = true)
if (commandHistory.lastOrNull() != raw) {
if (!isInteractiveInput && commandHistory.lastOrNull() != raw) {
commandHistory = commandHistory + raw
}
historyIndex = -1
@@ -473,7 +474,7 @@ fun GitHugApp() {
}
val (newRepo, lines) = runtime.execute(currentLevel, repo, raw)
applyCommandResult(raw, newRepo, lines, echoCommand = true)
applyCommandResult(raw, newRepo, lines, echoCommand = !isInteractiveInput)
}
fun showCommandHelp() {