diff --git a/dist/buildinfo.json b/dist/buildinfo.json index 0ff6f3b0..ee0d9618 100644 --- a/dist/buildinfo.json +++ b/dist/buildinfo.json @@ -1 +1 @@ -{"sha":"54bfa9a","timestamp":1731581746} \ No newline at end of file +{"sha":"463cf14","timestamp":1731589675} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 7266291a..075a4cc2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -192,8 +192,8 @@ class ConfigMerger { } } } -const BUILD_TIMESTAMP = 1731581746; -const BUILD_VERSION = "54bfa9a"; +const BUILD_TIMESTAMP = 1731589675; +const BUILD_VERSION = "463cf14"; function createAgentUserConfig() { return Object.assign( {}, @@ -267,6 +267,9 @@ class Environment extends EnvironmentConfig { this.migrateOldEnv(source); this.USER_CONFIG.DEFINE_KEYS = []; this.I18N = loadI18n(this.LANGUAGE.toLowerCase()); + if (!this.USER_CONFIG.SYSTEM_INIT_MESSAGE) { + this.USER_CONFIG.SYSTEM_INIT_MESSAGE = this.I18N?.env?.system_init_message || "You are a helpful assistant"; + } } mergeCommands(prefix, descriptionPrefix, scopePrefix, source, target) { for (const key of Object.keys(source)) { diff --git a/packages/apps/vercel/package.json b/packages/apps/vercel/package.json index db649b96..1b6c97d3 100644 --- a/packages/apps/vercel/package.json +++ b/packages/apps/vercel/package.json @@ -6,8 +6,7 @@ "types": "./dist/index.d.ts", "scripts": { "build": "pnpm vite build", - "clean": "rm -rf dist", - "sync": "tsx src/sync.ts" + "clean": "rm -rf dist" }, "dependencies": { "@chatgpt-telegram-workers/core": "workspace:*", diff --git a/packages/lib/core/src/config/env.ts b/packages/lib/core/src/config/env.ts index f31cb8fa..2ee09f28 100644 --- a/packages/lib/core/src/config/env.ts +++ b/packages/lib/core/src/config/env.ts @@ -121,6 +121,9 @@ class Environment extends EnvironmentConfig { this.migrateOldEnv(source); this.USER_CONFIG.DEFINE_KEYS = []; this.I18N = loadI18n(this.LANGUAGE.toLowerCase()); + if (!this.USER_CONFIG.SYSTEM_INIT_MESSAGE) { + this.USER_CONFIG.SYSTEM_INIT_MESSAGE = this.I18N?.env?.system_init_message || 'You are a helpful assistant'; + } } private mergeCommands(prefix: string, descriptionPrefix: string, scopePrefix: string, source: any, target: Record) { diff --git a/packages/lib/core/src/config/version.ts b/packages/lib/core/src/config/version.ts index ff219de1..979288c3 100644 --- a/packages/lib/core/src/config/version.ts +++ b/packages/lib/core/src/config/version.ts @@ -1,2 +1,2 @@ -export const BUILD_TIMESTAMP = 1731581746; -export const BUILD_VERSION = '54bfa9a'; +export const BUILD_TIMESTAMP = 1731589675; +export const BUILD_VERSION = '463cf14'; diff --git a/scripts/vercel-sync-env.ts b/scripts/vercel-sync-env.ts index 2f929116..1629001c 100644 --- a/scripts/vercel-sync-env.ts +++ b/scripts/vercel-sync-env.ts @@ -9,9 +9,13 @@ async function main() { VERCEL_BIN = './node_modules/.bin/vercel', } = process.env; - const envs = execSync(`${VERCEL_BIN} env ls ${VERCEL_ENV}`, { - encoding: 'utf-8', - }).trim().split('\n').map(l => l.trim()).slice(1).map(l => l.split(/\s+/)[0]).map(l => l.replace(/[^\x20-\x7E]/g, '').replace(/\[\d+m/g, '')); + const envs = execSync(`${VERCEL_BIN} env ls ${VERCEL_ENV}`, { encoding: 'utf-8' }) + .trim() + .split('\n') + .map(l => l.trim()) + .slice(1) + .map(l => l.split(/\s+/)[0]) + .map(l => l.replace(/[^\x20-\x7E]/g, '').replace(/\[\d+m/g, '')); const usedKeys = new Set(); usedKeys.add('UPSTASH_REDIS_REST_URL'); usedKeys.add('UPSTASH_REDIS_REST_TOKEN');