-
Notifications
You must be signed in to change notification settings - Fork 0
release/1.2.2-alpha #367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
release/1.2.2-alpha #367
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Throttle streaming DOM upserts more aggressively and process DOM updates in smaller batches to keep the UI responsive while moving/resizing the WebChat dialog.
Move chat message HTML/markdown rendering off the UI thread (including tool result ordering inserts) and ensure only the latest render per DOM key is applied.
…ug logging
- Add keyed DOM update queue (`_keyedDomUpdateLatest` + `_keyedDomUpdateQueue`) to ensure only latest render per DOM key is applied, preventing redundant updates during streaming
- Wrap all `Debug.WriteLine` calls in `[Conditional("DEBUG")]` `DebugLog` method to eliminate debug overhead in release builds
- Move HTML equality checks inside `#if DEBUG` blocks to skip expensive string comparisons in production
…fing, and wipe-in animations - Add template cache (`_templateCache`) and LRU HTML cache (`_htmlLru`) to avoid redundant DOM parsing and equality checks during streaming - Implement queued DOM operations (`enqueueDomOp` + `flushDomOps`) batched via `requestAnimationFrame` to reduce layout thrashing - Add sampled equality diffing (25% sample rate) via `shouldSkipBecauseSame` to skip redundant renders when HTML unchanged
…reservation - Remove unused `stream-update` CSS animations and `addStreamUpdateAnimation` JS function - Remove unused `MAX_CONCURRENT_SCRIPTS` and `_activeScripts` variables from chat-script.js - Add `FlushPendingTextStateForTurn` to ensure throttled text deltas are rendered before tool calls appear in the UI - Fix `ConversationSession` to preserve `ContextFilter` when rebuilding AIBody in special turns and helper methods
… improve token efficiency - Add new `instruction_get` tool that returns detailed operational instructions on-demand for canvas operations, component discovery, scripting workflows, and knowledge base usage - Refactor `CanvasButton` system prompt to be concise and delegate detailed tool usage guidelines to `instruction_get` calls - Remove verbose inline documentation for tool workflows (canvas state reading, component discovery, scripting, knowledge base)
…meter validation - Enhance `instruction_get` tool description to explicitly mention required `topic` argument since some models (MistralAI, OpenAI) don't always respect JSON Schema `required` fields but do follow description text - Add explicit validation for missing/empty required parameters in `ToolJsonSchemaValidator` with actionable error messages prompting retry - Remove redundant null check in `instruction_get` tool body
…adapter discovery - Extract duplicated streaming delta processing (~80 lines) into shared `ProcessStreamingDeltasAsync` helper in `ConversationSession` - Add `GetStreamingAdapter()` to `IAIProvider` interface with caching in `AIProvider` base class, replacing reflection-based discovery - Add `CreateStreamingAdapter()` virtual method for providers to override; update OpenAI, DeepSeek, MistralAI, Anthropic, and OpenRouter - Removed "Clear" button from webchat and replaced with a "Regen" button on debug
## Description This PR improves WebChat stability and streaming performance through several optimizations: - **Streaming Infrastructure**: Extracted shared streaming logic into `ProcessStreamingDeltasAsync` helper method and optimized provider adapter discovery with caching instead of reflection - **Performance Optimizations**: Implemented template caching, LRU diffing, keyed queue processing, and wipe-in animations for faster message rendering - **UI Stability**: Reduced WebChat freezes during streaming and drag/resize operations through aggressive DOM throttling and batched updates - **Tool Improvements**: Added `instruction_get` tool to reduce system prompt size and improved its reliability with explicit parameter validation Mitigates #261. ## Breaking Changes No breaking changes. ## Testing Done - Verified WebChat streaming performance improvements during long AI responses - Tested drag/resize operations during active streaming to confirm UI stability - Validated `instruction_get` tool functionality across different AI providers - Confirmed selection context providers work correctly with the new fallback logic ## 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)
…component messages - Replace "Done :)" completion messages with empty strings in AIListEvaluate, AIListFilter, AITextEvaluate, AITextGenerate, and AITextListGenerate components - Update AsyncComponentBase to only set component message when worker output message is non-empty, preventing accidental message clearing
…utput processing - Add early return in post-solve phase when tasks are still running (_setData == 0) or state is not ready (_state <= 0) - Skip output processing until continuation properly sets _state and _setData - Add debug logging to track skipped post-solve executions
- Add BoundsSerializer for panel size serialization using format "bounds:width,height" - Serialize/deserialize panel background color in componentState.additionalProperties.color using Color serializer - Serialize/deserialize panel size in componentState.additionalProperties.bounds while preserving position in pivot - Register BoundsSerializer in DataTypeRegistry - Update GhJSON documentation to reflect panel color and bounds properties
…event stale callbacks - Add early return when debounceTimeMs is 0, indicating timer has been cancelled/reset - Capture debounceTimeMs along with generation and target state in initial lock - Add double-check validation using captured time value to prevent race conditions - Update debug messages to include time value for better diagnostics
- Replace integer literals with double literals in test calculations for type consistency - Mark ComponentStateManager field as readonly in tests - Rename 'run' variable to 'runInput' to avoid shadowing instance field - Simplify conditional expressions using ternary operators in InputChanged methods - Flatten nested if statements in DeepSeekProvider reasoning_content removal logic
…teManager (#364) ## Description Harden stateful component base behaviors to improve stability/reliability across Grasshopper components. ## Breaking Changes Saved files with components from previous version would require to run again or to replace the component. ## Testing Done All cases tested. ## 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 development version date in Solution.props to reflect the latest changes. This is an automated PR created by the Update Development Version Date workflow.
… fixes (#366) This PR prepares the release for version 1.2.2-alpha with version update and code style fixes: - Updated version in Solution.props - Updated changelog with closed-solved issues - Updated README badges
marc-romu
approved these changes
Dec 27, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR prepares the release for version 1.2.2-alpha with version update and code style fixes: