style: fix prettier formatting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,11 @@ import path from 'path';
|
|||||||
import { readEnvFile } from './env.js';
|
import { readEnvFile } from './env.js';
|
||||||
|
|
||||||
// Read config values from .env (falls back to process.env).
|
// Read config values from .env (falls back to process.env).
|
||||||
const envConfig = readEnvFile(['ASSISTANT_NAME', 'ASSISTANT_HAS_OWN_NUMBER', 'ONECLI_URL']);
|
const envConfig = readEnvFile([
|
||||||
|
'ASSISTANT_NAME',
|
||||||
|
'ASSISTANT_HAS_OWN_NUMBER',
|
||||||
|
'ONECLI_URL',
|
||||||
|
]);
|
||||||
|
|
||||||
export const ASSISTANT_NAME =
|
export const ASSISTANT_NAME =
|
||||||
process.env.ASSISTANT_NAME || envConfig.ASSISTANT_NAME || 'Andy';
|
process.env.ASSISTANT_NAME || envConfig.ASSISTANT_NAME || 'Andy';
|
||||||
|
|||||||
@@ -56,7 +56,9 @@ vi.mock('@onecli-sh/sdk', () => ({
|
|||||||
OneCLI: class {
|
OneCLI: class {
|
||||||
applyContainerConfig = vi.fn().mockResolvedValue(true);
|
applyContainerConfig = vi.fn().mockResolvedValue(true);
|
||||||
createAgent = vi.fn().mockResolvedValue({ id: 'test' });
|
createAgent = vi.fn().mockResolvedValue({ id: 'test' });
|
||||||
ensureAgent = vi.fn().mockResolvedValue({ name: 'test', identifier: 'test', created: true });
|
ensureAgent = vi
|
||||||
|
.fn()
|
||||||
|
.mockResolvedValue({ name: 'test', identifier: 'test', created: true });
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|||||||
@@ -232,7 +232,10 @@ async function buildContainerArgs(
|
|||||||
if (onecliApplied) {
|
if (onecliApplied) {
|
||||||
logger.info({ containerName }, 'OneCLI gateway config applied');
|
logger.info({ containerName }, 'OneCLI gateway config applied');
|
||||||
} else {
|
} else {
|
||||||
logger.warn({ containerName }, 'OneCLI gateway not reachable — container will have no credentials');
|
logger.warn(
|
||||||
|
{ containerName },
|
||||||
|
'OneCLI gateway not reachable — container will have no credentials',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Runtime-specific args for host gateway resolution
|
// Runtime-specific args for host gateway resolution
|
||||||
@@ -279,7 +282,11 @@ export async function runContainerAgent(
|
|||||||
const agentIdentifier = input.isMain
|
const agentIdentifier = input.isMain
|
||||||
? undefined
|
? undefined
|
||||||
: group.folder.toLowerCase().replace(/_/g, '-');
|
: group.folder.toLowerCase().replace(/_/g, '-');
|
||||||
const containerArgs = await buildContainerArgs(mounts, containerName, agentIdentifier);
|
const containerArgs = await buildContainerArgs(
|
||||||
|
mounts,
|
||||||
|
containerName,
|
||||||
|
agentIdentifier,
|
||||||
|
);
|
||||||
|
|
||||||
logger.debug(
|
logger.debug(
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user