src / config.ts
import { createConfigSchematics } from "@lmstudio/sdk";
export const configSchematics = createConfigSchematics()
.field(
// any text field
"place-holder",
"string",
{
displayName: "Just text / ---",
subtitle: "--- / Not yet / --- \n These keys might become invalid \n Use your own",
nonConfigurable: true
},
"Not yet"
)
// a Nickname for the chat in Cloud RTDB
.field(
"defaultUsername",
"string",
{
displayName: "Nickname (Username)",
subtitle: "name for chat / from / to / username",
placeholder: "enter your alias (for Example, Alex)"
},
"" //User_" + Math.floor(Math.random() * 1000) // random, User_497
)
// Public Web API Key of Firebase
.field(
"firebaseApiKey",
"string",
{
displayName: "Firebase API Key:",
subtitle: "Public key Firebase (anonymous id auth)",
placeholder: "insert a key AIzaSy..."
},
"AIzaSyBsK7vU5WlGgoiPx7Scb_myXqowTxoTsFQ" // <-- API KEY -- this is my key. I can revoke this key at any time.
)
// URL of yours Realtime Database :: if my base remains, it will be a single space for everyone on LMS Hub.
.field(
"firebaseDbUrl",
"string",
{
displayName: "Firebase Database URL:",
subtitle: "URL of RTDB (endpoint)",
placeholder: "https://...-rtdb.firebaseio.com"
},
"https://gitchat-2b675-default-rtdb.firebaseio.com" // <-- RTDB LINK -- my db in google acc. https://firebase.google.com/
)
.build();
// this Key is my own from the RTDB. It should be the same for everyone so that different users can see (and post to) each other.
//const API_KEY = "AIzaSyBsK7vU5WlGgoiPx7Scb_myXqowTxoTsFQ";
//const DB_URL = "https://gitchat-2b675-default-rtdb.firebaseio.com"