Skip to content

Codeer v1.0.1#3

Open
davidkivuyo wants to merge 714 commits into
codeerfrom
codeer-v1.0.1
Open

Codeer v1.0.1#3
davidkivuyo wants to merge 714 commits into
codeerfrom
codeer-v1.0.1

Conversation

@davidkivuyo

Copy link
Copy Markdown
Owner

No description provided.

vijayupadya and others added 30 commits May 27, 2026 02:16
* Make session sync flush params exp controllable

* Feedback update

* Fix for test
The `chat.agentHost.*` settings were only registered in
`chat.shared.contribution.ts` (renderer). The desktop main process reads
`chat.agentHost.enabled` in `app.ts` to decide whether to spawn the
agent host, and the electron-main and remote-server agent host starters
read `chat.agentHost.claudeAgent.path` plus the six `chat.agentHost.otel.*`
settings to populate env vars on the spawned process. Without a
registration in those processes, every `getValue()` call returned
`undefined` and the declared defaults were silently ignored.

This change introduces two platform-level contribution files and wires
each one only where it's consumed:

- `agentHost.config.contribution.ts` — registers `chat.agentHost.enabled`.
  Side-effect-imported by `electronAgentHostStarter.ts` so the main
  process picks it up transitively from `app.ts`. The remote server does
  **not** consume this key (it spawns the agent host based on
  `--agent-host-port` / `--agent-host-path` CLI args), so the server's
  registry intentionally stays empty for it — an accidental future read
  will fail loudly instead of silently picking up a workbench default.

- `agentHostStarter.config.contribution.ts` — registers the seven
  starter-consumed settings (`claudeAgent.path` + 6 `otel.*`).
  Side-effect-imported by both starters (`electronAgentHostStarter.ts`
  and `nodeAgentHostStarter.ts`) so the registration travels with the
  consumer and is discoverable from either end.

Both contribution files are also side-effect-imported from
`chat.shared.contribution.ts` so the renderer still sees all keys in
the settings UI. The three renderer-only keys (`ipcLogging`,
`ahpJsonl`, `customTerminalTool`) stay inline in
`chat.shared.contribution.ts` — they have no consumers outside the
renderer, so registering them elsewhere would only pollute those
processes' registries.

