@cloud411716/fancy-webnovel 4.30.27 → 4.30.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud411716/fancy-webnovel",
3
- "version": "4.30.27",
3
+ "version": "4.30.28",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -2065,8 +2065,8 @@ function teamText(root, config) {
2065
2065
  '',
2066
2066
  '设置示例:',
2067
2067
  ' /fancy-material team set a opencode-go glm-5.3',
2068
- ' /fancy-material team set b opencode-go kimi-k3',
2069
- ' /fancy-material team set judge opencode-go deepseek-v4.1-flash',
2068
+ ' /fancy-material team set b opencode-go hy4-flash off',
2069
+ ' /fancy-material team set judge opencode-go mimo-v2.6-flash low',
2070
2070
  ' /fancy-material team set rounds 5',
2071
2071
  ' /fancy-material team on',
2072
2072
  ].join('\n');
@@ -2115,14 +2115,18 @@ async function handleTeamCommand(ctx, session, tokens) {
2115
2115
  const key = String(tokens[1] || '').toLowerCase();
2116
2116
  const value = tokens.slice(2);
2117
2117
  if (!key) {
2118
- return notify(session, 'error', '用法:/fancy-material team set a|b|judge <provider> <model> | rounds <n> | max-calls <n> | mode <cross|oneway> | judge-on-max <true|false>');
2118
+ return notify(session, 'error', '用法:/fancy-material team set a|b|judge <provider> <model> [thinking] | rounds <n> | max-calls <n> | mode <cross|oneway> | judge-on-max <true|false>');
2119
2119
  }
2120
2120
  if (key === 'a' || key === 'b' || key === 'judge') {
2121
2121
  if (value.length < 2) {
2122
- return notify(session, 'error', `用法:/fancy-material team set ${key} <provider> <model>`);
2122
+ return notify(session, 'error', `用法:/fancy-material team set ${key} <provider> <model> [off|minimal|low|medium|high|xhigh|max]`);
2123
2123
  }
2124
2124
  const provider = value[0];
2125
2125
  const model = value[1];
2126
+ const reasoningEffort = String(value[2] || '').trim().toLowerCase();
2127
+ if (reasoningEffort && !['off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max'].includes(reasoningEffort)) {
2128
+ return notify(session, 'error', 'thinking 等级只能是 off / minimal / low / medium / high / xhigh / max。');
2129
+ }
2126
2130
  let models;
2127
2131
  try {
2128
2132
  models = await listTeamModels(ctx, provider);
@@ -2138,9 +2142,10 @@ async function handleTeamCommand(ctx, session, tokens) {
2138
2142
  if (clash) {
2139
2143
  return notify(session, 'error', `❌ ${provider}/${model} 已被 ${clash} 使用。A、B、裁判必须使用不同模型。`);
2140
2144
  }
2141
- config[field] = { provider, model };
2145
+ config[field] = { provider, model, ...(reasoningEffort ? { reasoningEffort } : {}) };
2142
2146
  writeTeamConfig(root, config);
2143
- return notify(session, 'success', `✅ ${field} 已设为 ${provider}/${model}。`
2147
+ return notify(session, 'success', `✅ ${field} 已设为 ${provider}/${model}`
2148
+ + (reasoningEffort ? `(thinking: ${reasoningEffort})` : '(thinking: 模型默认)') + '。'
2144
2149
  + (catalogMiss ? '\n⚠️ 该模型不在当前 provider 目录里,生成时以实际 API 为准。' : ''));
2145
2150
  }
2146
2151
  if (key === 'rounds') {
@@ -70,11 +70,13 @@ function normalizeRoute(value) {
70
70
  const provider = String(value.provider || '').trim();
71
71
  const model = String(value.model || '').trim();
72
72
  if (!provider || !model) return null;
73
- return { provider, model };
73
+ const reasoningEffort = String(value.reasoningEffort || '').trim();
74
+ return { provider, model, ...(reasoningEffort ? { reasoningEffort } : {}) };
74
75
  }
75
76
 
76
77
  export function teamRouteText(route) {
77
- return route ? `${route.provider}/${route.model}` : '(未设置)';
78
+ if (!route) return '(未设置)';
79
+ return `${route.provider}/${route.model}${route.reasoningEffort ? '(thinking: ' + route.reasoningEffort + ')' : ''}`;
78
80
  }
79
81
 
80
82
  export function teamConfigProblem(config) {
@@ -389,7 +391,11 @@ async function callSubagent({ ctx, subagents, parent, prompt, route, label, sche
389
391
  parent,
390
392
  signal,
391
393
  delivery: 'caller',
392
- agentOptions: { provider: route.provider, model: route.model },
394
+ agentOptions: {
395
+ provider: route.provider,
396
+ model: route.model,
397
+ ...(route.reasoningEffort ? { reasoningEffort: route.reasoningEffort } : {}),
398
+ },
393
399
  ...(schema ? { outputSchema: schema } : {}),
394
400
  });
395
401
  } catch (err) {
@@ -25,7 +25,7 @@ export function helpText() {
25
25
  /fancy-material continue 沿用上次的世界母体、facet、风格和范围,继续追加素材
26
26
  /fancy-material team show 查看双生成 + 交叉审查 + 裁判的配置
27
27
  /fancy-material team models [provider] 查看当前可用模型(默认 opencode-go)
28
- /fancy-material team set a|b|judge <provider> <model> 设置生成者/裁判模型(三者必须不同)
28
+ /fancy-material team set a|b|judge <provider> <model> [thinking] 设置模型和 thinking 等级(三者必须不同)
29
29
  /fancy-material team set rounds <1-10> 设置最多交叉审查轮次(默认 5)
30
30
  /fancy-material team set max-calls <6-40> 设置整个 workflow 最多 agent 调用
31
31
  /fancy-material team on|off 开/关 Team 模式