style: prettier formatting fixes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
gavrielc
2026-04-09 01:40:52 +03:00
parent 6f2a7314d0
commit b36f127acc
3 changed files with 7 additions and 12 deletions

View File

@@ -29,7 +29,9 @@ function now() {
} }
/** Create a mock ChannelAdapter for testing. */ /** 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 delivered: OutboundMessage[] = [];
const inbound: InboundMessage[] = []; const inbound: InboundMessage[] = [];
let setupConfig: ChannelSetup | null = null; let setupConfig: ChannelSetup | null = null;
@@ -74,9 +76,8 @@ describe('channel registry', () => {
}); });
it('should register and retrieve channel adapters', async () => { it('should register and retrieve channel adapters', async () => {
const { registerChannelAdapter, getRegisteredChannelNames, getChannelContainerConfig } = await import( const { registerChannelAdapter, getRegisteredChannelNames, getChannelContainerConfig } =
'./channel-registry.js' await import('./channel-registry.js');
);
registerChannelAdapter('test-channel', { registerChannelAdapter('test-channel', {
factory: () => createMockAdapter('test'), factory: () => createMockAdapter('test'),

View File

@@ -27,9 +27,7 @@ export function getAllMessagingGroups(): MessagingGroup[] {
} }
export function getMessagingGroupsByChannel(channelType: string): MessagingGroup[] { export function getMessagingGroupsByChannel(channelType: string): MessagingGroup[] {
return getDb() return getDb().prepare('SELECT * FROM messaging_groups WHERE channel_type = ?').all(channelType) as MessagingGroup[];
.prepare('SELECT * FROM messaging_groups WHERE channel_type = ?')
.all(channelType) as MessagingGroup[];
} }
export function updateMessagingGroup( export function updateMessagingGroup(

View File

@@ -20,11 +20,7 @@ import { log } from './log.js';
// import './channels/discord-v2.js'; // import './channels/discord-v2.js';
import type { ChannelAdapter, ChannelSetup, ConversationConfig } from './channels/adapter.js'; import type { ChannelAdapter, ChannelSetup, ConversationConfig } from './channels/adapter.js';
import { import { initChannelAdapters, teardownChannelAdapters, getChannelAdapter } from './channels/channel-registry.js';
initChannelAdapters,
teardownChannelAdapters,
getChannelAdapter,
} from './channels/channel-registry.js';
async function main(): Promise<void> { async function main(): Promise<void> {
log.info('NanoClaw v2 starting'); log.info('NanoClaw v2 starting');