Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Needs human review 1 blocking correctness issue found. This PR adds GitHub Copilot as a new provider, introducing ~4000 lines of new code including SDK integration, session management, and permission handling. The substantial scope, new external dependency, and unresolved high-severity comment about incomplete turn event lifecycle in error paths warrant thorough human review. You can customize Macroscope's approvability policy. Learn more. |
|
This needs to be tested if the desktop app is working fine with Copilot |
|
Because julius plumbed in ACP can't we just use ACP, I guess the copilot sdk has copilot specific stuff |
f02de1a to
290befb
Compare
# Conflicts: # bun.lock
| }); | ||
| export type CodexSettings = typeof CodexSettings.Type; | ||
| export const CopilotSettings = Schema.Struct({ | ||
| enabled: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(true))), |
There was a problem hiding this comment.
Copilot enabled by default causes unwanted CLI spawns
Medium Severity
CopilotSettings defaults enabled to true, meaning every existing user who upgrades will have Copilot auto-enabled. Combined with the 1-hour COPILOT_REFRESH_INTERVAL, this will repeatedly spawn the bundled Copilot CLI binary, attempt auth checks, and fail for the majority of users who have no GitHub Copilot subscription or auth configured. Unlike Codex/Claude/OpenCode which are the app's core providers, Copilot is a newly added optional integration — defaulting to false (like Cursor does) would avoid unnecessary process spawns and error noise on every refresh cycle.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c9b8512. Configure here.
| readonly raw?: SessionEvent | undefined; | ||
| }) { | ||
| return { | ||
| eventId: EventId.make(Effect.runSync(Random.nextUUIDv4)), |
There was a problem hiding this comment.
Non-idiomatic UUID generation bypasses Effect runtime
Low Severity
createBaseEvent uses Effect.runSync(Random.nextUUIDv4) to generate event IDs, creating a throwaway mini-runtime on every call. The Claude adapter, by contrast, uses yield* Random.nextUUIDv4 within Effect generators. Since createBaseEvent is called from both Effect and async/promise contexts (via emitAsync and handleSdkEvent), the runSync escape hatch is used as a workaround. A reviewer already noted this file is "a bit too promise based" — wrapping the SDK with a thin Effect shim would let createBaseEvent live inside the Effect context and use the runtime's Random service idiomatically.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c9b8512. Configure here.
|
i'l look into this |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 01451c8. Configure here.



What Changed
Why
T3 Code already supports multiple agent providers, but it did not have GitHub Copilot support. This change adds Copilot end to end in the same shape as the other providers instead of treating it as a one-off integration.
That keeps the UX and server behavior consistent: users can configure Copilot in settings, select Copilot models from the same pickers, use it for git text generation, and rely on the same persistence and runtime flows that already exist for other providers. Using the official SDK also keeps the integration aligned with GitHub’s supported protocol and model discovery/auth flows.
UI Changes
Checklist
Note
High Risk
Introduces a new first-class provider with a large new session/event adapter and shared client lifecycle management, touching core runtime orchestration, settings/contracts, and UI model selection paths; failures could impact session handling and provider routing across the app.
Overview
Adds GitHub Copilot as a first-class provider end-to-end (dependency on
@github/copilot-sdk), including provider status probing/model discovery (CopilotProviderLive), a full runtime session adapter with event streaming, permission/user-input handling, resume support, and ndjson native event logging (CopilotAdapterLive).Extends git text generation routing to support
copilotviaCopilotTextGenerationLive, which reuses a shared started Copilot client across requests with an idle shutdown TTL and structured-JSON prompting/validation for commit messages, PR content, branch names, and thread titles.Updates shared contracts/settings and the web UI to include
copiloteverywhere providers/models are handled (provider kind enums, default models, reasoning-effort options, provider ordering, model pickers/traits, settings panel fields, persisted draft normalization), plus adds targeted tests for the new Copilot runtime, provider probe error surfacing, and git client reuse.Reviewed by Cursor Bugbot for commit 01451c8. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add GitHub Copilot as a provider for chat, text generation, and settings
@github/copilot-sdkas a newcopilotprovider across the full stack: provider registry, adapter, text generation, model selection, and settings UI.CopilotProviderandCopilotAdapterlayers that probe SDK availability, surface auth status, and stream provider state changes via the existing managed provider infrastructure.CopilotTextGenerationLivefor commit messages, PR content, branch names, and thread titles using a shared client with session-per-request semantics and a 30-second idle shutdown.CopilotSettings,CopilotModelOptions(withreasoningEffort: xhigh/high/medium/low), andCopilotModelSelection.COPILOT_CLI_PATHis explicitly deleted to prevent unintended CLI selection.Macroscope summarized 01451c8.