@midscene/shared 1.3.1 → 1.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.
@@ -18,7 +18,7 @@ class ModelConfigManager {
18
18
  configMap = this.normalizeModelConfig(this.modelConfig);
19
19
  } else configMap = this.globalConfigManager?.getAllEnvConfig() || {};
20
20
  const defaultConfig = decideModelConfigFromIntentConfig('default', configMap);
21
- if (!defaultConfig) throw new Error('default model config is not found, which should not happen');
21
+ if (!defaultConfig) throw new Error('Model configuration is incomplete: model name (MIDSCENE_MODEL_NAME) is required. See https://midscenejs.com/model-strategy.html');
22
22
  const insightConfig = decideModelConfigFromIntentConfig('insight', configMap);
23
23
  const planningConfig = decideModelConfigFromIntentConfig('planning', configMap);
24
24
  this.modelConfigMap = {
@@ -46,7 +46,7 @@ class ModelConfigManager {
46
46
  configMap = this.normalizeModelConfig(this.modelConfig);
47
47
  } else configMap = this.globalConfigManager?.getAllEnvConfig() || {};
48
48
  const defaultConfig = (0, external_parse_model_config_js_namespaceObject.decideModelConfigFromIntentConfig)('default', configMap);
49
- if (!defaultConfig) throw new Error('default model config is not found, which should not happen');
49
+ if (!defaultConfig) throw new Error('Model configuration is incomplete: model name (MIDSCENE_MODEL_NAME) is required. See https://midscenejs.com/model-strategy.html');
50
50
  const insightConfig = (0, external_parse_model_config_js_namespaceObject.decideModelConfigFromIntentConfig)('insight', configMap);
51
51
  const planningConfig = (0, external_parse_model_config_js_namespaceObject.decideModelConfigFromIntentConfig)('planning', configMap);
52
52
  this.modelConfigMap = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midscene/shared",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "repository": "https://github.com/web-infra-dev/midscene",
5
5
  "homepage": "https://midscenejs.com/",
6
6
  "types": "./dist/types/index.d.ts",
@@ -49,7 +49,7 @@ export class ModelConfigManager {
49
49
  );
50
50
  if (!defaultConfig) {
51
51
  throw new Error(
52
- 'default model config is not found, which should not happen',
52
+ 'Model configuration is incomplete: model name (MIDSCENE_MODEL_NAME) is required. See https://midscenejs.com/model-strategy.html',
53
53
  );
54
54
  }
55
55