Skip to content

Commit 362f6ab

Browse files
chore: remove debug logging and add whitespace for readability
1 parent 19edfad commit 362f6ab

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

src/lib/history.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,6 @@ import { formatMessagesAsText } from './utils'
77
const lookbackHours = Number.parseInt(HISTORY_LOOKBACK_HOURS || '0')
88

99
export const fetchRelevantHistory = async (messages: Message[]): Promise<string> => {
10-
logger.debug(
11-
{
12-
original: messages[0].timestamp,
13-
isoParsed: new Date(messages[0].timestamp).toISOString(),
14-
localParsed: new Date(messages[0].timestamp).toLocaleString('en-US', {
15-
timeZone: 'America/Los_Angeles',
16-
}),
17-
},
18-
'Timestamp interpretation test'
19-
)
20-
2110
try {
2211
if (!lookbackHours || messages.length === 0) {
2312
logger.warn('No messages or invalid lookbackHours; skipping history fetch')

src/lib/utils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,18 @@ export const extractReplies = (rawOutput: string): string[] => {
4545
return cleanReplyText(currentMatch[1] || currentMatch[2] || '')
4646
})
4747
.filter(Boolean)
48+
4849
return replies
4950
}
5051

5152
export const safeCompare = (a: string, b: string): boolean => {
5253
const len = Math.max(a.length, b.length)
5354
const aBuf = Buffer.alloc(len, 0)
5455
const bBuf = Buffer.alloc(len, 0)
56+
5557
Buffer.from(a).copy(aBuf)
5658
Buffer.from(b).copy(bBuf)
59+
5760
return timingSafeEqual(aBuf, bBuf) && a.length === b.length
5861
}
5962

0 commit comments

Comments
 (0)