mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-09-04 18:21:54 +03:00
refactor(tui): simplify session rows
This commit is contained in:
+11
-2
@@ -2147,7 +2147,12 @@ export class NanobotTui {
|
||||
this.updateTitle()
|
||||
}
|
||||
const limit = this.renderer.height >= 20 ? 8 : 4
|
||||
this.sessionMenu.open(sessions, this.client.activeChatId, limit)
|
||||
this.sessionMenu.open(
|
||||
sessions,
|
||||
this.client.activeChatId,
|
||||
limit,
|
||||
this.defaultModelPreset,
|
||||
)
|
||||
this.startSessionRefresh()
|
||||
this.renderTitleColor()
|
||||
this.sessionMenu.update(this.composer.plainText, limit)
|
||||
@@ -2361,7 +2366,11 @@ export class NanobotTui {
|
||||
this.apiReauthenticator,
|
||||
)
|
||||
if (this.quitting || loadId !== this.sessionLoadId || !this.sessionMenu.visible) return
|
||||
this.sessionMenu.replace(sessions, this.client.activeChatId)
|
||||
this.sessionMenu.replace(
|
||||
sessions,
|
||||
this.client.activeChatId,
|
||||
this.defaultModelPreset,
|
||||
)
|
||||
this.status.content = sessions.length ? `${sessions.length} sessions` : "No saved sessions"
|
||||
} catch {
|
||||
// Keep the existing picker usable during a transient refresh failure.
|
||||
|
||||
Reference in New Issue
Block a user