Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 33 additions & 39 deletions .github/actions/version-tools/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,19 @@ runs:

# Determine color and status based on version
if [[ $VERSION == *"-dev"* ]]; then
COLOR="red"
STATUS="Unstable Development"
COLOR="brown"
STATUS="Unstable%20Development"
elif [[ $VERSION == *"-alpha"* ]]; then
COLOR="orange"
STATUS="Alpha"
elif [[ $VERSION == *"-beta"* ]]; then
COLOR="yellow"
STATUS="Beta"
elif [[ $VERSION == *"-rc"* ]]; then
COLOR="blue"
STATUS="Release Candidate"
COLOR="lightblue"
STATUS="Release%20Candidate"
else
COLOR="brightgreen"
COLOR="lightgreen"
STATUS="Stable"
fi

Expand All @@ -131,56 +131,50 @@ runs:
echo "New version badge: $VERSION_BADGE"
echo "New status badge: $STATUS_BADGE"

BADGES_CHANGED=false

# Update README.md with new badges
if [[ -f "README.md" ]]; then
BADGES_CHANGED=false

# Get the current version from Solution.props
echo "Current version from Solution.props: $VERSION"

# Create new badge URLs
VERSION_BADGE_URL="https://img.shields.io/badge/version-$ENCODED_VERSION-$COLOR"
STATUS_BADGE_URL="https://img.shields.io/badge/status-$STATUS-$COLOR"

# Create badge markdown
VERSION_BADGE="[![Version]($VERSION_BADGE_URL)](https://github.com/architects-toolkit/SmartHopper/releases)"
STATUS_BADGE="[![Status]($STATUS_BADGE_URL)](https://github.com/architects-toolkit/SmartHopper/releases)"

echo "New version badge: $VERSION_BADGE"
echo "New status badge: $STATUS_BADGE"

# Check if README contains version badge
# Check if README contains version badge and if it needs updating
if grep -q "\[\!\[Version\]" README.md; then
echo "Found version badge in README"

# Always update the badges with the current version from Solution.props
sed -i "s|\[\!\[Version\](https://img\.shields\.io/badge/version[^)]*)|[![Version]($VERSION_BADGE_URL)|g" README.md
echo "Updated version badge"
BADGES_CHANGED=true
# Extract current badge URL to check if color matches
CURRENT_VERSION_BADGE=$(grep -o "\[\!\[Version\](https://img\.shields\.io/badge/version[^)]*)" README.md || echo "")

# Check if the badge needs updating (different version or color)
if [[ "$CURRENT_VERSION_BADGE" != *"$ENCODED_VERSION"* || "$CURRENT_VERSION_BADGE" != *"-$COLOR"* ]]; then
sed -i "s|\[\!\[Version\](https://img\.shields\.io/badge/version[^)]*)|[![Version]($VERSION_BADGE_URL)|g" README.md
echo "Updated version badge"
BADGES_CHANGED=true
else
echo "Version badge is already up to date"
fi
else
echo "No version badge found in README to replace"
fi

# Check if README contains status badge
# Check if README contains status badge and if it needs updating
if grep -q "\[\!\[Status\]" README.md; then
echo "Found status badge in README"

# Always update the status badge
sed -i "s|\[\!\[Status\](https://img\.shields\.io/badge/status[^)]*)|[![Status]($STATUS_BADGE_URL)|g" README.md
echo "Updated status badge"
BADGES_CHANGED=true
# Extract current badge URL to check if status or color matches
CURRENT_STATUS_BADGE=$(grep -o "\[\!\[Status\](https://img\.shields\.io/badge/status[^)]*)" README.md || echo "")

