CherryHQ / CherryHQ/cherry-studio

[功能]: 允许缓存对话中 markdown 引用的图片到本地

Open
#6,972 17 comments 1 reaction 0 assignees View on GitHub
feature ui-ux
Dominant language
TypeScript
Stars
51.8k
Forks
5k
Avg merge
2d 4h
Merged PRs (30d)
592

Description

### 提交前检查

- [x] 我理解 Issue 是用于反馈和解决问题的,而非吐槽评论区,将尽可能提供更多信息帮助问题解决。
- [x] 我已经查看了置顶 Issue 并搜索了现有的 [开放Issue](https://github.com/CherryHQ/cherry-studio/issues)和[已关闭Issue](https://github.com/CherryHQ/cherry-studio/issues?q=is%3Aissue%20state%3Aclosed%20),没有找到类似的建议。
- [x] 我填写了简短且清晰明确的标题,以便开发者在翻阅 Issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等。
- [x] 最新的 Cherry Studio 版本没有实现我所提出的功能。

### 平台

Windows

### 版本

v1.4.1

### 您的功能建议是否与某个问题/issue相关?

我希望能够添加一个选项,允许缓存对话中 markdown 引用的图片到本地。

有些生图服务商会选择以 chat 格式提供服务,以 markdown 格式返回指向生成的图片的链接,但是这样的链接通常有较短的有效期,希望能够提供一个选项,允许自动缓存对话中出现的图片,在加载图片时,同样优先尝试从缓存加载。

### 请描述您希望实现的解决方案

在加载图片之前添加一个缓存层,保存的信息共用现有的数据存储和备份逻辑。

### 请描述您考虑过的其他方案

导出功能只会原样导出图片为 url,可以编写一个 markdown 解析器来自动化下载并替换 url,但是仍然需要手动导出相应的对话。

### 其他补充信息

![Image](https://github.com/user-attachments/assets/78fb6b7f-1167-4a58-a6d5-240f58fda45e)

Contributor guide

Open the contributing guide

Research direction

No files or tests are named in the issue. Start by tracing how markdown images are loaded and how conversation data is stored and backed up; then define the cache's loading, expiry, and backup behavior. Done means eligible conversation images are cached locally, loaded from cache when available, and remain usable after their remote URLs expire.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.