[PR #1542] [MERGED] fix(tui): attachment source is not stored when using message from message history #9966

Closed
opened 2026-02-16 18:14:28 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/1542
Author: @yihuikhuu
Created: 8/2/2025
Status: Merged
Merged: 8/2/2025
Merged by: @adamdotdevin

Base: devHead: fix-history-attachment-source-hydration


📝 Commits (1)

  • 99218a9 fix(tui): attachment source is hydrated as a generic type - convert to concrete type

📊 Changes

2 files changed (+85 additions, -0 deletions)

View changed files

📝 packages/tui/internal/app/state.go (+8 -0)
📝 packages/tui/internal/attachment/attachment.go (+77 -0)

📄 Description

this fixes #1541

As the type of the Source after deserialisation from the .toml file is map[string]any, calls to methods such as GetFileSource fail. This converts to the proper type based on the value of the Type field when the message history is loaded


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/1542 **Author:** [@yihuikhuu](https://github.com/yihuikhuu) **Created:** 8/2/2025 **Status:** ✅ Merged **Merged:** 8/2/2025 **Merged by:** [@adamdotdevin](https://github.com/adamdotdevin) **Base:** `dev` ← **Head:** `fix-history-attachment-source-hydration` --- ### 📝 Commits (1) - [`99218a9`](https://github.com/anomalyco/opencode/commit/99218a9b4daa82cf138a6979c514f605fe785f47) fix(tui): attachment source is hydrated as a generic type - convert to concrete type ### 📊 Changes **2 files changed** (+85 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/tui/internal/app/state.go` (+8 -0) 📝 `packages/tui/internal/attachment/attachment.go` (+77 -0) </details> ### 📄 Description this fixes #1541 As the type of the `Source` after deserialisation from the `.toml` file is `map[string]any`, calls to methods such as `GetFileSource` fail. This converts to the proper type based on the value of the `Type` field when the message history is loaded --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:28 -05:00
yindo closed this issue 2026-02-16 18:14:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9966