fix: ban telegram log
Browse files
src/hooks/useTelegramBridge.ts
CHANGED
|
@@ -15,8 +15,11 @@ import type { Message } from '../types/message.js'
|
|
| 15 |
import { enqueue } from '../utils/messageQueueManager.js'
|
| 16 |
import { getContentText } from '../utils/messages.js'
|
| 17 |
|
| 18 |
-
// 日志函数 -
|
| 19 |
function logTelegramDebug(message: string, level: 'debug' | 'error' | 'info' = 'debug'): void {
|
|
|
|
|
|
|
|
|
|
| 20 |
try {
|
| 21 |
const fs = require('node:fs')
|
| 22 |
const path = require('node:path')
|
|
@@ -27,6 +30,7 @@ function logTelegramDebug(message: string, level: 'debug' | 'error' | 'info' = '
|
|
| 27 |
} catch (error) {
|
| 28 |
// 忽略文件写入错误
|
| 29 |
}
|
|
|
|
| 30 |
}
|
| 31 |
|
| 32 |
type Props = {
|
|
|
|
| 15 |
import { enqueue } from '../utils/messageQueueManager.js'
|
| 16 |
import { getContentText } from '../utils/messages.js'
|
| 17 |
|
| 18 |
+
// 日志函数 - 已禁用,不再写入文件
|
| 19 |
function logTelegramDebug(message: string, level: 'debug' | 'error' | 'info' = 'debug'): void {
|
| 20 |
+
// Telegram 功能已完成,禁用日志输出到 log.md
|
| 21 |
+
// 如需调试,可以临时取消注释下面的代码
|
| 22 |
+
/*
|
| 23 |
try {
|
| 24 |
const fs = require('node:fs')
|
| 25 |
const path = require('node:path')
|
|
|
|
| 30 |
} catch (error) {
|
| 31 |
// 忽略文件写入错误
|
| 32 |
}
|
| 33 |
+
*/
|
| 34 |
}
|
| 35 |
|
| 36 |
type Props = {
|
src/services/telegram/interactiveCommands.ts
CHANGED
|
@@ -30,9 +30,11 @@ import type {
|
|
| 30 |
TelegramInlineKeyboardMarkup,
|
| 31 |
} from './telegramTypes.js'
|
| 32 |
|
| 33 |
-
// 辅助函数:记录 Telegram 相关日志
|
| 34 |
function logTelegramDebug(message: string, level: 'debug' | 'error' | 'info' = 'debug'): void {
|
| 35 |
-
|
|
|
|
|
|
|
| 36 |
}
|
| 37 |
|
| 38 |
const COPILOT_CLIENT_ID = 'Ov23li8tweQw6odWQebz'
|
|
|
|
| 30 |
TelegramInlineKeyboardMarkup,
|
| 31 |
} from './telegramTypes.js'
|
| 32 |
|
| 33 |
+
// 辅助函数:记录 Telegram 相关日志(已禁用)
|
| 34 |
function logTelegramDebug(message: string, level: 'debug' | 'error' | 'info' = 'debug'): void {
|
| 35 |
+
// Telegram 功能已完成,禁用日志输出
|
| 36 |
+
// 如需调试,可以临时取消注释下面的代码
|
| 37 |
+
// logForDebugging(`[telegram] ${message}`, { level })
|
| 38 |
}
|
| 39 |
|
| 40 |
const COPILOT_CLIENT_ID = 'Ov23li8tweQw6odWQebz'
|