fix(tui): attachment source is not stored when using message from message history (#1542)
This commit is contained in:
parent
0b132c032a
commit
fa95c09cdc
2 changed files with 85 additions and 0 deletions
|
|
@ -120,5 +120,13 @@ func LoadState(filePath string) (*State, error) {
|
|||
}
|
||||
return nil, fmt.Errorf("failed to decode TOML from file %s: %w", filePath, err)
|
||||
}
|
||||
|
||||
// Restore attachment sources types that were deserialized as map[string]any
|
||||
for _, prompt := range state.MessageHistory {
|
||||
for _, att := range prompt.Attachments {
|
||||
att.RestoreSourceType()
|
||||
}
|
||||
}
|
||||
|
||||
return &state, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue