Skip to content

Remove the unused OpenAI and ImGui.NET packages and the no-op AI menu items [patch] - #517

Merged
matt-edmondson merged 2 commits into
mainfrom
remove-unused-openai-imgui-net
Nov 4, 2026
Merged

matt-edmondson merged 2 commits into
mainfrom
remove-unused-openai-imgui-net

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #447

What changed

  • Dropped OpenAI and ImGui.NET from ProjectDirector.csproj and Directory.Packages.props. Both entries are removed together, as KTSU0005 requires.
  • Deleted the commented-out ChatClient code, and the right-click "Generate Tests" / "Generate Documentation Comments" items on .cs files. Both items had empty bodies. The menu now offers only actions that do something.
  • Removed OpenAIToken (the property and its semantic type) from ProjectDirectorOptions. An old settings file that still has the field loads fine; the unknown property is ignored.

Tests

New UnusedDependencyTests:

  • OptionsHaveNoOpenAITokenField checks that the options type has no OpenAIToken property.
  • UnusedPackageIsNotShipped("OpenAI.dll" / "ImGui.NET.dll") checks that neither assembly reaches the build output.

With the source changes reverted, all three fail. With them applied, all three pass.

The full suite, from a clean build: 181 passed, 1 skipped, 1 failed. The failure is GitCliTests.CloningAnLfsRepositoryRestoresTheFileContentRatherThanThePointer, and it fails the same way on unmodified main in this container. It is an environment issue (LFS smudge through the sandbox proxy), not this change. The whole solution, tests/ProjectDirector.UITests included, builds with 0 warnings.


Generated by Claude Code

… items [patch]

The OpenAI feature was commented out long ago, but its package, its token
field in the plain-text options file and two empty "Generate Tests" /
"Generate Documentation Comments" menu items on .cs files remained.
ImGui.NET was never referenced; the app uses Hexa.NET.ImGui, so it only
shipped a second, conflicting native cimgui.

Fixes #447

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017vfJW5526rrxQXBzaZBBJE
@sonarqubecloud

Copy link
Copy Markdown

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.

Remove the unused OpenAI and ImGui.NET packages and the no-op "Generate Tests" / "Generate Documentation Comments" menu items

2 participants