File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,9 @@ async function main(): Promise<void> {
168168 initialMode,
169169 } = parseArgs ( )
170170
171+ const isPublishCommand = process . argv . includes ( 'publish' )
172+ const hasAgentOverride = Boolean ( agent && agent . trim ( ) . length > 0 )
173+
171174 await initializeApp ( { cwd } )
172175
173176 // Detect if user is at home directory or outside a project (should show project picker)
@@ -178,10 +181,12 @@ async function main(): Promise<void> {
178181 projectRoot === '/' || projectRoot === homeDir || gitRoot === null
179182
180183 // Initialize agent registry (loads user agents via SDK)
181- await initializeAgentRegistry ( )
184+ if ( isPublishCommand || ! hasAgentOverride ) {
185+ await initializeAgentRegistry ( )
186+ }
182187
183188 // Handle publish command before rendering the app
184- if ( process . argv . includes ( 'publish' ) ) {
189+ if ( isPublishCommand ) {
185190 const publishIndex = process . argv . indexOf ( 'publish' )
186191 const agentIds = process . argv . slice ( publishIndex + 1 )
187192 const result = await handlePublish ( agentIds )
You can’t perform that action at this time.
0 commit comments