Skip to content

Conversation

@marc-romu
Copy link
Member

No description provided.

marc-romu and others added 28 commits April 27, 2025 12:23
…hancements, and ci tests (#180)

## 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)  
- `GhGetComponents` → `GhGetComponent` (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
- [x] Version in Solution.props was updated, if necessary, and follows
semantic versioning
- [x] CHANGELOG.md has been updated
- [ ] 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)
…as HTML

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
## Description

Release 0.3.0-beta includes some improvements in AIChat interface, such
as well-formatted copying and collapsed tool responses. This update also
includes a well-formatted internal structure for both MistralAI and
OpenAI tool calls.

## Breaking Changes

None.

## Testing Done

RH8.18 on windows

## 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)
Copilot AI review requested due to automatic review settings April 29, 2025 13:16
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 updates the development branch from main, synchronizing code changes across multiple projects and workflows. Key changes include refactoring AI message handling and chat model classes, adding new AI tools (for searching and retrieving Rhino forum posts), and updating several GitHub workflows and documentation to support the new release process.

Reviewed Changes

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

File Description
src/SmartHopper.Core/AI/AIMessageBuilder.cs Refactored message creation logic and updated chat model processing
src/SmartHopper.Core.Grasshopper/Tools/WebTools.cs Added new AI tools for forum search and retrieval, plus minor UI changes
src/SmartHopper.Config/Models/IChatModel.cs Renamed and modified chat model classes to improve API consistency
Various GitHub workflows and documentation files Updated branch filters, versioning processes, and component labels
Files not reviewed (1)
  • Solution.props: Language not supported
Comments suppressed due to low confidence (1)

src/SmartHopper.Components/AI/AIChatComponent.cs:192

  • Replacing the detailed token usage message with a generic "Ready" may reduce diagnostic clarity. Verify that this change is intentional and that end users no longer require token metrics in the output.
message = "Ready";

marc-romu and others added 3 commits April 29, 2025 15:20
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.
@marc-romu marc-romu merged commit c95bb33 into dev Apr 29, 2025
10 of 12 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