Skip to content

Conversation

@yuvrajvirk
Copy link

Fixes opencode import failing for valid share URLs which currently return “Not Found” despite being publicly accessible.

Fixes

  • Fetch share data from the correct endpoint: /api/share/:id/data
  • Use ShareNext.url() instead of hardcoding url
  • Transform data returned by API into structure expected for local storage
  • Add unit tests demonstrating expected behavior for URL parsing and data transformation for local storage

Fixes #7106

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@rekram1-node
Copy link
Collaborator

/review

if (item.type === "message") {
messageMap.set(item.data.id, item.data)
} else if (item.type === "part") {
const messageID = item.data.messageID
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Consider removing the intermediate messageID variable as it is unnecessary destructuring. You could reference item.data.messageID directly on lines 48 and 51.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

opencode import fails for valid /share link (HTTP 200) with “Failed to fetch share data: Not Found”

2 participants