Verified the agent host process itself does not read `chat.agentHost.*`
via the workbench `IConfigurationService`: the starters translate
settings into env vars (`buildAgentHostOTelEnv`,
`VSCODE_AGENT_HOST_CLAUDE_SDK_PATH`) and the agent host's own
root/session config service handles runtime knobs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tern (#318488)

* launch: simple file dialog, monaco-paste helper, parallel session pattern

Surfaced while running a bug bash over the Agents window terminal tool —
the launch skill needed three improvements before subagents could drive
multiple Code OSS instances cleanly.

1. launch.sh now forces `files.simpleDialog.enable: true` in the launched
   profile. Native macOS file dialogs cannot be driven via @playwright/cli
   over CDP/SSH; the simple (quick-input style) dialog can. Without this,
   the new-session workspace picker's `Select...` button is a dead end
   for automation on a fresh slim-copied UDD.

2. New scripts/monaco-paste.sh helper inserts text into the focused
   Code OSS chat-input Monaco editor by dispatching a synthetic
   ClipboardEvent('paste') with a DataTransfer payload. Avoids pbcopy's
   system-wide NSPasteboard collision (which fights any other process
   touching the clipboard), supports unicode/emoji/backticks/quotes/
   newlines, and waits two requestAnimationFrames before read-back
   because Monaco updates its view-line DOM asynchronously after paste.
   Honors `--session NAME` arg or `$PW_SESSION` env. Verified across
   20+ pastes including all the awkward characters and parallel
   multi-instance runs.

3. SKILL.md updated to:
   - document the new simpleDialog default
   - recommend monaco-paste.sh as the primary typing path; keeps per-key
     `press` and `pbcopy` as fallbacks with the pasteboard-collision
     caveat called out explicitly
   - make `-s=$PW_SESSION` the default convention on every
     @playwright/cli example so the skill's per-instance isolation
     extends to the Playwright-driving layer. Without `-s=`, parallel
     shells share the implicit "default" session daemon and the most-
     recently-attached CDP wins for every subsequent command
   - add a "Parallel multi-instance pattern" subsection showing the
     full attach/paste/cleanup loop with per-session names
   - note that PLAYWRIGHT_CLI_SESSION env var works for `open`-style
     workflows but interacts poorly with `attach --cdp=` due to a
     playwright-core bug (cli-client/session.ts:142-143) — explicit
     `-s=` works in all modes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address PR review feedback

Five inline comments from the Copilot reviewer on #318488, all addressed:

- launch.sh: replace the regex-strip-then-JSON.parse settings overlay
  with a data-preserving text-based insert. The previous version could
  silently drop user settings on parse failure and would incorrectly
  strip `//` inside string values (e.g. URLs). The new version:
    * detects when the key is already present (any value) and updates
      its value via a targeted regex on the value slot only;
    * otherwise inserts the key before the last `}`, preserving all
      comments and formatting;
    * fails loudly (non-zero exit) if the file is structurally bad
      rather than silently overwriting with `{}`;
    * is idempotent (T6: byte-identical when key is already `true`).
  Verified across 7 scenarios incl. JSONC comments + URLs containing
  `//` + malformed input.

- monaco-paste.sh: detect platform and pick `Meta+a` (macOS) or
  `Control+a` (Linux/Windows) for the clear-before-paste select-all,
  so the default (non-`--append`) path actually clears the editor on
  non-mac.

- monaco-paste.sh: validate node + jq up-front in addition to npx, so
  missing tools fail with a clear actionable message and exit 2 rather
  than crashing later.

- monaco-paste.sh: header docs now correctly list the three exit codes
  (0 success, 1 paste/eval failure, 2 argument/tooling error) and the
  required tools on PATH.

- monaco-paste.sh: fix `set -u` unbound-variable error when no
  PW_SESSION/--session is set — `"${PW_ARGS[@]}"` on an empty array
  trips set -u, so use the `${PW_ARGS[@]+"${PW_ARGS[@]}"}` idiom at
  every call site.

- SKILL.md: fix "Macros-Mach-ports" → "macOS Mach-ports" typo.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…498)

Streaming the agent host's worktree announcement
("Created isolated worktree for branch `xyz`") briefly rendered a bare
opening backtick because `fillInIncompleteTokens` was not closing the
codespan during progressive rendering. The progressive word renderer in
`chatWordCounter` deliberately excludes backticks from word characters,
so the intermediate state at the end of a streamed chunk is exactly
"…for branch \`xyz" — which is precisely what
`fillInIncompleteTokensOnce` is supposed to patch up.

Two issues conspired:

