Add terminal input onboarding bubble

This commit is contained in:
Joe Tretter
2026-05-05 19:54:33 -05:00
parent 9d09eb1385
commit 344ff99f0a
3 changed files with 60 additions and 2 deletions

View File

@@ -77,6 +77,7 @@ fun GitHugApp() {
var gitMessageEditorState by remember { mutableStateOf<GitMessageEditorState?>(null) }
var manPageState by remember { mutableStateOf<ManPageState?>(null) }
var solvedCelebrationTitle by remember { mutableStateOf<String?>(null) }
var showTerminalInputHint by remember { mutableStateOf(true) }
val currentLevel = levels[currentLevelIndex]
LaunchedEffect(solvedCelebrationTitle) {
@@ -412,6 +413,7 @@ fun GitHugApp() {
val raw = submittedText.trim()
if (raw.isBlank()) return
showTerminalInputHint = false
suppressedImeEcho = submittedText
clearCommandInput(recreateField = true)
@@ -509,6 +511,8 @@ fun GitHugApp() {
output = output,
inputFieldVersion = inputFieldVersion,
commandInput = commandInput,
showInputHint = showTerminalInputHint,
onInputHintDismiss = { showTerminalInputHint = false },
onValueChange = {
val blockedEcho = suppressedImeEcho
if (blockedEcho != null && commandInput.text.isEmpty()) {
@@ -518,6 +522,9 @@ fun GitHugApp() {
}
}
suppressedImeEcho = null
if (it.text.isNotEmpty()) {
showTerminalInputHint = false
}
commandInput = it
},
onRun = { runCommand() },