More monior TUI refactor/cleanup
`tui/tui.go` is no longer responsible for passing window resize updates to all views, instead we request a new window size message to be sent at the same time we enter the view, allowing the view to catch and handle it. Add `Initialized` to `tui/shared/View` model, now we only call `Init` on a view before entering it for the first time, rather than calling `Init` on all views when the application starts. Renames file, small cleanups
This commit is contained in:
@@ -16,7 +16,6 @@ type LoadedConversation struct {
|
||||
LastReply api.Message
|
||||
}
|
||||
|
||||
// AppModel represents the application data model
|
||||
type AppModel struct {
|
||||
Ctx *lmcli.Context
|
||||
Conversations []LoadedConversation
|
||||
@@ -193,7 +192,6 @@ func (a *AppModel) PromptLLM(messages []api.Message, chatReplyChunks chan api.Ch
|
||||
)
|
||||
}
|
||||
|
||||
// Helper function
|
||||
func cycleSelectedMessage(selected *api.Message, choices []api.Message, dir MessageCycleDirection) (*api.Message, error) {
|
||||
currentIndex := -1
|
||||
for i, reply := range choices {
|
||||
|
||||
Reference in New Issue
Block a user