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 +172 -171
- package/README.md +182 -187
- package/README.zh-CN.md +172 -171
- package/lib/client.js +186 -25
- package/lib/client.js.map +1 -1
- package/lib/index.js +385 -33
- package/lib/types/client/index.d.ts +22 -2
- package/lib/types/comfyui-workflow.d.ts +8 -0
- package/lib/types/comfyui.d.ts +15 -0
- package/lib/types/config.d.ts +14 -2
- package/lib/types/dashscope.d.ts +2 -2
- package/lib/types/google.d.ts +2 -2
- package/lib/types/openai-compatible.d.ts +1 -1
- package/lib/types/reference-image.d.ts +17 -0
- package/lib/types/seedream.d.ts +2 -2
- package/lib/types/shared.d.ts +5 -1
- package/package.json +133 -131
- package/skills/install-dsh-image-gen/SKILL.md +22 -22
package/lib/types/dashscope.d.ts
CHANGED
|
@@ -10,10 +10,10 @@ export interface DashScopeImageOptions {
|
|
|
10
10
|
signal?: AbortSignal;
|
|
11
11
|
}
|
|
12
12
|
export interface DashScopeEditOptions extends DashScopeImageOptions {
|
|
13
|
-
|
|
13
|
+
sourceImages: Array<{
|
|
14
14
|
data: Uint8Array;
|
|
15
15
|
mediaType: ImageMediaType;
|
|
16
|
-
}
|
|
16
|
+
}>;
|
|
17
17
|
}
|
|
18
18
|
export declare function generateDashScopeImage(options: DashScopeImageOptions): Promise<{
|
|
19
19
|
data: Uint8Array;
|
package/lib/types/google.d.ts
CHANGED
|
@@ -22,9 +22,9 @@ export declare function generateGoogleImage(input: GoogleRequestBase & {
|
|
|
22
22
|
/** Send one native Google image-editing request using already-resolved bytes. */
|
|
23
23
|
export declare function editGoogleImage(input: GoogleRequestBase & {
|
|
24
24
|
prompt: string;
|
|
25
|
-
|
|
25
|
+
sourceImages: Array<{
|
|
26
26
|
data: Uint8Array;
|
|
27
27
|
mediaType: ImageMediaType;
|
|
28
|
-
}
|
|
28
|
+
}>;
|
|
29
29
|
}): Promise<GeneratedImage>;
|
|
30
30
|
export {};
|
|
@@ -23,7 +23,7 @@ export declare function editOpenAICompatibleImage(input: {
|
|
|
23
23
|
baseURL: string;
|
|
24
24
|
model: string;
|
|
25
25
|
prompt: string;
|
|
26
|
-
|
|
26
|
+
sourceImages: CompatibleReferenceImage[];
|
|
27
27
|
size?: string;
|
|
28
28
|
maxBytes: number;
|
|
29
29
|
signal: AbortSignal;
|
|
@@ -32,6 +32,23 @@ export declare function resolveReferenceImage(input: {
|
|
|
32
32
|
maxBytes?: number;
|
|
33
33
|
signal: AbortSignal;
|
|
34
34
|
}): Promise<ResolvedReferenceImage>;
|
|
35
|
+
/**
|
|
36
|
+
* Resolve one or more edit references while keeping every DSH-specific detail
|
|
37
|
+
* behind this compatibility boundary. Explicit selectors preserve caller order;
|
|
38
|
+
* without selectors, all images in the newest image-bearing message are used.
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveReferenceImages(input: {
|
|
41
|
+
agent?: ReferenceImageAgent;
|
|
42
|
+
attachments: ReferenceImageStore;
|
|
43
|
+
sourceAttachmentId?: string;
|
|
44
|
+
sourceAttachmentIds?: readonly string[];
|
|
45
|
+
sourcePath?: string;
|
|
46
|
+
sourcePaths?: readonly string[];
|
|
47
|
+
maxBytes?: number;
|
|
48
|
+
signal: AbortSignal;
|
|
49
|
+
}): Promise<ResolvedReferenceImage[]>;
|
|
50
|
+
/** Find images in caller order, or every image in the newest image-bearing message. */
|
|
51
|
+
export declare function findReferenceImages(messages: readonly Message[], sourceAttachmentIds?: readonly string[]): ImageAttachmentRef[];
|
|
35
52
|
/** Find the newest matching image in the effective, replacement-aware history. */
|
|
36
53
|
export declare function findReferenceImage(messages: readonly Message[], sourceAttachmentId?: string): ImageAttachmentRef | undefined;
|
|
37
54
|
/** Validate an untrusted serialized image reference at an HTTP/UI boundary. */
|
package/lib/types/seedream.d.ts
CHANGED
|
@@ -7,10 +7,10 @@ export declare function editSeedreamImage(input: {
|
|
|
7
7
|
baseURL: string;
|
|
8
8
|
model: string;
|
|
9
9
|
prompt: string;
|
|
10
|
-
|
|
10
|
+
sourceImages: Array<{
|
|
11
11
|
data: Uint8Array;
|
|
12
12
|
mediaType: ImageMediaType;
|
|
13
|
-
}
|
|
13
|
+
}>;
|
|
14
14
|
size?: string;
|
|
15
15
|
maxBytes: number;
|
|
16
16
|
signal: AbortSignal;
|
package/lib/types/shared.d.ts
CHANGED
|
@@ -4,13 +4,17 @@ export declare const IMAGE_ROUTE = "/plugins/dsh-image-gen/image";
|
|
|
4
4
|
/** Namespace persisted through DSH Settings. */
|
|
5
5
|
export declare const IMAGE_GENERATION_NAMESPACE = "image-generation";
|
|
6
6
|
/** Supported providers. */
|
|
7
|
-
export declare const IMAGE_PROVIDERS: readonly ["google", "openai", "seedream", "dashscope"];
|
|
7
|
+
export declare const IMAGE_PROVIDERS: readonly ["google", "openai", "seedream", "dashscope", "comfyui"];
|
|
8
8
|
export type ImageProvider = typeof IMAGE_PROVIDERS[number];
|
|
9
9
|
/** Default endpoints and base URLs. */
|
|
10
10
|
export declare const DEFAULT_GOOGLE_ENDPOINT = "https://generativelanguage.googleapis.com/v1beta/interactions";
|
|
11
11
|
export declare const DEFAULT_OPENAI_BASE_URL = "https://api.openai.com/v1";
|
|
12
12
|
export declare const DEFAULT_SEEDREAM_BASE_URL = "https://ark.cn-beijing.volces.com/api/v3";
|
|
13
13
|
export declare const DEFAULT_DASHSCOPE_ENDPOINT = "https://dashscope.aliyuncs.com/api/v1";
|
|
14
|
+
export declare const DEFAULT_COMFYUI_BASE_URL = "http://127.0.0.1:8188";
|
|
15
|
+
export declare const DEFAULT_COMFYUI_TIMEOUT_MS = 300000;
|
|
16
|
+
export declare const DEFAULT_COMFYUI_WORKFLOW_LABEL = "API workflow";
|
|
17
|
+
export declare const MAX_COMFYUI_WORKFLOW_BYTES: number;
|
|
14
18
|
/** Default model names. */
|
|
15
19
|
export declare const DEFAULT_GOOGLE_MODEL = "gemini-3.1-flash-image";
|
|
16
20
|
export declare const DEFAULT_OPENAI_MODEL = "gpt-image-2";
|
package/package.json
CHANGED
|
@@ -1,131 +1,133 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-image-gen",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Bring ChatGPT-like image generation to DeepSeek Harness — Gemini, OpenAI, Seedream, DashScope & more.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"author": "shanliuling",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/shanliuling/dsh-image-gen.git"
|
|
10
|
-
},
|
|
11
|
-
"bugs": {
|
|
12
|
-
"url": "https://github.com/shanliuling/dsh-image-gen/issues"
|
|
13
|
-
},
|
|
14
|
-
"homepage": "https://github.com/shanliuling/dsh-image-gen#readme",
|
|
15
|
-
"main": "lib/index.js",
|
|
16
|
-
"types": "lib/types/index.d.ts",
|
|
17
|
-
"exports": {
|
|
18
|
-
".": {
|
|
19
|
-
"types": "./lib/types/index.d.ts",
|
|
20
|
-
"default": "./lib/index.js"
|
|
21
|
-
},
|
|
22
|
-
"./client": {
|
|
23
|
-
"types": "./lib/types/client/index.d.ts",
|
|
24
|
-
"default": "./lib/client.js"
|
|
25
|
-
},
|
|
26
|
-
"./package.json": "./package.json"
|
|
27
|
-
},
|
|
28
|
-
"files": [
|
|
29
|
-
"lib/index.js",
|
|
30
|
-
"lib/client.js",
|
|
31
|
-
"lib/client.js.map",
|
|
32
|
-
"lib/types/**/*.d.ts",
|
|
33
|
-
"skills/**/*.md",
|
|
34
|
-
"cordis.patch.yml",
|
|
35
|
-
"README.md",
|
|
36
|
-
"README.zh-CN.md",
|
|
37
|
-
"LICENSE"
|
|
38
|
-
],
|
|
39
|
-
"dsh": {
|
|
40
|
-
"bundle": {
|
|
41
|
-
"patch": "./cordis.patch.yml"
|
|
42
|
-
},
|
|
43
|
-
"client": {
|
|
44
|
-
"inject": [
|
|
45
|
-
"@deepseek-ai/dsh-client-connection",
|
|
46
|
-
"@deepseek-ai/dsh-api-remotes",
|
|
47
|
-
"@deepseek-ai/dsh-client-runtime",
|
|
48
|
-
"@deepseek-ai/dsh-client-ui-conversation",
|
|
49
|
-
"@deepseek-ai/dsh-client-ui-settings",
|
|
50
|
-
"@deepseek-ai/dsh-client-ui-settings-plugins",
|
|
51
|
-
"@deepseek-ai/dsh-client-ui-tool",
|
|
52
|
-
"@deepseek-ai/dsh-client-locale"
|
|
53
|
-
],
|
|
54
|
-
"platform": "web"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"scripts": {
|
|
58
|
-
"typecheck": "tsc --noEmit",
|
|
59
|
-
"build": "tsc && tsdown",
|
|
60
|
-
"prepare": "pnpm run build",
|
|
61
|
-
"test": "vitest run",
|
|
62
|
-
"pack:check": "pnpm pack --dry-run"
|
|
63
|
-
},
|
|
64
|
-
"engines": {
|
|
65
|
-
"node": "^22.19.0 || >=24.0.0"
|
|
66
|
-
},
|
|
67
|
-
"license": "MIT",
|
|
68
|
-
"keywords": [
|
|
69
|
-
"deepseek",
|
|
70
|
-
"deepseek-harness",
|
|
71
|
-
"dsh",
|
|
72
|
-
"dsh-plugin",
|
|
73
|
-
"ai-agent",
|
|
74
|
-
"image-generation",
|
|
75
|
-
"ai-image-generation",
|
|
76
|
-
"multimodal",
|
|
77
|
-
"gemini",
|
|
78
|
-
"openai",
|
|
79
|
-
"openai-compatible",
|
|
80
|
-
"seedream",
|
|
81
|
-
"dashscope",
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"@deepseek-ai/
|
|
92
|
-
"@deepseek-ai/dsh-
|
|
93
|
-
"@deepseek-ai/dsh-
|
|
94
|
-
"@deepseek-ai/dsh-client-
|
|
95
|
-
"@deepseek-ai/dsh-client-
|
|
96
|
-
"@deepseek-ai/dsh-client-ui-
|
|
97
|
-
"@deepseek-ai/dsh-client-ui-
|
|
98
|
-
"@deepseek-ai/dsh-client-ui-
|
|
99
|
-
"@deepseek-ai/dsh-
|
|
100
|
-
"@deepseek-ai/dsh-
|
|
101
|
-
"@deepseek-ai/dsh-
|
|
102
|
-
"@deepseek-ai/dsh-
|
|
103
|
-
"@deepseek-ai/
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"@deepseek-ai/
|
|
110
|
-
"@deepseek-ai/dsh-
|
|
111
|
-
"@deepseek-ai/dsh-
|
|
112
|
-
"@deepseek-ai/dsh-client-
|
|
113
|
-
"@deepseek-ai/dsh-client-
|
|
114
|
-
"@deepseek-ai/dsh-client-ui-
|
|
115
|
-
"@deepseek-ai/dsh-client-ui-
|
|
116
|
-
"@deepseek-ai/dsh-client-ui-
|
|
117
|
-
"@deepseek-ai/dsh-
|
|
118
|
-
"@deepseek-ai/dsh-
|
|
119
|
-
"@deepseek-ai/dsh-
|
|
120
|
-
"@deepseek-ai/dsh-
|
|
121
|
-
"@deepseek-ai/dsh-
|
|
122
|
-
"@deepseek-ai/
|
|
123
|
-
"@
|
|
124
|
-
"@
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-image-gen",
|
|
3
|
+
"version": "0.2.2",
|
|
4
|
+
"description": "Bring ChatGPT-like image generation to DeepSeek Harness — Gemini, OpenAI, Seedream, DashScope, local ComfyUI & more.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"author": "shanliuling",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/shanliuling/dsh-image-gen.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/shanliuling/dsh-image-gen/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/shanliuling/dsh-image-gen#readme",
|
|
15
|
+
"main": "lib/index.js",
|
|
16
|
+
"types": "lib/types/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./lib/types/index.d.ts",
|
|
20
|
+
"default": "./lib/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./client": {
|
|
23
|
+
"types": "./lib/types/client/index.d.ts",
|
|
24
|
+
"default": "./lib/client.js"
|
|
25
|
+
},
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"lib/index.js",
|
|
30
|
+
"lib/client.js",
|
|
31
|
+
"lib/client.js.map",
|
|
32
|
+
"lib/types/**/*.d.ts",
|
|
33
|
+
"skills/**/*.md",
|
|
34
|
+
"cordis.patch.yml",
|
|
35
|
+
"README.md",
|
|
36
|
+
"README.zh-CN.md",
|
|
37
|
+
"LICENSE"
|
|
38
|
+
],
|
|
39
|
+
"dsh": {
|
|
40
|
+
"bundle": {
|
|
41
|
+
"patch": "./cordis.patch.yml"
|
|
42
|
+
},
|
|
43
|
+
"client": {
|
|
44
|
+
"inject": [
|
|
45
|
+
"@deepseek-ai/dsh-client-connection",
|
|
46
|
+
"@deepseek-ai/dsh-api-remotes",
|
|
47
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
48
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
49
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
50
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins",
|
|
51
|
+
"@deepseek-ai/dsh-client-ui-tool",
|
|
52
|
+
"@deepseek-ai/dsh-client-locale"
|
|
53
|
+
],
|
|
54
|
+
"platform": "web"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"typecheck": "tsc --noEmit",
|
|
59
|
+
"build": "tsc && tsdown",
|
|
60
|
+
"prepare": "pnpm run build",
|
|
61
|
+
"test": "vitest run",
|
|
62
|
+
"pack:check": "pnpm pack --dry-run"
|
|
63
|
+
},
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
66
|
+
},
|
|
67
|
+
"license": "MIT",
|
|
68
|
+
"keywords": [
|
|
69
|
+
"deepseek",
|
|
70
|
+
"deepseek-harness",
|
|
71
|
+
"dsh",
|
|
72
|
+
"dsh-plugin",
|
|
73
|
+
"ai-agent",
|
|
74
|
+
"image-generation",
|
|
75
|
+
"ai-image-generation",
|
|
76
|
+
"multimodal",
|
|
77
|
+
"gemini",
|
|
78
|
+
"openai",
|
|
79
|
+
"openai-compatible",
|
|
80
|
+
"seedream",
|
|
81
|
+
"dashscope",
|
|
82
|
+
"comfyui",
|
|
83
|
+
"local-image-generation",
|
|
84
|
+
"wanx",
|
|
85
|
+
"aliyun",
|
|
86
|
+
"volcengine",
|
|
87
|
+
"byok",
|
|
88
|
+
"cordis"
|
|
89
|
+
],
|
|
90
|
+
"peerDependencies": {
|
|
91
|
+
"@deepseek-ai/cordis": ">=4.0.0 <5",
|
|
92
|
+
"@deepseek-ai/dsh-api-remotes": ">=0.1.1-rc.2 <0.2.0",
|
|
93
|
+
"@deepseek-ai/dsh-attachment": ">=0.1.1-rc.2 <0.2.0",
|
|
94
|
+
"@deepseek-ai/dsh-client-connection": ">=0.1.1-rc.2 <0.2.0",
|
|
95
|
+
"@deepseek-ai/dsh-client-runtime": ">=0.1.1-rc.2 <0.2.0",
|
|
96
|
+
"@deepseek-ai/dsh-client-ui-conversation": ">=0.1.1-rc.2 <0.2.0",
|
|
97
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.1.1-rc.2 <0.2.0",
|
|
98
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": ">=0.1.1-rc.2 <0.2.0",
|
|
99
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.1.1-rc.2 <0.2.0",
|
|
100
|
+
"@deepseek-ai/dsh-client-ui-tool": ">=0.1.1-rc.2 <0.2.0",
|
|
101
|
+
"@deepseek-ai/dsh-credentials": ">=0.1.1-rc.2 <0.2.0",
|
|
102
|
+
"@deepseek-ai/dsh-host-webserver": ">=0.1.1-rc.2 <0.2.0",
|
|
103
|
+
"@deepseek-ai/dsh-settings": ">=0.1.1-rc.2 <0.2.0",
|
|
104
|
+
"@deepseek-ai/dsh-tools": ">=0.1.1-rc.2 <0.2.0",
|
|
105
|
+
"@deepseek-ai/schemastery": ">=3.18.0 <4",
|
|
106
|
+
"react": ">=18.2.0 <19"
|
|
107
|
+
},
|
|
108
|
+
"devDependencies": {
|
|
109
|
+
"@deepseek-ai/cordis": "4.0.1",
|
|
110
|
+
"@deepseek-ai/dsh-api-remotes": "0.1.1-rc.2",
|
|
111
|
+
"@deepseek-ai/dsh-attachment": "0.1.1-rc.2",
|
|
112
|
+
"@deepseek-ai/dsh-client-connection": "0.1.1-rc.2",
|
|
113
|
+
"@deepseek-ai/dsh-client-runtime": "0.1.1-rc.2",
|
|
114
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.1.1-rc.2",
|
|
115
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.1-rc.2",
|
|
116
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.1-rc.2",
|
|
117
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.1-rc.2",
|
|
118
|
+
"@deepseek-ai/dsh-client-ui-tool": "0.1.1-rc.2",
|
|
119
|
+
"@deepseek-ai/dsh-credentials": "0.1.1-rc.2",
|
|
120
|
+
"@deepseek-ai/dsh-host-webserver": "0.1.1-rc.2",
|
|
121
|
+
"@deepseek-ai/dsh-llm": "0.1.1-rc.2",
|
|
122
|
+
"@deepseek-ai/dsh-settings": "0.1.1-rc.2",
|
|
123
|
+
"@deepseek-ai/dsh-tools": "0.1.1-rc.2",
|
|
124
|
+
"@deepseek-ai/schemastery": "3.18.1",
|
|
125
|
+
"@types/node": "^22.20.0",
|
|
126
|
+
"@types/react": "~18.3.1",
|
|
127
|
+
"react": "^18.2.0",
|
|
128
|
+
"tsdown": "^0.22.2",
|
|
129
|
+
"typescript": "^6.0.3",
|
|
130
|
+
"vitest": "^4.1.8"
|
|
131
|
+
},
|
|
132
|
+
"packageManager": "pnpm@11.7.0"
|
|
133
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: install-dsh-image-gen
|
|
3
|
-
description: Install, configure, verify, or remove the dsh-image-gen Bundle in a DeepSeek Harness Web profile. Use when a user wants Google, OpenAI-compatible relay, or
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Install DSH Image Gen
|
|
7
|
-
|
|
8
|
-
1. Confirm `dsh` runs and record `dsh --version`.
|
|
9
|
-
2. Ask which Web profile to change if the user did not name one. Default to `web` only when that profile already exists.
|
|
10
|
-
3. Install the pinned package or repository spec the user provides:
|
|
11
|
-
|
|
12
|
-
```sh
|
|
13
|
-
dsh plugin --profile <profile> add <package-or-git-spec>
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
4. If pnpm blocks the Git dependency's `prepare` script, explain that the allowance executes repository code during installation. Add only the exact package key pnpm reports to the profile's `pnpm-workspace.yaml`, then retry after the user approves.
|
|
17
|
-
5. Verify `dsh --profile <profile> --dump-config` contains the `dsh-image-gen` layer and `image-gen` row.
|
|
18
|
-
6. Start the profile. If port 3080 is already in use, identify the existing DSH process before stopping anything.
|
|
19
|
-
7. In Settings > Plugins > Plugin configuration > Image generation, select
|
|
20
|
-
8. Test with “生成一张戴墨镜的赛博朋克猫图片”. Confirm one `generate_image` call succeeds and its image renders in the conversation.
|
|
21
|
-
|
|
22
|
-
For removal, run `dsh plugin --profile <profile> remove dsh-image-gen`. Do not delete the user's credentials unless they explicitly request it.
|
|
1
|
+
---
|
|
2
|
+
name: install-dsh-image-gen
|
|
3
|
+
description: Install, configure, verify, or remove the dsh-image-gen Bundle in a DeepSeek Harness Web profile. Use when a user wants Google, OpenAI-compatible relay, Seedream, DashScope, or local ComfyUI image generation in DSH, cannot find the Image generation settings card, or needs help testing generate_image.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Install DSH Image Gen
|
|
7
|
+
|
|
8
|
+
1. Confirm `dsh` runs and record `dsh --version`.
|
|
9
|
+
2. Ask which Web profile to change if the user did not name one. Default to `web` only when that profile already exists.
|
|
10
|
+
3. Install the pinned package or repository spec the user provides:
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
dsh plugin --profile <profile> add <package-or-git-spec>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
4. If pnpm blocks the Git dependency's `prepare` script, explain that the allowance executes repository code during installation. Add only the exact package key pnpm reports to the profile's `pnpm-workspace.yaml`, then retry after the user approves.
|
|
17
|
+
5. Verify `dsh --profile <profile> --dump-config` contains the `dsh-image-gen` layer and `image-gen` row.
|
|
18
|
+
6. Start the profile. If port 3080 is already in use, identify the existing DSH process before stopping anything.
|
|
19
|
+
7. In Settings > Plugins > Plugin configuration > Image generation, select a cloud Provider and save its API key, or select Local ComfyUI, enter its URL, and import a ComfyUI API Format workflow JSON containing `{{prompt}}`. Never print, read back, or commit a key.
|
|
20
|
+
8. Test with “生成一张戴墨镜的赛博朋克猫图片”. Confirm one `generate_image` call succeeds and its image renders in the conversation.
|
|
21
|
+
|
|
22
|
+
For removal, run `dsh plugin --profile <profile> remove dsh-image-gen`. Do not delete the user's credentials unless they explicitly request it.
|