@logictan/dsh-imagegen 2.0.2 → 2.0.3
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.md +1 -1
- package/lib/client.js +115 -113
- package/lib/client.js.map +1 -1
- package/lib/index.js +280 -31
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ dsh plugin --profile web add @logictan/dsh-imagegen
|
|
|
46
46
|
| --- | --- |
|
|
47
47
|
| 预设 | 常见厂商的预填(OpenAI 官方、xAI Grok Imagine、Google Nano Banana、字节 Seedream、智谱 GLM-Image、阿里 Qwen-Image、MiniMax image-01 等) |
|
|
48
48
|
| API 地址 | 该渠道的端点;非 OpenAI 兼容协议的厂商按其官方接口填写(预设里已说明) |
|
|
49
|
-
| API 密钥 |
|
|
49
|
+
| API 密钥 | 凭据,存于 `$DSH_HOME/.credentials.yaml`(渠道密钥为 `DSH_IMAGEGEN_CHANNEL_<渠道 ID>`,提示词增强为 `DSH_IMAGEGEN_PROMPT_KEY`);不写入插件配置行,生成时由宿主代理转发 |
|
|
50
50
|
| 模型目录 | 该渠道下可用的「别名 → 上游模型 id」映射 |
|
|
51
51
|
|
|
52
52
|
可选配置**提示词增强**:填一个 OpenAI 兼容的聊天端点与模型,生图前会把简短提示词扩写成更完整的描述。
|
package/lib/client.js
CHANGED
|
@@ -2583,9 +2583,11 @@ window.__ModuleLoader__.load({
|
|
|
2583
2583
|
*
|
|
2584
2584
|
* Storage rules (dictated by dsh-settings semantics):
|
|
2585
2585
|
* - the whole `channels` array is written wholesale via `path: ['channels']`;
|
|
2586
|
-
* - every channel's API key
|
|
2587
|
-
*
|
|
2588
|
-
*
|
|
2586
|
+
* - every channel's API key is written to `path: ['channelSecrets', <id>]`,
|
|
2587
|
+
* one key at a time so untouched keys are never clobbered by a save the
|
|
2588
|
+
* reader could not see (keys are redacted out of the wire view). The host
|
|
2589
|
+
* bridge diverts that path into the credential store, so the value never
|
|
2590
|
+
* reaches the settings document — this module only speaks the wire shape;
|
|
2589
2591
|
* - path ops never navigate *inside* the channels array.
|
|
2590
2592
|
*/
|
|
2591
2593
|
/** Deep equality over JSON-compatible data (the change predicate). */
|
|
@@ -3028,132 +3030,132 @@ window.__ModuleLoader__.load({
|
|
|
3028
3030
|
document.head.appendChild(tag);
|
|
3029
3031
|
}
|
|
3030
3032
|
var settings_card_module_css_default = {
|
|
3031
|
-
"
|
|
3032
|
-
"
|
|
3033
|
-
"
|
|
3034
|
-
"
|
|
3035
|
-
"
|
|
3036
|
-
"
|
|
3033
|
+
"textareaInvalid": "_5JdLea_textareaInvalid",
|
|
3034
|
+
"healthBadge": "_5JdLea_healthBadge",
|
|
3035
|
+
"pickerHeader": "_5JdLea_pickerHeader",
|
|
3036
|
+
"overviewHint": "_5JdLea_overviewHint",
|
|
3037
|
+
"modelChip": "_5JdLea_modelChip",
|
|
3038
|
+
"footer": "_5JdLea_footer",
|
|
3039
|
+
"failed": "_5JdLea_failed",
|
|
3040
|
+
"pickerOverlay": "_5JdLea_pickerOverlay",
|
|
3041
|
+
"subscriptionWarning": "_5JdLea_subscriptionWarning",
|
|
3037
3042
|
"sectionToggleText": "_5JdLea_sectionToggleText",
|
|
3043
|
+
"editorSectionHeader": "_5JdLea_editorSectionHeader",
|
|
3038
3044
|
"editorBackdrop": "_5JdLea_editorBackdrop",
|
|
3045
|
+
"editorPanel": "_5JdLea_editorPanel",
|
|
3046
|
+
"modelRowInputs": "_5JdLea_modelRowInputs",
|
|
3047
|
+
"channelList": "_5JdLea_channelList",
|
|
3048
|
+
"sectionDivider": "_5JdLea_sectionDivider",
|
|
3049
|
+
"reset": "_5JdLea_reset",
|
|
3050
|
+
"presetHint": "_5JdLea_presetHint",
|
|
3051
|
+
"head": "_5JdLea_head",
|
|
3052
|
+
"invalid": "_5JdLea_invalid",
|
|
3053
|
+
"inlineDisclosure": "_5JdLea_inlineDisclosure",
|
|
3054
|
+
"badges": "_5JdLea_badges",
|
|
3039
3055
|
"versionLabel": "_5JdLea_versionLabel",
|
|
3040
|
-
"
|
|
3041
|
-
"
|
|
3042
|
-
"channelHost": "_5JdLea_channelHost",
|
|
3043
|
-
"modelArrow": "_5JdLea_modelArrow",
|
|
3044
|
-
"pickerDialog": "_5JdLea_pickerDialog",
|
|
3045
|
-
"modelChip": "_5JdLea_modelChip",
|
|
3046
|
-
"pickerHeader": "_5JdLea_pickerHeader",
|
|
3047
|
-
"channelDotWarn": "_5JdLea_channelDotWarn",
|
|
3048
|
-
"inputInvalid": "_5JdLea_inputInvalid",
|
|
3049
|
-
"headText": "_5JdLea_headText",
|
|
3050
|
-
"channelControls": "_5JdLea_channelControls",
|
|
3056
|
+
"presetAction": "_5JdLea_presetAction",
|
|
3057
|
+
"sectionContent": "_5JdLea_sectionContent",
|
|
3051
3058
|
"notExposed": "_5JdLea_notExposed",
|
|
3052
|
-
"
|
|
3053
|
-
"
|
|
3054
|
-
"
|
|
3059
|
+
"chevronOpen": "_5JdLea_chevronOpen",
|
|
3060
|
+
"modelCandidateList": "_5JdLea_modelCandidateList",
|
|
3061
|
+
"checkboxRow": "_5JdLea_checkboxRow",
|
|
3062
|
+
"pickerDialog": "_5JdLea_pickerDialog",
|
|
3063
|
+
"pickerHint": "_5JdLea_pickerHint",
|
|
3064
|
+
"modelRows": "_5JdLea_modelRows",
|
|
3065
|
+
"pickerList": "_5JdLea_pickerList",
|
|
3055
3066
|
"save": "_5JdLea_save",
|
|
3056
|
-
"
|
|
3057
|
-
"
|
|
3058
|
-
"
|
|
3059
|
-
"presetName": "_5JdLea_presetName",
|
|
3067
|
+
"name": "_5JdLea_name",
|
|
3068
|
+
"channelMain": "_5JdLea_channelMain",
|
|
3069
|
+
"versionRow": "_5JdLea_versionRow",
|
|
3060
3070
|
"manualModelRow": "_5JdLea_manualModelRow",
|
|
3061
|
-
"
|
|
3062
|
-
"channelSection": "_5JdLea_channelSection",
|
|
3071
|
+
"presetList": "_5JdLea_presetList",
|
|
3063
3072
|
"pickerEmpty": "_5JdLea_pickerEmpty",
|
|
3064
|
-
"
|
|
3065
|
-
"presetInlineHeader": "_5JdLea_presetInlineHeader",
|
|
3066
|
-
"pickerTitle": "_5JdLea_pickerTitle",
|
|
3073
|
+
"sectionTitle": "_5JdLea_sectionTitle",
|
|
3067
3074
|
"modelRowBadges": "_5JdLea_modelRowBadges",
|
|
3068
|
-
"channelAdd": "_5JdLea_channelAdd",
|
|
3069
|
-
"overviewTitle": "_5JdLea_overviewTitle",
|
|
3070
3075
|
"modelSection": "_5JdLea_modelSection",
|
|
3071
|
-
"
|
|
3076
|
+
"sectionHeader": "_5JdLea_sectionHeader",
|
|
3077
|
+
"summaryCard": "_5JdLea_summaryCard",
|
|
3078
|
+
"label": "_5JdLea_label",
|
|
3079
|
+
"channelAdd": "_5JdLea_channelAdd",
|
|
3080
|
+
"addModel": "_5JdLea_addModel",
|
|
3081
|
+
"channelDotReady": "_5JdLea_channelDotReady",
|
|
3082
|
+
"editorFooter": "_5JdLea_editorFooter",
|
|
3083
|
+
"inputInvalid": "_5JdLea_inputInvalid",
|
|
3072
3084
|
"textarea": "_5JdLea_textarea",
|
|
3073
|
-
"
|
|
3074
|
-
"
|
|
3075
|
-
"
|
|
3076
|
-
"channelList": "_5JdLea_channelList",
|
|
3077
|
-
"fieldHint": "_5JdLea_fieldHint",
|
|
3078
|
-
"disclosure": "_5JdLea_disclosure",
|
|
3079
|
-
"pickerTabs": "_5JdLea_pickerTabs",
|
|
3080
|
-
"modelRows": "_5JdLea_modelRows",
|
|
3081
|
-
"settingsSection": "_5JdLea_settingsSection",
|
|
3082
|
-
"channelMain": "_5JdLea_channelMain",
|
|
3085
|
+
"channelBadge": "_5JdLea_channelBadge",
|
|
3086
|
+
"channelDotWarn": "_5JdLea_channelDotWarn",
|
|
3087
|
+
"overviewTitle": "_5JdLea_overviewTitle",
|
|
3083
3088
|
"optionalContent": "_5JdLea_optionalContent",
|
|
3084
|
-
"
|
|
3085
|
-
"
|
|
3086
|
-
"
|
|
3087
|
-
"
|
|
3088
|
-
"footer": "_5JdLea_footer",
|
|
3089
|
-
"channelMeta": "_5JdLea_channelMeta",
|
|
3089
|
+
"summaryValue": "_5JdLea_summaryValue",
|
|
3090
|
+
"sectionToggleTitle": "_5JdLea_sectionToggleTitle",
|
|
3091
|
+
"presetName": "_5JdLea_presetName",
|
|
3092
|
+
"summaryLabel": "_5JdLea_summaryLabel",
|
|
3090
3093
|
"editorClose": "_5JdLea_editorClose",
|
|
3091
|
-
"
|
|
3092
|
-
"
|
|
3093
|
-
"versionRow": "_5JdLea_versionRow",
|
|
3094
|
-
"chevronOpen": "_5JdLea_chevronOpen",
|
|
3095
|
-
"editorDivider": "_5JdLea_editorDivider",
|
|
3096
|
-
"overviewHead": "_5JdLea_overviewHead",
|
|
3097
|
-
"healthBadge": "_5JdLea_healthBadge",
|
|
3094
|
+
"body": "_5JdLea_body",
|
|
3095
|
+
"settingsSection": "_5JdLea_settingsSection",
|
|
3098
3096
|
"sectionToggle": "_5JdLea_sectionToggle",
|
|
3099
|
-
"
|
|
3100
|
-
"
|
|
3101
|
-
"
|
|
3102
|
-
"
|
|
3103
|
-
"
|
|
3104
|
-
"
|
|
3097
|
+
"editorTools": "_5JdLea_editorTools",
|
|
3098
|
+
"hint": "_5JdLea_hint",
|
|
3099
|
+
"input": "_5JdLea_input",
|
|
3100
|
+
"discard": "_5JdLea_discard",
|
|
3101
|
+
"channelName": "_5JdLea_channelName",
|
|
3102
|
+
"channelAddRow": "_5JdLea_channelAddRow",
|
|
3103
|
+
"pending": "_5JdLea_pending",
|
|
3105
3104
|
"summaryGrid": "_5JdLea_summaryGrid",
|
|
3106
|
-
"
|
|
3105
|
+
"subscriptionBox": "_5JdLea_subscriptionBox",
|
|
3106
|
+
"readOnly": "_5JdLea_readOnly",
|
|
3107
|
+
"channelRow": "_5JdLea_channelRow",
|
|
3108
|
+
"presetMeta": "_5JdLea_presetMeta",
|
|
3109
|
+
"disclosure": "_5JdLea_disclosure",
|
|
3110
|
+
"badge": "_5JdLea_badge",
|
|
3111
|
+
"modelFetch": "_5JdLea_modelFetch",
|
|
3112
|
+
"modelBadge": "_5JdLea_modelBadge",
|
|
3113
|
+
"modelArrow": "_5JdLea_modelArrow",
|
|
3114
|
+
"channelHost": "_5JdLea_channelHost",
|
|
3107
3115
|
"modelChoices": "_5JdLea_modelChoices",
|
|
3108
|
-
"
|
|
3116
|
+
"header": "_5JdLea_header",
|
|
3109
3117
|
"sectionSummary": "_5JdLea_sectionSummary",
|
|
3110
|
-
"sectionToggleHint": "_5JdLea_sectionToggleHint",
|
|
3111
|
-
"overviewHint": "_5JdLea_overviewHint",
|
|
3112
|
-
"subscriptionManual": "_5JdLea_subscriptionManual",
|
|
3113
|
-
"modelCandidate": "_5JdLea_modelCandidate",
|
|
3114
|
-
"sectionHeader": "_5JdLea_sectionHeader",
|
|
3115
|
-
"sectionDivider": "_5JdLea_sectionDivider",
|
|
3116
|
-
"input": "_5JdLea_input",
|
|
3117
|
-
"editorPanel": "_5JdLea_editorPanel",
|
|
3118
3118
|
"presetRow": "_5JdLea_presetRow",
|
|
3119
|
-
"
|
|
3120
|
-
"
|
|
3121
|
-
"
|
|
3122
|
-
"
|
|
3123
|
-
"
|
|
3124
|
-
"
|
|
3119
|
+
"headText": "_5JdLea_headText",
|
|
3120
|
+
"versionValue": "_5JdLea_versionValue",
|
|
3121
|
+
"subscriptionDot": "_5JdLea_subscriptionDot",
|
|
3122
|
+
"subscriptionAccount": "_5JdLea_subscriptionAccount",
|
|
3123
|
+
"presetInline": "_5JdLea_presetInline",
|
|
3124
|
+
"channelEmpty": "_5JdLea_channelEmpty",
|
|
3125
|
+
"modelSummary": "_5JdLea_modelSummary",
|
|
3126
|
+
"sectionToggleHint": "_5JdLea_sectionToggleHint",
|
|
3125
3127
|
"chevron": "_5JdLea_chevron",
|
|
3126
|
-
"
|
|
3128
|
+
"modelFetchRow": "_5JdLea_modelFetchRow",
|
|
3129
|
+
"channelSection": "_5JdLea_channelSection",
|
|
3130
|
+
"editorDivider": "_5JdLea_editorDivider",
|
|
3131
|
+
"overview": "_5JdLea_overview",
|
|
3127
3132
|
"pickerSearch": "_5JdLea_pickerSearch",
|
|
3133
|
+
"select": "_5JdLea_select",
|
|
3134
|
+
"channelControls": "_5JdLea_channelControls",
|
|
3128
3135
|
"description": "_5JdLea_description",
|
|
3129
|
-
"
|
|
3130
|
-
"
|
|
3131
|
-
"versionValue": "_5JdLea_versionValue",
|
|
3132
|
-
"pending": "_5JdLea_pending",
|
|
3133
|
-
"modelRow": "_5JdLea_modelRow",
|
|
3134
|
-
"head": "_5JdLea_head",
|
|
3135
|
-
"summaryCard": "_5JdLea_summaryCard",
|
|
3136
|
-
"card": "_5JdLea_card",
|
|
3137
|
-
"sectionTitle": "_5JdLea_sectionTitle",
|
|
3138
|
-
"subscriptionBox": "_5JdLea_subscriptionBox",
|
|
3139
|
-
"readOnly": "_5JdLea_readOnly",
|
|
3140
|
-
"defaultModelRow": "_5JdLea_defaultModelRow",
|
|
3141
|
-
"summaryLabel": "_5JdLea_summaryLabel",
|
|
3142
|
-
"overview": "_5JdLea_overview",
|
|
3143
|
-
"presetAction": "_5JdLea_presetAction",
|
|
3144
|
-
"channelAddRow": "_5JdLea_channelAddRow",
|
|
3145
|
-
"textareaInvalid": "_5JdLea_textareaInvalid",
|
|
3146
|
-
"invalid": "_5JdLea_invalid",
|
|
3136
|
+
"field": "_5JdLea_field",
|
|
3137
|
+
"channelDanger": "_5JdLea_channelDanger",
|
|
3147
3138
|
"sectionHint": "_5JdLea_sectionHint",
|
|
3148
|
-
"
|
|
3149
|
-
"
|
|
3150
|
-
"
|
|
3151
|
-
"
|
|
3139
|
+
"modelCandidateLabel": "_5JdLea_modelCandidateLabel",
|
|
3140
|
+
"deleteConfirmText": "_5JdLea_deleteConfirmText",
|
|
3141
|
+
"editorHeader": "_5JdLea_editorHeader",
|
|
3142
|
+
"presetInlineHeader": "_5JdLea_presetInlineHeader",
|
|
3143
|
+
"pickerTitle": "_5JdLea_pickerTitle",
|
|
3152
3144
|
"sectionChevron": "_5JdLea_sectionChevron",
|
|
3153
|
-
"
|
|
3154
|
-
"
|
|
3155
|
-
"
|
|
3156
|
-
"
|
|
3145
|
+
"modelCandidate": "_5JdLea_modelCandidate",
|
|
3146
|
+
"detectOk": "_5JdLea_detectOk",
|
|
3147
|
+
"channelAction": "_5JdLea_channelAction",
|
|
3148
|
+
"defaultModelRow": "_5JdLea_defaultModelRow",
|
|
3149
|
+
"spacer": "_5JdLea_spacer",
|
|
3150
|
+
"editorField": "_5JdLea_editorField",
|
|
3151
|
+
"modelRow": "_5JdLea_modelRow",
|
|
3152
|
+
"pickerTabs": "_5JdLea_pickerTabs",
|
|
3153
|
+
"subscriptionManual": "_5JdLea_subscriptionManual",
|
|
3154
|
+
"overviewHead": "_5JdLea_overviewHead",
|
|
3155
|
+
"channelMeta": "_5JdLea_channelMeta",
|
|
3156
|
+
"fieldHint": "_5JdLea_fieldHint",
|
|
3157
|
+
"card": "_5JdLea_card",
|
|
3158
|
+
"modelRowRemove": "_5JdLea_modelRowRemove"
|
|
3157
3159
|
};
|
|
3158
3160
|
//#endregion
|
|
3159
3161
|
//#region src/client/SettingsCard.tsx
|
|
@@ -4605,16 +4607,16 @@ window.__ModuleLoader__.load({
|
|
|
4605
4607
|
document.head.appendChild(tag);
|
|
4606
4608
|
}
|
|
4607
4609
|
var image_toolview_module_css_default = {
|
|
4608
|
-
"
|
|
4610
|
+
"imageLink": "UtJPoq_imageLink",
|
|
4611
|
+
"status": "UtJPoq_status",
|
|
4609
4612
|
"message": "UtJPoq_message",
|
|
4613
|
+
"error": "UtJPoq_error",
|
|
4610
4614
|
"images": "UtJPoq_images",
|
|
4611
|
-
"imageLink": "UtJPoq_imageLink",
|
|
4612
4615
|
"icon": "UtJPoq_icon",
|
|
4613
|
-
"image": "UtJPoq_image",
|
|
4614
4616
|
"loading": "UtJPoq_loading",
|
|
4615
|
-
"
|
|
4616
|
-
"
|
|
4617
|
-
"
|
|
4617
|
+
"root": "UtJPoq_root",
|
|
4618
|
+
"image": "UtJPoq_image",
|
|
4619
|
+
"header": "UtJPoq_header"
|
|
4618
4620
|
};
|
|
4619
4621
|
//#endregion
|
|
4620
4622
|
//#region src/client/image-toolview.tsx
|