refactor: remove session syncing metadata

This commit is contained in:
Peter Steinberger
2025-12-23 00:50:42 +01:00
parent c0c20ebf3e
commit ce04308c17
11 changed files with 1 additions and 175 deletions

View File

@@ -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 {