filter_elements, version/update, tabbed settings, Cyrillic fix, tool index (v1.97 → v2.2) - #4
Merged
Conversation
…egation
Our answer to revit-mcp's ai_element_filter, but stronger: a structured query the
model can trust without knowing Revit's internal feet or exact BuiltInParameter
names.
- predicates [{parameter, op, value}] combined by all/any; ops eq/ne/gt/lt/gte/lte,
contains/starts_with, exists/not_exists.
- unit-aware pseudo-parameters computed from geometry: length(mm), height(mm),
area(m2), volume(m3), elevation(mm), plus name/type/family/level/category and
any parameter by fuzzy display name.
- scope by on_level and/or in_active_view.
- optional aggregate {op: count|sum|avg|min|max, parameter} rolls up the matched
set in the same call (e.g. total wall length in one round-trip).
Registered as a core tool.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RCGB6xWx3ZtmWZRQEJtN6B
- Stamp the numeric version onto the assembly at release build time (-p:Version). - UpdateChecker: reports the running version and queries the latest GitHub release; compares numerically; surfaces the installer URL. Best-effort/non-fatal. - Chat pane footer shows a clickable '⬆ vX.Y available' when a newer release exists (opens the installer); loaded DLLs can't self-replace while Revit runs, so it's notify-only, user installs on their terms. - Help window title shows the current version. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RCGB6xWx3ZtmWZRQEJtN6B
Split the long single-scroll settings into tabs (same x:Names, so behaviour is unchanged): General (API key, code exec, confirmations, balance, max rounds), Models (Auto advisor/executor, diagnostics, alternative provider), Subscription (MCP) (server, port, config, Claude Code path), Tools (tool groups), and a new About tab showing the current version with a 'Check for updates' button. RU/EN localization for the tab headers and About section. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RCGB6xWx3ZtmWZRQEJtN6B
…ilter_elements Consolidate the feet<->mm/m2/m3 conversions that were copy-pasted as magic numbers / per-file helpers across ~19 tools into one pure, unit-tested Units class (10 tests: exact-foot, round-trips, area/volume powers). Migrate the new filter_elements to it. Remaining call sites will move over in follow-up passes (kept small and build/test-verified since the geometry can't be run here). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RCGB6xWx3ZtmWZRQEJtN6B
…ovements P1 (blocking for RU users): the prompt is written to the claude CLI's stdin, but StandardInputEncoding was unset, so on a Russian Windows .NET encoded it as CP1251/OEM and the model received mojibake for the free-text request (the JSON doc context survived only because the serializer \u-escapes it). Force UTF-8 (no BOM) on stdin. Nice-to-have: inline the selection's per-category breakdown (SelectionService already tracks CategoryCounts) into the context, so 'what's selected?' needs no tool call. P3: get_element_parameters now de-dupes by parameter name (Revit exposes the same display name as built-in + shared) and takes a relevant_only flag to drop empty/none values — a compact, cheaper payload. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RCGB6xWx3ZtmWZRQEJtN6B
…DME) P2 follow-up: even though the client may defer the 180 MCP tool schemas, the initialize instructions now include a compact index of every available tool (name + one-line description, grouped by category) so the model calls the right tool by name directly — no discovery round-trips. Generated once, cached, and mirrored to %AppData%\ClaudeRevit\tools-catalog.md. README feature list updated (filter_elements, tool index, update check, tabbed settings). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RCGB6xWx3ZtmWZRQEJtN6B
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
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.
Highlights
filter_elements— unit-aware element filter (mm/m²/m³ pseudo-parameters from geometry), AND/OR predicates, level/active-view scoping, and count/sum/avg/min/max aggregate in one call. Our stronger answer to revit-mcp'sai_element_filter.get_element_parameters— de-dup by name +relevant_onlyflag.tools-catalog.md.Unitshelper (feet↔metric), 10 tests (30 total).🤖 Generated with Claude Code
https://claude.ai/code/session_01RCGB6xWx3ZtmWZRQEJtN6B
Generated by Claude Code