dsh-tool-vision 0.10.5 → 0.10.6
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/index.js +5 -4
- package/package.json +10 -9
package/index.js
CHANGED
|
@@ -975,11 +975,12 @@ async function routeDirectDecision(provider, model, config, llm) {
|
|
|
975
975
|
/**
|
|
976
976
|
* Whether the session's current model may receive image blocks directly.
|
|
977
977
|
*
|
|
978
|
-
* {@link routeDirectDecision} keyed by the
|
|
978
|
+
* {@link routeDirectDecision} keyed by the step's fixed route when available,
|
|
979
|
+
* otherwise by the session's route on older hosts, with the answer
|
|
979
980
|
* recorded in {@link lastModelDecision} for the settings panel.
|
|
980
981
|
*/
|
|
981
|
-
async function currentModelAcceptsImage(agent, config, llm) {
|
|
982
|
-
const { provider, model } = currentRoute(agent);
|
|
982
|
+
async function currentModelAcceptsImage(agent, config, llm, modelSelection) {
|
|
983
|
+
const { provider, model } = modelSelection ?? currentRoute(agent);
|
|
983
984
|
const decision = await routeDirectDecision(provider, model, config, llm);
|
|
984
985
|
Object.assign(lastModelDecision, { provider, model, ...decision });
|
|
985
986
|
return decision.direct;
|
|
@@ -1038,7 +1039,7 @@ function attachPreStepBridge(ctx, getConfig, exportDir) {
|
|
|
1038
1039
|
const agent = payload?.agent;
|
|
1039
1040
|
if (!agent?.session) return decision;
|
|
1040
1041
|
try {
|
|
1041
|
-
const acceptsImage = await currentModelAcceptsImage(agent, getConfig(), ctx.get("llm"));
|
|
1042
|
+
const acceptsImage = await currentModelAcceptsImage(agent, getConfig(), ctx.get("llm"), payload.modelSelection);
|
|
1042
1043
|
warnAutoPromotion(ctx.logger);
|
|
1043
1044
|
if (!acceptsImage) {
|
|
1044
1045
|
let repaired = repairedBySession.get(agent.session.id);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-tool-vision",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.6",
|
|
4
4
|
"description": "DeepSeek Harness 外置视觉模型插件:inspect_image 把本地图片或 http(s) 图片 URL 发给任意 OpenAI 兼容端点,视觉模型看图的文字回答直接带回对话;附 Web UI 设置栏。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"platform": "web"
|
|
23
23
|
},
|
|
24
24
|
"compatibility": {
|
|
25
|
-
"dsh": ">=0.2.0-rc.2 <0.3.0 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5",
|
|
25
|
+
"dsh": ">=0.2.0-rc.2 <0.3.0 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1",
|
|
26
26
|
"dshReleases": {
|
|
27
27
|
"0.1.5-rc.2": "incompatible",
|
|
28
28
|
"0.1.5-rc.3": "incompatible",
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
"0.2.1-rc.2": "compatible",
|
|
38
38
|
"0.2.1-rc.3": "compatible",
|
|
39
39
|
"0.2.1-rc.4": "compatible",
|
|
40
|
-
"0.2.1-rc.5": "compatible"
|
|
40
|
+
"0.2.1-rc.5": "compatible",
|
|
41
|
+
"0.2.2-rc.1": "compatible"
|
|
41
42
|
},
|
|
42
43
|
"node": ">=20.18",
|
|
43
44
|
"profiles": [
|
|
@@ -73,7 +74,7 @@
|
|
|
73
74
|
"license": "MIT",
|
|
74
75
|
"engines": {
|
|
75
76
|
"node": ">=20.18",
|
|
76
|
-
"dsh": ">=0.2.0-rc.2 <0.3.0 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5"
|
|
77
|
+
"dsh": ">=0.2.0-rc.2 <0.3.0 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1"
|
|
77
78
|
},
|
|
78
79
|
"repository": {
|
|
79
80
|
"type": "git",
|
|
@@ -86,8 +87,8 @@
|
|
|
86
87
|
"@deepseek-ai/schemastery": "^3.18.4"
|
|
87
88
|
},
|
|
88
89
|
"peerDependencies": {
|
|
89
|
-
"@deepseek-ai/dsh-settings": ">=0.2.0-rc.2 <0.3.0 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5",
|
|
90
|
-
"@deepseek-ai/dsh-tools": ">=0.2.0-rc.2 <0.3.0 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5",
|
|
90
|
+
"@deepseek-ai/dsh-settings": ">=0.2.0-rc.2 <0.3.0 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1",
|
|
91
|
+
"@deepseek-ai/dsh-tools": ">=0.2.0-rc.2 <0.3.0 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1",
|
|
91
92
|
"react": "^18.2.0"
|
|
92
93
|
},
|
|
93
94
|
"optionalDependencies": {
|
|
@@ -96,9 +97,9 @@
|
|
|
96
97
|
"sharp": ">=0.35.3 <1"
|
|
97
98
|
},
|
|
98
99
|
"devDependencies": {
|
|
99
|
-
"@deepseek-ai/dsh": "0.2.
|
|
100
|
-
"@deepseek-ai/dsh-settings": "0.2.
|
|
101
|
-
"@deepseek-ai/dsh-tools": "0.2.
|
|
100
|
+
"@deepseek-ai/dsh": "0.2.2-rc.1",
|
|
101
|
+
"@deepseek-ai/dsh-settings": "0.2.2-rc.1",
|
|
102
|
+
"@deepseek-ai/dsh-tools": "0.2.2-rc.1",
|
|
102
103
|
"jsdom": "^30.0.1",
|
|
103
104
|
"react": "^18.3.1",
|
|
104
105
|
"react-dom": "^18.3.1"
|