Skip to content

Commit f8d58a0

Browse files
committed
feat: auto-select JSON output for list command when running in AI agent
1 parent b59a82b commit f8d58a0

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

modules/ace/commands.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,17 @@ export class ListCommand extends AceListCommand implements BaseCommand {
185185
super(kernel, parsed, ui, prompt)
186186
}
187187

188+
/**
189+
* Auto-select JSON output when running inside an AI agent
190+
* and no explicit format flag is provided.
191+
*/
192+
async run() {
193+
if (!this.json && this.app.runningInAIAgent) {
194+
this.json = true
195+
}
196+
return super.run()
197+
}
198+
188199
/**
189200
* Creates the codemods module to modify source files programmatically.
190201
* This method provides access to AST-based code transformations.

0 commit comments

Comments
 (0)