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
@@ -17,12 +17,16 @@ import * as fs from 'fs'
import { pipeWriteRegardlessError } from '../utils/pipe' import { pipeWriteRegardlessError } from '../utils/pipe'
import { BossInfo } from '@geekgeekrun/sqlite-plugin/dist/entity/BossInfo' import { BossInfo } from '@geekgeekrun/sqlite-plugin/dist/entity/BossInfo'
import { messageForSaveFilter } from '../../../common/utils/chat-list' import { messageForSaveFilter } from '../../../common/utils/chat-list'
import { RECHAT_CONTENT_SOURCE } from '../../../common/enums/auto-start-chat'
const throttleIntervalMinutes = const throttleIntervalMinutes =
readConfigFile('boss.json').autoReminder?.throttleIntervalMinutes ?? 10 readConfigFile('boss.json').autoReminder?.throttleIntervalMinutes ?? 10
const rechatLimitDay = readConfigFile('boss.json').autoReminder?.rechatLimitDay ?? 21 const rechatLimitDay = readConfigFile('boss.json').autoReminder?.rechatLimitDay ?? 21
const recentMessageQuantityForLlm = const recentMessageQuantityForLlm =
readConfigFile('boss.json').autoReminder?.recentMessageQuantityForLlm ?? 8 readConfigFile('boss.json').autoReminder?.recentMessageQuantityForLlm ?? 8
const rechatContentSource =
readConfigFile('boss.json').autoReminder?.rechatContentSource ??
RECHAT_CONTENT_SOURCE.LOOK_FORWARD_EMOTION
const dbInitPromise = initDb(getPublicDbFilePath()) const dbInitPromise = initDb(getPublicDbFilePath())
@@ -280,9 +284,7 @@ const mainLoop = async () => {
(throttleIntervalMinutes + 4 * Math.random()) * 60 * 1000 (throttleIntervalMinutes + 4 * Math.random()) * 60 * 1000
) { ) {
await sleepWithRandomDelay(3250) await sleepWithRandomDelay(3250)
// execute reply if (rechatContentSource === RECHAT_CONTENT_SOURCE.GEMINI_WITH_CHAT_CONTEXT) {
// eslint-disable-next-line no-constant-condition
if (1 + 1 === 2) {
try { try {
const messageListForGpt = historyMessageList.filter(it => it.bizType !== 101 && it.isSelf).slice(-recentMessageQuantityForLlm) const messageListForGpt = historyMessageList.filter(it => it.bizType !== 101 && it.isSelf).slice(-recentMessageQuantityForLlm)
await sendGptContent(pageMapByName.boss!, messageListForGpt) await sendGptContent(pageMapByName.boss!, messageListForGpt)
+2 -2
View File
@@ -142,9 +142,9 @@ const router = createRouter({
router.afterEach((to, from) => { router.afterEach((to, from) => {
if (to.meta?.title) { if (to.meta?.title) {
document.title = `${to.meta.title} - GeekGeekRun` document.title = `${to.meta.title} - GeekGeekRun 牛人快跑`
} else { } else {
document.title = `GeekGeekRun` document.title = `GeekGeekRun 牛人快跑`
} }
gtagRenderer('router_path_changed', { gtagRenderer('router_path_changed', {
from_path: from.fullPath, from_path: from.fullPath,