style: format extracted runtime helpers
This commit is contained in:
@@ -3,7 +3,10 @@ import path from 'path';
|
|||||||
|
|
||||||
import { DATA_DIR } from './config.js';
|
import { DATA_DIR } from './config.js';
|
||||||
|
|
||||||
export function queueFollowUpMessage(groupFolder: string, text: string): string {
|
export function queueFollowUpMessage(
|
||||||
|
groupFolder: string,
|
||||||
|
text: string,
|
||||||
|
): string {
|
||||||
const inputDir = path.join(DATA_DIR, 'ipc', groupFolder, 'input');
|
const inputDir = path.join(DATA_DIR, 'ipc', groupFolder, 'input');
|
||||||
fs.mkdirSync(inputDir, { recursive: true });
|
fs.mkdirSync(inputDir, { recursive: true });
|
||||||
const filename = `${Date.now()}-${Math.random().toString(36).slice(2, 6)}.json`;
|
const filename = `${Date.now()}-${Math.random().toString(36).slice(2, 6)}.json`;
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
import { ChildProcess } from 'child_process';
|
import { ChildProcess } from 'child_process';
|
||||||
|
|
||||||
import { MAX_CONCURRENT_AGENTS } from './config.js';
|
import { MAX_CONCURRENT_AGENTS } from './config.js';
|
||||||
import {
|
import { queueFollowUpMessage, writeCloseSentinel } from './group-queue-ipc.js';
|
||||||
queueFollowUpMessage,
|
|
||||||
writeCloseSentinel,
|
|
||||||
} from './group-queue-ipc.js';
|
|
||||||
import { logger } from './logger.js';
|
import { logger } from './logger.js';
|
||||||
|
|
||||||
interface QueuedTask {
|
interface QueuedTask {
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
import {
|
import { getLastHumanMessageTimestamp, isPairedRoomJid } from './db.js';
|
||||||
getLastHumanMessageTimestamp,
|
|
||||||
isPairedRoomJid,
|
|
||||||
} from './db.js';
|
|
||||||
import { filterProcessableMessages } from './bot-message-filter.js';
|
import { filterProcessableMessages } from './bot-message-filter.js';
|
||||||
import { normalizeStoredSeqCursor } from './message-cursor.js';
|
import { normalizeStoredSeqCursor } from './message-cursor.js';
|
||||||
import { isTriggerAllowed, loadSenderAllowlist } from './sender-allowlist.js';
|
import { isTriggerAllowed, loadSenderAllowlist } from './sender-allowlist.js';
|
||||||
|
|||||||
Reference in New Issue
Block a user