Skip to content
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
81f0622
Create turbobot_engine.js
Seigh-sword Dec 30, 2025
a1a8221
Add files via upload
Seigh-sword Dec 30, 2025
196c566
Rename turbobot_banner.svg.svg to turbobot_banner.svg
Seigh-sword Dec 30, 2025
ad83006
Delete images/turbobot_banner.svg
Seigh-sword Dec 30, 2025
24b411e
Add files via upload
Seigh-sword Dec 30, 2025
af35724
Rename made by Seigh_sword.png to turbobot_banner.svg
Seigh-sword Dec 30, 2025
45d5d2e
Rename turbobot_banner.svg to turbobot_banner.png
Seigh-sword Dec 30, 2025
cd7ac4d
Update README.md
Seigh-sword Dec 30, 2025
9c604a3
Update extensions.json
Seigh-sword Dec 30, 2025
6f2c67e
Rename turbobot_engine.js to TurboBot.js
Seigh-sword Dec 30, 2025
a3af0e6
Rename turbobot_banner.png to TurboBot.png
Seigh-sword Dec 30, 2025
dc88708
Rename TurboBot.js to turbobot.js
Seigh-sword Dec 30, 2025
6320ffc
Rename extensions/turbobot.js to extensions/Seigh-sword/turbobot.js
Seigh-sword Dec 30, 2025
7a04f14
Update README.md
Seigh-sword Dec 30, 2025
3fdd459
Update README.md
Seigh-sword Dec 30, 2025
5dd8161
Update README.md
Seigh-sword Dec 30, 2025
d7845c1
Add files via upload
Seigh-sword Dec 30, 2025
626ce41
Delete images/TurboBot.png
Seigh-sword Dec 30, 2025
7ba1b55
Rename images/turbobot.svg to images/Seigh-sword/turbobot.svg
Seigh-sword Dec 30, 2025
5855ad3
Update turbobot.js
Seigh-sword Dec 30, 2025
43bcf80
Update extensions.json
Seigh-sword Dec 30, 2025
d01afa5
[Automated] Format code
DangoCat Dec 30, 2025
143ddfc
Update turbobot.js
Seigh-sword Dec 30, 2025
87e25ef
[Automated] Format code
DangoCat Dec 30, 2025
3af0df6
Update turbobot.js
Seigh-sword Dec 30, 2025
e22dbae
[Automated] Format code
DangoCat Dec 30, 2025
834a24f
Update turbobot.js
Seigh-sword Dec 30, 2025
acd3a37
[Automated] Format code
DangoCat Dec 30, 2025
5d1e4b5
Create README.md
Seigh-sword Jan 7, 2026
1b148af
Update README.md
Seigh-sword Jan 7, 2026
c7b32e4
Update turbobot.js
Seigh-sword Jan 7, 2026
c913349
[Automated] Format code
DangoCat Jan 7, 2026
8f1b462
Delete extensions/Seigh-sword/README.md
Seigh-sword Jan 10, 2026
15471e2
Update turbobot.js
Seigh-sword Jan 10, 2026
674ac58
Update turbobot.js
Seigh-sword Jan 10, 2026
7f6e965
[Automated] Format code
DangoCat Jan 10, 2026
f4d0983
Update turbobot.js
Seigh-sword Jan 10, 2026
911d34d
Update turbobot.js
Seigh-sword Jan 10, 2026
3d13270
Update turbobot.js
Seigh-sword Jan 10, 2026
4d3d388
Update turbobot.js
Seigh-sword Jan 10, 2026
50d0382
[Automated] Format code
DangoCat Jan 10, 2026
88a6ffc
Update turbobot.js
Seigh-sword Jan 10, 2026
267e510
Update turbobot.js
Seigh-sword Jan 10, 2026
adcd124
[Automated] Format code
DangoCat Jan 10, 2026
0eebfb9
Update turbobot.js
Seigh-sword Jan 10, 2026
662e675
[Automated] Format code
DangoCat Jan 10, 2026
539c515
Update turbobot.js
Seigh-sword Jan 10, 2026
ef33e62
Update turbobot.js
Seigh-sword Jan 10, 2026
4f041e1
[Automated] Format code
DangoCat Jan 10, 2026
debe0df
Update turbobot.js
Seigh-sword Jan 10, 2026
5468ac5
Update turbobot.js
Seigh-sword Jan 10, 2026
a2c46e9
[Automated] Format code
DangoCat Jan 10, 2026
4f39c76
Update turbobot.js
Seigh-sword Jan 10, 2026
33d1746
Update turbobot.js
Seigh-sword Jan 10, 2026
e745eee
Update turbobot.js
Seigh-sword Jan 10, 2026
3528882
Update turbobot.js
Seigh-sword Jan 10, 2026
0e4797b
[Automated] Format code
DangoCat Jan 10, 2026
7db3046
Update turbobot.js
Seigh-sword Jan 10, 2026
06652fb
Update turbobot.js
Seigh-sword Jan 10, 2026
42c308f
Update turbobot.js
Seigh-sword Jan 10, 2026
2833d5f
[Automated] Format code
DangoCat Jan 10, 2026
678ca70
Update turbobot.js
Seigh-sword Jan 10, 2026
3bdb08f
Update turbobot.js
Seigh-sword Jan 11, 2026
05853fd
Update turbobot.js
Seigh-sword Jan 11, 2026
d72ee5e
Update turbobot.js
Seigh-sword Jan 11, 2026
63c779b
[Automated] Format code
DangoCat Jan 11, 2026
6f9c32f
Update turbobot.js
Seigh-sword Jan 11, 2026
d1f0937
[Automated] Format code
DangoCat Jan 11, 2026
b0b7284
Update turbobot.svg
Seigh-sword Jan 14, 2026
933ba61
Update turbobot.svg
Seigh-sword Jan 14, 2026
7130ec9
Update README.md
Seigh-sword Jan 14, 2026
300f80f
Update turbobot.js
Seigh-sword Jan 15, 2026
fe107ee
Update turbobot.js
Seigh-sword Jan 15, 2026
a933e2c
Update turbobot.js
Seigh-sword Jan 15, 2026
93c7c8a
Create turbobot.md
Seigh-sword Jan 15, 2026
f57f505
Update turbobot.md
Seigh-sword Jan 15, 2026
8af62fb
Update turbobot.js
Seigh-sword Jan 15, 2026
28ce6af
[Automated] Format code
DangoCat Jan 15, 2026
6841d25
Update turbobot.js
Seigh-sword Jan 15, 2026
4a4d411
Update turbobot.js
Seigh-sword Jan 15, 2026
a8757a0
[Automated] Format code
DangoCat Jan 15, 2026
c359e8f
Add files via upload
Seigh-sword Jan 15, 2026
1f701ea
Rename samples/turbobot_sample.sb3 to samples/Seigh-sword/Turbobot_sa…
Seigh-sword Jan 15, 2026
3e0a2a4
Update turbobot.js
Seigh-sword Jan 15, 2026
e7f44a6
Update turbobot.js
Seigh-sword Jan 15, 2026
2d3a994
Update turbobot.js
Seigh-sword Jan 15, 2026
1fd159a
[Automated] Format code
DangoCat Jan 15, 2026
233dafd
Update turbobot.js
Seigh-sword Jan 15, 2026
c61f2d2
Delete samples/Seigh-sword directory
Seigh-sword Jan 15, 2026
30fd8f7
Add files via upload
Seigh-sword Jan 15, 2026
717dc7c
Update turbobot.js
Seigh-sword Jan 15, 2026
f552efb
Delete samples/turbobot_sample.sb3
Seigh-sword Jan 15, 2026
abca96b
[Automated] Format code
DangoCat Jan 15, 2026
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
321 changes: 321 additions & 0 deletions extensions/Seigh-sword/turbobot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,321 @@
// Name: Turbo Bot
// ID: TurboBotEngine
// Description: Advanced AI text and image generation with bot memory.
// By: Seigh_sword <https://scratch.mit.edu/users/Seigh_sword/>
// License: MPL-2.0

