Skip to content

Commit dde5d2c

Browse files
committed
dashboard fixes
1 parent cd80cb8 commit dde5d2c

2 files changed

Lines changed: 20 additions & 8 deletions

File tree

packages/cli/src/lib/agent-runner.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,18 @@ export async function runAgentWizard(config: FrameworkConfig, options: WizardOpt
121121
);
122122

123123
// Run agent - errors will throw naturally with skill-based approach
124-
const agentResult = await runAgent(agent, integrationPrompt, options, spinner, {
125-
spinnerMessage: SPINNER_MESSAGE,
126-
successMessage: config.ui.successMessage,
127-
errorMessage: 'Integration failed',
128-
});
124+
const agentResult = await runAgent(
125+
agent,
126+
integrationPrompt,
127+
options,
128+
spinner,
129+
{
130+
spinnerMessage: SPINNER_MESSAGE,
131+
successMessage: config.ui.successMessage,
132+
errorMessage: 'Integration failed',
133+
},
134+
options.emitter,
135+
);
129136

130137
// If agent returned an error, don't proceed with success flow
131138
// The complete event was already emitted by runAgent

packages/cli/src/run.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,15 @@ export async function runWizard(argv: Args) {
9090
process.exit(1);
9191
}
9292

93-
// Silent auth check for dashboard mode
93+
// Check authentication for dashboard mode (same as regular CLI)
9494
if (!wizardOptions.skipAuth && !getAccessToken()) {
95-
console.error('Authentication required. Run `wizard login` first.');
96-
process.exit(1);
95+
await runLogin();
96+
97+
// Final check - must have valid token
98+
if (!getAccessToken()) {
99+
console.error('Authentication failed. Please try again.');
100+
process.exit(1);
101+
}
97102
}
98103

99104
const integration = finalArgs.integration ?? (await detectIntegration(wizardOptions));

0 commit comments

Comments
 (0)