style: format after runtime unification
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,9 +22,7 @@ import {
|
||||
getChannelFactory,
|
||||
getRegisteredChannelNames,
|
||||
} from './channels/registry.js';
|
||||
import {
|
||||
writeGroupsSnapshot,
|
||||
} from './agent-runner.js';
|
||||
import { writeGroupsSnapshot } from './agent-runner.js';
|
||||
import {
|
||||
getAllChats,
|
||||
getAllRegisteredGroups,
|
||||
|
||||
@@ -31,10 +31,7 @@ vi.mock('./db.js', () => {
|
||||
const withSeqs = (messages: Array<Record<string, unknown>>) =>
|
||||
messages.map((message, index) => ({
|
||||
...message,
|
||||
seq:
|
||||
typeof message.seq === 'number'
|
||||
? message.seq
|
||||
: index + 1,
|
||||
seq: typeof message.seq === 'number' ? message.seq : index + 1,
|
||||
}));
|
||||
|
||||
return {
|
||||
@@ -50,7 +47,8 @@ vi.mock('./db.js', () => {
|
||||
sinceSeqCursor: string,
|
||||
botPrefix: string,
|
||||
limit?: number,
|
||||
) => withSeqs(getMessagesSince(chatJid, sinceSeqCursor, botPrefix, limit)),
|
||||
) =>
|
||||
withSeqs(getMessagesSince(chatJid, sinceSeqCursor, botPrefix, limit)),
|
||||
),
|
||||
getNewMessagesBySeq: vi.fn(
|
||||
(
|
||||
@@ -65,8 +63,12 @@ vi.mock('./db.js', () => {
|
||||
newSeqCursor?: string;
|
||||
newTimestamp?: string;
|
||||
}
|
||||
| undefined =
|
||||
getNewMessages(jids, lastSeqCursor, botPrefix, limit) || {
|
||||
| undefined = getNewMessages(
|
||||
jids,
|
||||
lastSeqCursor,
|
||||
botPrefix,
|
||||
limit,
|
||||
) || {
|
||||
messages: [],
|
||||
newSeqCursor: '0',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user