dsh-gpt-image-playground 0.2.5 → 0.2.7

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 CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  把 [CookSleep/gpt_image_playground](https://github.com/CookSleep/gpt_image_playground) 的**原版工作台**装进 [DeepSeek Harness](https://github.com/deepseek-ai)(DSH):左栏多一个「生图工作台」,点开就是完整的画廊 / Agent 双模式、参考图与遮罩编辑、多供应商、收藏夹、历史管理。
8
8
 
9
- 界面与功能来自上游官方构建(v0.8.4,原样 vendor),插件自己只负责**同源托管**和**可选的 API 代理**。
9
+ 界面与功能来自上游官方构建(v0.8.9,原样 vendor),插件自己只负责**同源托管**和**可选的 API 代理**。
10
10
 
11
11
  ![工作台](docs/screenshot-gallery.png)
12
12
 
@@ -10,7 +10,7 @@ publishing or shipping it.
10
10
  - Source: https://github.com/CookSleep/gpt_image_playground
11
11
  - Build redistributed: `vendor-app/` — the official production build published
12
12
  at https://cooksleep.github.io/gpt_image_playground/ (application version
13
- **v0.8.4**, per the build's own service-worker cache tag)
13
+ **v0.8.9**, per the build's own service-worker cache tag)
14
14
  - License: MIT
15
15
 
16
16
  Changes made to the redistributed build:
@@ -29,6 +29,10 @@ Changes made to the redistributed build:
29
29
  anchor loses `href`/`target`/`rel`)
30
30
  - the settings "关于" tab
31
31
  - the settings header's upstream version, replaced with this plugin's version
32
+ 4. One element is **added** rather than removed: a red hint next to
33
+ 设置 → API 配置 → 当前配置 ("建议使用 ToolifyAi API 高效稳定") that links to
34
+ https://api.toolify-ai.com. It is injected by `lib/client.js` and is not part
35
+ of the upstream build.
32
36
 
33
37
  No other files of the build were edited.
34
38
 
package/lib/client.js CHANGED
@@ -53,6 +53,12 @@ window.__ModuleLoader__.load({
53
53
  const TRIM_STYLE_ID = 'dsh-gipg-trim'
54
54
  const ABOUT_LABEL = '关于'
55
55
 
56
+ /** Provider hint appended to the "当前配置" row of 设置 → API 配置. */
57
+ const CURRENT_PROFILE_LABEL = '当前配置'
58
+ const TIP_ATTR = 'data-dsh-gipg-tip'
59
+ const TIP_TEXT = '建议使用 ToolifyAi API 高效稳定'
60
+ const TIP_URL = 'https://api.toolify-ai.com'
61
+
56
62
  /** What the settings header shows: the plugin's own version, nothing else. */
57
63
  function versionLabel(pluginVersion) {
58
64
  return pluginVersion ? `v${pluginVersion}` : undefined
@@ -93,6 +99,38 @@ window.__ModuleLoader__.load({
93
99
  anchor.removeAttribute('rel')
94
100
  anchor.setAttribute('data-dsh-gipg-nolink', '1')
95
101
  }
102
+ // A provider recommendation next to the "当前配置" label in
103
+ // 设置 → API 配置. Injected here so the vendored build stays pristine;
104
+ // re-added on every render because React owns that row.
105
+ for (const span of doc.querySelectorAll('span')) {
106
+ if ((span.textContent || '').trim() !== CURRENT_PROFILE_LABEL) continue
107
+ const row = span.parentElement
108
+ if (!row || row.querySelector(`[${TIP_ATTR}]`)) continue
109
+ const tip = doc.createElement('a')
110
+ tip.setAttribute(TIP_ATTR, '1')
111
+ tip.href = TIP_URL
112
+ tip.target = '_blank'
113
+ tip.rel = 'noopener noreferrer'
114
+ tip.textContent = TIP_TEXT
115
+ tip.title = TIP_URL
116
+ tip.style.cssText = [
117
+ 'margin-left:4px',
118
+ 'font-size:11px',
119
+ 'line-height:1.35',
120
+ 'color:#ef4444',
121
+ 'text-decoration:none',
122
+ 'cursor:pointer',
123
+ 'flex:none',
124
+ ].join(';')
125
+ tip.addEventListener('mouseenter', () => {
126
+ tip.style.textDecoration = 'underline'
127
+ })
128
+ tip.addEventListener('mouseleave', () => {
129
+ tip.style.textDecoration = 'none'
130
+ })
131
+ row.appendChild(tip)
132
+ break
133
+ }
96
134
  if (!label) return
97
135
  for (const span of doc.querySelectorAll('span')) {
98
136
  const text = (span.textContent || '').trim()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-gpt-image-playground",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "GPT Image Playground as a DeepSeek Harness plugin: the upstream image generation and editing workbench, vendored, served same-origin, with an optional API proxy.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "upstream": {
33
33
  "name": "gpt-image-playground",
34
- "version": "0.8.4",
34
+ "version": "0.8.9",
35
35
  "repository": "https://github.com/CookSleep/gpt_image_playground",
36
36
  "build": "vendor-app"
37
37
  }