erosolar-cli 2.1.30 → 2.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/contracts/agent-schemas.json +70 -15
- package/dist/shell/interactiveShell.d.ts +4 -0
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +194 -20
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/ui/PromptController.d.ts +1 -0
- package/dist/ui/PromptController.d.ts.map +1 -1
- package/dist/ui/PromptController.js +6 -0
- package/dist/ui/PromptController.js.map +1 -1
- package/dist/ui/UnifiedUIRenderer.d.ts +0 -6
- package/dist/ui/UnifiedUIRenderer.d.ts.map +1 -1
- package/dist/ui/UnifiedUIRenderer.js +22 -112
- package/dist/ui/UnifiedUIRenderer.js.map +1 -1
- package/package.json +1 -1
|
@@ -302,6 +302,76 @@
|
|
|
302
302
|
],
|
|
303
303
|
|
|
304
304
|
"slashCommands": [
|
|
305
|
+
{
|
|
306
|
+
"command": "/model",
|
|
307
|
+
"description": "Choose what model and reasoning effort to use",
|
|
308
|
+
"category": "configuration"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"command": "/approvals",
|
|
312
|
+
"description": "Choose what Codex can do without approval",
|
|
313
|
+
"category": "configuration"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"command": "/review",
|
|
317
|
+
"description": "Review current changes and find issues",
|
|
318
|
+
"category": "diagnostics"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"command": "/new",
|
|
322
|
+
"description": "Start a new chat without closing the session",
|
|
323
|
+
"category": "workspace"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"command": "/init",
|
|
327
|
+
"description": "Create AGENTS.md with instructions for Codex",
|
|
328
|
+
"category": "workspace"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"command": "/compact",
|
|
332
|
+
"description": "Summarize conversation to prevent hitting the context limit",
|
|
333
|
+
"category": "workspace"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"command": "/undo",
|
|
337
|
+
"description": "Undo the last turn (rewind/checkpoint helper)",
|
|
338
|
+
"category": "workspace"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"command": "/diff",
|
|
342
|
+
"description": "Show git diff (including untracked files)",
|
|
343
|
+
"category": "workspace"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"command": "/mention",
|
|
347
|
+
"description": "Mention a file or path (e.g., @src/app.ts)",
|
|
348
|
+
"category": "workspace"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"command": "/status",
|
|
352
|
+
"description": "Show current session configuration and token usage",
|
|
353
|
+
"category": "diagnostics"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"command": "/mcp",
|
|
357
|
+
"description": "List configured MCP tools",
|
|
358
|
+
"category": "configuration"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"command": "/logout",
|
|
362
|
+
"description": "Log out of Codex (clear stored credentials)",
|
|
363
|
+
"category": "configuration"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"command": "/quit",
|
|
367
|
+
"description": "Exit Codex",
|
|
368
|
+
"category": "other"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"command": "/exit",
|
|
372
|
+
"description": "Exit Codex",
|
|
373
|
+
"category": "other"
|
|
374
|
+
},
|
|
305
375
|
{
|
|
306
376
|
"command": "/help",
|
|
307
377
|
"description": "Show all available commands and keyboard shortcuts",
|
|
@@ -332,11 +402,6 @@
|
|
|
332
402
|
"description": "Intelligent test flows (generate, bugs, ui, edge) - edge case detection and bug finding",
|
|
333
403
|
"category": "other"
|
|
334
404
|
},
|
|
335
|
-
{
|
|
336
|
-
"command": "/model",
|
|
337
|
-
"description": "Choose what model to use",
|
|
338
|
-
"category": "configuration"
|
|
339
|
-
},
|
|
340
405
|
{
|
|
341
406
|
"command": "/refresh-models",
|
|
342
407
|
"description": "Auto-discover new models from configured providers",
|
|
@@ -352,11 +417,6 @@
|
|
|
352
417
|
"description": "Enable or disable CLI tools and MCP servers",
|
|
353
418
|
"category": "configuration"
|
|
354
419
|
},
|
|
355
|
-
{
|
|
356
|
-
"command": "/mcp",
|
|
357
|
-
"description": "MCP server status and setup guide (subcommands: setup, examples)",
|
|
358
|
-
"category": "configuration"
|
|
359
|
-
},
|
|
360
420
|
{
|
|
361
421
|
"command": "/thinking",
|
|
362
422
|
"description": "Toggle thinking mode (balanced or extended)",
|
|
@@ -452,11 +512,6 @@
|
|
|
452
512
|
"description": "Export conversation history to a file",
|
|
453
513
|
"category": "workspace"
|
|
454
514
|
},
|
|
455
|
-
{
|
|
456
|
-
"command": "/review",
|
|
457
|
-
"description": "Trigger a code review of pending changes",
|
|
458
|
-
"category": "diagnostics"
|
|
459
|
-
},
|
|
460
515
|
{
|
|
461
516
|
"command": "/security-review",
|
|
462
517
|
"description": "Run a comprehensive security review",
|
|
@@ -367,6 +367,10 @@ export declare class InteractiveShell {
|
|
|
367
367
|
private handleUsageCommand;
|
|
368
368
|
private showCompactionHistory;
|
|
369
369
|
private handleClearCommand;
|
|
370
|
+
private handleDiffCommand;
|
|
371
|
+
private handleMentionCommand;
|
|
372
|
+
private handleStatusCommand;
|
|
373
|
+
private handleLogoutCommand;
|
|
370
374
|
private handleResumeCommand;
|
|
371
375
|
private handleExportCommand;
|
|
372
376
|
private handleReviewCommand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactiveShell.d.ts","sourceRoot":"","sources":["../../src/shell/interactiveShell.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAkDtE,OAAO,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE/E,OAAO,EAAE,iBAA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AAO,CAAC,sBAAsB;IAa9B,OAAO,CAAC,uBAAuB;IA0B/B,OAAO,CAAC,eAAe;IA0CvB,OAAO,CAAC,oBAAoB;IAuB5B,OAAO,CAAC,gBAAgB;YAkBV,mBAAmB;IA2BjC,OAAO,CAAC,kBAAkB;IA0B1B,OAAO,CAAC,gBAAgB;IAmBxB,OAAO,CAAC,YAAY;IAcpB,OAAO,CAAC,kBAAkB;IAkB1B,OAAO,CAAC,mBAAmB;IAyB3B,OAAO,CAAC,qBAAqB;IAmB7B,OAAO,CAAC,uBAAuB;IAW/B,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,iBAAiB;IA+BzB,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,4BAA4B;IAUpC,OAAO,CAAC,qBAAqB;IAQ7B,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,qBAAqB;IAyB7B,OAAO,CAAC,qBAAqB;IAuB7B,OAAO,CAAC,wBAAwB;IAUhC;;OAEG;YACW,qBAAqB;IA6DnC;;OAEG;YACW,qBAAqB;IAyCnC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IA0B/B;;OAEG;YACW,kBAAkB;IA2BhC;;OAEG;YACW,kBAAkB;IA6EhC;;OAEG;IACH,OAAO,CAAC,aAAa;IAsBrB;;;OAGG;IACH,iBAAiB,CAAC,SAAS,EAAE,KAAK,CAAC;QACjC,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,OAAO,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,GAAG,IAAI;CAIV"}
|
|
@@ -2,7 +2,7 @@ import { stdin as input, stdout as output, exit } from 'node:process';
|
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import { exec } from 'node:child_process';
|
|
4
4
|
import { promisify } from 'node:util';
|
|
5
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
5
|
+
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
6
6
|
import { join } from 'node:path';
|
|
7
7
|
import { display } from '../ui/display.js';
|
|
8
8
|
import { theme } from '../ui/theme.js';
|
|
@@ -289,17 +289,12 @@ export class InteractiveShell {
|
|
|
289
289
|
this.alphaZeroMetrics = new MetricsTracker(`${this.profile}-${Date.now()}`);
|
|
290
290
|
this.setupStatusTracking();
|
|
291
291
|
this.refreshContextGauge();
|
|
292
|
-
// Prime renderer state before it first paints
|
|
293
|
-
|
|
294
|
-
// Start terminal input (sets up handlers)
|
|
295
|
-
this.terminalInput.start();
|
|
292
|
+
// Prime renderer state before it first paints (but don't show profile/model yet)
|
|
293
|
+
// The control bar will be refreshed after the welcome banner
|
|
296
294
|
// Allow planning tools (e.g., ProposePlan) to open the interactive approval UI just like Codex CLI
|
|
297
295
|
this.registerPlanApprovalBridge();
|
|
298
296
|
// Set up command autocomplete with all slash commands
|
|
299
297
|
this.setupCommandAutocomplete();
|
|
300
|
-
// Render chat box immediately using the streaming UI lifecycle
|
|
301
|
-
this.syncRendererInput();
|
|
302
|
-
this.renderer?.render();
|
|
303
298
|
this.rebuildAgent();
|
|
304
299
|
this.setupHandlers();
|
|
305
300
|
this.refreshSessionContext();
|
|
@@ -408,6 +403,8 @@ export class InteractiveShell {
|
|
|
408
403
|
else {
|
|
409
404
|
display.stream(`\n${lines}\n`);
|
|
410
405
|
}
|
|
406
|
+
// Explicitly surface version info in scrollback so it isn't missed
|
|
407
|
+
display.showSystemMessage(`erosolar-cli version: v${version}`);
|
|
411
408
|
// Check for updates asynchronously (non-blocking)
|
|
412
409
|
void this.checkAndShowUpdates();
|
|
413
410
|
// Keep UI pinned; no scrollback banners
|
|
@@ -518,8 +515,14 @@ export class InteractiveShell {
|
|
|
518
515
|
async start(initialPrompt) {
|
|
519
516
|
// Always use the scroll-region streaming layout from the outset
|
|
520
517
|
this.terminalInput.start();
|
|
518
|
+
// Show welcome banner FIRST before any status rendering
|
|
519
|
+
await this.showWelcomeBanner();
|
|
520
|
+
// Now refresh control bar with profile/model/version info
|
|
521
|
+
this.refreshControlBar();
|
|
522
|
+
// Now sync renderer and control bar state
|
|
521
523
|
this.syncRendererInput();
|
|
522
|
-
|
|
524
|
+
// Ensure the prompt/control bar is rendered after the welcome banner
|
|
525
|
+
this.ensureReadlineReady();
|
|
523
526
|
if (initialPrompt) {
|
|
524
527
|
await this.processInputBlock(initialPrompt);
|
|
525
528
|
return;
|
|
@@ -527,6 +530,7 @@ export class InteractiveShell {
|
|
|
527
530
|
this.showLaunchCommandPalette();
|
|
528
531
|
// Ensure the terminal input is visible
|
|
529
532
|
this.syncRendererInput();
|
|
533
|
+
this.ensureReadlineReady();
|
|
530
534
|
}
|
|
531
535
|
showLaunchCommandPalette() {
|
|
532
536
|
// Disabled: Quick commands palette takes up too much space
|
|
@@ -1283,9 +1287,39 @@ export class InteractiveShell {
|
|
|
1283
1287
|
catch {
|
|
1284
1288
|
// Custom commands are optional
|
|
1285
1289
|
}
|
|
1286
|
-
//
|
|
1287
|
-
|
|
1288
|
-
|
|
1290
|
+
// Deduplicate commands, preserving first occurrence
|
|
1291
|
+
const uniqueCommands = new Map();
|
|
1292
|
+
for (const cmd of commands) {
|
|
1293
|
+
if (!uniqueCommands.has(cmd.command)) {
|
|
1294
|
+
uniqueCommands.set(cmd.command, cmd);
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
const priorityOrder = [
|
|
1298
|
+
'/model',
|
|
1299
|
+
'/approvals',
|
|
1300
|
+
'/review',
|
|
1301
|
+
'/new',
|
|
1302
|
+
'/init',
|
|
1303
|
+
'/compact',
|
|
1304
|
+
'/undo',
|
|
1305
|
+
'/diff',
|
|
1306
|
+
'/mention',
|
|
1307
|
+
'/status',
|
|
1308
|
+
'/mcp',
|
|
1309
|
+
'/logout',
|
|
1310
|
+
'/quit',
|
|
1311
|
+
'/exit',
|
|
1312
|
+
];
|
|
1313
|
+
const priority = new Map(priorityOrder.map((cmd, index) => [cmd, index]));
|
|
1314
|
+
const sorted = Array.from(uniqueCommands.values()).sort((a, b) => {
|
|
1315
|
+
const aRank = priority.has(a.command) ? (priority.get(a.command) ?? Number.MAX_SAFE_INTEGER) : Number.MAX_SAFE_INTEGER;
|
|
1316
|
+
const bRank = priority.has(b.command) ? (priority.get(b.command) ?? Number.MAX_SAFE_INTEGER) : Number.MAX_SAFE_INTEGER;
|
|
1317
|
+
if (aRank !== bRank) {
|
|
1318
|
+
return aRank - bRank;
|
|
1319
|
+
}
|
|
1320
|
+
return a.command.localeCompare(b.command);
|
|
1321
|
+
});
|
|
1322
|
+
this.terminalInput.setAvailableCommands(sorted);
|
|
1289
1323
|
}
|
|
1290
1324
|
setupStatusTracking() {
|
|
1291
1325
|
this.statusSubscription = this.statusTracker.subscribe((state) => {
|
|
@@ -2033,6 +2067,21 @@ export class InteractiveShell {
|
|
|
2033
2067
|
case '/security-review':
|
|
2034
2068
|
await this.handleSecurityReviewCommand();
|
|
2035
2069
|
break;
|
|
2070
|
+
case '/new':
|
|
2071
|
+
this.handleClearCommand();
|
|
2072
|
+
break;
|
|
2073
|
+
case '/undo':
|
|
2074
|
+
await this.handleRewindCommand(input);
|
|
2075
|
+
break;
|
|
2076
|
+
case '/diff':
|
|
2077
|
+
await this.handleDiffCommand();
|
|
2078
|
+
break;
|
|
2079
|
+
case '/mention':
|
|
2080
|
+
this.handleMentionCommand();
|
|
2081
|
+
break;
|
|
2082
|
+
case '/status':
|
|
2083
|
+
this.handleStatusCommand();
|
|
2084
|
+
break;
|
|
2036
2085
|
case '/bug':
|
|
2037
2086
|
this.handleBugCommand();
|
|
2038
2087
|
break;
|
|
@@ -2043,11 +2092,14 @@ export class InteractiveShell {
|
|
|
2043
2092
|
this.handlePermissionsCommand();
|
|
2044
2093
|
break;
|
|
2045
2094
|
case '/init':
|
|
2046
|
-
this.handleInitCommand();
|
|
2095
|
+
this.handleInitCommand(input);
|
|
2047
2096
|
break;
|
|
2048
2097
|
case '/compact':
|
|
2049
2098
|
await this.handleCompactCommand();
|
|
2050
2099
|
break;
|
|
2100
|
+
case '/logout':
|
|
2101
|
+
this.handleLogoutCommand();
|
|
2102
|
+
break;
|
|
2051
2103
|
default:
|
|
2052
2104
|
if (!(await this.tryCustomSlashCommand(command, input))) {
|
|
2053
2105
|
display.showWarning(`Unknown command "${command}".`);
|
|
@@ -3880,6 +3932,88 @@ export class InteractiveShell {
|
|
|
3880
3932
|
display.showInfo('Conversation cleared. Starting fresh.');
|
|
3881
3933
|
this.syncRendererInput();
|
|
3882
3934
|
}
|
|
3935
|
+
async handleDiffCommand() {
|
|
3936
|
+
try {
|
|
3937
|
+
await execAsync('git rev-parse --is-inside-work-tree', { cwd: this.workingDir });
|
|
3938
|
+
}
|
|
3939
|
+
catch {
|
|
3940
|
+
display.showWarning('Not a git repository. No diff to show.');
|
|
3941
|
+
return;
|
|
3942
|
+
}
|
|
3943
|
+
const results = [];
|
|
3944
|
+
try {
|
|
3945
|
+
const { stdout } = await execAsync('git status --short', { cwd: this.workingDir });
|
|
3946
|
+
const status = stdout.trim();
|
|
3947
|
+
if (status) {
|
|
3948
|
+
results.push(theme.bold('Changes (including untracked):'));
|
|
3949
|
+
results.push(status);
|
|
3950
|
+
}
|
|
3951
|
+
}
|
|
3952
|
+
catch {
|
|
3953
|
+
// ignore status errors
|
|
3954
|
+
}
|
|
3955
|
+
try {
|
|
3956
|
+
const { stdout } = await execAsync('git diff --stat', { cwd: this.workingDir });
|
|
3957
|
+
const diffStat = stdout.trim();
|
|
3958
|
+
if (diffStat) {
|
|
3959
|
+
results.push('');
|
|
3960
|
+
results.push(theme.bold('Diff summary:'));
|
|
3961
|
+
results.push(diffStat);
|
|
3962
|
+
}
|
|
3963
|
+
}
|
|
3964
|
+
catch {
|
|
3965
|
+
// ignore diff errors
|
|
3966
|
+
}
|
|
3967
|
+
if (results.length === 0) {
|
|
3968
|
+
display.showInfo('No changes detected. Working tree is clean.');
|
|
3969
|
+
return;
|
|
3970
|
+
}
|
|
3971
|
+
display.showSystemMessage(results.join('\n'));
|
|
3972
|
+
}
|
|
3973
|
+
handleMentionCommand() {
|
|
3974
|
+
const lines = [];
|
|
3975
|
+
lines.push(theme.bold('Mention a File'));
|
|
3976
|
+
lines.push('');
|
|
3977
|
+
lines.push('Use @path/to/file (relative to workspace) in your prompt to highlight files for the agent.');
|
|
3978
|
+
lines.push('Examples:');
|
|
3979
|
+
lines.push(' @src/app.ts (single file)');
|
|
3980
|
+
lines.push(' @src/components (directory)');
|
|
3981
|
+
lines.push('');
|
|
3982
|
+
lines.push('Tip: run /context to refresh the workspace snapshot if files were added.');
|
|
3983
|
+
display.showSystemMessage(lines.join('\n'));
|
|
3984
|
+
}
|
|
3985
|
+
handleStatusCommand() {
|
|
3986
|
+
const lines = [];
|
|
3987
|
+
lines.push(theme.bold('Session Status'));
|
|
3988
|
+
lines.push('');
|
|
3989
|
+
lines.push(`${theme.primary('Profile')}: ${theme.info(this.profileLabel)}`);
|
|
3990
|
+
lines.push(`${theme.primary('Provider/Model')}: ${theme.info(`${this.providerLabel(this.sessionState.provider)} · ${this.sessionState.model}`)}`);
|
|
3991
|
+
lines.push(`${theme.primary('Workspace')}: ${theme.ui.muted(this.abbreviatePath(this.workingDir))}`);
|
|
3992
|
+
lines.push(`${theme.primary('Autosave')}: ${this.autosaveEnabled ? theme.success('on') : theme.ui.muted('off')}`);
|
|
3993
|
+
lines.push(`${theme.primary('Auto-continue')}: ${this.autoContinueEnabled ? theme.success('on') : theme.ui.muted('off')}`);
|
|
3994
|
+
lines.push(`${theme.primary('Verification')}: ${this.verificationEnabled ? theme.success('on') : theme.ui.muted('off')}`);
|
|
3995
|
+
lines.push(`${theme.primary('Approvals')}: ${theme.ui.muted(this.describeEditGuardMode())}`);
|
|
3996
|
+
lines.push(`${theme.primary('Critical approvals')}: ${this.criticalApprovalMode === 'approval' ? theme.warning('ask') : theme.ui.muted('auto')}`);
|
|
3997
|
+
const used = this.latestTokenUsage.used;
|
|
3998
|
+
const limit = this.latestTokenUsage.limit ?? this.activeContextWindowTokens;
|
|
3999
|
+
if (used != null && limit != null) {
|
|
4000
|
+
const percent = limit > 0 ? Math.round((used / limit) * 100) : null;
|
|
4001
|
+
const usageLabel = percent !== null ? `${used}/${limit} tokens (${percent}%)` : `${used}/${limit} tokens`;
|
|
4002
|
+
lines.push(`${theme.primary('Context')}: ${theme.info(usageLabel)}`);
|
|
4003
|
+
}
|
|
4004
|
+
display.showSystemMessage(lines.join('\n'));
|
|
4005
|
+
}
|
|
4006
|
+
handleLogoutCommand() {
|
|
4007
|
+
const secretPath = join(homedir(), '.erosolar', 'secrets.json');
|
|
4008
|
+
const lines = [];
|
|
4009
|
+
lines.push(theme.bold('Logout / Clear Credentials'));
|
|
4010
|
+
lines.push('');
|
|
4011
|
+
lines.push('To remove saved API keys:');
|
|
4012
|
+
lines.push(` 1) Delete ${secretPath}`);
|
|
4013
|
+
lines.push(' 2) Unset any API key environment variables in your shell');
|
|
4014
|
+
lines.push(' 3) Run /secrets to verify keys are cleared');
|
|
4015
|
+
display.showSystemMessage(lines.join('\n'));
|
|
4016
|
+
}
|
|
3883
4017
|
async handleResumeCommand(input) {
|
|
3884
4018
|
const tokens = input.split(/\s+/).slice(1);
|
|
3885
4019
|
const sessionId = tokens[0];
|
|
@@ -4012,20 +4146,60 @@ export class InteractiveShell {
|
|
|
4012
4146
|
lines.push(theme.ui.muted('Use /tools to manage which tool suites are enabled.'));
|
|
4013
4147
|
display.showSystemMessage(lines.join('\n'));
|
|
4014
4148
|
}
|
|
4015
|
-
handleInitCommand() {
|
|
4149
|
+
handleInitCommand(input) {
|
|
4150
|
+
const tokens = input.split(/\s+/).slice(1);
|
|
4151
|
+
const confirm = tokens[0]?.toLowerCase() === 'confirm';
|
|
4152
|
+
const target = join(this.workingDir, 'AGENTS.md');
|
|
4153
|
+
if (confirm) {
|
|
4154
|
+
if (existsSync(target)) {
|
|
4155
|
+
display.showWarning(`AGENTS.md already exists at ${target}.`);
|
|
4156
|
+
return;
|
|
4157
|
+
}
|
|
4158
|
+
const template = [
|
|
4159
|
+
'# AGENTS.md',
|
|
4160
|
+
'',
|
|
4161
|
+
'## Project context',
|
|
4162
|
+
'- Brief description of the repo',
|
|
4163
|
+
'- Primary goals and non-goals',
|
|
4164
|
+
'',
|
|
4165
|
+
'## Coding guardrails',
|
|
4166
|
+
'- Language/framework conventions',
|
|
4167
|
+
'- Testing expectations',
|
|
4168
|
+
'- Performance or security constraints',
|
|
4169
|
+
'',
|
|
4170
|
+
'## Communication',
|
|
4171
|
+
'- Preferred response style',
|
|
4172
|
+
'- Review/approval expectations',
|
|
4173
|
+
'',
|
|
4174
|
+
'## Quick links',
|
|
4175
|
+
'- Key files or directories to prioritize',
|
|
4176
|
+
'- Setup commands/tests to run first',
|
|
4177
|
+
'',
|
|
4178
|
+
'Keep this file concise; update it as the project evolves.',
|
|
4179
|
+
].join('\n');
|
|
4180
|
+
try {
|
|
4181
|
+
writeFileSync(target, `${template}\n`, { flag: 'wx' });
|
|
4182
|
+
display.showInfo(`Created ${target}. Update it with project-specific guidance for Codex.`);
|
|
4183
|
+
}
|
|
4184
|
+
catch (error) {
|
|
4185
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
4186
|
+
display.showError(`Failed to create AGENTS.md: ${message}`);
|
|
4187
|
+
}
|
|
4188
|
+
return;
|
|
4189
|
+
}
|
|
4016
4190
|
const lines = [];
|
|
4017
4191
|
lines.push(theme.bold('Initialize Project'));
|
|
4018
4192
|
lines.push('');
|
|
4019
|
-
lines.push('Create
|
|
4193
|
+
lines.push('Create AGENTS.md with instructions for Codex.');
|
|
4020
4194
|
lines.push('');
|
|
4021
4195
|
lines.push(theme.secondary('This will create:'));
|
|
4022
|
-
lines.push(` ${this.workingDir}/
|
|
4196
|
+
lines.push(` ${this.workingDir}/AGENTS.md`);
|
|
4023
4197
|
lines.push('');
|
|
4024
4198
|
lines.push(theme.secondary('Template includes:'));
|
|
4025
|
-
lines.push(' - Project
|
|
4026
|
-
lines.push(' - Coding
|
|
4027
|
-
lines.push(' -
|
|
4028
|
-
lines.push(' -
|
|
4199
|
+
lines.push(' - Project context');
|
|
4200
|
+
lines.push(' - Coding guardrails and expectations');
|
|
4201
|
+
lines.push(' - Communication preferences');
|
|
4202
|
+
lines.push(' - Quick links to key files/tests');
|
|
4029
4203
|
lines.push('');
|
|
4030
4204
|
lines.push(theme.ui.muted('Use /init confirm to create the file.'));
|
|
4031
4205
|
display.showSystemMessage(lines.join('\n'));
|