Skip to content

Conversation

@marc-romu
Copy link
Member

@marc-romu marc-romu commented Apr 27, 2025

Description

AI & Grasshopper Tools

  • AIChat component can now invoke Grasshopper‐aware tools at runtime
  • Added AI toolbox commands for canvas manipulation:
    • Component Finder (GhRetrieveComponents + ghretrievecomponents) lists types, inputs/outputs, keywords
    • Enhanced Get Components (GhGetComponents) supports include/exclude tag filters and type‐based filtering
    • ghcategories (list component categories)
    • ghtogglepreview / ghtogglelock (toggle preview/lock by GUID)
    • ghmoveobj (move component pivot by GUID)
    • New WebTools to fetch HTML or JSON from arbitrary URLs for AI–driven workflows, with specific commands to fetch posts from McNeel forum.

UI & UX Improvements

  • Consistent SmartHopper branding (logo) in About, Settings, Chat, Message and Error dialogs
  • StyledMessageDialog for polished info/warning pop-ups
  • All Eto.Forms dialogs and updates marshaled via RhinoApp.InvokeOnUiThread for reliability

Provider Security & Initialization

  • Enforce strong-name & Authenticode signature checks before loading any provider DLL
  • Signature‐algorithm validation to guard against tampering
  • Introduce SmartHopperInitializer for safe startup

CI & Testing

  • Comprehensive unit tests: signature enforcement, provider loading, tool execution
  • CI workflow enhancements: permission scopes, parallel test runs, automated release artifact packaging

Breaking Changes

  • .NET Framework 4.8 support removed (Rhino 8+ only)
  • GhGetComponentsGhGetComponent (schema updated)
  • FilterListAsync now returns indices; downstream list construction moved to AIListFilter
  • ToolFunction/ToolArgument in AIResponse replaced by AIToolCall

Under-the-Hood (Internal)

  • Reorganized namespaces/files in SmartHopper.Core.Grasshopper
  • Refactored ProviderManager, SmartHopperSettings, and AIStatefulAsyncComponentBase
  • Added new classes: SmartHopperInitializer, AIToolCall, StyledMessageDialog
  • CI workflows refactored for release automation; removed unused HtmlAgilityPack dependency

Testing Done

  • Manual verification of tools/components in Rhino/Grasshopper
  • All new & existing unit tests pass in CI
  • Known bug in signature test, fails to generate a testing certificate

Checklist

  • This PR is focused on a single feature or bug fix
  • Version in Solution.props was updated, if necessary, and follows semantic versioning
  • CHANGELOG.md has been updated
  • PR title follows Conventional Commits format
  • PR description follows Pull Request Description Template

