refactor: remove session syncing metadata
This commit is contained in:
@@ -5,38 +5,6 @@ public struct ClawdisChatSessionsDefaults: Codable, Sendable {
|
||||
public let contextTokens: Int?
|
||||
}
|
||||
|
||||
public enum ClawdisChatSessionSyncing: Codable, Hashable, Sendable {
|
||||
case bool(Bool)
|
||||
case string(String)
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
if let b = try? container.decode(Bool.self) {
|
||||
self = .bool(b)
|
||||
return
|
||||
}
|
||||
if let s = try? container.decode(String.self) {
|
||||
self = .string(s)
|
||||
return
|
||||
}
|
||||
throw DecodingError.typeMismatch(
|
||||
ClawdisChatSessionSyncing.self,
|
||||
DecodingError.Context(
|
||||
codingPath: decoder.codingPath,
|
||||
debugDescription: "Expected Bool or String"))
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.singleValueContainer()
|
||||
switch self {
|
||||
case let .bool(b):
|
||||
try container.encode(b)
|
||||
case let .string(s):
|
||||
try container.encode(s)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public struct ClawdisChatSessionEntry: Codable, Identifiable, Sendable, Hashable {
|
||||
public var id: String { self.key }
|
||||
|
||||
@@ -56,7 +24,6 @@ public struct ClawdisChatSessionEntry: Codable, Identifiable, Sendable, Hashable
|
||||
|
||||
public let model: String?
|
||||
public let contextTokens: Int?
|
||||
public let syncing: ClawdisChatSessionSyncing?
|
||||
}
|
||||
|
||||
public struct ClawdisChatSessionsListResponse: Codable, Sendable {
|
||||
|
||||
Reference in New Issue
Block a user