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 +166 -163
- package/README.md +169 -159
- package/README.zh-CN.md +169 -159
- package/lib/client.js +22 -11
- package/lib/client.js.map +1 -1
- package/lib/index.js +125 -3
- package/lib/types/client/index.d.ts +2 -0
- package/lib/types/config.d.ts +12 -2
- package/lib/types/dashscope.d.ts +16 -0
- package/lib/types/shared.d.ts +3 -1
- package/package.json +5 -2
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 â
|
|
10
|
-
|
|
11
|
-
[](https://www.npmjs.com/package/dsh-image-gen)
|
|
12
|
-
[](https://github.com/deepseek-ai)
|
|
13
|
-
[](https://www.npmjs.com/package/dsh-image-gen)
|
|
14
|
-
[](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
|
|
64
|
-
|
|
65
|
-
### 1. Install Plugin
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
# Recommended: Install or upgrade to latest
|
|
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>đ ī¸
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
# Method B:
|
|
82
|
-
pnpm dsh plugin --profile web add git+https://github.com/shanliuling/dsh-image-gen.git
|
|
83
|
-
|
|
84
|
-
# Method C:
|
|
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.
|
|
96
|
-
2. Select
|
|
97
|
-
|
|
98
|
-
<div align="center">
|
|
99
|
-
<img src="docs/assets/settings-preview.png" alt="Settings preview" width="720" />
|
|
100
|
-
</div>
|
|
101
|
-
|
|
102
|
-
### 3.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
```text
|
|
107
|
-
Generate a minimalist modern architecture living room illustration.
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
The Agent will
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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
|
+
[](https://www.npmjs.com/package/dsh-image-gen)
|
|
12
|
+
[](https://github.com/deepseek-ai)
|
|
13
|
+
[](https://www.npmjs.com/package/dsh-image-gen)
|
|
14
|
+
[](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**!
|