Skip to content

Commit 7c5757a

Browse files
committed
merged API_HOST and AI_HOST
1 parent 93383e2 commit 7c5757a

3 files changed

Lines changed: 10 additions & 11 deletions

File tree

‎src/addons/addons/ai-integration/userscript.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import GetSVG from "./helpers/parser.js";
22
import helpers from "./helpers/helpers.js";
33
import Attachment from "./helpers/attachment.js";
44
import main from "./main.js";
5+
const {API_HOST} = require('../../../lib/brand.js');
56

6-
const apiUrl = "http://127.0.0.1:5000";
77
let authToken = {};
88

99
var mainWorkspace;
@@ -47,7 +47,7 @@ export default async function ({ addon, console }) {
4747
const Blockly = await addon.tab.traps.getBlockly();
4848
//mainWorkspace = Blockly.getMainWorkspace();
4949
mainWorkspace = addon.tab.traps.getWorkspace();
50-
main.apiUrl = apiUrl;
50+
main.apiUrl = API_HOST+"/torchy/";
5151
main.authToken = authToken;
5252
main.mainWorkspace = mainWorkspace;
5353
main.Gaddon = addon;
@@ -58,7 +58,7 @@ export default async function ({ addon, console }) {
5858
//create new CSS (style for popup)
5959
const style = document.createElement('link');
6060
style.setAttribute('rel', 'stylesheet');
61-
style.setAttribute('href', apiUrl + '/main.css');
61+
style.setAttribute('href', API_HOST + '/torchy/main.css');
6262
document.head.appendChild(style);
6363

6464
if (authToken.gemini == "" && authToken.openrouter == "") {
@@ -68,8 +68,8 @@ export default async function ({ addon, console }) {
6868
});
6969
return;
7070
}else{
71-
//fetch apiUrl + "/AI_models"
72-
fetch(apiUrl + "/AI_models", {
71+
//fetch API_HOST + "/torchy/AI_models"
72+
fetch(API_HOST + "/torchy/AI_models", {
7373
method: 'GET',
7474
headers: {
7575
'Content-Type': 'application/json',

‎src/lib/brand.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ module.exports = {
55
APP_DOMAIN: 'https://codetorch.net',
66
API_HOST: 'http://localhost:8093',
77
DEFAULT_CLOUD_HOST: 'wss://cloudserver.codetorch.net',
8-
AI_HOST: 'http://127.0.0.1:5000',
98
enableGenerate: false,
109
};

‎src/lib/libraries/decks/index.jsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { FormattedMessage } from 'react-intl';
88
// Animate A Character
99
import libraryAnimateChar from './thumbnails/animate-a-character.jpg';
1010

11-
const { AI_HOST } = require('../../brand');
11+
const { API_HOST } = require('../../brand');
1212

1313

1414
export const CATEGORIES = {
@@ -48,7 +48,7 @@ export default {
4848
id="gui.gettingStarted.ai-use.addApiKeys"
4949
/>
5050
),
51-
video: AI_HOST + '/open-addons-tab.mp4',
51+
video: API_HOST + '/torchy/open-addons-tab.mp4',
5252
},
5353
{
5454
title: (
@@ -58,7 +58,7 @@ export default {
5858
id="gui.gettingStarted.ai-use.openPopup"
5959
/>
6060
),
61-
video: AI_HOST + '/open-popup.mp4',
61+
video: API_HOST + '/torchy/open-popup.mp4',
6262
},
6363
{
6464
title: (
@@ -68,7 +68,7 @@ export default {
6868
id="gui.gettingStarted.ai-use.popupUI"
6969
/>
7070
),
71-
img: AI_HOST + '/popup-ui.png',
71+
img: API_HOST + '/torchy/popup-ui.png',
7272
},
7373
{
7474
title: (
@@ -78,7 +78,7 @@ export default {
7878
id="gui.gettingStarted.ai-use.insertCode"
7979
/>
8080
),
81-
img: AI_HOST + '/insert-code.png',
81+
img: API_HOST + '/torchy/insert-code.png',
8282
},
8383
{
8484
title: (

0 commit comments

Comments
 (0)