(Frontend) Install Historian extension via VS Code marketplace (TBD)
(Backend) Install Python and dependencies:
Python 3.10 +
pip install -r requirements.txt
(Backend) Install Node.js and dependencies:
Node.js 18 +
npm install -g @anthropic-ai/claude-code
(Backend) Set configurations at .config file, including argumments:
REPOS_DIR= # Absolute path to download github repositories for simulation
DEVICE_ID= # The CUDA device id
MAX_RETRY= # Maximum number of retries for autoGUI action
MAX_WAIT_RESPONSE= # Maximum seconds to wait for an AI response
OUTPUT_DIR= # Absolute path the save the simulation records of given commit and system under test
LOG_DIR= # Absolute path the save the log of given commit and system under test during simulation
OPENAI_TOKEN= # The api for openai model
OPENAI_BASE_URL= # The base url for openai model
ANTHROPIC_API_KEY= # The api for claude code
ANTHROPIC_BASE_URL= # The base url for claude code
MEDIA_PATH_NAME= # default path name is media, you may set differently for different devices
BACKEND_PORT=5001 # The backend port that frontend will send request to
💡 Usage and Interaction
Visualization of simualtion process:
Start backend service via python src/server.py at project root directory;
Open VS Code;
User press cmd + shift + p (on MacOS) or ctrl + shift + p (on Windows/Linux) to open command palette;
User type Historian: Simulate Editing Process and press enter to activate the simulation assistant.
User select System under test and Suggestion type.
User can watch the simulation:
Check edit suggestions (location + content) at each timestamp;
Check the flow keeping status of each suggestion;
Watch the simulation process in real time;
Can pause at any time.
Batch simulation:
Set Suggestion type, System under test in src/simulation/main.py: __main__;
Run python -m simulation.main at src directory;
Optimize existing code editing assistants:
Open code project in VS Code;
User press cmd + shift + p (on MacOS) or ctrl + shift + p (on Windows/Linux) to open command palette;
User type Historian: Suggest Next Edit and press enter to activate the suggestion assistant.
User can start editing on the project;
Click Suggest Next Edit button (or via shortcut key TBD) and enter edit description to get next edit suggestion.
Edit suggestions will appear in left side bar, ranked by their confidence.
User can click each location, VS Code will jump to the corresponding location, with edit suggestion shown in diff view.
User can modify suggested content on the right panel, and click Apply button (or via shortcut key TBD) to apply, or Reject button (or via shortcut key TBD) to reject the suggestion.
Suggestions will not automatically be refreshed, user can continue to browse rest suggestions, until user click Suggest Next Edit button (or via shortcut key TBD) again.
📚 Wiki
For more implementation details, we have detailed documents at /wiki, to preview the mermaid diagrams in VS Code, please install the Mermaid Preview extension.
🐛 Issues
You are welcomed report any bugs or feature requests through the GitHub issues page.