(function (Scratch) {
"use strict";

const icon =
"https://raw.githubusercontent.com/Seigh-sword/TurboBot-Turbwarp/refs/heads/main/assets/TurboBotIcon.png";
const blockColor = "#FF4C4C";
const menuColor = "#B00000";

class TurboBot {
constructor() {
this.bots = {};
this.textModel = "openai";
this.imageModel = "turbo";
this.temp = 1;
this.seed = Math.floor(Math.random() * 999999);
this.systemLog = "You are a helpful AI, who helps users";
this.attachedFile = "";
}

getInfo() {
return {
id: "TurboBotEngine",
name: "Turbo Bot",

Check failure on line 29 in extensions/Seigh-sword/turbobot.js

View workflow job for this annotation

GitHub Actions / lint

Extension name should usually be translated
menuIconURI: icon,
blockIconURI: icon,
color1: blockColor,
color2: menuColor,
blocks: [
{
opcode: "isReady",
blockType: Scratch.BlockType.BOOLEAN,
text: "AI ready?",

Check failure on line 38 in extensions/Seigh-sword/turbobot.js

View workflow job for this annotation

GitHub Actions / lint

Block text should usually be translated
},
{
opcode: "getCurrentModel",
blockType: Scratch.BlockType.REPORTER,
text: "model?",

Check failure on line 43 in extensions/Seigh-sword/turbobot.js

View workflow job for this annotation

GitHub Actions / lint

Block text should usually be translated
},
{
opcode: "getBotName",
blockType: Scratch.BlockType.REPORTER,
text: "bot?",

Check failure on line 48 in extensions/Seigh-sword/turbobot.js

View workflow job for this annotation

GitHub Actions / lint

Block text should usually be translated
},
{
opcode: "getMemory",
blockType: Scratch.BlockType.REPORTER,
text: "memory",

Check failure on line 53 in extensions/Seigh-sword/turbobot.js

View workflow job for this annotation

GitHub Actions / lint

Block text should usually be translated
},
"---",
{
opcode: "createBot",
blockType: Scratch.BlockType.COMMAND,
text: "create bot named [NAME]",

Check failure on line 59 in extensions/Seigh-sword/turbobot.js

View workflow job for this annotation

GitHub Actions / lint

Block text should usually be translated
arguments: {
NAME: {
type: Scratch.ArgumentType.STRING,
defaultValue: "TurboBot",
},
},
},
{
opcode: "deleteBot",
blockType: Scratch.BlockType.COMMAND,
text: "delete bot named [NAME]",

Check failure on line 70 in extensions/Seigh-sword/turbobot.js

View workflow job for this annotation

GitHub Actions / lint

Block text should usually be translated
arguments: {
NAME: {
type: Scratch.ArgumentType.STRING,
defaultValue: "TurboBot",
},
},
},
{
opcode: "renameBot",
blockType: Scratch.BlockType.COMMAND,
text: "rename bot [OLD] to [NEW]",

Check failure on line 81 in extensions/Seigh-sword/turbobot.js

View workflow job for this annotation

GitHub Actions / lint

Block text should usually be translated
arguments: {
OLD: { type: Scratch.ArgumentType.STRING, defaultValue: "Bot1" },
NEW: {
type: Scratch.ArgumentType.STRING,
defaultValue: "TurboBot",
},
},
},
"---",
{
opcode: "setTextModel",
blockType: Scratch.BlockType.COMMAND,
text: "set text model [MOD]",

Check failure on line 94 in extensions/Seigh-sword/turbobot.js

View workflow job for this annotation

GitHub Actions / lint

Block text should usually be translated
arguments: {
MOD: { type: Scratch.ArgumentType.STRING, menu: "textMenu" },
},
},
{
opcode: "setImageModel",
blockType: Scratch.BlockType.COMMAND,
text: "set image model [MOD]",

Check failure on line 102 in extensions/Seigh-sword/turbobot.js

View workflow job for this annotation

GitHub Actions / lint

Block text should usually be translated
arguments: {
MOD: { type: Scratch.ArgumentType.STRING, menu: "imageMenu" },
},
},
"---",
{
opcode: "simplePrompt",
blockType: Scratch.BlockType.REPORTER,
text: "prompt [TEXT]",
arguments: {
TEXT: {
type: Scratch.ArgumentType.STRING,
defaultValue: "Hello!",
},
},
},
{
opcode: "getImageUrl",
blockType: Scratch.BlockType.REPORTER,
text: "get url for image prompt [TEXT]",
arguments: {
TEXT: {
type: Scratch.ArgumentType.STRING,
defaultValue: "a racecar in a race going so fast",
},
},
},
{
opcode: "attachFile",
blockType: Scratch.BlockType.COMMAND,
text: "attach file url [URL]",
arguments: {
URL: { type: Scratch.ArgumentType.STRING, defaultValue: "" },
},
},
"---",
{
opcode: "setSystem",
blockType: Scratch.BlockType.COMMAND,
text: "set system log [LOG]",
arguments: {
LOG: {
type: Scratch.ArgumentType.STRING,
defaultValue: "You are a helpful assistant.",
},
},
},
{
opcode: "setContextText",
blockType: Scratch.BlockType.REPORTER,
text: "set context [CTX] and prompt [TEXT]",
arguments: {
CTX: {
type: Scratch.ArgumentType.STRING,
defaultValue: "Persona",
},
TEXT: {
type: Scratch.ArgumentType.STRING,
defaultValue: "Hello!",
},
},
},
{
opcode: "setContextImage",
blockType: Scratch.BlockType.REPORTER,
text: "set context [CTX] and get url of image prompt [TEXT]",
arguments: {
CTX: { type: Scratch.ArgumentType.STRING, defaultValue: "Anime" },
TEXT: {
type: Scratch.ArgumentType.STRING,
defaultValue: "racecar",
},
},
},
"---",
{
opcode: "setTemp",
blockType: Scratch.BlockType.COMMAND,
text: "set temperature [N]",
arguments: {
N: { type: Scratch.ArgumentType.NUMBER, defaultValue: 1.0 },
},
},
{
opcode: "setSeed",
blockType: Scratch.BlockType.COMMAND,
text: "set seed [N]",
arguments: {
N: { type: Scratch.ArgumentType.NUMBER, defaultValue: 12345 },
},
},
{
opcode: "getSeed",
blockType: Scratch.BlockType.REPORTER,
text: "seed",
},
{
opcode: "getTemp",
blockType: Scratch.BlockType.REPORTER,
text: "temperature",
},
],
menus: {
textMenu: {
acceptReporters: true,
items: [
"openai",
"mistral",
"gemini",
"deepseek-r1",
"p1",
"llama",
],
},
imageMenu: {
acceptReporters: true,
items: [
"turbo",
"flux-pro",
"flux-realism",
"flux-anime",
"flux-3d",
"flux",
"any",
],
},
},
};
}

isReady() {
return true;
}
getCurrentModel() {
return `T:${this.textModel} | I:${this.imageModel}`;
}
getBotName() {
return Object.keys(this.bots)[0] || "None";
}
getMemory() {
return JSON.stringify(this.bots);
}
getSeed() {
return this.seed;
}
getTemp() {
return this.temp;
}

createBot({ NAME }) {
if (!this.bots[NAME]) this.bots[NAME] = [];
}
deleteBot({ NAME }) {
delete this.bots[NAME];
}
renameBot({ OLD, NEW }) {
if (this.bots[OLD]) {
this.bots[NEW] = this.bots[OLD];
delete this.bots[OLD];
}
}
setTextModel({ MOD }) {
this.textModel = MOD;
}
setImageModel({ MOD }) {
this.imageModel = MOD;
}
setTemp({ N }) {
this.temp = N;
}
setSeed({ N }) {
this.seed = N;
}
setSystem({ LOG }) {
this.systemLog = LOG;
}
attachFile({ URL }) {
this.attachedFile = URL;
}

async simplePrompt({ TEXT }) {
try {
const url = `https://text.pollinations.ai/${encodeURIComponent(TEXT)}?model=${this.textModel}&system=${encodeURIComponent(this.systemLog)}&seed=${this.seed}&temperature=${this.temp}`;
const r = await fetch(url);
if (!r.ok) return "Network error!! AI is sleeping?";
const res = await r.text();

const botNames = Object.keys(this.bots);
if (botNames.length > 0) {
this.bots[botNames[0]].push({ q: TEXT, a: res });
}
return res;
} catch (e) {
return "Error connecting to AI... try again later!!";
}
}

getImageUrl({ TEXT }) {
try {
let url = `https://image.pollinations.ai/prompt/${encodeURIComponent(TEXT)}?model=${this.imageModel}&seed=${this.seed}&nologo=true`;
if (this.attachedFile)
url += `&feed=${encodeURIComponent(this.attachedFile)}`;
return url;
} catch (err) {
return "url_error_check_prompt";
}
}

async setContextText({ CTX, TEXT }) {
return await this.simplePrompt({ TEXT: `[Context: ${CTX}] ${TEXT}` });
}

setContextImage({ CTX, TEXT }) {
return this.getImageUrl({ TEXT: `${CTX}, ${TEXT}` });
}
}

Scratch.extensions.register(new TurboBot());
})(Scratch);
1 change: 1 addition & 0 deletions extensions/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"runtime-options",
"fetch",
"text",
"Seigh-sword/turbobot",
"local-storage",
"true-fantom/base",
"bitwise",
Expand Down
7 changes: 6 additions & 1 deletion images/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ All images in this folder are licensed under the [GNU General Public License ver
## text.svg
- Based on https://github.com/ScratchCE/scratch-gui/blob/develop/src/lib/libraries/extensions/strings/strings.png by [@JoshsAccount](https://scratch.mit.edu/users/JoshsAccount/) under [The GNU General Public License version 3](https://www.gnu.org/licenses/gpl-3.0.html).

## Seigh-sword/turbobot.svg
- Created by **[@Seigh-sword](https://github.com/Seigh-sword/)** in [canva](https://www.canva.com/)
- Used **[Turbowarp's](https://turbowarp.org/)** logo on the top-left corner as the logo
- Used [PhotoPea](https://www.photopea.com/) to make the file from png to svg and resize and used other tools like blur, and to make it the form that we know now

## Lily/lmsutils.svg
- Created by [@HamsterCreativity](https://scratch.mit.edu/users/HamsterCreativity/) in https://github.com/TurboWarp/extensions/issues/90#issuecomment-1694410464.

Expand Down Expand Up @@ -323,4 +328,4 @@ All images in this folder are licensed under the [GNU General Public License ver
- Created by [@SharkPool-SP](https://github.com/SharkPool-SP/)

## DogeisCut/FormatNumbers.png
- Created by [@Dillon](https://github.com/DillonRGaming)
- Created by [@Dillon](https://github.com/DillonRGaming)
8 changes: 8 additions & 0 deletions images/Seigh-sword/turbobot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.