Skip to content

filter_elements, version/update, tabbed settings, Cyrillic fix, tool index (v1.97 → v2.2) - #4

Merged
debug23win merged 6 commits into
mainfrom
claude/dynamo-document-persistence-issue-b3h1ay
Jul 8, 2026
Merged

filter_elements, version/update, tabbed settings, Cyrillic fix, tool index (v1.97 → v2.2)#4
debug23win merged 6 commits into
mainfrom
claude/dynamo-document-persistence-issue-b3h1ay

Conversation

@debug23win

Copy link
Copy Markdown
Owner

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's ai_element_filter.
  • Version & update check — assembly version stamped at release build; pane footer shows a clickable "update available", Settings → About has a "Check for updates" button. Notify-only (a loaded add-in can't self-replace).
  • Tabbed Settings — General · Models · Subscription (MCP) · Tools · About.
  • Cyrillic mojibake fix (blocking for RU users) — the subscription path wrote the prompt to the CLI's stdin without a UTF-8 encoding, so a Russian Windows mangled the request; now forced UTF-8.
  • Selection context — inline per-category breakdown so "what's selected?" needs no tool call.
  • get_element_parameters — de-dup by name + relevant_only flag.
  • MCP tool index — the handshake hands the driving model a compact index of every tool so it calls the right one without discovery round-trips; mirrored to tools-catalog.md.
  • Refactor — shared unit-tested Units helper (feet↔metric), 10 tests (30 total).

🤖 Generated with Claude Code

https://claude.ai/code/session_01RCGB6xWx3ZtmWZRQEJtN6B


Generated by Claude Code

claude added 6 commits July 8, 2026 00:35
…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
@debug23win
debug23win merged commit bf2e47b into main Jul 8, 2026
2 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.

2 participants