Skip to content

Commit 2144c57

Browse files
committed
wip #35
1 parent c6a8b58 commit 2144c57

File tree

9 files changed

+2219
-1881
lines changed

9 files changed

+2219
-1881
lines changed

conversation.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ def get_action(self, query, locale):
5555

5656
data = json.load(response)
5757
retval = {}
58-
retval["action"] = data["result"]["action"]
59-
retval["parameters"] = data["result"]["parameters"]
60-
retval["contexts"] = data["result"]["contexts"]
61-
retval["response"] = data["result"]["fulfillment"]["speech"]
58+
retval["action"] = data.get("result", {}).get("action")
59+
retval["parameters"] = data.get("result", {}).get("parameters", {})
60+
retval["contexts"] = data.get("result", {}).get("contexts", [])
61+
retval["response"] = data.get("result", {}).get("fulfillment", {}).get("speech")
6262

63+
retval["action"] = retval["action"].encode("utf-8") if retval["action"] else None
64+
retval["response"] = retval["response"].encode("utf-8") if retval["response"] else None
6365
return retval

static/js/blockly/blockly_compressed.js

Lines changed: 823 additions & 640 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/js/blockly/blocks_compressed.js

Lines changed: 133 additions & 112 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/js/blockly/en.js

Lines changed: 399 additions & 364 deletions
Large diffs are not rendered by default.

static/js/blockly/fr.js

Lines changed: 399 additions & 364 deletions
Large diffs are not rendered by default.

static/js/blockly/it.js

Lines changed: 399 additions & 364 deletions
Large diffs are not rendered by default.

static/js/blockly/python_compressed.js

Lines changed: 51 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/js/program.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@ $(document).on( "pageshow", '#page-program', function( event, ui ) {
55
inject_once=false;
66
Blockly.inject(document.getElementById('blocklyDiv'),
77
{path: '../../', toolbox: document.getElementById('toolbox'),
8-
scrollbars:CODERBOT_PROG_SCROLLBARS, maxBlocks:CODERBOT_PROG_MAXBLOCKS});
8+
scrollbars:CODERBOT_PROG_SCROLLBARS, maxBlocks:CODERBOT_PROG_MAXBLOCKS,
9+
zoom:
10+
{controls: true,
11+
wheel: true,
12+
startScale: 1.0, //you can change this accorting to your needs.
13+
maxScale: 1.5,
14+
minScale: 0.2
15+
}});
916
}
1017

1118
$('[href="#page-program"]').addClass( "ui-btn-active" );

templates/config_params.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
var CODERBOT_MOV_TR_DEF_SPEED={{config.move_tr_speed}};
55
var CODERBOT_MOV_TR_DEF_ELAPSE={{config.move_tr_elapse}};
66
var CODERBOT_PROG_MOVE_MOTION="{{config.prog_move_motion}}"=="yes";
7+
var CODERBOT_PROG_MOVE_MPU="{{config.prog_move_mpu}}"=="yes";
78
var CODERBOT_STREAM_URL="http://{{host}}:{{stream_port}}/stream"
89
var CODERBOT_PROG_LEVEL="{{config.prog_level}}";
910
var CODERBOT_PROG_SCROLLBARS="{{config.prog_scrollbars}}"=="true";

0 commit comments

Comments
 (0)