dsh-my-go 0.1.7 → 0.1.8
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 +5 -7
- package/dist/client.js +5 -7
- package/lib/index.js +15 -6
- package/package.json +1 -1
- package/src/client.js +6 -8
package/dist/client.core.js
CHANGED
|
@@ -228,14 +228,8 @@ 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
|
|
235
|
-
const modelSet = /* @__PURE__ */ new Set();
|
|
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 allModels = [...new Set(Object.values(available.models).flat())];
|
|
239
233
|
const providerLabel = (v) => v === "" ? "\u8DDF\u968F Sisyphus" : v;
|
|
240
234
|
const modelLabel = (v) => v === "" ? "\u8DDF\u968F Sisyphus" : v;
|
|
241
235
|
const effortLabel = (v) => v === "" ? "\u8DDF\u968F\u6A21\u578B\u9ED8\u8BA4" : v;
|
|
@@ -246,11 +240,15 @@ function apply(ctx) {
|
|
|
246
240
|
(opt) => React.createElement("option", { key: opt, value: opt }, labelFn(opt))
|
|
247
241
|
)
|
|
248
242
|
);
|
|
243
|
+
const fetchFailed = available.providers.length === 0;
|
|
249
244
|
return React.createElement(
|
|
250
245
|
"div",
|
|
251
246
|
{ style: { padding: 16, maxWidth: 600 } },
|
|
252
247
|
React.createElement("h2", { style: { margin: "0 0 4px" } }, "MyGO \u7F16\u6392\u914D\u7F6E"),
|
|
253
248
|
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"),
|
|
249
|
+
fetchFailed ? React.createElement("div", {
|
|
250
|
+
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 }
|
|
251
|
+
}, "\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
252
|
...AGENT_TYPES.map((type) => {
|
|
255
253
|
const cfg = draft?.[type] || {};
|
|
256
254
|
return React.createElement(
|
package/dist/client.js
CHANGED
|
@@ -233,14 +233,8 @@ 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
|
|
240
|
-
const modelSet = /* @__PURE__ */ new Set();
|
|
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 allModels = [...new Set(Object.values(available.models).flat())];
|
|
244
238
|
const providerLabel = (v) => v === "" ? "\u8DDF\u968F Sisyphus" : v;
|
|
245
239
|
const modelLabel = (v) => v === "" ? "\u8DDF\u968F Sisyphus" : v;
|
|
246
240
|
const effortLabel = (v) => v === "" ? "\u8DDF\u968F\u6A21\u578B\u9ED8\u8BA4" : v;
|
|
@@ -251,11 +245,15 @@ function apply(ctx) {
|
|
|
251
245
|
(opt) => React.createElement("option", { key: opt, value: opt }, labelFn(opt))
|
|
252
246
|
)
|
|
253
247
|
);
|
|
248
|
+
const fetchFailed = available.providers.length === 0;
|
|
254
249
|
return React.createElement(
|
|
255
250
|
"div",
|
|
256
251
|
{ style: { padding: 16, maxWidth: 600 } },
|
|
257
252
|
React.createElement("h2", { style: { margin: "0 0 4px" } }, "MyGO \u7F16\u6392\u914D\u7F6E"),
|
|
258
253
|
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"),
|
|
254
|
+
fetchFailed ? React.createElement("div", {
|
|
255
|
+
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 }
|
|
256
|
+
}, "\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
257
|
...AGENT_TYPES.map((type) => {
|
|
260
258
|
const cfg = draft?.[type] || {};
|
|
261
259
|
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.8",
|
|
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,8 @@ 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 providers = available.providers.length > 0 ? available.providers : FALLBACK_PROVIDERS
|
|
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 allModels = [...new Set(Object.values(available.models).flat())]
|
|
225
218
|
|
|
226
219
|
const providerLabel = (v) => v === '' ? '跟随 Sisyphus' : v
|
|
227
220
|
const modelLabel = (v) => v === '' ? '跟随 Sisyphus' : v
|
|
@@ -234,9 +227,14 @@ export function apply(ctx) {
|
|
|
234
227
|
)
|
|
235
228
|
)
|
|
236
229
|
|
|
230
|
+
const fetchFailed = available.providers.length === 0
|
|
231
|
+
|
|
237
232
|
return React.createElement('div', { style: { padding: 16, maxWidth: 600 } },
|
|
238
233
|
React.createElement('h2', { style: { margin: '0 0 4px' } }, 'MyGO 编排配置'),
|
|
239
234
|
React.createElement('p', { style: { margin: '0 0 16px', fontSize: 13, color: 'var(--text-secondary, #888)' } }, '每个子智能体的模型 / Provider / 思考程度 / DSV4P0813 补丁开关。修改后点保存,下次派发生效。'),
|
|
235
|
+
fetchFailed ? React.createElement('div', {
|
|
236
|
+
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 },
|
|
237
|
+
}, '⚠ 无法从 DSH 获取 Provider/Model 列表。请确认:1) 已重启 dsh web;2) LLM 插件已配置并激活。下拉框仍可手动输入自定义值。') : null,
|
|
240
238
|
...AGENT_TYPES.map((type) => {
|
|
241
239
|
const cfg = draft?.[type] || {}
|
|
242
240
|
return React.createElement('div', { key: type, style: cardStyle },
|