style: prettier formatting fixes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -29,7 +29,9 @@ function now() {
|
||||
}
|
||||
|
||||
/** Create a mock ChannelAdapter for testing. */
|
||||
function createMockAdapter(channelType: string): ChannelAdapter & { delivered: OutboundMessage[]; inbound: InboundMessage[] } {
|
||||
function createMockAdapter(
|
||||
channelType: string,
|
||||
): ChannelAdapter & { delivered: OutboundMessage[]; inbound: InboundMessage[] } {
|
||||
const delivered: OutboundMessage[] = [];
|
||||
const inbound: InboundMessage[] = [];
|
||||
let setupConfig: ChannelSetup | null = null;
|
||||
@@ -74,9 +76,8 @@ describe('channel registry', () => {
|
||||
});
|
||||
|
||||
it('should register and retrieve channel adapters', async () => {
|
||||
const { registerChannelAdapter, getRegisteredChannelNames, getChannelContainerConfig } = await import(
|
||||
'./channel-registry.js'
|
||||
);
|
||||
const { registerChannelAdapter, getRegisteredChannelNames, getChannelContainerConfig } =
|
||||
await import('./channel-registry.js');
|
||||
|
||||
registerChannelAdapter('test-channel', {
|
||||
factory: () => createMockAdapter('test'),
|
||||
|
||||
@@ -27,9 +27,7 @@ export function getAllMessagingGroups(): MessagingGroup[] {
|
||||
}
|
||||
|
||||
export function getMessagingGroupsByChannel(channelType: string): MessagingGroup[] {
|
||||
return getDb()
|
||||
.prepare('SELECT * FROM messaging_groups WHERE channel_type = ?')
|
||||
.all(channelType) as MessagingGroup[];
|
||||
return getDb().prepare('SELECT * FROM messaging_groups WHERE channel_type = ?').all(channelType) as MessagingGroup[];
|
||||
}
|
||||
|
||||
export function updateMessagingGroup(
|
||||
|
||||
@@ -20,11 +20,7 @@ import { log } from './log.js';
|
||||
// import './channels/discord-v2.js';
|
||||
|
||||
import type { ChannelAdapter, ChannelSetup, ConversationConfig } from './channels/adapter.js';
|
||||
import {
|
||||
initChannelAdapters,
|
||||
teardownChannelAdapters,
|
||||
getChannelAdapter,
|
||||
} from './channels/channel-registry.js';
|
||||
import { initChannelAdapters, teardownChannelAdapters, getChannelAdapter } from './channels/channel-registry.js';
|
||||
|
||||
async function main(): Promise<void> {
|
||||
log.info('NanoClaw v2 starting');
|
||||
|
||||
Reference in New Issue
Block a user