opencrush 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +19 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38420,11 +38420,6 @@ async function callLLMDirect(provider, apiKey, systemPrompt, messages, maxTokens
|
|
|
38420
38420
|
function getProviderInfo(id) {
|
|
38421
38421
|
return PROVIDER_INFO.find((p2) => p2.id === id);
|
|
38422
38422
|
}
|
|
38423
|
-
function detectRegion() {
|
|
38424
|
-
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
38425
|
-
const cnZones = ["Asia/Shanghai", "Asia/Beijing", "Asia/Chongqing", "Asia/Harbin", "PRC"];
|
|
38426
|
-
return cnZones.includes(tz) ? "cn" : "overseas";
|
|
38427
|
-
}
|
|
38428
38423
|
var PROVIDER_META, PROVIDER_INFO;
|
|
38429
38424
|
var init_llm_direct = __esm({
|
|
38430
38425
|
"src/llm-direct.ts"() {
|
|
@@ -245020,8 +245015,7 @@ async function runSetupWizard() {
|
|
|
245020
245015
|
\u2551 Your AI companion, always there \u2551
|
|
245021
245016
|
\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
245022
245017
|
`));
|
|
245023
|
-
const
|
|
245024
|
-
const isCN = region === "cn";
|
|
245018
|
+
const isCN = false;
|
|
245025
245019
|
console.log(source_default.cyan(isCN ? "\u6B22\u8FCE\uFF01\u51E0\u6B65\u5C31\u80FD\u641E\u5B9A\u3002\n" : "Welcome! Let's get you set up.\n"));
|
|
245026
245020
|
const { setupMode } = await esm_default12.prompt([{
|
|
245027
245021
|
type: "list",
|
|
@@ -245261,6 +245255,22 @@ async function runSetupWizard() {
|
|
|
245261
245255
|
envValues.PROACTIVE_MESSAGE_MAX_INTERVAL = "240";
|
|
245262
245256
|
envValues.QUIET_HOURS_START = "23";
|
|
245263
245257
|
envValues.QUIET_HOURS_END = "8";
|
|
245258
|
+
const { wantSelfies } = await esm_default12.prompt([{
|
|
245259
|
+
type: "confirm",
|
|
245260
|
+
name: "wantSelfies",
|
|
245261
|
+
message: "\u{1F4F8} Enable selfies & video? (fal.ai \u2014 free credits on signup)",
|
|
245262
|
+
default: true
|
|
245263
|
+
}]);
|
|
245264
|
+
if (wantSelfies) {
|
|
245265
|
+
await openBrowserPrompt("https://fal.ai/dashboard/keys", false);
|
|
245266
|
+
const { falKey } = await esm_default12.prompt([{
|
|
245267
|
+
type: "password",
|
|
245268
|
+
name: "falKey",
|
|
245269
|
+
message: "Paste your fal.ai key (or press Enter to skip):",
|
|
245270
|
+
mask: "*"
|
|
245271
|
+
}]);
|
|
245272
|
+
if (falKey.trim()) envValues.FAL_KEY = falKey.trim();
|
|
245273
|
+
}
|
|
245264
245274
|
const quickEnvPath = (0, import_fs20.existsSync)(_legacyEnv) && _legacyEnv !== getEnvPath() ? _legacyEnv : getEnvPath();
|
|
245265
245275
|
const quickSpinner = ora("Writing configuration...").start();
|
|
245266
245276
|
(0, import_fs20.writeFileSync)(quickEnvPath, generateEnvFile(envValues), "utf-8");
|
|
@@ -245268,10 +245278,11 @@ async function runSetupWizard() {
|
|
|
245268
245278
|
console.log("\n" + boxen(
|
|
245269
245279
|
source_default.green("\u2705 " + (isCN ? "\u8BBE\u7F6E\u5B8C\u6210\uFF01\n\n" : "Setup complete!\n\n")) + source_default.white(isCN ? "\u5DF2\u542F\u7528:\n" : "Enabled:\n") + [
|
|
245270
245280
|
`\u{1F9E0} AI: ${((_a3 = getProviderInfo(envValues.LLM_PROVIDER)) == null ? void 0 : _a3.name) ?? envValues.LLM_PROVIDER}`,
|
|
245271
|
-
`\u{1F49D}
|
|
245281
|
+
`\u{1F49D} Character: ${characterName}`,
|
|
245272
245282
|
envValues.WHATSAPP_ENABLED ? "\u{1F4AC} WhatsApp" : "",
|
|
245273
245283
|
envValues.DISCORD_BOT_TOKEN ? "\u{1F3AE} Discord" : "",
|
|
245274
245284
|
envValues.TELEGRAM_BOT_TOKEN ? "\u{1F4EC} Telegram" : "",
|
|
245285
|
+
envValues.FAL_KEY ? "\u{1F4F8} Selfies & Video" : "",
|
|
245275
245286
|
"\u{1F495} Emotion engine \u{1F91D} Relationship tracking \u{1F9E0} Memory"
|
|
245276
245287
|
].filter(Boolean).map((f2) => source_default.cyan(` ${f2}`)).join("\n") + "\n\n" + source_default.gray(isCN ? " \u89E3\u9501\u81EA\u62CD/\u8BED\u97F3\u7B49: npx opencrush@latest setup \u2192 \u5B8C\u6574\u8BBE\u7F6E" : " Unlock selfies/voice: npx opencrush@latest setup \u2192 Full setup"),
|
|
245277
245288
|
{ padding: 1, margin: 1, borderStyle: "round", borderColor: "magenta" }
|