Skip to content

feat: add foundation model for summarization#21

Merged
sirily11 merged 1 commit into
mainfrom
briefing-foundation-model
May 18, 2026
Merged

feat: add foundation model for summarization#21
sirily11 merged 1 commit into
mainfrom
briefing-foundation-model

Conversation

@sirily11

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 18, 2026 12:58
@vercel

vercel Bot commented May 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rxcode Ready Ready Preview, Comment May 18, 2026 0:58am

Request Review

@sirily11 sirily11 enabled auto-merge (squash) May 18, 2026 12:58
@autopilot-project-manager autopilot-project-manager Bot added the enhancement New feature or request label May 18, 2026
@sirily11 sirily11 merged commit 71d7c72 into main May 18, 2026
8 checks passed
@sirily11 sirily11 deleted the briefing-foundation-model branch May 18, 2026 13:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an on-device summarization option backed by Apple’s Foundation Models framework and wires it into the app’s summarization flows. The PR also expands the Briefings sidebar UI with branch scoping, copy-to-clipboard, and a waterfall-style layout (via a new third-party dependency).

Changes:

  • Add FoundationModelSummarizationService and integrate it as a new SummarizationProvider in AppState summarization/title/briefing paths.
  • Update Settings UI to show/select the new provider (and gate provider visibility based on device availability).
  • Revamp Briefings sidebar layout and filtering (branch scope toggle, project filters, waterfall grid, copy button), adding WaterfallGrid as a dependency.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
RxCode/Views/Sidebar/BriefingView.swift Adds branch scoping + copy button + waterfall grid layout for briefings.
RxCode/Views/SettingsView.swift Updates summarization provider picker and adds Apple Foundation Model status UI.
RxCode/Views/Chat/ThreadTitlePopoverButton.swift Simplifies title rendering by only showing a popover button when a summary exists.
RxCode/Services/FoundationModelSummarizationService.swift Introduces on-device summarization/title generation via Foundation Models.
RxCode/App/AppState.swift Adds the new provider and routes summarization calls to the Foundation Models service.
RxCode.xcodeproj/.../Package.resolved Adds WaterfallGrid SwiftPM pin.
RxCode.xcodeproj/project.pbxproj Adds WaterfallGrid package dependency to the Xcode project.
Comments suppressed due to low confidence (1)

RxCode/Views/Sidebar/BriefingView.swift:325

  • Same issue here: Label(..., systemImage: "") uses an empty symbol name for the unchecked state. Consider conditionally rendering the icon (or using Text) so menu rows don’t rely on an invalid system image name.
                    Button {
                        selectedProjectIds.removeAll()
                    } label: {
                        Label("All projects", systemImage: selectedProjectIds.isEmpty ? "checkmark" : "")
                    }
                    Divider()
                    ForEach(projects) { project in
                        Button {
                            toggleProject(project.id)
                        } label: {
                            Label(
                                project.name,
                                systemImage: selectedProjectIds.contains(project.id) ? "checkmark" : ""
                            )
                        }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


/// Cached current branch per project path, refreshed when the project list changes.
@State private var currentBranchByProject: [UUID: String] = [:]
@State private var branchRefreshTask: Task<Void, Never>?
Comment on lines +267 to +272
Label("Current branch", systemImage: showAllBranches ? "" : "checkmark")
}
Button {
showAllBranches = true
} label: {
Label("All branches", systemImage: showAllBranches ? "checkmark" : "")
Comment on lines +147 to +153
private func refreshCurrentBranches() async {
var resolved: [UUID: String] = [:]
for project in appState.projects {
if let branch = await GitHelper.currentBranch(at: project.path) {
resolved[project.id] = branch
}
}
Comment thread RxCode/App/AppState.swift
Comment on lines +112 to 124
/// Returns the providers that should be offered to the user right now.
/// Apple Foundation Model is hidden when the device doesn't support it
/// (non-Apple-Silicon Mac, Apple Intelligence disabled, etc.).
@MainActor
static var availableCases: [SummarizationProvider] {
allCases.filter { provider in
switch provider {
case .appleFoundationModel:
return FoundationModelSummarizationService.isAvailable
case .selectedClient, .openAI:
return true
}
}
Comment on lines 674 to 678
Picker("Provider", selection: $appState.summarizationProvider) {
ForEach(SummarizationProvider.allCases) { provider in
ForEach(SummarizationProvider.availableCases) { provider in
Text(provider.displayName).tag(provider)
}
}
Comment on lines 1 to +4
import SwiftUI
import Foundation
import RxCodeCore
import WaterfallGrid
@sirily11

Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 1.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants