Skip to content

Commit 24ef8be

Browse files
committed
Merge branch 'develop' of https://github.com/Titanium2099/Block-Compiler-with-AI into develop
2 parents 4f423dd + a14a110 commit 24ef8be

41 files changed

Lines changed: 2496 additions & 220 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎package-lock.json‎

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

‎package.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@
5151
"core-js": "2.5.7",
5252
"css-loader": "^1.0.0",
5353
"dapjs": "2.3.0",
54+
"dom-serializer": "^2.0.0",
5455
"es6-object-assign": "1.1.0",
5556
"get-float-time-domain-data": "0.1.0",
5657
"get-user-media-promise": "1.1.4",
58+
"htmlparser2": "^10.0.0",
5759
"immutable": "3.8.2",
5860
"intl": "1.2.5",
5961
"intl-messageformat": "^2.2.0",
@@ -94,8 +96,11 @@
9496
"scratch-paint": "github:TurboWarp/scratch-paint#develop",
9597
"scratch-render": "github:TurboWarp/scratch-render#develop",
9698
"scratch-vm": "github:TurboWarp/scratch-vm#develop",
99+
"showdown": "^2.1.0",
100+
"simplex-noise": "^4.0.3",
97101
"style-loader": "^0.23.0",
98102
"text-encoding": "0.7.0",
103+
"three": "^0.172.0",
99104
"to-style": "1.3.3",
100105
"wav-encoder": "1.3.0",
101106
"xhr": "2.5.0"

