From 764d278c23163615888e561458f12185cf1bdbdf Mon Sep 17 00:00:00 2001 From: geekgeekrun Date: Mon, 14 Apr 2025 23:41:35 +0800 Subject: [PATCH] make rechatContentSource take effect; change window title --- .../ui/src/main/flow/READ_NO_REPLY_AUTO_REMINDER/index.ts | 8 +++++--- packages/ui/src/renderer/src/router/index.ts | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/ui/src/main/flow/READ_NO_REPLY_AUTO_REMINDER/index.ts b/packages/ui/src/main/flow/READ_NO_REPLY_AUTO_REMINDER/index.ts index 545598c..90f4c1e 100644 --- a/packages/ui/src/main/flow/READ_NO_REPLY_AUTO_REMINDER/index.ts +++ b/packages/ui/src/main/flow/READ_NO_REPLY_AUTO_REMINDER/index.ts @@ -17,12 +17,16 @@ import * as fs from 'fs' import { pipeWriteRegardlessError } from '../utils/pipe' import { BossInfo } from '@geekgeekrun/sqlite-plugin/dist/entity/BossInfo' import { messageForSaveFilter } from '../../../common/utils/chat-list' +import { RECHAT_CONTENT_SOURCE } from '../../../common/enums/auto-start-chat' const throttleIntervalMinutes = readConfigFile('boss.json').autoReminder?.throttleIntervalMinutes ?? 10 const rechatLimitDay = readConfigFile('boss.json').autoReminder?.rechatLimitDay ?? 21 const recentMessageQuantityForLlm = readConfigFile('boss.json').autoReminder?.recentMessageQuantityForLlm ?? 8 +const rechatContentSource = + readConfigFile('boss.json').autoReminder?.rechatContentSource ?? + RECHAT_CONTENT_SOURCE.LOOK_FORWARD_EMOTION const dbInitPromise = initDb(getPublicDbFilePath()) @@ -280,9 +284,7 @@ const mainLoop = async () => { (throttleIntervalMinutes + 4 * Math.random()) * 60 * 1000 ) { await sleepWithRandomDelay(3250) - // execute reply - // eslint-disable-next-line no-constant-condition - if (1 + 1 === 2) { + if (rechatContentSource === RECHAT_CONTENT_SOURCE.GEMINI_WITH_CHAT_CONTEXT) { try { const messageListForGpt = historyMessageList.filter(it => it.bizType !== 101 && it.isSelf).slice(-recentMessageQuantityForLlm) await sendGptContent(pageMapByName.boss!, messageListForGpt) diff --git a/packages/ui/src/renderer/src/router/index.ts b/packages/ui/src/renderer/src/router/index.ts index e8eb87a..f162633 100644 --- a/packages/ui/src/renderer/src/router/index.ts +++ b/packages/ui/src/renderer/src/router/index.ts @@ -142,9 +142,9 @@ const router = createRouter({ router.afterEach((to, from) => { if (to.meta?.title) { - document.title = `${to.meta.title} - GeekGeekRun` + document.title = `${to.meta.title} - GeekGeekRun 牛人快跑` } else { - document.title = `GeekGeekRun` + document.title = `GeekGeekRun 牛人快跑` } gtagRenderer('router_path_changed', { from_path: from.fullPath,