dsh-tool-vision 0.3.1 → 0.3.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.
Files changed (2) hide show
  1. package/index.js +8 -4
  2. package/package.json +56 -56
package/index.js CHANGED
@@ -351,12 +351,16 @@ function apply(ctx, config) {
351
351
  // ── settings-backed configuration ─────────────────────────────────────────
352
352
  // The composition entry stays the `base` layer; a registered `tool-vision`
353
353
  // settings section (Web UI section, settings.yaml) overlays it live, so
354
- // edits hot-apply without a restart. `current` is read at use time.
354
+ // edits hot-apply without a restart. `installSettingsSection` hands
355
+ // `setSource` a GETTER (`() => scope.get()`), not the config object — keep
356
+ // it and call it at use time, or `getConfig()` would return a function and
357
+ // every `cfg.*` read would be undefined (apiKey included).
355
358
  let current = config;
356
- const getConfig = () => current;
359
+ let sourceGetter = null;
360
+ const getConfig = () => (sourceGetter ? sourceGetter() : current);
357
361
  installSettingsSection(ctx, NS, Config, config, {
358
- setSource: (source) => {
359
- current = source;
362
+ setSource: (getter) => {
363
+ sourceGetter = getter;
360
364
  },
361
365
  onChange: () => {},
362
366
  });
package/package.json CHANGED
@@ -1,56 +1,56 @@
1
- {
2
- "name": "dsh-tool-vision",
3
- "version": "0.3.1",
4
- "description": "DeepSeek Harness 外置视觉模型插件:inspect_image 把本地图片或 http(s) 图片 URL 发给任意 OpenAI 兼容端点,视觉模型看图的文字回答直接带回对话;附 Web UI 设置栏。",
5
- "type": "module",
6
- "main": "index.js",
7
- "exports": {
8
- ".": "./index.js",
9
- "./client": "./client.js",
10
- "./package.json": "./package.json"
11
- },
12
- "dsh": {
13
- "client": {
14
- "platform": "web"
15
- }
16
- },
17
- "files": [
18
- "index.js",
19
- "client.js",
20
- "README.md",
21
- "README.zh.md",
22
- "LICENSE"
23
- ],
24
- "homepage": "https://github.com/Scorp1o117/dsh-tool-vision",
25
- "keywords": [
26
- "dsh",
27
- "dsh-plugin",
28
- "deepseek-harness",
29
- "vision",
30
- "multimodal",
31
- "image",
32
- "openai-compatible",
33
- "qwen-vl",
34
- "glm-4v",
35
- "ollama"
36
- ],
37
- "license": "MIT",
38
- "engines": {
39
- "node": ">=20.18"
40
- },
41
- "repository": {
42
- "type": "git",
43
- "url": "git+https://github.com/Scorp1o117/dsh-tool-vision.git"
44
- },
45
- "bugs": {
46
- "url": "https://github.com/Scorp1o117/dsh-tool-vision/issues"
47
- },
48
- "dependencies": {
49
- "@deepseek-ai/dsh-settings": "^0.1.0-rc.6",
50
- "@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
51
- "@deepseek-ai/schemastery": "^3.18.1"
52
- },
53
- "peerDependencies": {
54
- "react": "^18.2.0"
55
- }
56
- }
1
+ {
2
+ "name": "dsh-tool-vision",
3
+ "version": "0.3.2",
4
+ "description": "DeepSeek Harness 外置视觉模型插件:inspect_image 把本地图片或 http(s) 图片 URL 发给任意 OpenAI 兼容端点,视觉模型看图的文字回答直接带回对话;附 Web UI 设置栏。",
5
+ "type": "module",
6
+ "main": "index.js",
7
+ "exports": {
8
+ ".": "./index.js",
9
+ "./client": "./client.js",
10
+ "./package.json": "./package.json"
11
+ },
12
+ "dsh": {
13
+ "client": {
14
+ "platform": "web"
15
+ }
16
+ },
17
+ "files": [
18
+ "index.js",
19
+ "client.js",
20
+ "README.md",
21
+ "README.zh.md",
22
+ "LICENSE"
23
+ ],
24
+ "homepage": "https://github.com/Scorp1o117/dsh-tool-vision",
25
+ "keywords": [
26
+ "dsh",
27
+ "dsh-plugin",
28
+ "deepseek-harness",
29
+ "vision",
30
+ "multimodal",
31
+ "image",
32
+ "openai-compatible",
33
+ "qwen-vl",
34
+ "glm-4v",
35
+ "ollama"
36
+ ],
37
+ "license": "MIT",
38
+ "engines": {
39
+ "node": "\u003e=20.18"
40
+ },
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "git+https://github.com/Scorp1o117/dsh-tool-vision.git"
44
+ },
45
+ "bugs": {
46
+ "url": "https://github.com/Scorp1o117/dsh-tool-vision/issues"
47
+ },
48
+ "dependencies": {
49
+ "@deepseek-ai/dsh-settings": "^0.1.0-rc.6",
50
+ "@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
51
+ "@deepseek-ai/schemastery": "^3.18.1"
52
+ },
53
+ "peerDependencies": {
54
+ "react": "^18.2.0"
55
+ }
56
+ }