‎src/addons/addons.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const addons = [
4848
'folders',
4949
'block-switching',
5050
'load-extensions',
51+
'ai-integration',
5152
'custom-zoom',
5253
'copy-reporter',
5354
'initialise-sprite-position',
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/* generated by pull.js */
2+
const manifest = {
3+
"editorOnly": true,
4+
"noTranslations": true,
5+
"name": "AI integration into the editor",
6+
"description": "Adds AI integration into the editor including code completion, code generation, sprite generation, background generation, and more.\n\n\nDISCLAIMER: We do not store any request data or your API keys. Your API keys are only sent with requests and remain fully stored locally on your computer. All models we use are free, ensuring no charges apply. However, for added security, we recommend setting restrictions on your API keys. If you'd like to verify this, our AI backend is open-source—feel free to check it out yourself!",
7+
"info": [
8+
{
9+
"text": "If you need help with creating an API key, check out our guides here: https://blog.codetorch.net/gemini-api-key-for-torchy/ , https://blog.codetorch.net/openrouter-api-key-for-torchy/",
10+
"id": "warning"
11+
}
12+
],
13+
"userscripts": [
14+
{
15+
"url": "userscript.js"
16+
}
17+
],
18+
"settings": [
19+
{
20+
"id": "GeminiAPIKey",
21+
"name": "Gemini API Key",
22+
"type": "long_string",
23+
"default": "",
24+
},
25+
{
26+
"id": "OpenRouterAPIKey",
27+
"name": "OpenRouter API Key",
28+
"type": "long_string",
29+
"default": "",
30+
}
31+
],
32+
"dynamicDisable": true,
33+
"tags": [
34+
"new"
35+
],
36+
"enabledByDefault": true
37+
};
38+
export default manifest;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/* generated by pull.js */
2+
import _js from "./userscript.js";
3+
export const resources = {
4+
"userscript.js": _js,
5+
};

‎src/addons/addons/ai-integration/assets/defaultToolbox.json‎

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"overrides":{
3+
"control_forever":"<block type=\"control_forever\"><statement name=\"SUBSTACK\"></statement></block>",
4+
"control_if":"<block type=\"control_if\"><value name=\"CONDITION\"></value><statement name=\"SUBSTACK\"></statement></block>",
5+
"control_if_else":"<block type=\"control_if_else\"><value name=\"CONDITION\"></value><statement name=\"SUBSTACK\"></statement><statement name=\"SUBSTACK2\"></statement></block>",
6+
"control_wait_until":"<block type=\"control_wait_until\"><value name=\"CONDITION\"></value></block>",
7+
"control_repeat_until":"<block type=\"control_repeat_until\"><value name=\"CONDITION\"></value><statement name=\"SUBSTACK\"></statement></block>",
8+
"control_while":"<block type=\"control_while\"><value name=\"CONDITION\"></value><statement name=\"SUBSTACK\"></statement></block>",
9+
"operator_and":"<block type=\"operator_and\"><value name=\"OPERAND1\"></value><value name=\"OPERAND2\"></value></block>",
10+
"operator_or":"<block type=\"operator_or\"><value name=\"OPERAND1\"></value><value name=\"OPERAND2\"></value></block>",
11+
"operator_not":"<block type=\"operator_not\"><value name=\"OPERAND\"></value></block>",
12+
"event_broadcast":"<block type=\"event_broadcast\"><value name=\"BROADCAST_INPUT\"><shadow type=\"event_broadcast_menu\"><field name=\"BROADCAST_OPTION\" variabletype=\"broadcast_msg\">message1</field></shadow></value></block>",
13+
"event_broadcastandwait":"<block type=\"event_broadcastandwait\"><value name=\"BROADCAST_INPUT\"><shadow type=\"event_broadcast_menu\"><field name=\"BROADCAST_OPTION\" variabletype=\"broadcast_msg\">message1</field></shadow></value></block>",
14+
"event_whenbroadcastreceived":"<block type=\"event_whenbroadcastreceived\"><field name=\"BROADCAST_OPTION\" variabletype=\"broadcast_msg\">message1</field></block>"
15+
},
16+
"insert":{
17+
"data_variable":"<block blockType=\"Stack\" type=\"data_variable\"><field name=\"VARIABLE\" variabletype=\"\">my variable</field></block>",
18+
"data_setvariableto":"<block blockType=\"Stack\" type=\"data_setvariableto\"><field name=\"VARIABLE\" variabletype=\"\">my variable</field><value name=\"VALUE\"><shadow type=\"text\"><field name=\"TEXT\">0</field></shadow></value></block>",
19+
"data_changevariableby":"<block blockType=\"Stack\" type=\"data_changevariableby\"><field name=\"VARIABLE\" variabletype=\"\">my variable</field><value name=\"VALUE\"><shadow type=\"math_number\"><field name=\"NUM\">1</field></shadow></value></block>",
20+
"data_showvariable":"<block blockType=\"Stack\" type=\"data_showvariable\"><field name=\"VARIABLE\" variabletype=\"\">my variable</field></block>",
21+
"data_hidevariable":"<block blockType=\"Stack\" type=\"data_hidevariable\"><field name=\"VARIABLE\" variabletype=\"\">my variable</field></block>",
22+
"data_listcontents":"<block blockType=\"Reporter\" type=\"data_listcontents\"><field name=\"LIST\" variabletype=\"list\">my list</field></block>",
23+
"data_addtolist":"<block blockType=\"Stack\" type=\"data_addtolist\"><field name=\"LIST\" variabletype=\"list\">my list</field><value name=\"ITEM\"><shadow type=\"text\"><field name=\"TEXT\">thing</field></shadow></value></block>",
24+
"data_deleteoflist":"<block blockType=\"Stack\" type=\"data_deleteoflist\"><field name=\"LIST\" variabletype=\"list\">my list</field><value name=\"INDEX\"><shadow type=\"math_integer\"><field name=\"NUM\">1</field></shadow></value></block>",
25+
"data_deletealloflist":"<block blockType=\"Stack\" type=\"data_deletealloflist\"><field name=\"LIST\" variabletype=\"list\">my list</field></block>",
26+
"data_insertatlist":"<block blockType=\"Stack\" type=\"data_insertatlist\"><field name=\"LIST\" variabletype=\"list\">my list</field><value name=\"ITEM\"><shadow type=\"text\"><field name=\"TEXT\">thing</field></shadow></value><value name=\"INDEX\"><shadow type=\"math_integer\"><field name=\"NUM\">1</field></shadow></value></block>",
27+
"data_replaceitemoflist":"<block blockType=\"Stack\" type=\"data_replaceitemoflist\"><field name=\"LIST\" variabletype=\"list\">my list</field><value name=\"INDEX\"><shadow type=\"math_integer\"><field name=\"NUM\">1</field></shadow></value><value name=\"ITEM\"><shadow type=\"text\"><field name=\"TEXT\">thing</field></shadow></value></block>",
28+
"data_itemoflist":"<block blockType=\"Reporter\" type=\"data_itemoflist\"><field name=\"LIST\" variabletype=\"list\">my list</field><value name=\"INDEX\"><shadow type=\"math_integer\"><field name=\"NUM\">1</field></shadow></value></block>",
29+
"data_itemnumoflist":"<block blockType=\"Reporter\" type=\"data_itemnumoflist\"><field name=\"LIST\" variabletype=\"list\">my list</field><value name=\"ITEM\"><shadow type=\"text\"><field name=\"TEXT\">thing</field></shadow></value></block>",
30+
"data_showlist":"<block blockType=\"Stack\" type=\"data_showlist\"><field name=\"LIST\" variabletype=\"list\">my list</field></block>",
31+
"data_lengthoflist":"<block blockType=\"Reporter\" type=\"data_lengthoflist\"><field name=\"LIST\" variabletype=\"list\">my list</field></block>",
32+
"data_listcontainsitem":"<block blockType=\"Boolean\" type=\"data_listcontainsitem\"><field name=\"LIST\" variabletype=\"list\">my list</field><value name=\"ITEM\"><shadow type=\"text\"><field name=\"TEXT\">thing</field></shadow></value></block>",
33+
"data_hidelist":"<block blockType=\"Stack\" type=\"data_hidelist\"><field name=\"LIST\" variabletype=\"list\">my list</field></block>",
34+
"procedures_definition":"<block type=\"procedures_definition\" blockType=\"Hat\"><statement name=\"custom_block\"><shadow type=\"procedures_prototype\"><mutation proccode=\"...\" argumentids=\"...\" argumentnames=\"...\" argumentdefaults=\"\" warp=\"...\"></mutation></shadow></statement><next><!-- Custom Block Body (OUTSIDE THE STATEMENT BODY)--></next></block>",
35+
"procedures_call":"<block type=\"procedures_call\" blockType=\"Stack\"><mutation proccode=\"...\" argumentids=\"...\" warp=\"...\"></mutation><!-- Custom block arguments here --></block>",
36+
"argument_reporter_boolean":"<block type=\"argument_reporter_boolean\" blockType=\"Boolean\"><field name=\"VALUE\"/></block>",
37+
"argument_reporter_string_number":"<block type=\"argument_reporter_string_number\" blockType=\"Reporter\"><field name=\"VALUE\"/></block>"
38+
}
39+
}

0 commit comments

Comments
 (0)