diff --git a/boards/default_src/micropython/blocks/ai_cloud.js b/boards/default_src/micropython/blocks/ai_cloud.js index 13a2df8a..fc1443ba 100644 --- a/boards/default_src/micropython/blocks/ai_cloud.js +++ b/boards/default_src/micropython/blocks/ai_cloud.js @@ -140,8 +140,6 @@ export const llm_set_callback = { .appendField(Blockly.Msg.MIXLY_FUNCTION_NAME); this.appendValueInput('VAR3') .appendField(Blockly.Msg.MIXLY_FUNCTION_DESCRIPTION) - this.appendDummyInput() - .appendField(Blockly.Msg.MIXLY_PARAMS + Blockly.Msg.OLED_STRING); this.itemCount_ = 2; this.updateShape_(); @@ -211,23 +209,22 @@ export const llm_set_callback = { // Delete everything. if (this.getInput('EMPTY')) { this.removeInput('EMPTY'); - } else { - var i = 0; - while (this.getInput('ADD' + i)) { - this.removeInput('ADD' + i); - i++; - } + } + if (this.getInput('PARAMS_LABEL')) { + this.removeInput('PARAMS_LABEL'); + } + var i = 0; + while (this.getInput('ADD' + i)) { + this.removeInput('ADD' + i); + i++; } // Rebuild block. if (this.itemCount_ == 0) { - this.appendDummyInput('EMPTY') - // .appendField(Blockly.Msg.MIXLY_PARAMS); } else { + this.appendDummyInput('PARAMS_LABEL') + .appendField(Blockly.Msg.MIXLY_PARAMS + Blockly.Msg.OLED_STRING); for (var i = 0; i < this.itemCount_; i++) { var input = this.appendValueInput('ADD' + i); - if (i == 0) { - // input.appendField(Blockly.MIXLY_PARAMS); - } } } } diff --git a/boards/default_src/micropython_esp32c2/template.xml b/boards/default_src/micropython_esp32c2/template.xml index 875e0309..b35bdc53 100644 --- a/boards/default_src/micropython_esp32c2/template.xml +++ b/boards/default_src/micropython_esp32c2/template.xml @@ -2966,20 +2966,15 @@ - + cb_func - + - - cb------ - - - - xx + info