Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/config/rush/build-cache.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
"azureBlobStorageConfiguration": {
/**
* (Required) The name of the the Azure storage account to use for build cache.
* (Required) The name of the Azure storage account to use for build cache.
*/
// "storageAccountName": "example",

Expand Down
2 changes: 1 addition & 1 deletion common/scripts/hotfix-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function run() {
const pkgJsonPath = path.join(__dirname, '../../', package.projectFolder, 'package.json')
const pkgJson = getPackageJson(pkgJsonPath)

// 5. add the the changes
// 5. add the changes
spawnSync('sh', ['-c', `git add --all`], {
stdio: 'inherit',
shell: false,
Expand Down
4 changes: 2 additions & 2 deletions common/scripts/install-run.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/scripts/pre-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function run() {
const pkgJsonPath = path.join(__dirname, '../../', package.projectFolder, 'package.json')
const pkgJson = getPackageJson(pkgJsonPath)

// 5. add the the changes
// 5. add the changes
spawnSync('sh', ['-c', `git add --all`], {
stdio: 'inherit',
shell: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2611,8 +2611,8 @@ const realEstateData = {
]
};

const enviromentData = {
domain: 'enviroment',
const environmentData = {
domain: 'environment',
data: [
{
isEnglish: false,
Expand Down Expand Up @@ -6574,7 +6574,7 @@ const transposition = {
export const dataExtractionCommonDataset = [
economyData,
technologyData,
enviromentData,
environmentData,
cultureSportsData,
agricultureData,
retailData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ export function DataExtractionResult() {
</Select>
</div>
<Divider style={{ margin: '8px 0' }} />
<div className="sub-title">Comparision Result:</div>
<div className="sub-title">Comparison Result:</div>
<div className="compare">
<div className="title">
<div style={{ width: '20%' }}>
Expand Down
18 changes: 9 additions & 9 deletions packages/vmind/src/schedule/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { CombineAll, MapAtomTypes, ScheduleOptions, TaskMapping } from '../
import { Factory } from '../core/factory';

export class Schedule<T extends AtomName[]> {
atomInstaces: IBaseAtom<BaseContext, BaseOptions>[];
atomInstances: IBaseAtom<BaseContext, BaseOptions>[];

atomList: AtomName[];

Expand All @@ -24,13 +24,13 @@ export class Schedule<T extends AtomName[]> {
this.atomList = atomList;
this.options = options || {};
this.query = '';
this.atomInstaces = atomList.map(atomName => this.atomFactory(atomName));
this.atomInstances = atomList.map(atomName => this.atomFactory(atomName));
this.setNewTask(context);
}

initContext() {
this.context = {} as T;
this.atomInstaces.forEach(atom => {
this.atomInstances.forEach(atom => {
this.context = atom.buildDefaultContext(this.context);
atom.reset();
});
Expand Down Expand Up @@ -85,7 +85,7 @@ export class Schedule<T extends AtomName[]> {
completion_tokens: 0,
total_tokens: 0
};
for (const atom of this.atomInstaces) {
for (const atom of this.atomInstances) {
const { shouldRun, query: taskQuery } = (subTasks as any)?.[atom.name] || {};
if ((shouldRunList as any)?.[atom.name] !== false && (shouldRun || atom.shouldRunByContextUpdate(this.context))) {
this.context = await atom.run({ context: this.context, query: taskQuery });
Expand All @@ -103,15 +103,15 @@ export class Schedule<T extends AtomName[]> {
setNewTask(context: any) {
this.initContext();
this.updateContext(context);
this.atomInstaces.forEach(atom => {
this.atomInstances.forEach(atom => {
atom.reset(this.context);
atom.clearHistory();
});
}

updateOptions(options: ScheduleOptions) {
this.options = merge({}, this.options, options);
this.atomInstaces.forEach(atom => atom.updateOptions(this.getAtomOptions(atom.name as AtomName)));
this.atomInstances.forEach(atom => atom.updateOptions(this.getAtomOptions(atom.name as AtomName)));
}

updateContext(context: any, isReplace = false) {
Expand All @@ -125,12 +125,12 @@ export class Schedule<T extends AtomName[]> {
*/
getContext(atomName?: AtomName): CombineAll<MapAtomTypes<T>> {
if (atomName) {
const atomInstaces = this.atomInstaces.find(atom => atom.name === atomName);
if (!atomInstaces) {
const atomInstances = this.atomInstances.find(atom => atom.name === atomName);
if (!atomInstances) {
console.error(`Doesn\'t exist ${atomName}`);
return null as any;
}
return atomInstaces.getContext() as any;
return atomInstances.getContext() as any;
}
return this.context;
}
Expand Down