# Check if the badge needs updating (different status or color)
if [[ "$CURRENT_STATUS_BADGE" != *"$STATUS"* || "$CURRENT_STATUS_BADGE" != *"-$COLOR"* ]]; then
sed -i "s|\[\!\[Status\](https://img\.shields\.io/badge/status[^)]*)|[![Status]($STATUS_BADGE_URL)|g" README.md
echo "Updated status badge"
BADGES_CHANGED=true
else
echo "Status badge is already up to date"
fi
else
echo "No status badge found in README to replace"
fi

# Check if badges were changed
if [ "$BADGES_CHANGED" = true ]; then
echo "README.md badges were updated"
echo "badges-changed=true" >> $GITHUB_OUTPUT
else
echo "No changes to README.md badges"
echo "badges-changed=false" >> $GITHUB_OUTPUT
fi
# Output whether badges were changed
echo "badges-changed=$BADGES_CHANGED" >> $GITHUB_OUTPUT
else
echo "README.md not found, skipping badge update"
echo "badges-changed=false" >> $GITHUB_OUTPUT
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Modified AIChatComponent to always run when the Run parameter is true, regardless of input changes.
- Improved version badge workflow to also update badges when color doesn't match the requirements based on version type.
- Improved ChatDialog UI with numerous enhancements:
- Modern chat-like interface featuring message bubbles and visual styling.
- Better layout with proper text wrapping to prevent horizontal scrolling.
Expand All @@ -49,6 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Automatically build and attach artifacts to published releases.
- Create platform-specific zip files (Rhino8-Windows, Rhino8-Mac) instead of a single zip with subfolders.
- Improved error handling in the AIStatefulAsyncComponentBase.
- Updated settings menu to use Eto.Forms and Eto.Drawing.

### Removed

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SmartHopper - AI-Powered Grasshopper3D Plugin

[![Version](https://img.shields.io/badge/version-0%2E1%2E3--dev%2E250330-red)](https://github.com/architects-toolkit/SmartHopper/releases)
[![Status](https://img.shields.io/badge/status-Development-red)](https://github.com/architects-toolkit/SmartHopper/releases)
[![Version](https://img.shields.io/badge/version-0%2E2%2E0--dev%2E250331-red)](https://github.com/architects-toolkit/SmartHopper/releases)
[![Status](https://img.shields.io/badge/status-Unstable%20Development-red)](https://github.com/architects-toolkit/SmartHopper/releases)
[![Grasshopper](https://img.shields.io/badge/plugin_for-Grasshopper3D-darkgreen?logo=rhinoceros)](https://www.rhino3d.com/)
[![MistralAI](https://img.shields.io/badge/AI--powered-MistralAI-orange)](https://mistral.ai/)
[![OpenAI](https://img.shields.io/badge/AI--powered-OpenAI-blue?logo=openai)](https://openai.com/)
Expand Down
2 changes: 1 addition & 1 deletion Solution.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<SolutionVersion>0.1.3-dev.250330</SolutionVersion>
<SolutionVersion>0.2.0-dev.250331</SolutionVersion>
</PropertyGroup>
</Project>
Binary file added design/icons/export/mistralai_icon-old.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified design/icons/export/mistralai_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/icons/export/openai_icon-old.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified design/icons/export/openai_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/SmartHopper.Config/Resources/mistralai_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/SmartHopper.Config/Resources/openai_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/SmartHopper.Menu/Dialogs/AboutDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public AboutDialog(string version)
);
}

private Control CreateLogoPanel()
private static Control CreateLogoPanel()
{
// Create an ImageView with the SmartHopper logo from the resources
var imageView = new ImageView();
Expand Down Expand Up @@ -199,7 +199,7 @@ private Control CreateContentPanel(string version)
};
}

private LinkButton CreateLinkButton(string text, string url)
private static LinkButton CreateLinkButton(string text, string url)
{
var link = new LinkButton
{
Expand All @@ -212,7 +212,7 @@ private LinkButton CreateLinkButton(string text, string url)
return link;
}

private void OpenUrl(string url)
private static void OpenUrl(string url)
{
try
{
Expand Down
Loading
Loading