feat(tui): print resume command on exit

This commit is contained in:
chengyongru authored and chengyongru committed 2026-08-20 17:20:36 +08:00
1 parent 997bdfc79d
commit 415df576b4
8 files changed
+57 -9

No files matched your search

+4 -1
View File
@@ -1,4 +1,4 @@
import { NanobotTui, type AppOptions } from "./app"
import { NanobotTui, sessionExitMessage, type AppOptions } from "./app"
import { currentGitBranch } from "./host"
function themePreference(): AppOptions["theme"] {
@@ -32,6 +32,9 @@ const options: AppOptions = {
version: process.env.NANOBOT_TUI_VERSION?.trim() || "dev",
access: process.env.NANOBOT_TUI_ACCESS?.trim() || "workspace access",
theme: themePreference(),
onExit: (chatId) => {
process.stdout.write(sessionExitMessage(chatId))
},
}
let app: NanobotTui | undefined