Skip to content

Commit

Permalink
fix bulk generation path and editor checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigopivi committed Aug 25, 2018
1 parent 05af67e commit bc4f4a3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chatito",
"version": "2.1.2",
"version": "2.1.3",
"description": "Generate training datasets for NLU chatbots using a simple DSL",
"bin": {
"chatito": "./dist/bin.js"
Expand Down
2 changes: 1 addition & 1 deletion src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const adapterAccumulator = (format: 'default' | 'rasa' | 'snips', formatOptions?
console.error(`Invalid format argument: ${format}`);
process.exit(1);
}
const outputPath = argv.outputPath || __dirname;
const outputPath = argv.outputPath || process.cwd();
try {
// parse the formatOptions argument
let formatOptions = null;
Expand Down
10 changes: 9 additions & 1 deletion web/components/Editor/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,15 @@ export default class Editor extends React.Component<{}, IEditorState> {
private onCloseDrawer = () => this.setState({ showDrawer: false, dataset: null });

private onCustomOptionsCheckboxChange = e => {
this.setState({ useCustomOptions: e.target.checked });
let adapterOptions = {};
if (this.state.currentAdapter === 'rasa') {
adapterOptions = Object.assign({}, rasaDefaultOptions);
} else if (this.state.currentAdapter === 'snips') {
adapterOptions = Object.assign({}, snipsDefaultOptions);
}
this.setState({ useCustomOptions: e.target.checked, adapterOptions, dataset: null }, () => {
this.saveToLocalStorage(false, true, true);
});
};

private onAdapterChange = e => {
Expand Down

0 comments on commit bc4f4a3

Please sign in to comment.