Migration: Desktop off Semantic Kernel onto Microsoft.Extensions.AI - #37
Merged
Conversation
The engine dropped Semantic Kernel in the Agent Framework migration, and Desktop had been compiling against SK types it never declared — it inherited them transitively through the harness project reference. When the harness stopped bringing SK in, Desktop stopped building (CS0234). Two separate breaks, both fixed here: The history boundary. AIService.GetHistoryAsync now returns MEAI ChatMessage, so IAiService, AiServiceAdapter, the fake in ResponseStreamerTests, and HistorySummarizer all move to that type. MEAI's FunctionResultContent carries only a call id where SK's carried the function name, so HistorySummarizer now builds a call-id-to-name map per walk to keep tool lines reading "read_file -> ..." instead of a bare id — the same approach the engine took in SynthesizeHistorySummary. Desktop's own Ollama callers. NoteAssistant, SnapshotEnhancer, and SkillAuthor each built a throwaway SK Kernel to reach Ollama directly. They now use OllamaApiClient as an IChatClient, with ChatOptions in place of OllamaPromptExecutionSettings. Prompts, temperatures, and streaming semantics are unchanged; the clients are disposed now, which the kernels never were. Both projects declare Microsoft.Extensions.AI and OllamaSharp explicitly rather than leaning on the harness's transitive copies. Depending on packages we never declared is what turned an engine-side removal into a Desktop build failure, and the comments in both csproj files say so.
The README described the app as built on Semantic Kernel's Ollama connector, and session-persistence.md pointed at SK's content types for the cross-provider carry note. Both now name what actually runs: Agent Framework in the engine, Microsoft.Extensions.AI content types across the boundary. Older changelog entries keep their SK references — they were accurate for the versions they describe.
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.
What this does
Finishes the Agent Framework migration on the Desktop side. PR #36 pointed Desktop
at the new engine; this makes Desktop's own code stop depending on the framework
that engine removed.
Why Desktop needed work at all
Desktop had been using Semantic Kernel types it never declared as its own
dependency — it inherited them from the engine. When the engine dropped Semantic
Kernel, Desktop stopped compiling. Two repairs:
crosses the boundary. One detail needed care: the new type identifies a tool
result by call id rather than by name, so the snapshot transcript now maps ids
back to names. Without that, recaps of tool-using conversations would have
degraded to unreadable identifiers.
the snapshot summarizer, and the skill author — moved to the same client library
the engine standardized on. Prompts, temperatures, and streaming behavior are
unchanged.
Both projects now declare these dependencies explicitly. Relying on the engine to
supply them is precisely what turned an engine-side removal into a Desktop build
failure, and that class of surprise is now closed.
Also included
README and one design doc corrected where they still named the old framework, and
a line added to the existing
[Unreleased]changelog entry.Impact and risk
notes assistant, and skill refinement all behaving as before. Snapshot recaps over
tool-using conversations are the highest-value thing for a reviewer to re-check,
since that is where the history change is visible.