Skip to content

Commit 0d82957

Browse files
authored
Merge pull request #205 from VisActor/release/2.0.5
[Auto release] release 2.0.5
2 parents 6d8f41a + 42b7b27 commit 0d82957

File tree

28 files changed

+1942
-35
lines changed

28 files changed

+1942
-35
lines changed

common/config/rush/pnpm-lock.yaml

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/config/rush/version-policies.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"definitionName": "lockStepVersion",
44
"policyName": "vmindMin",
5-
"version": "2.0.4",
5+
"version": "2.0.5",
66
"mainProject": "@visactor/vmind",
77
"nextBump": "patch"
88
}

packages/calculator/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@visactor/calculator",
3-
"version": "2.0.4",
3+
"version": "2.0.5",
44
"description": "SQL-like query executor with DSL",
55
"main": "lib",
66
"module": "es",

packages/chart-advisor/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@visactor/chart-advisor",
3-
"version": "2.0.4",
3+
"version": "2.0.5",
44
"description": "图表推荐模块",
55
"main": "lib",
66
"module": "es",

packages/vmind/CHANGELOG.json

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"name": "@visactor/vmind",
33
"entries": [
4+
{
5+
"version": "2.0.5",
6+
"tag": "@visactor/vmind_v2.0.5",
7+
"date": "Thu, 03 Apr 2025 08:50:08 GMT",
8+
"comments": {}
9+
},
410
{
511
"version": "2.0.4",
612
"tag": "@visactor/vmind_v2.0.4",

packages/vmind/CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Change Log - @visactor/vmind
22

3-
This log was last generated on Thu, 20 Mar 2025 02:17:19 GMT and should not be manually modified.
3+
This log was last generated on Thu, 03 Apr 2025 08:50:08 GMT and should not be manually modified.
4+
5+
## 2.0.5
6+
Thu, 03 Apr 2025 08:50:08 GMT
7+
8+
_Version update only_
49

510
## 2.0.4
611
Thu, 20 Mar 2025 02:17:19 GMT

packages/vmind/__tests__/browser/src/pages/Insight/DataInput.tsx

+17-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-console */
22
import React, { useState, useCallback, useEffect } from 'react';
33
import '../index.scss';
4-
import { Avatar, Input, Divider, Button, InputNumber, Select, Radio, Modal } from '@arco-design/web-react';
4+
import { Avatar, Input, Divider, Button, InputNumber, Select, Radio, Modal, Checkbox } from '@arco-design/web-react';
55
import VMind from '../../../../../src/index';
66
import { Model } from '../../../../../src/index';
77
import {
@@ -67,6 +67,7 @@ export function DataInput(props: IPropsType) {
6767
const [visible, setVisible] = React.useState(false);
6868
const [url, setUrl] = React.useState(ModelConfigMap[model]?.url ?? OPENAI_API_URL);
6969
const [apiKey, setApiKey] = React.useState(ModelConfigMap[model]?.key);
70+
const [enableAnnotation, setEnableAnnotation] = React.useState(false);
7071

7172
const [loading, setLoading] = useState<boolean>(false);
7273

@@ -102,24 +103,29 @@ export function DataInput(props: IPropsType) {
102103
lofOutlier: { threshold: 2 },
103104
statisticsBase: { defaultLeftAxisName: '左轴', defaultRightAxisName: '右轴' }
104105
},
106+
// usePolish: false,
105107
detailMaxNum: [
106108
{ types: ['outlier', 'pair_outlier', 'extreme_value', 'turning_point', 'majority_value'], maxNum: 3 },
107109
{ types: ['abnormal_band'], maxNum: 3 },
108110
{ types: ['correlation'], maxNum: 2 },
109111
{ types: ['overall_trend'], maxNum: 2 },
110112
{ types: ['abnormal_trend'], maxNum: 3 }
111-
] as any
112-
});
113+
]
114+
} as any);
113115
const endTime = new Date().getTime();
114116
const costTime = endTime - startTime;
115-
116-
props.onInsightGenerate(insights, specJson, costTime);
117+
let newSpec = null;
118+
if (enableAnnotation) {
119+
newSpec = (await vmind.current.updateSpecByInsights(specJson, insights)).newSpec;
120+
console.log(newSpec);
121+
}
122+
props.onInsightGenerate(insights, enableAnnotation ? newSpec : specJson, costTime);
117123

118124
console.log(costTime);
119125
console.log(insights);
120126

121127
setLoading(false);
122-
}, [numLimits, props, spec]);
128+
}, [numLimits, props, spec, enableAnnotation]);
123129

124130
return (
125131
<div className="left-sider">
@@ -216,6 +222,11 @@ export function DataInput(props: IPropsType) {
216222
<Radio value={globalVariables.VITE_CUSTOM_MODEL}>Your Custom Model</Radio>
217223
</RadioGroup>
218224
</div>
225+
<div style={{ width: '90%', marginBottom: 10 }}>
226+
<Checkbox checked={enableAnnotation} onChange={v => setEnableAnnotation(v)}>
227+
Enable Insights Annotation
228+
</Checkbox>
229+
</div>
219230
<div className="generate-botton">
220231
<Button
221232
loading={loading}

0 commit comments

Comments
 (0)