Skip to content

Commit fce0445

Browse files
committed
fix(init): remove redundant isNonInteractive from template loading condition
The original condition (!template || !dir) already covers every case where templates need to be loaded for prompts or the options note. Adding isNonInteractive caused an unnecessary network fetch when an agent provided both --template and dir (only to populate a template list in the note that wasn't needed). The 'Proceeding with:' section in the note still works correctly without it. https://claude.ai/code/session_01LsDZBSg7peDmxh6QW33ag8
1 parent 0f5863c commit fce0445

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/nuxi/src/commands/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export default defineCommand({
150150

151151
let availableTemplates: Record<string, TemplateData> = {}
152152

153-
if (!ctx.args.template || !ctx.args.dir || isNonInteractive) {
153+
if (!ctx.args.template || !ctx.args.dir) {
154154
const defaultTemplates = await import('../data/templates').then(r => r.templates)
155155
if (ctx.args.offline || ctx.args.preferOffline) {
156156
// In offline mode, use static templates directly

0 commit comments

Comments
 (0)