File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,18 +113,8 @@ final class ScriptTab: Identifiable {
113113 init ( record: ScriptTabRecord ) {
114114 self . id = record. tabId
115115 self . scriptName = record. scriptName
116- // Cap restored log at 50K chars (matches ActivityLogView render cap)
117- let restored = record. activityLog
118- if restored. count > 50_000 {
119- let drop = restored. count - 50_000
120- var trimmed = String ( restored. dropFirst ( drop) )
121- if let nl = trimmed. firstIndex ( of: " \n " ) {
122- trimmed = String ( trimmed [ trimmed. index ( after: nl) ... ] )
123- }
124- self . activityLog = trimmed
125- } else {
126- self . activityLog = restored
127- }
116+ // Truncation handled by ActivityLogView at render time
117+ self . activityLog = record. activityLog
128118 self . exitCode = record. exitCode == - 999 ? nil : Int32 ( record. exitCode)
129119 self . isRunning = false
130120 self . isMessagesTab = record. isMessagesTab
Original file line number Diff line number Diff line change @@ -480,15 +480,7 @@ extension AgentViewModel {
480480 activityLog += combined
481481 NotificationCenter . default. post ( name: . activityLogDidChange, object: nil )
482482 }
483- // Trim from front if too large — ActivityLogView shows yellow banner
484- let maxChars = 50_000
485- if activityLog. count > maxChars {
486- let drop = activityLog. count - maxChars
487- activityLog = String ( activityLog. dropFirst ( drop) )
488- if let nl = activityLog. firstIndex ( of: " \n " ) {
489- activityLog = String ( activityLog [ activityLog. index ( after: nl) ... ] )
490- }
491- }
483+ // Truncation handled by ActivityLogView at render time (50K cap)
492484 }
493485
494486 private func schedulePersist( ) {
You can’t perform that action at this time.
0 commit comments