style(swift): fix lint

This commit is contained in:
Peter Steinberger
2025-12-17 21:50:54 +01:00
parent 51bdf01e2e
commit 2b2376d4c0
5 changed files with 23 additions and 13 deletions

View File

@@ -66,4 +66,3 @@ public struct ClawdisChatSessionsListResponse: Codable, Sendable {
public let defaults: ClawdisChatSessionsDefaults?
public let sessions: [ClawdisChatSessionEntry]
}

View File

@@ -18,7 +18,9 @@ struct ChatSessionsSheet: View {
.font(.system(.body, design: .monospaced))
.lineLimit(1)
if let updatedAt = session.updatedAt, updatedAt > 0 {
Text(Date(timeIntervalSince1970: updatedAt / 1000).formatted(date: .abbreviated, time: .shortened))
Text(Date(timeIntervalSince1970: updatedAt / 1000).formatted(
date: .abbreviated,
time: .shortened))
.font(.caption)
.foregroundStyle(.secondary)
}

View File

@@ -45,7 +45,8 @@ public final class ClawdisChatViewModel {
private var pendingToolCallsById: [String: ClawdisChatPendingToolCall] = [:] {
didSet {
self.pendingToolCalls = self.pendingToolCallsById.values.sorted { ($0.startedAt ?? 0) < ($1.startedAt ?? 0) }
self.pendingToolCalls = self.pendingToolCallsById.values
.sorted { ($0.startedAt ?? 0) < ($1.startedAt ?? 0) }
}
}