Private
Public Access
1
0

Display generation model in message header and other tweaks

Adjusted `ctrl+t` in chat view to toggle `showDetails` which toggles the
display of system messages, message metadata (generation model), and
tool call details

Modified message selection update logic to skip messages that aren't
shown
This commit is contained in:
2024-09-30 20:21:51 +00:00
parent 5d13c3e056
commit bb48bc9abd
4 changed files with 93 additions and 59 deletions

View File

@@ -71,14 +71,22 @@ func ApplySystemPrompt(m []Message, system string, force bool) []Message {
}
}
func (m *MessageRole) IsAssistant() bool {
switch *m {
func (m MessageRole) IsAssistant() bool {
switch m {
case MessageRoleAssistant, MessageRoleToolCall:
return true
}
return false
}
func (m MessageRole) IsSystem() bool {
switch m {
case MessageRoleSystem:
return true
}
return false
}
// FriendlyRole returns a human friendly signifier for the message's role.
func (m MessageRole) FriendlyRole() string {
switch m {