Skip to content

Commit bdaa043

Browse files
author
DavertMik
committed
fixed command
1 parent 08caee0 commit bdaa043

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

bin/explorbot-cli.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,12 @@ addCommonOptions(program.command('start [path]').alias('sail').description('Star
106106
await startTUI(explorBot);
107107
});
108108

109-
addCommonOptions(program.command('explore [path]').description('Start web exploration (legacy command)')).action(async (explorePath, options) => {
109+
addCommonOptions(program.command('explore <path>').description('Start web exploration (legacy command)')).action(async (explorePath, options) => {
110110
try {
111111
const explorBot = new ExplorBot(buildExplorBotOptions(explorePath, options));
112112
await explorBot.start();
113-
await explorBot.explore(explorePath || undefined);
113+
await explorBot.visit(explorePath);
114+
await explorBot.explore();
114115
await explorBot.stop();
115116
await showStatsAndExit(0);
116117
} catch (error) {

src/explorbot.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -344,14 +344,8 @@ export class ExplorBot {
344344
}
345345

346346
async explore(feature?: string) {
347-
const currentState = this.getCurrentState();
348-
const currentPath = currentState?.url ? new URL(currentState.url).pathname : null;
349-
if (!currentState || (feature?.startsWith('/') && currentPath !== feature)) {
350-
await this.visit(feature || '/');
351-
}
352-
353347
const planner = this.agentPlanner();
354-
this.currentPlan = await planner.plan(feature?.startsWith('/') ? undefined : feature);
348+
this.currentPlan = await planner.plan(feature);
355349
const tester = this.agentTester();
356350
for (const test of this.currentPlan.tests) {
357351
await tester.test(test);

0 commit comments

Comments
 (0)