Support interactive add/stage input flow
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user