Tweaks/cleanups to conversation management in tui
- Pass around message/conversation values instead of pointers where it makes more sense, and store values instead of pointers in the globally (within the TUI) shared `App` (pointers provide no utility here). - Split conversation persistence into separate conversation/message saving stages
This commit is contained in:
@@ -72,6 +72,14 @@ func (m MessageRole) IsAssistant() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (m MessageRole) IsUser() bool {
|
||||
switch m {
|
||||
case MessageRoleUser, MessageRoleToolResult:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m MessageRole) IsSystem() bool {
|
||||
switch m {
|
||||
case MessageRoleSystem:
|
||||
|
||||
Reference in New Issue
Block a user