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
5 changes: 5 additions & 0 deletions Sources/OpenUsage/Providers/ErrorCategory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ extension OpenCodeUsageError: CategorizedError {
switch self {
case .notLoggedIn: .notLoggedIn
case .credentialsUnreadable, .databaseUnreadable: .credentialAccess
case .unauthorized: .authExpired
case .noGoSubscription: .notAvailable
case .connectionFailed: .network
case .invalidResponse: .decoding
case .requestFailed(let status): ErrorCategory.http(status)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Foundation

/// Reads the OpenCode Go/Zen credential already on the machine. Local-only — never the network. The
/// `opencode-go` key is both the first-run detection signal and (for a future `/zen/go/v1/usage` API)
/// the Bearer token, so it lives behind one loader.
/// Reads the OpenCode Go credential already on the machine. Local-only — never the network. The
/// `opencode-go` key is both the first-run detection signal and the Bearer token for
/// `GET /zen/go/v1/usage`, so it lives behind one loader.
struct OpenCodeAuthStore: Sendable {
var files: TextFileAccessing
var environment: EnvironmentReading
Expand Down
147 changes: 0 additions & 147 deletions Sources/OpenUsage/Providers/OpenCode/OpenCodeGoWindows.swift

This file was deleted.

Loading