Skip to content

Conversation

@thekingofcity
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses issue #1287 by preserving station attributes when predicting the next node in the canvas. The changes enable the application to copy attributes from the selected station to the newly created station, and use the last selected tool or selected station type to determine the station type for prediction, rather than always using the most frequent station type.

Key changes:

  • Station type determination now considers the selected station's type or the last used tool (lastTool) before falling back to mostFrequentStationType
  • Station attributes are preserved from the selected station when creating a new station via the predict-next-node feature
  • Random station names generation now uses the user's preference (randomStationsNames) instead of hardcoded StationCity.Shmetro

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/components/predict-next-node.tsx Adds logic to preserve station attributes from selected stations, uses lastTool and selected station type for better type prediction, and handles random station names based on user preferences
src/util/random-station-names.ts Changes from hardcoded StationCity.Shmetro to user preference randomStationsNames for generating random station names

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants