diff options
| author | Yihui Khuu <[email protected]> | 2025-08-03 00:23:32 +1000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-02 09:23:32 -0500 |
| commit | fa95c09cdce6e212be1b2c8d6b2a07f701821770 (patch) | |
| tree | bbb1ac792b13d1f5a3c70154b4b8528919e1a9de /packages/tui/internal/app | |
| parent | 0b132c032aae15a99907a5979f471c3b5bb2e3dc (diff) | |
| download | opencode-fa95c09cdce6e212be1b2c8d6b2a07f701821770.tar.gz opencode-fa95c09cdce6e212be1b2c8d6b2a07f701821770.zip | |
fix(tui): attachment source is not stored when using message from message history (#1542)
Diffstat (limited to 'packages/tui/internal/app')
| -rw-r--r-- | packages/tui/internal/app/state.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/tui/internal/app/state.go b/packages/tui/internal/app/state.go index e797d4220..bf2a602b3 100644 --- a/packages/tui/internal/app/state.go +++ b/packages/tui/internal/app/state.go @@ -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 } |