1. `ChatContentMarkdownRenderer` wraps `supportHtml` markdown in
   `<body>...</body>` so dompurify does not strip leading comments.
   That makes the lexer emit
   `[html('<body>'), paragraph(…`xyz), space, html('</body>')]`, so
   `tokens.at(-1)` is `html`, not `paragraph`, and the
   codespan / list fix-ups never run.

2. The agent host paths were unconditionally setting
   `supportHtml: true` on streamed markdown deltas. The
   "supportHtml is load bearing" comment is now stale: PR #318053
   replaced the old `AgentHostEditingSession` (which emitted bare
   ` ```` ` fences as `markdownContent`) with a dedicated
   `'externalEdit'` progress part, so model deltas have nothing to
   accidentally merge into.

Fixes:

- `fillInIncompleteTokensOnce` now walks past trailing `space` and
  `html` tokens to find the last paragraph/list, then preserves those
  trailing tokens around the patched-up node. Heading branch is
  intentionally left alone.
- Drop `supportHtml: true` (and the stale comment) from both the live
  streaming sink in `agentHostSessionHandler` and the history rebuild
  in `stateToProgressAdapter`. Drop the now-unused `options` parameter
  from `rawMarkdownToString`.

Tests:

- New token-level regression in `markdownRenderer.test.ts` exercises
  the `<body>…</body>`-wrapped + bare-backtick scenario.
- New end-to-end test in `chatMarkdownRenderer.test.ts` runs through
  the full render pipeline (with `supportHtml: true` and
  `fillInIncompleteTokens: true`) and asserts a `<code>` element is
  produced with no leftover bare backtick.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ensures the search subagent's parentChatSessionId is always set by
falling back to the conversation's sessionId when the capturing token's
chatSessionId is unavailable. Without this fallback the search subagent
spans lacked PARENT_CHAT_SESSION_ID and were uploaded as independent
cloud sessions instead of folding into the parent.

Follow-up fix for #318463.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* test: Add BYOK retry regression coverage

 - add BYOK Responses retry regression for ignored stateful marker
 - preserve non-ZDR initial request and ZDR guard coverage

* fix: Preserve BYOK retry marker suppression

 - keep explicit ignoreStatefulMarker on non-ZDR retries
 - retain existing ZDR and shared Responses behavior

* chore: Clarify BYOK retry comment

- clarify initial-request default vs retry override
- point retry-time override at parent retry flow

* fix: Preserve explicit BYOK marker override

- keep caller-supplied ignoreStatefulMarker values
- add makeChatRequest2 regression coverage

* test: Fix BYOK response fixtures

- add missing ChatResponse success fields
- keep makeChatRequest2 regression tests typed

---------

Co-authored-by: Vritant Bhardwaj <vritoku@gmail.com>
…8503)

* Chronicle: handle undefined CapturingToken in execution_subagent

* minor update
Co-authored-by: vs-code-engineering[bot] <vs-code-engineering[bot]@users.noreply.github.com>
…copilot-linuxmusl` packages (#318490)

Co-authored-by: vs-code-engineering[bot] <vs-code-engineering[bot]@users.noreply.github.com>
… (#318479)

* Add /chronicle:improve prompt for data-driven instructions refinement

* Address review feedback: typo fix and instructions file clarity

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Chat: OTel enrichment for Claude agent sessions
* perf(copilot): dedupe tool-definition JSON across telemetry/OTel sites

Each LLM round previously serialized the tool list multiple times (OTel inference span, OTel agent span, 'tools_available' event, GH 'request.options.tools' enhanced telemetry, and per-key 'request.option.tools' property), producing several independent multi-MB strings retained by buffered spans and telemetry queues.

Add stringifyToolDefinitionsForOTel and stringifyToolsRawForTelemetry in messageFormatters: a WeakMap by-reference cache plus a single-slot content intern so identical tool lists across consecutive agent rounds collapse to one string instance. Wire all producer sites (chatMLFetcher GH telemetry + Object.entries loops, toolCallingLoop agent span and tools_available event, anthropic/gemini byok providers, genAiEvents inference event) through the helpers.

* fix: leave Object.entries(request) telemetry loop untouched

Those properties are sent synchronously and released; they weren't among the retained copies. The other helper sites still dedupe the long-lived strings.

* perf: route tools through memoized helper in Object.entries loops with JSON.stringify fallback to preserve empty-array byte equality

* Simplify comment

* PR feedback
…oid race with killForceful timer

Co-authored-by: vritant24 <13074644+vritant24@users.noreply.github.com>
…on with specific Agent in Agent Window (#318506)
…() to avoid race with killForceful timer"

This reverts commit 0baa8cd.
…models-issue

Prevent signed-out users from seeing GitHub Copilot upgrade recommendations
* Fix chat notification outline to match chat input focus ring

Co-authored-by: Copilot <copilot@github.com>

* PR feedback

---------

Co-authored-by: Copilot <copilot@github.com>
…n integration in AI Customization Management Editor

Co-authored-by: Copilot <copilot@github.com>
* feat: update to Electron v42

* chore: drop support for arm 32-bit server

* chore: update types/node to v24.x

* chore: temporarily lock the target version for build/

* chore: update v8-source-location.patch

* chore: fix clippy

* chore: cleanup armhf server ci config

* fix: broken lock file

* fix: c++ version requirement for sysroot builds

* fix: msvc compilation of native modules

* fix: handle rejections for fire-and-forget loadurl

* fix: windows build

* ci: fix teardown of daemon process on windows

```
2026-05-15T20:55:09.7717127Z Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 76
```

* chore: update deb and rpm dependencies

* chore: update version info

* spec: improve reliablity of offscreencanvas tests

* spec: retry EPERM failures on teardown

* chore: update x86_64 rpm deps

* ci: exclude server binskim for armhf

* temp: bump distro

* test: ignore deprecation warnings treated as errors

* chore: update lockfile

* fix: externalize electron from auth extension bundles

 Error: Cannot find module 'c:\Users\cloudtest\AppData\Local\Temp\vscode-sanityQvCaze\vscode-server-win32-x64-web\extensions\github-authentication\dist\install.js'
     at Module._resolveFilename (node:internal/modules/cjs/loader:1476:15)
     at wrapResolveFilename (node:internal/modules/cjs/loader:1049:27)
     at defaultResolveImplForCJSLoading (node:internal/modules/cjs/loader:1073:10)
     at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1094:12)
     at Module._load (node:internal/modules/cjs/loader:1262:25)
     at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
     at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)
     at node:internal/main/run_main_module:33:47 {
   code: 'MODULE_NOT_FOUND',
   requireStack: []
 }

 Node.js v24.15.0

* test: make wsl sanity tests reliable

* chore: bump electron@42.1.0

* temp: bump distro

* chore: bump electron@42.2.0

* chore: bump distro

* chore: update debian dependencies

* Revert "test: make wsl sanity tests reliable"

This reverts commit b3f2b63e83b89a0d99abd832c7525a5815e0355b.

* test: do not fail for deprecation warnings

* chore: patch node24 server binary for wsl1

* chore: address review feedback

* chore: revert global navigation error handler in browserview

* chore: bump distro
…nsistency

Co-authored-by: Copilot <copilot@github.com>
aeschli and others added 28 commits May 29, 2026 16:25
…and related services for distiguishing local from user customizations + several bug fixes (#319047)

* feat: add getWorkingDirectory method to agent host session providers and related services for distiguishing local from user customizations + several bug fixes

* update
Forward GitHub token in createSession/resumeSession RPC (#318693)

The Copilot SDK has two GitHub-token slots:

  - Client-level (CopilotClientOptions.gitHubToken): hands the token to
    the spawned CLI subprocess via an environment variable. The CLI then
    does its own HTTP fetch to api.github.com to turn the bytes into an
    AuthInfo. If that fetch fails (slow/proxied network on the SSH host,
    transient 401, etc.) the CLI is left permanently unauthenticated
    because we also pass useLoggedInUser: false to disable the stored-
    OAuth fallback. Sessions created against that CLI inherit no
    AuthInfo and fail on first send with 'Session was not created with
    authentication info or custom provider'.

  - Session-level (SessionConfig.gitHubToken): the token travels inside
    the createSession RPC payload itself. The CLI resolves it as part of
    the create handler, so the session always carries its own AuthInfo
    regardless of whether the env-var bootstrap settled.

Pass the cached _githubToken through _buildSessionConfig so both
client.createSession and client.resumeSession get session-level auth.
This makes session start independent of the fragile env-var bootstrap
that fails for users with slow/proxied paths to api.github.com from the
remote. Add a regression test asserting the token is forwarded.

The client-level env-var path is left in place because client-scoped
SDK calls (listModels, listSessions, etc.) have no per-call token
override; those calls are tolerant of transient auth failures and are
not user-facing.

Fixes #318693

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…(#318511)

* Support Copilot async shell completions with AHP message origins

* removed unused import

* fix test
Git - throttle initial repository.status() across repositories

Each repository.status() spawns ~10 git subprocesses. With many repos in a workspace, fan-out can saturate the extension host and trigger the IPC unresponsive watcher kill loop. Bound concurrency with a Limiter(5).

Fixes #318279

Fixes #318764
…ni-3-Flash (#319023)

* Added gemini in exec subagent description and gated on gemini availability

* Set Gemini as default execution subagent model and enabled by default

* Modified the description of the executionSubagent.enabled setting
…-request-id

Add header request id for ghosttext edit types
Add gemini exp setting gemini3GetChangedFilesTool
* Live streaming for Task API cloud agent sessions

Adds TaskTurnStreamer to incrementally push v2 Task API events into
vscode.ChatResponseStream for both initial open (mode: 'current') and
follow-up sends (mode: 'next'), mirroring the v1 JobsApiBackend SSE flow.

Key design (modelled after github-ui/agent-sessions):
- Eager tool rendering from assistant.message.toolRequests, since
  tool.execution_complete does not fire for many agent-host-synthesised
  setup ops (run_setup, run_custom_setup_step).
- Per-messageId content dedup: Task API sends progressive snapshots, not
  deltas; only the suffix is fed to the renderer.
- Intermediate assistant.message.content (content + toolRequests in the
  same event) is suppressed; only pure-text assistant messages (the final
  reply of the turn) are rendered as markdown.
- Default 'Working...' progress label until the first assistant.intent
  arrives.
- Bounded poll loop: exits on terminal state, cancellation, or
  MAX_CONSECUTIVE_FETCH_FAILURES.
- Follow-up (mode: 'next') only advances when task.sessions.length grows,
  to avoid premature exit when trailing prior-turn events arrive between
  the snapshot and sendFollowUpToTask resolving.

ChatSessionContentBuilder updates:
- buildTaskHistory: single-pass turn split + bootstrap event suppression.
- buildTaskResponseTurn: mirrors the live rules (eager tool rendering,
  intermediate-narration suppression, dedup with live cards) so the
  refresh() after streaming is idempotent.
- parseToolCallDetails: friendly cards for run_setup,
  run_custom_setup_step, report_intent.
- toFileLabel: handles v1 (/home/runner/work/...) and v2
  (/tmp/workspace/..., /workspace/...) layouts.

* Address PR review: parallelize fetches, fix stale comment, add Task API history tests

- Parallelize fetchTask/fetchEvents with Promise.all in both the main
  poll loop and _waitForTurnStart so each poll only pays the slower of
  the two requests.
- Update StreamBaseline JSDoc to reflect that phase 1 (mode: 'next')
  unblocks only on turnCount > priorTurnCount, not 'any unseen event'.
- Add unit tests covering the new Task API history rules:
  bootstrap suppression, turn-boundary split, eager tool rendering with
  execution_complete dedup, intermediate-narration suppression, and
  the synthesised-turn fallback when no user.message has arrived.

* Readme update
* Initial attempt. Send dummy user requests every 5 mins

* Modified the probe message

* Modified timeouts

* Removed artificial 2 min delay

* Addressing Copilot suggestions

* Made it configurable

* Make probe limit exp based

* Typo in docstring

* Enabled only for execution subagent

* Changed default number of probes to 1

* Fixed formatting in package.json

* Override userInitiatedRequest to false for probe messages

* Added a subtype keep-alive-probe in telemetry

* Updated telemetry to keep subtype unchanged but use a different source

* Address review: scope keep-alive to Anthropic + current round, constant-1 finishedCb

* Simplify keep-alive endpoint resolution: separate lookup, no flag-off reordering

---------

Co-authored-by: bhavyaus <bhavyau@microsoft.com>
Disable execution subagent by default (enable via exp)
* Fix selectChatModels API

* Prevent feedback loop through onChatModelsChange event

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
* Clear timeouts/intervals on dispose in chat extension

* Revert uneeded change

Co-authored-by: Copilot <copilot@github.com>

* Revert unneeded change.

* Dispose timers

Co-authored-by: Copilot <copilot@github.com>

* Type fix

* Clear timeouts/intervals on dispose in extensions

---------

Co-authored-by: Copilot <copilot@github.com>
Fix separator for open in agents window action
The autorun in WorktreeCreatedTaskDispatcher previously disposed its own store via _sessionDisposables.deleteAndDispose, which could synchronously remove the entry while the autorun was still mid-run and allow a re-entrant _trackSession call to install a fresh autorun that fires again.

- Switch to reader.dispose() so the autorun tears itself down cleanly without racing _sessionDisposables bookkeeping, preventing the worktreeCreated tasks from being dispatched more than once per session.

(Commit message generated by Copilot)
@davidkivuyo davidkivuyo reopened this Jun 9, 2026
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.