dsh-image-gen 0.2.0 → 0.2.2

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,171 +1,172 @@
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 generate images and can also continue editing the previous image directly.</p>
37
-
38
- <br />
39
-
40
- <div align="center">
41
- <img src="docs/assets/generate-example.png" alt="Initial image generation conversation" width="48%" style="vertical-align: top;" />
42
- <img src="docs/assets/edit-example.png" alt="Continued image editing conversation" width="48%" style="vertical-align: top;" />
43
- </div>
44
-
45
- </div>
46
-
47
- ---
48
-
49
- ## 💡 What Problem Does It Solve?
50
-
51
- **`dsh-image-gen` is an open-source image generation plugin built specifically for DeepSeek Harness (DSH).**
52
-
53
- DeepSeek Harness empowers agents to use tools for various tasks. This project adds native **multimodal image generation capabilities**:
54
-
55
- ```mermaid
56
- graph LR
57
- A[User Prompt] --> B[DeepSeek Harness Agent]
58
- B --> C[generate_image Tool]
59
- C --> D[Gemini / OpenAI / Seedream / DashScope]
60
- D --> E[Image Data]
61
- E --> F[In-chat Conversation Stream]
62
- ```
63
-
64
- ---
65
-
66
- ## 🚀 Quick Install & Usage
67
-
68
- ### 1. Install Plugin
69
-
70
- In your DeepSeek Harness workspace root:
71
-
72
- ```bash
73
- # Recommended: Install or upgrade to latest release
74
- pnpm dsh plugin --profile web add dsh-image-gen@latest
75
-
76
- # If dsh is installed globally:
77
- dsh plugin --profile web add dsh-image-gen@latest
78
- ```
79
-
80
- <details>
81
- <summary><b>đŸ› ī¸ Alternative Installations (Git Repo / Local Dev)</b></summary>
82
-
83
- ```bash
84
- # Method B: Install directly from GitHub
85
- pnpm dsh plugin --profile web add git+https://github.com/shanliuling/dsh-image-gen.git
86
-
87
- # Method C: Clone & install locally
88
- git clone https://github.com/shanliuling/dsh-image-gen.git
89
- pnpm dsh plugin --profile web add ./dsh-image-gen
90
- ```
91
-
92
- </details>
93
-
94
- ### 2. Configure API Key & Workspace Settings
95
-
96
- Open DSH Web (`http://localhost:3080`):
97
-
98
- 1. Navigate to **Settings → Plugins → Image generation**.
99
- 2. Select Provider, input API Key.
100
- 3. Optionally enable **Save to workspace** (enabled by default) and specify subfolder, then click **Save**.
101
-
102
- <div align="center">
103
- <img src="docs/assets/settings-preview.png?v=0.1.7" alt="Settings preview" width="720" />
104
- </div>
105
-
106
- ### 3. Generate Images in Chat
107
-
108
- Simply prompt in the chat input:
109
-
110
- ```text
111
- Generate a minimalist modern architecture living room illustration.
112
- ```
113
-
114
- The Agent will call `generate_image` and return the image directly in the conversation stream.
115
-
116
- ### 4. Browse Native Image Gallery
117
-
118
- Click the **`[Gallery]`** Tab in the top navigation bar to browse and search all generated images across conversations:
119
-
120
- <div align="center">
121
- <img src="docs/assets/gallery-preview.png" alt="Gallery preview" width="820" />
122
- </div>
123
-
124
- ---
125
-
126
- ## ✨ Key Features
127
-
128
- - đŸ’Ŧ **In-Chat Image Generation**: Tell your Agent what you want to draw without switching tabs or tools.
129
- - đŸ–ŧī¸ **Native Image Gallery**: Dedicated "Gallery" tab automatically collecting all generated images with keyword search, provider filtering, single-item deletion (with confirmation and persistent tombstones), and quick copy/download.
130
- - 🔍 **Interactive Image Tools**: High-res fullscreen preview, one-click copy to clipboard, local download, and open in new tab.
131
- - 🎨 **Multi-Provider Support**: Supports Google Gemini, OpenAI Images, OpenAI Compatible API, ByteDance Seedream / Volcengine Ark, and Aliyun DashScope (Wanx / Qwen-Image).
132
- - 🔑 **BYOK (Bring Your Own Key)**: Uses your own API keys managed securely by DSH credentials service with write-only protection.
133
- - đŸ–ŧī¸ **Durable Session Persistence**: Images integrate with DSH Attachment and conversation lifecycle, preserved across reloads.
134
- - 💾 **Workspace File Output**: By default each generated image is also written as a file into the current session workspace; the tool result carries the absolute file path. Can be disabled or re-pointed in settings.
135
- - âš™ī¸ **Native Web Settings**: Configure providers, keys, models, and endpoints directly in DSH settings.
136
-
137
- ---
138
-
139
- ## đŸ“Ļ Supported Providers
140
-
141
- | Provider | Default Model | Default Endpoint / Base URL |
142
- | :--- | :--- | :--- |
143
- | **Google Gemini** | `gemini-3.1-flash-image` | `https://generativelanguage.googleapis.com/v1beta/interactions` |
144
- | **OpenAI Images** | `gpt-image-2` | `https://api.openai.com/v1` |
145
- | **OpenAI Compatible** | Custom | Custom Base URL |
146
- | **ByteDance Seedream / Volcengine Ark** | `doubao-seedream-5-0-260128` | `https://ark.cn-beijing.volces.com/api/v3` |
147
- | **Aliyun DashScope / Wanx** | `wanx2.1-t2i-turbo` | `https://dashscope.aliyuncs.com/api/v1` |
148
-
149
- ---
150
-
151
- ## đŸ› ī¸ Local Development
152
-
153
- ```bash
154
- git clone https://github.com/shanliuling/dsh-image-gen.git
155
- cd dsh-image-gen
156
-
157
- pnpm install
158
- pnpm run typecheck
159
- pnpm run test
160
- pnpm run build
161
-
162
- pnpm run pack:check
163
- ```
164
-
165
- ---
166
-
167
- ## 📄 License
168
-
169
- Open-sourced under the [MIT License](LICENSE).
170
-
171
- If this plugin helps you, feel free to give it a â­ī¸ **Star**!
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
+ **Complete conversational image capabilities for DeepSeek Harness: text-to-image, image-to-image, multi-image references, continuous editing, local ComfyUI, and gallery management.**
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 or configure local ComfyUI 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 generate images and can also continue editing the previous image directly.</p>
37
+
38
+ <br />
39
+
40
+ <div align="center">
41
+ <img src="docs/assets/generate-example.png" alt="Initial image generation conversation" width="48%" style="vertical-align: top;" />
42
+ <img src="docs/assets/edit-example.png" alt="Continued image editing conversation" width="48%" style="vertical-align: top;" />
43
+ </div>
44
+
45
+ </div>
46
+
47
+ ---
48
+
49
+ ## 💡 What Problem Does It Solve?
50
+
51
+ **`dsh-image-gen` is an open-source image generation and editing plugin built specifically for DeepSeek Harness (DSH).**
52
+
53
+ DeepSeek Harness empowers agents to use tools for various tasks. This project adds native **multimodal image generation capabilities**:
54
+
55
+ ```mermaid
56
+ graph LR
57
+ A[User Prompt] --> B[DeepSeek Harness Agent]
58
+ B --> C[generate_image / edit_image]
59
+ C --> D[Gemini / OpenAI / Seedream / DashScope / ComfyUI]
60
+ D --> E[Image Data]
61
+ E --> F[In-chat Conversation Stream]
62
+ ```
63
+
64
+ ---
65
+
66
+ ## 🚀 Quick Install & Usage
67
+
68
+ ### 1. Install Plugin
69
+
70
+ In your DeepSeek Harness workspace root:
71
+
72
+ ```bash
73
+ # Recommended: Install or upgrade to latest release
74
+ pnpm dsh plugin --profile web add dsh-image-gen@latest
75
+
76
+ # If dsh is installed globally:
77
+ dsh plugin --profile web add dsh-image-gen@latest
78
+ ```
79
+
80
+ <details>
81
+ <summary><b>đŸ› ī¸ Alternative Installations (Git Repo / Local Dev)</b></summary>
82
+
83
+ ```bash
84
+ # Method B: Install directly from GitHub
85
+ pnpm dsh plugin --profile web add git+https://github.com/shanliuling/dsh-image-gen.git
86
+
87
+ # Method C: Clone & install locally
88
+ git clone https://github.com/shanliuling/dsh-image-gen.git
89
+ pnpm dsh plugin --profile web add ./dsh-image-gen
90
+ ```
91
+
92
+ </details>
93
+
94
+ ### 2. Configure Provider & Workspace Settings
95
+
96
+ Open DSH Web (`http://localhost:3080`):
97
+
98
+ 1. Navigate to **Settings → Plugins → Image generation**.
99
+ 2. Select a Provider. Enter an API key for cloud providers; for local ComfyUI, enter its URL and import an API Format Workflow JSON using `{{prompt}}` for the prompt and optional `{{seed}}` for the seed.
100
+ 3. Optionally enable **Save to workspace** (enabled by default) and specify subfolder, then click **Save**.
101
+
102
+ <div align="center">
103
+ <img src="docs/assets/settings-preview.png?v=0.1.7" alt="Settings preview" width="720" />
104
+ </div>
105
+
106
+ ### 3. Generate Images in Chat
107
+
108
+ Simply prompt in the chat input:
109
+
110
+ ```text
111
+ Generate a minimalist modern architecture living room illustration.
112
+ ```
113
+
114
+ The Agent will call `generate_image` and return the image directly in the conversation stream.
115
+
116
+ ### 4. Browse Native Image Gallery
117
+
118
+ Click the **`[Gallery]`** Tab in the top navigation bar to browse and search all generated images across conversations:
119
+
120
+ <div align="center">
121
+ <img src="docs/assets/gallery-preview.png" alt="Gallery preview" width="820" />
122
+ </div>
123
+
124
+ ---
125
+
126
+ ## ✨ Key Features
127
+
128
+ - đŸ’Ŧ **In-Chat Image Generation**: Tell your Agent what you want to draw without switching tabs or tools.
129
+ - đŸ–ŧī¸ **Native Image Gallery**: Dedicated "Gallery" tab automatically collecting all generated images with keyword search, provider filtering, single-item deletion (with confirmation and persistent tombstones), and quick copy/download.
130
+ - 🔍 **Interactive Image Tools**: High-res fullscreen preview, one-click copy to clipboard, local download, and open in new tab.
131
+ - 🎨 **Multi-Provider Support**: Supports Google Gemini, OpenAI Images, OpenAI Compatible API, ByteDance Seedream / Volcengine Ark, Aliyun DashScope (Wanx / Qwen-Image), and local ComfyUI workflows.
132
+ - 🔑 **BYOK (Bring Your Own Key)**: Uses your own API keys managed securely by DSH credentials service with write-only protection.
133
+ - đŸ–ŧī¸ **Durable Session Persistence**: Images integrate with DSH Attachment and conversation lifecycle, preserved across reloads.
134
+ - 💾 **Workspace File Output**: By default each generated image is also written as a file into the current session workspace; the tool result carries the absolute file path. Can be disabled or re-pointed in settings.
135
+ - âš™ī¸ **Native Web Settings**: Configure providers, keys, models, and endpoints directly in DSH settings.
136
+
137
+ ---
138
+
139
+ ## đŸ“Ļ Supported Providers
140
+
141
+ | Provider | Default Model | Default Endpoint / Base URL |
142
+ | :--- | :--- | :--- |
143
+ | **Google Gemini** | `gemini-3.1-flash-image` | `https://generativelanguage.googleapis.com/v1beta/interactions` |
144
+ | **OpenAI Images** | `gpt-image-2` | `https://api.openai.com/v1` |
145
+ | **OpenAI Compatible** | Custom | Custom Base URL |
146
+ | **ByteDance Seedream / Volcengine Ark** | `doubao-seedream-5-0-260128` | `https://ark.cn-beijing.volces.com/api/v3` |
147
+ | **Aliyun DashScope / Wanx** | `wanx2.1-t2i-turbo` | `https://dashscope.aliyuncs.com/api/v1` |
148
+ | **Local ComfyUI (text-to-image only)** | Imported API Format Workflow | `http://127.0.0.1:8188` |
149
+
150
+ ---
151
+
152
+ ## đŸ› ī¸ Local Development
153
+
154
+ ```bash
155
+ git clone https://github.com/shanliuling/dsh-image-gen.git
156
+ cd dsh-image-gen
157
+
158
+ pnpm install
159
+ pnpm run typecheck
160
+ pnpm run test
161
+ pnpm run build
162
+
163
+ pnpm run pack:check
164
+ ```
165
+
166
+ ---
167
+
168
+ ## 📄 License
169
+
170
+ Open-sourced under the [MIT License](LICENSE).
171
+
172
+ If this plugin helps you, feel free to give it a â­ī¸ **Star**!