style: apply prettier formatting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Koshkoshinsk
2026-04-14 14:49:15 +00:00
parent d92d75e173
commit 42467d796d
5 changed files with 16 additions and 11 deletions

View File

@@ -69,8 +69,7 @@ export interface ChatSdkBridgeConfig {
export function createChatSdkBridge(config: ChatSdkBridgeConfig): ChannelAdapter {
const { adapter } = config;
const transformText = (t: string): string =>
config.transformOutboundText ? config.transformOutboundText(t) : t;
const transformText = (t: string): string => (config.transformOutboundText ? config.transformOutboundText(t) : t);
let chat: Chat;
let state: SqliteStateAdapter;
let setupConfig: ChannelSetup;

View File

@@ -29,9 +29,7 @@ describe('sanitizeTelegramLegacyMarkdown', () => {
});
it('strips formatting chars on odd delimiter count (unbalanced _)', () => {
expect(sanitizeTelegramLegacyMarkdown('file_name has _one italic_')).toBe(
'filename has one italic',
);
expect(sanitizeTelegramLegacyMarkdown('file_name has _one italic_')).toBe('filename has one italic');
});
it('strips brackets when unbalanced', () => {

View File

@@ -299,7 +299,10 @@ registerChannelAdapter('whatsapp', {
/** Download media from an inbound message, save to /workspace/attachments/. */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
async function downloadInboundMedia(msg: WAMessage, normalized: any): Promise<Array<{ type: string; name: string; localPath: string }>> {
async function downloadInboundMedia(
msg: WAMessage,
normalized: any,
): Promise<Array<{ type: string; name: string; localPath: string }>> {
const mediaTypes: Array<{ key: string; type: string; ext: string }> = [
{ key: 'imageMessage', type: 'image', ext: '.jpg' },
{ key: 'videoMessage', type: 'video', ext: '.mp4' },

View File

@@ -92,9 +92,9 @@ export function createPendingQuestion(pq: PendingQuestion): void {
}
export function getPendingQuestion(questionId: string): PendingQuestion | undefined {
const row = getDb()
.prepare('SELECT * FROM pending_questions WHERE question_id = ?')
.get(questionId) as (Omit<PendingQuestion, 'options'> & { options_json: string }) | undefined;
const row = getDb().prepare('SELECT * FROM pending_questions WHERE question_id = ?').get(questionId) as
| (Omit<PendingQuestion, 'options'> & { options_json: string })
| undefined;
if (!row) return undefined;
const { options_json, ...rest } = row;
return { ...rest, options: JSON.parse(options_json) };

View File

@@ -299,11 +299,16 @@ async function handleApprovalResponse(
sender: 'system',
senderId: 'system',
}),
processAfter: new Date(Date.now() + 5000).toISOString().replace('T', ' ').replace(/\.\d+Z$/, ''),
processAfter: new Date(Date.now() + 5000)
.toISOString()
.replace('T', ' ')
.replace(/\.\d+Z$/, ''),
});
log.info('Container rebuild completed (bundled with install)', { approvalId: approval.approval_id });
} catch (e) {
notify(`Packages added to config (${pkgs}) but rebuild failed: ${e instanceof Error ? e.message : String(e)}. Call request_rebuild to retry.`);
notify(
`Packages added to config (${pkgs}) but rebuild failed: ${e instanceof Error ? e.message : String(e)}. Call request_rebuild to retry.`,
);
log.error('Bundled rebuild failed after install approval', { approvalId: approval.approval_id, err: e });
}
} else if (approval.action === 'request_rebuild') {