Aider Test
This is a test repository for the Aider AI coding assistant.
File Editing V2 - Standalone Exploration
The exploration phase has been refactored to work independently of the main file editing flow. You can now use exploration functionality standalone:
Basic Usage
import {
runStandaloneExploration,
createEmptyExplorationState,
} from "./src/scripts/utils/file-editing-v2/phases/explorer";
import { Projects } from "./src/scripts/utils/file-editing-v2/types";
const projects: Projects = {
myProject: {
projectKey: "myProject",
name: "My Project",
path: "/path/to/project",
context: "A TypeScript project",
},
};
const { explorationState, result } = await runStandaloneExploration(
{
llmProvider: myLLMProvider,
userRequestPrompt: "Find all React components in the project",
projects: projects,
maxExplorationCycles: 3,
},
createEmptyExplorationState(),
[],
console.log
);
console.log("Main files found:", explorationState.mainFiles);
console.log("Context files:", explorationState.contextFiles);
console.log("Quote references:", explorationState.quoteReferences);
Key Types
ExplorationState: Contains all exploration data (mainFiles, contextFiles, etc.)
runStandaloneExploration(): Runs exploration independently
runExplorationPhase(): Core exploration function (now takes ExplorationState)
createEmptyExplorationState(): Helper to create initial state
Backward Compatibility
The main MainFlowState still contains both the new explorationState field and legacy fields for backward compatibility. All existing code continues to work unchanged.