dsh-image-gen 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -1,163 +1,166 @@
1
- <div align="center">
2
-
3
- <img src="docs/assets/hero-poster.webp" alt="dsh-image-gen poster" width="100%" style="max-width: 860px; border-radius: 12px;" />
4
-
5
- <br /><br />
6
-
7
- # 🎨 dsh-image-gen
8
-
9
- **Bring ChatGPT-like image generation to DeepSeek Harness — with fullscreen preview, quick copy, and one-click download.**
10
-
11
- [![npm version](https://img.shields.io/npm/v/dsh-image-gen.svg?style=flat-square&color=blue)](https://www.npmjs.com/package/dsh-image-gen)
12
- [![DSH Plugin](https://img.shields.io/badge/Plugin%20For-DeepSeek%20Harness-6366f1?style=flat-square)](https://github.com/deepseek-ai)
13
- [![npm downloads](https://img.shields.io/npm/dm/dsh-image-gen.svg?style=flat-square&color=emerald)](https://www.npmjs.com/package/dsh-image-gen)
14
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE)
15
-
16
- **English** | [įŽ€äŊ“中文](README.md)
17
-
18
- <br />
19
-
20
- <p align="center">đŸ’Ŧ <b>Prompt your DeepSeek Harness Agent to install:</b></p>
21
-
22
- ```text
23
- Install the image generation plugin by running: pnpm dsh plugin --profile web add dsh-image-gen@latest
24
- ```
25
-
26
- <p align="center"><sub>(Or run manually in terminal: <code>pnpm dsh plugin --profile web add dsh-image-gen@latest</code>)</sub></p>
27
-
28
- <br />
29
-
30
- <p align="center">After installation, enter your API Key in DSH Settings, then tell the Agent:</p>
31
-
32
- ```text
33
- Draw a cyberpunk cat on a neon street in a rainy night.
34
- ```
35
-
36
- <p align="center">The Agent will automatically call <code>generate_image</code> and display the image directly in the conversation.</p>
37
-
38
- <br />
39
-
40
- <img src="docs/assets/chat-preview.png" alt="Chat preview" width="820" />
41
-
42
- </div>
43
-
44
- ---
45
-
46
- ## 💡 What Problem Does It Solve?
47
-
48
- **`dsh-image-gen` is an open-source image generation plugin built specifically for DeepSeek Harness (DSH).**
49
-
50
- DeepSeek Harness empowers agents to use tools for various tasks. This project adds native **multimodal image generation capabilities**:
51
-
52
- ```mermaid
53
- graph LR
54
- A[User Prompt] --> B[DeepSeek Harness Agent]
55
- B --> C[generate_image Tool]
56
- C --> D[Gemini / OpenAI / Seedream]
57
- D --> E[Image Data]
58
- E --> F[In-chat Conversation Stream]
59
- ```
60
-
61
- ---
62
-
63
- ## 🚀 Quick Start
64
-
65
- ### 1. Install Plugin
66
-
67
- Run in your DeepSeek Harness project root:
68
-
69
- ```bash
70
- # Recommended: Install or upgrade to latest version
71
- pnpm dsh plugin --profile web add dsh-image-gen@latest
72
-
73
- # If dsh is installed globally:
74
- dsh plugin --profile web add dsh-image-gen@latest
75
- ```
76
-
77
- <details>
78
- <summary><b>đŸ› ī¸ Other installation methods (Git / Local development)</b></summary>
79
-
80
- ```bash
81
- # Method B: Direct install from GitHub
82
- pnpm dsh plugin --profile web add git+https://github.com/shanliuling/dsh-image-gen.git
83
-
84
- # Method C: Local development install
85
- git clone https://github.com/shanliuling/dsh-image-gen.git
86
- pnpm dsh plugin --profile web add ./dsh-image-gen
87
- ```
88
-
89
- </details>
90
-
91
- ### 2. Configure API Key
92
-
93
- Open DSH Web (`http://localhost:3080` by default):
94
-
95
- 1. Go to **Settings → Plugins → Image generation**.
96
- 2. Select your Provider, enter your API Key, and click **Save**.
97
-
98
- <div align="center">
99
- <img src="docs/assets/settings-preview.png" alt="Settings preview" width="720" />
100
- </div>
101
-
102
- ### 3. Start Generating Images
103
-
104
- Type in the chat box:
105
-
106
- ```text
107
- Generate a minimalist modern architecture living room illustration.
108
- ```
109
-
110
- The Agent will automatically invoke `generate_image` and render the image in the conversation.
111
-
112
- ---
113
-
114
- ## ✨ Features
115
-
116
- - đŸ’Ŧ **In-chat Image Generation**: No need to switch tabs or copy prompts; chat naturally to generate images.
117
- - 🔍 **Interactive Image Toolkit**: Click image for fullscreen preview (press `ESC` or click backdrop to close), hover toolbar to copy image to clipboard, download, or open in a new tab.
118
- - 🎨 **Multi-Provider Support**: Supports Google Gemini, OpenAI Images, OpenAI-compatible APIs, and ByteDance Seedream / Volcengine Ark.
119
- - 🔑 **BYOK (Bring Your Own Key)**: Securely managed through DSH `credentials` service with write-only protection; keys are never exposed in plaintext.
120
- - đŸ–ŧī¸ **Durable Conversation Persistence**: Integrated with DSH Attachment system; images remain visible when reopening past sessions.
121
- - âš™ī¸ **Native Settings UI**: Configure models, endpoints, and keys directly within DSH Web settings without editing config files.
122
-
123
- ---
124
-
125
- ## đŸ“Ļ Supported Providers
126
-
127
- | Provider | Default Model | Default Endpoint / Base URL |
128
- | :--- | :--- | :--- |
129
- | **Google Gemini** | `gemini-3.1-flash-image` | `https://generativelanguage.googleapis.com/v1beta/interactions` |
130
- | **OpenAI Images** | `gpt-image-2` | `https://api.openai.com/v1` |
131
- | **OpenAI Compatible** | Custom | Custom Base URL |
132
- | **ByteDance Seedream / Ark** | `doubao-seedream-5-0-260128` | `https://ark.cn-beijing.volces.com/api/v3` |
133
-
134
- ---
135
-
136
- ## đŸ› ī¸ Local Development
137
-
138
- ```bash
139
- # Clone repository
140
- git clone https://github.com/shanliuling/dsh-image-gen.git
141
- cd dsh-image-gen
142
-
143
- # Install dependencies
144
- pnpm install
145
-
146
- # Build
147
- pnpm run build
148
-
149
- # Run unit tests
150
- pnpm test
151
- ```
152
-
153
- ---
154
-
155
- ## 🤝 Contributing
156
-
157
- Contributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) before submitting Pull Requests.
158
-
159
- ---
160
-
161
- ## 📄 License
162
-
163
- [MIT](LICENSE) Š 2026 shanliuling
1
+ <div align="center">
2
+
3
+ <img src="docs/assets/hero-poster.webp" alt="dsh-image-gen poster" width="100%" style="max-width: 860px; border-radius: 12px;" />
4
+
5
+ <br /><br />
6
+
7
+ # 🎨 dsh-image-gen
8
+
9
+ **Bring ChatGPT-like image generation to DeepSeek Harness — supporting in-chat generation, gallery overview, fullscreen preview, quick copy, and one-click download.**
10
+
11
+ [![npm version](https://img.shields.io/npm/v/dsh-image-gen.svg?style=flat-square&color=blue)](https://www.npmjs.com/package/dsh-image-gen)
12
+ [![DSH Plugin](https://img.shields.io/badge/Plugin%20For-DeepSeek%20Harness-6366f1?style=flat-square)](https://github.com/deepseek-ai)
13
+ [![npm downloads](https://img.shields.io/npm/dm/dsh-image-gen.svg?style=flat-square&color=emerald)](https://www.npmjs.com/package/dsh-image-gen)
14
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE)
15
+
16
+ **English** | [įŽ€äŊ“中文](README.md)
17
+
18
+ <br />
19
+
20
+ <p align="center">đŸ’Ŧ <b>Prompt your DeepSeek Harness Agent to install:</b></p>
21
+
22
+ ```text
23
+ Install the image generation plugin by running: pnpm dsh plugin --profile web add dsh-image-gen@latest
24
+ ```
25
+
26
+ <p align="center"><sub>(Or run manually in terminal: <code>pnpm dsh plugin --profile web add dsh-image-gen@latest</code>)</sub></p>
27
+
28
+ <br />
29
+
30
+ <p align="center">After installation, enter your API Key in DSH Settings, then tell the Agent:</p>
31
+
32
+ ```text
33
+ Draw a cyberpunk cat on a neon street in a rainy night.
34
+ ```
35
+
36
+ <p align="center">The Agent will automatically call <code>generate_image</code> and display the image directly in the conversation.</p>
37
+
38
+ <br />
39
+
40
+ <img src="docs/assets/chat-preview.png" alt="Chat preview" width="820" />
41
+
42
+ </div>
43
+
44
+ ---
45
+
46
+ ## 💡 What Problem Does It Solve?
47
+
48
+ **`dsh-image-gen` is an open-source image generation plugin built specifically for DeepSeek Harness (DSH).**
49
+
50
+ DeepSeek Harness empowers agents to use tools for various tasks. This project adds native **multimodal image generation capabilities**:
51
+
52
+ ```mermaid
53
+ graph LR
54
+ A[User Prompt] --> B[DeepSeek Harness Agent]
55
+ B --> C[generate_image Tool]
56
+ C --> D[Gemini / OpenAI / Seedream / DashScope]
57
+ D --> E[Image Data]
58
+ E --> F[In-chat Conversation Stream]
59
+ ```
60
+
61
+ ---
62
+
63
+ ## 🚀 Quick Install & Usage
64
+
65
+ ### 1. Install Plugin
66
+
67
+ In your DeepSeek Harness workspace root:
68
+
69
+ ```bash
70
+ # Recommended: Install or upgrade to latest release
71
+ pnpm dsh plugin --profile web add dsh-image-gen@latest
72
+
73
+ # If dsh is installed globally:
74
+ dsh plugin --profile web add dsh-image-gen@latest
75
+ ```
76
+
77
+ <details>
78
+ <summary><b>đŸ› ī¸ Alternative Installations (Git Repo / Local Dev)</b></summary>
79
+
80
+ ```bash
81
+ # Method B: Install directly from GitHub
82
+ pnpm dsh plugin --profile web add git+https://github.com/shanliuling/dsh-image-gen.git
83
+
84
+ # Method C: Clone & install locally
85
+ git clone https://github.com/shanliuling/dsh-image-gen.git
86
+ pnpm dsh plugin --profile web add ./dsh-image-gen
87
+ ```
88
+
89
+ </details>
90
+
91
+ ### 2. Configure API Key
92
+
93
+ Open DSH Web (`http://localhost:3080`):
94
+
95
+ 1. Navigate to **Settings → Plugins → Image generation**.
96
+ 2. Select Provider, input API Key, click **Save**.
97
+
98
+ <div align="center">
99
+ <img src="docs/assets/settings-preview.png" alt="Settings preview" width="720" />
100
+ </div>
101
+
102
+ ### 3. Generate Images in Chat
103
+
104
+ Simply prompt in the chat input:
105
+
106
+ ```text
107
+ Generate a minimalist modern architecture living room illustration.
108
+ ```
109
+
110
+ The Agent will call `generate_image` and return the image directly in the conversation stream.
111
+
112
+ ### 4. Browse Native Image Gallery
113
+
114
+ Click the **`[Gallery]`** Tab in the top navigation bar to browse and search all generated images across conversations:
115
+
116
+ <div align="center">
117
+ <img src="docs/assets/gallery-preview.png" alt="Gallery preview" width="820" />
118
+ </div>
119
+
120
+ ---
121
+
122
+ ## ✨ Key Features
123
+
124
+ - đŸ’Ŧ **In-Chat Image Generation**: Tell your Agent what you want to draw without switching tabs or tools.
125
+ - đŸ–ŧī¸ **Native Image Gallery**: Dedicated "Gallery" tab automatically collecting all generated images with keyword search, provider filtering, and quick copy/download.
126
+ - 🔍 **Interactive Image Tools**: High-res fullscreen preview, one-click copy to clipboard, local download, and open in new tab.
127
+ - 🎨 **Multi-Provider Support**: Supports Google Gemini, OpenAI Images, OpenAI Compatible API, ByteDance Seedream / Volcengine Ark, and Aliyun DashScope (Wanx / Qwen-Image).
128
+ - 🔑 **BYOK (Bring Your Own Key)**: Uses your own API keys managed securely by DSH credentials service with write-only protection.
129
+ - đŸ–ŧī¸ **Durable Session Persistence**: Images integrate with DSH Attachment and conversation lifecycle, preserved across reloads.
130
+ - âš™ī¸ **Native Web Settings**: Configure providers, keys, models, and endpoints directly in DSH settings.
131
+
132
+ ---
133
+
134
+ ## đŸ“Ļ Supported Providers
135
+
136
+ | Provider | Default Model | Default Endpoint / Base URL |
137
+ | :--- | :--- | :--- |
138
+ | **Google Gemini** | `gemini-3.1-flash-image` | `https://generativelanguage.googleapis.com/v1beta/interactions` |
139
+ | **OpenAI Images** | `gpt-image-2` | `https://api.openai.com/v1` |
140
+ | **OpenAI Compatible** | Custom | Custom Base URL |
141
+ | **ByteDance Seedream / Volcengine Ark** | `doubao-seedream-5-0-260128` | `https://ark.cn-beijing.volces.com/api/v3` |
142
+ | **Aliyun DashScope / Wanx** | `wanx2.1-t2i-turbo` | `https://dashscope.aliyuncs.com/api/v1` |
143
+
144
+ ---
145
+
146
+ ## đŸ› ī¸ Local Development
147
+
148
+ ```bash
149
+ git clone https://github.com/shanliuling/dsh-image-gen.git
150
+ cd dsh-image-gen
151
+
152
+ pnpm install
153
+ pnpm run typecheck
154
+ pnpm run test
155
+ pnpm run build
156
+
157
+ pnpm run pack:check
158
+ ```
159
+
160
+ ---
161
+
162
+ ## 📄 License
163
+
164
+ Open-sourced under the [MIT License](LICENSE).
165
+
166
+ If this plugin helps you, feel free to give it a â­ī¸ **Star**!