Skip to content

Migration: Desktop off Semantic Kernel onto Microsoft.Extensions.AI - #37

Merged
DevMando merged 2 commits into
mainfrom
Migration/agent-framework-0.15
Aug 23, 2026
Merged

Migration: Desktop off Semantic Kernel onto Microsoft.Extensions.AI#37
DevMando merged 2 commits into
mainfrom
Migration/agent-framework-0.15

Conversation

@DevMando

Copy link
Copy Markdown
Owner

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:

  1. Conversation history now uses the engine's new message type everywhere it
    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.
  2. Three Desktop features that talk to Ollama directly — the notes assistant,
    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

  • User-facing impact: none intended. No Desktop feature, screen, or setting changed.
  • Risk: low, and verified — the app builds and runs, with streaming replies, the
    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.
  • Reversible: yes, self-contained in the files listed.

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.
@DevMando
DevMando merged commit c182341 into main Aug 23, 2026
1 check passed
@DevMando
DevMando deleted the Migration/agent-framework-0.15 branch August 23, 2026 02:29
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.

1 participant