summaryrefslogtreecommitdiffhomepage
path: root/packages/tui/internal/app
diff options
context:
space:
mode:
Diffstat (limited to 'packages/tui/internal/app')
-rw-r--r--packages/tui/internal/app/state.go8
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
}