Refactor/project layout - #66
Open
lsoft wants to merge 5 commits into
Open
Conversation
FreeAIr.csproj listed all 279 source files by hand, which silently drops a file that nobody remembers to add. It is SDK-style now and globs its sources: 660 lines down to ~120. Two assemblies come out of it: - FreeAIr.Shared gains CallAwaiter, NonDisposableSemaphoreSlim, TempFile and ActivityLogHelper, none of which had any reason to sit in the VSIX; - FreeAIr.Voice takes the whole Record/ folder and the recording options page, and with them six packages (NAudio, Whisper.net and its two runtimes, System.Speech, Windows.SDK.Contracts) plus the whisper runtime zipping, which is now a proper AfterTargets="Build" target instead of a PostBuildEvent that never saw $(TargetDir). CLAUDE.md records the two traps this hit: MSBuild-only builds, and F5 being driven by AdditionalArguments now that dropping the project flavor handed the Debug page to Visual Studio's own extensibility project system. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
InfoBarService.ShowInfoBar returned silently when the main window had no info bar host, which is exactly the state devenv is in while the start window is up - so on a machine that opens no solution the "new version installed" and first-run wizard bars were simply dropped. Waiting for ShellInitializedContext does not help either: the shell reports itself initialized long before the main window exists. It now retries once a second for a minute and gives up with a log line rather than in silence. The two callers log what they decided, which is what made this findable in the activity log at all. Dismissing the first-run bar also records FreeAIrLastVersion now. That bar links to the release notes itself, so without it a brand new install got the plain "new version installed" bar on its very next start. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…onEdit The parsed-prompt model (IParsedPart, Parsed, the answer parts, SelectedIdentifier) has no WPF in it and is used by Chat, Helper, Git, Commands and NLOutline, yet it lived under UI/Embedillo/. The files move to Chat/Context/Parser/; the namespace deliberately stays as it was, so this commit changes no using directive anywhere. IParser was the real coupling: it published its mentions as MentionVisualLineGenerator, an AvalonEdit VisualLineElementGenerator, so the whole ANTLR pipeline dragged in the editor. The parsers only ever used two members of it, which are now IMentionRecognizer. The generator implements that interface without a line of its body changing, IParser.Generators is gone, and the chat control passes the generators to the editor itself - the parser has no business handing out editor objects. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Most of what looked like a UI dependency was a misfiled type. BackgroundTask sat inside WaitForTaskWindow.xaml.cs and DifferenceShower under UI/Difference, yet neither has a line of WPF in it - the first is a cancellable task with a status event, the second drives IVsDifferenceService. Both move out; the window keeps only the window. GitWindowModifier makes the opposite trip: it is pure WPF and lived in Git/. What genuinely needed a seam now has one in Interaction/, implemented in the UI assembly and resolved through MEF the way ChatContainer already was: - IBackgroundTaskShower puts up the wait dialog, so the git diff collector no longer constructs a Window; - IUserChooser asks for a support action and an agent, hiding the Visual Studio context menus behind the two questions every command starts with; - IGitCommitMessageBox is the Git Changes commit box as far as the commit message builder cares, implemented by GitWindowModifier; - IChatWindowShower shows a chat wherever chats go; - IChatStatusIndicator takes the aggregate chat status, and ChatsStatusEnum moves with it, so ChatContainer no longer imports the status bar control. UIInformer and GitWindowModifier now carry two exports each and are marked Shared explicitly - both must stay singletons, since the package initializes the one instance the rest of the extension reports into. Git/GitNaturalLanguageOutliner still reaches for NaturalLanguageOutlinesViewModel. That is a real dependency on the NLO feature rather than a presentation seam, and belongs to the wave which extracts it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
No description provided.