make rechatContentSource take effect; change window title

This commit is contained in:
geekgeekrun
2025-04-14 23:41:35 +08:00
parent 73d03cb76a
commit 764d278c23
2 changed files with 7 additions and 5 deletions

View File

@@ -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)

View File

@@ -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,