Remove unnecessary section divider comments
This commit is contained in:
@@ -272,8 +272,6 @@ export async function main(args: string[]) {
|
||||
|
||||
const parsed = parseArgs(args);
|
||||
|
||||
// === Early exits ===
|
||||
|
||||
if (parsed.version) {
|
||||
console.log(VERSION);
|
||||
return;
|
||||
@@ -303,15 +301,11 @@ export async function main(args: string[]) {
|
||||
}
|
||||
}
|
||||
|
||||
// === Validation ===
|
||||
|
||||
if (parsed.mode === "rpc" && parsed.fileArgs.length > 0) {
|
||||
console.error(chalk.red("Error: @file arguments are not supported in RPC mode"));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// === Prepare inputs ===
|
||||
|
||||
const { initialMessage, initialAttachments } = await prepareInitialMessage(parsed);
|
||||
const isInteractive = !parsed.print && parsed.mode === undefined;
|
||||
const mode = parsed.mode || "text";
|
||||
@@ -338,8 +332,6 @@ export async function main(args: string[]) {
|
||||
sessionFileFromResume = selectedSession;
|
||||
}
|
||||
|
||||
// === Build session options ===
|
||||
|
||||
const sessionOptions = await buildSessionOptions(parsed, scopedModels);
|
||||
|
||||
// Apply resume session file
|
||||
@@ -348,12 +340,8 @@ export async function main(args: string[]) {
|
||||
sessionOptions.restoreFromSession = true;
|
||||
}
|
||||
|
||||
// === Create session ===
|
||||
|
||||
const { session, customToolsResult, modelFallbackMessage } = await createAgentSession(sessionOptions);
|
||||
|
||||
// === Validate for non-interactive mode ===
|
||||
|
||||
if (!isInteractive && !session.model) {
|
||||
console.error(chalk.red("No models available."));
|
||||
console.error(chalk.yellow("\nSet an API key environment variable:"));
|
||||
@@ -375,8 +363,6 @@ export async function main(args: string[]) {
|
||||
}
|
||||
}
|
||||
|
||||
// === Route to mode ===
|
||||
|
||||
if (mode === "rpc") {
|
||||
await runRpcMode(session);
|
||||
} else if (isInteractive) {
|
||||
|
||||
Reference in New Issue
Block a user