Skip to content

Streamline electron package#2688

Merged
hillary-mutisya merged 13 commits into
microsoft:mainfrom
hillary-mutisya:electronPackaging
Jul 18, 2026
Merged

Streamline electron package#2688
hillary-mutisya merged 13 commits into
microsoft:mainfrom
hillary-mutisya:electronPackaging

Conversation

@hillary-mutisya

Copy link
Copy Markdown
Collaborator
  • Switch default behavior for shell launch to connect to a running agent-server instance. If none is running, the shell will launch one, matching the behavior of CLI.
  • Add --standalone flag which alllows launching shell with in-proc hosted agent-server, for dev environments that want previous behavior.
  • Update electron packaging to only include platform-specific packages e.g. only x64 copilot sdk packages when building x64.
  • Mark the onnxruntime components used for local embedding as optional. Remove them from shell package since emebeddings would run in agent-server.
  • Together, the last 2 changes cut 40% of the shell installer size.

- Switch default behavior for shell launch to connect to a running agent-server instance. If none is running, the shell will launch one, matching the behavior of CLI.
- Add `--standalone` flag which alllows launching shell with in-proc hosted agent-server, for dev environments that want previous behavior.
- Update electron packaging to only include platform-specific packages e.g. only x64 copilot sdk packages when building x64.
- Mark the onnxruntime components used for local embedding as optional. Remove them from shell package since emebeddings would run in agent-server.
- Together, the last 2 changes cut 40% of the shell installer size.
@hillary-mutisya

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

Move `initRuntimeConfigFromProcessEnv` and `warmupCopilotFromConfig` out of `populateKeys`/`tryLoadYamlConfig` into a new `warmupRuntimeConfig` export that is called only when running in standalone mode (in-process agent-server). The connect-only shell never imports aiclient, keeping it out of the dependency closure.

Also guard continuous-speech processing behind `isLocalSpeechProcessingSupported()`, which skips local classification when the configured provider is Copilot (unavailable in the pruned connect-only shell).

Update `prune-shell-deploy.mjs` to drop ALL platform-native packages for `@github/copilot` and `@anthropic-ai/claude-agent-sdk` (not just the non-host arch), while preserving the small JS wrapper packages.
@hillary-mutisya
hillary-mutisya disabled auto-merge July 17, 2026 22:26
@curtisman

curtisman commented Jul 17, 2026

Copy link
Copy Markdown
Member

@hillary-mutisya Does the @shell agent works in server mode? I don't think support for "per client" agent injection is implemented yet. Might need a follow up work item.

@hillary-mutisya

Copy link
Copy Markdown
Collaborator Author

@curtisman , good call. I'm tracking the agent registration as a separate change (#2697). I'll make sure that PR goes in before this one.

Move browser and markdown view-service startup off the agent enable path by forking in the background, preventing startup delays from view-service timeouts. Preserve and update crash cleanup/port registration logic once the child process is ready, and rewire markdown UI context after late process creation. Also lazy-load `urlResolver` in browser URL resolution to avoid eager module loading during startup.
@hillary-mutisya
hillary-mutisya added this pull request to the merge queue Jul 18, 2026
Merged via the queue into microsoft:main with commit 84dc420 Jul 18, 2026
26 checks passed
@shell

shell commented Jul 18, 2026

Copy link
Copy Markdown

I do work in agent mode. Reluctantly

@hillary-mutisya
hillary-mutisya deleted the electronPackaging branch July 18, 2026 15:21
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.

4 participants