Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
branches: [main]

jobs:
test:
name: Build and Test
test-macos:
name: Build and Test (macOS)
runs-on: macos-26

steps:
Expand Down Expand Up @@ -48,3 +48,23 @@ jobs:
with:
files: ./*.lcov
fail_ci_if_error: false

build-ios:
name: Build (iOS)
runs-on: macos-26

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Build for iOS Simulator
run: |
xcodebuild build \
-scheme AgentKit \
-destination 'generic/platform=iOS Simulator' \
-skipPackagePluginValidation \
| tail -n 20
Comment on lines +64 to +70
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

In build-ios, piping xcodebuild into tail without set -o pipefail means the step can succeed even if xcodebuild fails (the exit code will be from tail). Ensure the pipeline preserves xcodebuild's failure status (e.g., enable pipefail or avoid piping altogether).

Copilot uses AI. Check for mistakes.
10 changes: 7 additions & 3 deletions Sources/AgentLayout/Markdown/CopyButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ struct CopyButton: View {
}

func onCopied() async {
let pasteboard = NSPasteboard.general
pasteboard.clearContents()
pasteboard.setString(content, forType: .string)
#if canImport(UIKit)
UIPasteboard.general.string = content
#elseif canImport(AppKit)
let pasteboard = NSPasteboard.general
pasteboard.clearContents()
pasteboard.setString(content, forType: .string)
#endif
Comment on lines +30 to +36
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

CopyButton references UIPasteboard/NSPasteboard but the file only imports SwiftUI. To ensure this compiles on both iOS and macOS, add conditional imports for UIKit/AppKit (e.g., under #if canImport(...)) before using these APIs.

Copilot uses AI. Check for mistakes.
copied = true
// Wait 1.5 secs
try? await Task.sleep(for: .seconds(1.5))
Expand Down
Loading