dsh-my-go 0.1.7 → 0.1.9
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/dist/client.core.js +6 -7
- package/dist/client.js +6 -7
- package/lib/index.js +15 -6
- package/package.json +1 -1
- package/src/client.js +7 -8
package/dist/client.core.js
CHANGED
|
@@ -228,14 +228,9 @@ function apply(ctx) {
|
|
|
228
228
|
const labelStyle = { fontSize: 12, color: "var(--text-secondary, #888)", marginBottom: 2 };
|
|
229
229
|
const cardStyle = { border: "1px solid var(--separator, #333)", borderRadius: 8, padding: 12, marginBottom: 12 };
|
|
230
230
|
const rowStyle = { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 };
|
|
231
|
-
const FALLBACK_PROVIDERS = ["octopus", "deepseek", "deepseek-chat"];
|
|
232
|
-
const FALLBACK_MODELS = ["mimo-v2.5", "deepseek-v4-flash", "deepseek-v4-pro", "deepseek-v3", "deepseek-v3-chat", "deepseek-reasoner"];
|
|
233
231
|
const EFFORTS = ["", "low", "high", "max"];
|
|
234
|
-
const providers = available.providers
|
|
235
|
-
const
|
|
236
|
-
for (const m of Object.values(available.models)) for (const id of m) modelSet.add(id);
|
|
237
|
-
if (modelSet.size === 0) for (const m of FALLBACK_MODELS) modelSet.add(m);
|
|
238
|
-
const allModels = [...modelSet];
|
|
232
|
+
const providers = available.providers;
|
|
233
|
+
const allModels = [...new Set(Object.values(available.models).flat())];
|
|
239
234
|
const providerLabel = (v) => v === "" ? "\u8DDF\u968F Sisyphus" : v;
|
|
240
235
|
const modelLabel = (v) => v === "" ? "\u8DDF\u968F Sisyphus" : v;
|
|
241
236
|
const effortLabel = (v) => v === "" ? "\u8DDF\u968F\u6A21\u578B\u9ED8\u8BA4" : v;
|
|
@@ -246,11 +241,15 @@ function apply(ctx) {
|
|
|
246
241
|
(opt) => React.createElement("option", { key: opt, value: opt }, labelFn(opt))
|
|
247
242
|
)
|
|
248
243
|
);
|
|
244
|
+
const fetchFailed = available.providers.length === 0;
|
|
249
245
|
return React.createElement(
|
|
250
246
|
"div",
|
|
251
247
|
{ style: { padding: 16, maxWidth: 600 } },
|
|
252
248
|
React.createElement("h2", { style: { margin: "0 0 4px" } }, "MyGO \u7F16\u6392\u914D\u7F6E"),
|
|
253
249
|
React.createElement("p", { style: { margin: "0 0 16px", fontSize: 13, color: "var(--text-secondary, #888)" } }, "\u6BCF\u4E2A\u5B50\u667A\u80FD\u4F53\u7684\u6A21\u578B / Provider / \u601D\u8003\u7A0B\u5EA6 / DSV4P0813 \u8865\u4E01\u5F00\u5173\u3002\u4FEE\u6539\u540E\u70B9\u4FDD\u5B58\uFF0C\u4E0B\u6B21\u6D3E\u53D1\u751F\u6548\u3002"),
|
|
250
|
+
fetchFailed ? React.createElement("div", {
|
|
251
|
+
style: { padding: 12, marginBottom: 16, borderRadius: 6, background: "rgba(244,67,54,0.1)", border: "1px solid rgba(244,67,54,0.3)", fontSize: 13 }
|
|
252
|
+
}, "\u26A0 \u65E0\u6CD5\u4ECE DSH \u83B7\u53D6 Provider/Model \u5217\u8868\u3002\u8BF7\u786E\u8BA4\uFF1A1) \u5DF2\u91CD\u542F dsh web\uFF1B2) LLM \u63D2\u4EF6\u5DF2\u914D\u7F6E\u5E76\u6FC0\u6D3B\u3002\u4E0B\u62C9\u6846\u4ECD\u53EF\u624B\u52A8\u8F93\u5165\u81EA\u5B9A\u4E49\u503C\u3002") : null,
|
|
254
253
|
...AGENT_TYPES.map((type) => {
|
|
255
254
|
const cfg = draft?.[type] || {};
|
|
256
255
|
return React.createElement(
|
package/dist/client.js
CHANGED
|
@@ -233,14 +233,9 @@ function apply(ctx) {
|
|
|
233
233
|
const labelStyle = { fontSize: 12, color: "var(--text-secondary, #888)", marginBottom: 2 };
|
|
234
234
|
const cardStyle = { border: "1px solid var(--separator, #333)", borderRadius: 8, padding: 12, marginBottom: 12 };
|
|
235
235
|
const rowStyle = { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 };
|
|
236
|
-
const FALLBACK_PROVIDERS = ["octopus", "deepseek", "deepseek-chat"];
|
|
237
|
-
const FALLBACK_MODELS = ["mimo-v2.5", "deepseek-v4-flash", "deepseek-v4-pro", "deepseek-v3", "deepseek-v3-chat", "deepseek-reasoner"];
|
|
238
236
|
const EFFORTS = ["", "low", "high", "max"];
|
|
239
|
-
const providers = available.providers
|
|
240
|
-
const
|
|
241
|
-
for (const m of Object.values(available.models)) for (const id of m) modelSet.add(id);
|
|
242
|
-
if (modelSet.size === 0) for (const m of FALLBACK_MODELS) modelSet.add(m);
|
|
243
|
-
const allModels = [...modelSet];
|
|
237
|
+
const providers = available.providers;
|
|
238
|
+
const allModels = [...new Set(Object.values(available.models).flat())];
|
|
244
239
|
const providerLabel = (v) => v === "" ? "\u8DDF\u968F Sisyphus" : v;
|
|
245
240
|
const modelLabel = (v) => v === "" ? "\u8DDF\u968F Sisyphus" : v;
|
|
246
241
|
const effortLabel = (v) => v === "" ? "\u8DDF\u968F\u6A21\u578B\u9ED8\u8BA4" : v;
|
|
@@ -251,11 +246,15 @@ function apply(ctx) {
|
|
|
251
246
|
(opt) => React.createElement("option", { key: opt, value: opt }, labelFn(opt))
|
|
252
247
|
)
|
|
253
248
|
);
|
|
249
|
+
const fetchFailed = available.providers.length === 0;
|
|
254
250
|
return React.createElement(
|
|
255
251
|
"div",
|
|
256
252
|
{ style: { padding: 16, maxWidth: 600 } },
|
|
257
253
|
React.createElement("h2", { style: { margin: "0 0 4px" } }, "MyGO \u7F16\u6392\u914D\u7F6E"),
|
|
258
254
|
React.createElement("p", { style: { margin: "0 0 16px", fontSize: 13, color: "var(--text-secondary, #888)" } }, "\u6BCF\u4E2A\u5B50\u667A\u80FD\u4F53\u7684\u6A21\u578B / Provider / \u601D\u8003\u7A0B\u5EA6 / DSV4P0813 \u8865\u4E01\u5F00\u5173\u3002\u4FEE\u6539\u540E\u70B9\u4FDD\u5B58\uFF0C\u4E0B\u6B21\u6D3E\u53D1\u751F\u6548\u3002"),
|
|
255
|
+
fetchFailed ? React.createElement("div", {
|
|
256
|
+
style: { padding: 12, marginBottom: 16, borderRadius: 6, background: "rgba(244,67,54,0.1)", border: "1px solid rgba(244,67,54,0.3)", fontSize: 13 }
|
|
257
|
+
}, "\u26A0 \u65E0\u6CD5\u4ECE DSH \u83B7\u53D6 Provider/Model \u5217\u8868\u3002\u8BF7\u786E\u8BA4\uFF1A1) \u5DF2\u91CD\u542F dsh web\uFF1B2) LLM \u63D2\u4EF6\u5DF2\u914D\u7F6E\u5E76\u6FC0\u6D3B\u3002\u4E0B\u62C9\u6846\u4ECD\u53EF\u624B\u52A8\u8F93\u5165\u81EA\u5B9A\u4E49\u503C\u3002") : null,
|
|
259
258
|
...AGENT_TYPES.map((type) => {
|
|
260
259
|
const cfg = draft?.[type] || {};
|
|
261
260
|
return React.createElement(
|
package/lib/index.js
CHANGED
|
@@ -349,15 +349,24 @@ export async function apply(ctx, config = {}) {
|
|
|
349
349
|
disposers.push(harness.handle('dsh-my-go/listModels', async () => {
|
|
350
350
|
const llm = ctx.get('llm')
|
|
351
351
|
if (!llm) return { providers: [], models: {} }
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
352
|
+
let providers = []
|
|
353
|
+
try {
|
|
354
|
+
const all = llm.listConfigurableProviders()
|
|
355
|
+
providers = all.map((p) => p.provider)
|
|
356
|
+
} catch {
|
|
357
|
+
try {
|
|
358
|
+
const active = await llm.listProviders()
|
|
359
|
+
providers = active.map((p) => p.id)
|
|
360
|
+
} catch { /* llm not available */ }
|
|
361
|
+
}
|
|
362
|
+
const models = {}
|
|
363
|
+
for (const pid of providers) {
|
|
355
364
|
try {
|
|
356
|
-
const
|
|
357
|
-
|
|
365
|
+
const list = await llm.listModels(pid)
|
|
366
|
+
models[pid] = list.map((m) => m.id)
|
|
358
367
|
} catch { /* provider may not support listing */ }
|
|
359
368
|
}
|
|
360
|
-
return
|
|
369
|
+
return { providers, models }
|
|
361
370
|
}))
|
|
362
371
|
}
|
|
363
372
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-my-go",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "DSH plugin: Sisyphus agent orchestration — star topology, single-line blocking, 7 specialist sub-agents (Hermes/Explore/Librarian/Looker/Hephaestus/Prometheus/Oracle) with per-type model binding, go_work/continue/need_help/forward communication tools, Web UI tree panel and settings.",
|
|
5
5
|
"author": "daizihan233",
|
|
6
6
|
"license": "MIT",
|
package/src/client.js
CHANGED
|
@@ -213,15 +213,9 @@ export function apply(ctx) {
|
|
|
213
213
|
const cardStyle = { border: '1px solid var(--separator, #333)', borderRadius: 8, padding: 12, marginBottom: 12 }
|
|
214
214
|
const rowStyle = { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8, marginBottom: 8 }
|
|
215
215
|
|
|
216
|
-
const FALLBACK_PROVIDERS = ['octopus', 'deepseek', 'deepseek-chat']
|
|
217
|
-
const FALLBACK_MODELS = ['mimo-v2.5', 'deepseek-v4-flash', 'deepseek-v4-pro', 'deepseek-v3', 'deepseek-v3-chat', 'deepseek-reasoner']
|
|
218
216
|
const EFFORTS = ['', 'low', 'high', 'max']
|
|
219
|
-
|
|
220
|
-
const
|
|
221
|
-
const modelSet = new Set()
|
|
222
|
-
for (const m of Object.values(available.models)) for (const id of m) modelSet.add(id)
|
|
223
|
-
if (modelSet.size === 0) for (const m of FALLBACK_MODELS) modelSet.add(m)
|
|
224
|
-
const allModels = [...modelSet]
|
|
217
|
+
const providers = available.providers
|
|
218
|
+
const allModels = [...new Set(Object.values(available.models).flat())]
|
|
225
219
|
|
|
226
220
|
const providerLabel = (v) => v === '' ? '跟随 Sisyphus' : v
|
|
227
221
|
const modelLabel = (v) => v === '' ? '跟随 Sisyphus' : v
|
|
@@ -234,9 +228,14 @@ export function apply(ctx) {
|
|
|
234
228
|
)
|
|
235
229
|
)
|
|
236
230
|
|
|
231
|
+
const fetchFailed = available.providers.length === 0
|
|
232
|
+
|
|
237
233
|
return React.createElement('div', { style: { padding: 16, maxWidth: 600 } },
|
|
238
234
|
React.createElement('h2', { style: { margin: '0 0 4px' } }, 'MyGO 编排配置'),
|
|
239
235
|
React.createElement('p', { style: { margin: '0 0 16px', fontSize: 13, color: 'var(--text-secondary, #888)' } }, '每个子智能体的模型 / Provider / 思考程度 / DSV4P0813 补丁开关。修改后点保存,下次派发生效。'),
|
|
236
|
+
fetchFailed ? React.createElement('div', {
|
|
237
|
+
style: { padding: 12, marginBottom: 16, borderRadius: 6, background: 'rgba(244,67,54,0.1)', border: '1px solid rgba(244,67,54,0.3)', fontSize: 13 },
|
|
238
|
+
}, '⚠ 无法从 DSH 获取 Provider/Model 列表。请确认:1) 已重启 dsh web;2) LLM 插件已配置并激活。下拉框仍可手动输入自定义值。') : null,
|
|
240
239
|
...AGENT_TYPES.map((type) => {
|
|
241
240
|
const cfg = draft?.[type] || {}
|
|
242
241
|
return React.createElement('div', { key: type, style: cardStyle },
|