Skip to content
Open
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
2 changes: 0 additions & 2 deletions apps/ios/Sources/Litter/LitterApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1916,7 +1916,6 @@ private struct ConversationDestinationScreen: View {
thread: conversationThread,
activeThreadKey: resolvedThreadKey,
transcript: screenModel.transcript,
followScrollToken: screenModel.followScrollToken,
pinnedContextItems: screenModel.pinnedContextItems,
composer: screenModel.composer,
supportsTurnPagination: screenModel.composer.supportsTurnPagination,
Expand Down Expand Up @@ -2053,7 +2052,6 @@ private struct ReplayDestinationScreen: View {
thread: thread,
activeThreadKey: key,
transcript: screenModel.transcript,
followScrollToken: screenModel.followScrollToken,
pinnedContextItems: screenModel.pinnedContextItems,
composer: screenModel.composer,
supportsTurnPagination: screenModel.composer.supportsTurnPagination,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ struct ConversationDisplayUITestHarnessView: View {
originThreadId: nil,
agentDirectoryVersion: 0,
messageActionsDisabled: true,
onStreamingSnapshotRendered: nil,
onLiveContentLayoutChanged: nil,
resolveTargetLabel: { _ in nil },
resolveThreadKey: { _ in nil },
resolveLiveStatus: { _ in nil },
Expand Down
11 changes: 0 additions & 11 deletions apps/ios/Sources/Litter/Views/ConversationScreenModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ final class ConversationScreenModel {
private(set) var transcript: ConversationTranscriptSnapshot = .empty
private(set) var pinnedContextItems: [ConversationItem] = []
private(set) var composer: ConversationComposerSnapshot = .empty
private(set) var followScrollToken = 0
private(set) var minigameOverlay: MinigameOverlayState = .idle
/// Precomputed server snapshot for the current thread's server. Read by
/// HeaderView and ConversationToolbarControls via param instead of
Expand Down Expand Up @@ -152,7 +151,6 @@ final class ConversationScreenModel {
self.agentDirectoryVersion = agentDirectoryVersion

if threadChanged {
followScrollToken = 0
cachedHydratedConversationItems = []
cachedConversationItemProjections = [:]
cachedProjectedConversationItems = []
Expand All @@ -173,7 +171,6 @@ final class ConversationScreenModel {
transcript = .empty
pinnedContextItems = []
composer = .empty
followScrollToken = 0
resolveTargetLabel = { _ in nil }
resolveThreadKey = { _ in nil }
resolveLiveStatus = { _ in nil }
Expand Down Expand Up @@ -303,21 +300,13 @@ final class ConversationScreenModel {
agentDirectoryVersion: agentDirectoryVersion,
renderDigest: transcriptChanged ? transcriptRevision : currentTranscript.renderDigest
)
var nextFollowScrollToken = followScrollToken
if hasTurnInFlight,
projection.didChange {
nextFollowScrollToken &+= 1
}
if transcript != nextTranscript {
transcript = nextTranscript
pinnedContextItems = items
}
if composer != composerSnapshot {
composer = composerSnapshot
}
if followScrollToken != nextFollowScrollToken {
followScrollToken = nextFollowScrollToken
}
}
}

Expand Down
15 changes: 1 addition & 14 deletions apps/ios/Sources/Litter/Views/ConversationTimelineView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ struct ConversationTurnTimeline: View {
let originThreadId: String?
let agentDirectoryVersion: UInt64
let messageActionsDisabled: Bool
let onStreamingSnapshotRendered: (() -> Void)?
let onLiveContentLayoutChanged: (() -> Void)?
let resolveTargetLabel: (String) -> String?
let resolveThreadKey: (String) -> ThreadKey?
let resolveLiveStatus: (ThreadKey) -> AppSubagentStatus?
Expand Down Expand Up @@ -43,12 +41,6 @@ struct ConversationTurnTimeline: View {
)
.id(row.id)
.modifier(RowEntranceModifier(isAssistantRow: row.isAssistantRow))
.onGeometryChange(for: CGFloat.self) { geometry in
geometry.size.height
} action: { oldHeight, newHeight in
guard isLive, abs(newHeight - oldHeight) > 0.5 else { return }
onLiveContentLayoutChanged?()
}
}
}
}
Expand Down Expand Up @@ -103,8 +95,6 @@ struct ConversationTurnTimeline: View {
commandDisplayMode: commandDisplayMode,
toolDisplayMode: toolDisplayMode,
messageActionsDisabled: messageActionsDisabled,
onStreamingSnapshotRendered: item.id == streamingAssistantItemId ? onStreamingSnapshotRendered : nil,
onLiveContentLayoutChanged: onLiveContentLayoutChanged,
resolveTargetLabel: resolveTargetLabel,
resolveThreadKey: resolveThreadKey,
resolveLiveStatus: resolveLiveStatus,
Expand Down Expand Up @@ -485,8 +475,6 @@ private struct ConversationTimelineItemRow: View, Equatable {
let commandDisplayMode: ConversationDetailDisplayMode
let toolDisplayMode: ConversationDetailDisplayMode
let messageActionsDisabled: Bool
let onStreamingSnapshotRendered: (() -> Void)?
let onLiveContentLayoutChanged: (() -> Void)?
let resolveTargetLabel: (String) -> String?
let resolveThreadKey: (String) -> ThreadKey?
let resolveLiveStatus: (ThreadKey) -> AppSubagentStatus?
Expand Down Expand Up @@ -704,8 +692,7 @@ private struct ConversationTimelineItemRow: View, Equatable {
itemId: item.id,
text: data.text,
isStreaming: isStreamingMessage,
label: assistantLabel,
onSnapshotRendered: isStreamingMessage ? onStreamingSnapshotRendered : nil
label: assistantLabel
)
}

Expand Down
Loading