marc-romu and others added 30 commits April 20, 2025 10:55
…h .github (#154)

## Branch Update

This PR updates `marc-romu/chat` with changes from `marc-romu/workflows`
for the path `.github`.

### ℹ️ Protected Branch

This PR was created because `marc-romu/chat` is a protected branch that
requires changes through pull requests.

### Instructions

1. Review the changes
2. Approve and merge the changes

This PR was automatically created by the Branch Update workflow.
## Branch Update

This PR updates `dev` with changes from `main` for the path `.github`.

### ℹ️ Protected Branch

This PR was created because `dev` is a protected branch that requires
changes through pull requests.

### Instructions

1. Review the changes
2. Approve and merge the changes

This PR was automatically created by the Branch Update workflow.
## Branch Update

This PR updates `marc-romu/chat` with changes from `main` for the path
`.github`.

### ℹ️ Protected Branch

This PR was created because `marc-romu/chat` is a protected branch that
requires changes through pull requests.

### Instructions

1. Review the changes
2. Approve and merge the changes

This PR was automatically created by the Branch Update workflow.
## Description

This PR introduces a new Grasshopper component `GhRetrieveComponents`
and its AI tool counterpart `ghretrievecomponents`. They provide a
unified way to enumerate all installed Grasshopper components, returning
for each:
- Name, GUID, category, subcategory, description, keywords  
- Detailed lists of input and output parameters (name, description, data
type, access)

This enhancement enables AI-driven workflows and script-based discovery
of component metadata and parameter signatures.

## Breaking Changes

None.

## Testing Done

- Manual validation in Grasshopper: `GhRetrieveComponents` lists
components correctly.
- AI script invocation of `ghretrievecomponents` returns valid JSON with
expected fields.
- Added unit tests for parameter introspection via `GHParameterUtils`.

## Checklist

- [x] This PR is focused on a single feature or bug fix
- [x] Version in Solution.props was updated, if necessary, and follows
semantic versioning
- [x] CHANGELOG.md has been updated
- [x] PR title follows [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) format
- [x] PR description follows [Pull Request Description
Template](#pull-request-description-template)
… subcategories of components (#167)

## Description

- Introduces a new `ghcategories` AI tool in
[GhTools](cci:2://file:///c:/Users/Marc%20Roca/source/repos/architects-toolkit/SmartHopper/src/SmartHopper.Core.Grasshopper/Tools/GhTools.cs:31:4-536:5)
that lists all Grasshopper component categories and their subcategories.
- Adds an optional `"filter"` parameter: normalizes the input (removes
`,;_-`), splits by space, and performs a case‑insensitive “soft” match
against category and subcategory names.
- Updates the `ghretrievecomponents` tool’s `categoryFilter` description
to point users to `ghcategories` for a full list of available
categories.

## Breaking Changes

None.

## Testing Done

RH8.18 on windows, using AiChat.

## Checklist

- [x] This PR is focused on a single feature or bug fix
- [x] Version in Solution.props was updated, if necessary, and follows
semantic versioning
- [x] CHANGELOG.md has been updated
- [x] PR title follows [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) format
- [x] PR description follows [Pull Request Description
Template](#pull-request-description-template)
…ew (#168)

## Description

Introduces a new `ghtogglepreview` tool in `GhVisTools` allowing users
to programmatically turn Grasshopper component preview on or off by
GUID. Utilizes `GHCanvasUtils.FindInstance` and
`GHComponentUtils.SetComponentPreview` with debug logging for tracing.

## Breaking Changes

None.

## Testing Done

- Manually invoked `ghtogglepreview` via AIChatComponent with valid
component GUIDs.
- Verified preview state toggles and canvas redraw occurs without
errors.
- Checked debug output to confirm object lookup and state changes.

## Checklist

- [x] This PR is focused on a single feature or bug fix
- [x] Version in Solution.props was updated, if necessary, and follows
semantic versioning
- [x] CHANGELOG.md has been updated
- [x] PR title follows [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) format
- [x] PR description follows [Pull Request Description
Template](#pull-request-description-template)
…abled) of components in canvas (#169)

## Description

Introduces a new `ghtogglelocked` tool in `GhObjTools` allowing users to
programmatically turn Grasshopper component on or off by GUID (enabling
and disabling(. Utilizes `GHCanvasUtils.FindInstance` and
`GHComponentUtils.SetComponentLock` with debug logging for tracing.

## Breaking Changes

None

## Testing Done

Tried in RH8.18 on windows, with the AiChat interface.

## Checklist

- [x] This PR is focused on a single feature or bug fix
- [x] Version in Solution.props was updated, if necessary, and follows
semantic versioning
- [x] CHANGELOG.md has been updated
- [x] PR title follows [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) format
- [x] PR description follows [Pull Request Description
Template](#pull-request-description-template)
marc-romu and others added 18 commits April 26, 2025 12:25
This PR updates the development version date in Solution.props to
reflect the latest changes.

This is an automated PR created by the Update Development Version Date
workflow.
…cements (#178)

## Description

This PR introduces several improvements and fixes across the codebase:

- **feat(webtools):** Added new tools to retrieve HTML and JSON from the
web, expanding SmartHopper's integration capabilities.
- **docs(changelog):** Updated documentation to reflect recent changes.
- **fix(ghget):** Re-enabled the select button function in the GhGet
component, restoring intended UI interactivity.
- **feat(dialogs):** Added the SmartHopper logo to WebChat, message,
about, and settings dialogs for improved branding and a cohesive look.
- **feat(messagebox):** Enhanced error, warning, and information dialogs
with a good-looking design and SmartHopper logo.
- **ci(workflows):** Updated CI configuration to add permissions for
dotnet test workflows, improving CI security and reliability.

These changes collectively improve user experience, maintainability, and
integration with external web resources.

## Breaking Changes

No breaking changes.

## Testing Done

- Manual testing of new web tools for HTML and JSON retrieval.
- Verified visual updates in dialogs and message boxes.
- Confirmed the select button works in GhGet.
- CI workflows validated on recent pushes.

## Checklist

- [x] This PR is focused on a single feature or bug fix
- [x] Version in Solution.props was updated, if necessary, and follows
semantic versioning
- [x] CHANGELOG.md has been updated
- [x] PR title follows [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) format
- [x] PR description follows [Pull Request Description
Template](#pull-request-description-template)
This PR updates the version badge in the README.md to match the current
version in Solution.props.

This is an automated PR created by the Update Version Badge workflow.
Copilot AI review requested due to automatic review settings April 27, 2025 08:03
@marc-romu marc-romu added this to the 0.3.0-alpha milestone Apr 27, 2025
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 introduces the 0.3.0‑alpha release with enhancements to AI & Grasshopper tools, UI improvements, and improved security and CI workflows.

  • Added multiple AI toolbox commands for component listing, category filtering, preview toggling, and object movement.
  • Refactored test component files for cleaner using directives and updated build and release pipelines for .NET 7 and signing.

Reviewed Changes

Copilot reviewed 78 out of 86 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/SmartHopper.Components.Test/Misc/TestStatefulTreePrimeCalculatorComponent.cs Updated using statements for Bitmap types.
src/SmartHopper.Components.Test/Misc/TestStatefulPrimeCalculatorComponent.cs Same update as above with improved readability.
src/SmartHopper.Components.Test/Misc/TestAsyncPrimeCalculatorComponent.cs Removed unused Windows.Forms and streamlined using.
src/SmartHopper.Components.Test/Misc/TestAIStatefulTreePrimeCalculatorComponent.cs Consistent update for using System.Drawing.
RELEASE_CHECKLIST.md Added checklist item for cleaning up old settings.
README.md Updated badges, description, and usage examples.
LIMITATIONS.md Removed outdated limitations documentation.
CONTRIBUTING.md Added Visual Studio 2022 setup instructions.
CHANGELOG.md Documented all changes including breaking and fixed items.
.github/workflows/release-build.yml Updated CI release workflow for signing and SDK setup.
.github/workflows/ci-dotnet-tests.yml Introduced a new workflow for .NET CI tests.
.github/labels.yml Added and updated GitHub labels for new components/features.
Files not reviewed (8)
  • .github/CODEOWNERS: Language not supported
  • .windsurfrules: Language not supported
  • Directory.Build.props: Language not supported
  • Directory.Build.targets: Language not supported
  • Sign-Authenticode.ps1: Language not supported
  • Sign-StrongNames.ps1: Language not supported
  • SmartHopper.sln: Language not supported
  • Solution.props: Language not supported

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@marc-romu marc-romu changed the title 0.3.0-alpha release feat(release): 0.3.0-alpha – web tools, AI tools, UI & security enhancements, CI/tests Apr 27, 2025
@marc-romu marc-romu changed the title feat(release): 0.3.0-alpha – web tools, AI tools, UI & security enhancements, CI/tests feat(release): 0.3.0-alpha with AI tools, UI enhancement, security enhancements, and ci tests Apr 27, 2025
@marc-romu marc-romu merged commit ed4aaa0 into main Apr 27, 2025
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants