Skip to content

Commit 158f8cb

Browse files
committed
formatting
1 parent 1da911d commit 158f8cb

9 files changed

Lines changed: 17 additions & 17 deletions

File tree

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const plugin: Plugin = (async (ctx) => {
6565

6666
// Check for updates after a delay
6767
setTimeout(() => {
68-
checkForUpdates(ctx.client, logger, config.showUpdateToasts ?? true).catch(() => {})
68+
checkForUpdates(ctx.client, logger, config.showUpdateToasts ?? true).catch(() => { })
6969
}, 5000)
7070

7171
// Show migration toast if there were config migrations

lib/fetch-wrapper/formats/bedrock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function injectSynth(messages: any[], instruction: string, nudgeText: string): b
1515
const msg = messages[i]
1616
if (msg.role === 'user') {
1717
if (isNudgeMessage(msg, nudgeText)) continue
18-
18+
1919
if (typeof msg.content === 'string') {
2020
if (msg.content.includes(instruction)) return false
2121
msg.content = msg.content + '\n\n' + instruction

lib/fetch-wrapper/formats/gemini.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function injectSynth(contents: any[], instruction: string, nudgeText: string): b
1515
const content = contents[i]
1616
if (content.role === 'user' && Array.isArray(content.parts)) {
1717
if (isNudgeContent(content, nudgeText)) continue
18-
18+
1919
const alreadyInjected = content.parts.some(
2020
(part: any) => part?.text && typeof part.text === 'string' && part.text.includes(instruction)
2121
)

lib/fetch-wrapper/formats/openai-chat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function injectSynth(messages: any[], instruction: string, nudgeText: string): b
1515
const msg = messages[i]
1616
if (msg.role === 'user') {
1717
if (isNudgeMessage(msg, nudgeText)) continue
18-
18+
1919
if (typeof msg.content === 'string') {
2020
if (msg.content.includes(instruction)) return false
2121
msg.content = msg.content + '\n\n' + instruction

lib/fetch-wrapper/formats/openai-responses.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function injectSynth(input: any[], instruction: string, nudgeText: string): bool
1515
const item = input[i]
1616
if (item.type === 'message' && item.role === 'user') {
1717
if (isNudgeItem(item, nudgeText)) continue
18-
18+
1919
if (typeof item.content === 'string') {
2020
if (item.content.includes(instruction)) return false
2121
item.content = item.content + '\n\n' + instruction

lib/fetch-wrapper/gc-tracker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function accumulateGCStats(
1414
const tokensCollected = estimateTokensFromOutputs(toolOutputs)
1515

1616
const existing = state.gcPending.get(sessionId) ?? { tokensCollected: 0, toolsDeduped: 0 }
17-
17+
1818
state.gcPending.set(sessionId, {
1919
tokensCollected: existing.tokensCollected + tokensCollected,
2020
toolsDeduped: existing.toolsDeduped + prunedIds.length

lib/fetch-wrapper/handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async function getAllPrunedIds(
4040
await ensureSessionRestored(state, currentSession.id, logger)
4141
const prunedIds = state.prunedIds.get(currentSession.id) ?? []
4242
prunedIds.forEach((id: string) => allPrunedIds.add(id.toLowerCase()))
43-
43+
4444
if (logger && prunedIds.length > 0) {
4545
logger.debug("fetch", "Loaded pruned IDs for replacement", {
4646
sessionId: currentSession.id,

lib/hooks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ export function createChatParamsHandler(
116116
if (part.type === 'tool' && part.callID && part.tool) {
117117
const toolName = part.tool.toLowerCase()
118118
const callId = part.callID.toLowerCase()
119-
119+
120120
if (!toolCallsByName.has(toolName)) {
121121
toolCallsByName.set(toolName, [])
122122
}
123123
toolCallsByName.get(toolName)!.push(callId)
124-
124+
125125
if (!state.toolParameters.has(callId)) {
126126
state.toolParameters.set(callId, {
127127
tool: part.tool,

lib/state/tool-cache.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ export function cacheToolParametersFromMessages(
3232
const params = typeof toolCall.function.arguments === 'string'
3333
? JSON.parse(toolCall.function.arguments)
3434
: toolCall.function.arguments
35-
state.toolParameters.set(toolCall.id.toLowerCase(), {
36-
tool: toolCall.function.name,
37-
parameters: params
38-
})
35+
state.toolParameters.set(toolCall.id.toLowerCase(), {
36+
tool: toolCall.function.name,
37+
parameters: params
38+
})
3939
openaiCached++
4040
} catch (error) {
4141
}
@@ -48,10 +48,10 @@ export function cacheToolParametersFromMessages(
4848
continue
4949
}
5050

51-
state.toolParameters.set(part.id.toLowerCase(), {
52-
tool: part.name,
53-
parameters: part.input ?? {}
54-
})
51+
state.toolParameters.set(part.id.toLowerCase(), {
52+
tool: part.name,
53+
parameters: part.input ?? {}
54+
})
5555
anthropicCached++
5656
}
5757
}

0 commit comments

Comments
 (0)