@@ -89,41 +89,45 @@ struct ReferenceList: View {
8989 let chat : StoreOf < Chat >
9090
9191 var body : some View {
92- ScrollView {
93- VStack ( alignment: . leading, spacing: 8 ) {
94- ForEach ( 0 ..< references. endIndex, id: \. self) { index in
95- let reference = references [ index]
92+ WithPerceptionTracking {
93+ ScrollView {
94+ VStack ( alignment: . leading, spacing: 8 ) {
95+ ForEach ( 0 ..< references. endIndex, id: \. self) { index in
96+ WithPerceptionTracking {
97+ let reference = references [ index]
9698
97- Button ( action: {
98- chat. send ( . referenceClicked( reference) )
99- } ) {
100- HStack ( spacing: 8 ) {
101- ReferenceIcon ( kind: reference. kind)
102- . layoutPriority ( 2 )
103- Text ( reference. title)
104- . truncationMode ( . middle)
105- . lineLimit ( 1 )
106- . layoutPriority ( 1 )
107- Text ( reference. subtitle)
108- . lineLimit ( 1 )
109- . truncationMode ( . middle)
110- . foregroundStyle ( . tertiary)
111- . layoutPriority ( 0 )
112- }
113- . padding ( . vertical, 4 )
114- . padding ( . horizontal, 4 )
115- . frame ( maxWidth: . infinity, alignment: . leading)
116- . overlay {
117- RoundedRectangle ( cornerRadius: 4 )
118- . stroke ( Color ( nsColor: . separatorColor) , lineWidth: 1 )
99+ Button ( action: {
100+ chat. send ( . referenceClicked( reference) )
101+ } ) {
102+ HStack ( spacing: 8 ) {
103+ ReferenceIcon ( kind: reference. kind)
104+ . layoutPriority ( 2 )
105+ Text ( reference. title)
106+ . truncationMode ( . middle)
107+ . lineLimit ( 1 )
108+ . layoutPriority ( 1 )
109+ Text ( reference. subtitle)
110+ . lineLimit ( 1 )
111+ . truncationMode ( . middle)
112+ . foregroundStyle ( . tertiary)
113+ . layoutPriority ( 0 )
114+ }
115+ . padding ( . vertical, 4 )
116+ . padding ( . horizontal, 4 )
117+ . frame ( maxWidth: . infinity, alignment: . leading)
118+ . overlay {
119+ RoundedRectangle ( cornerRadius: 4 )
120+ . stroke ( Color ( nsColor: . separatorColor) , lineWidth: 1 )
121+ }
122+ }
123+ . buttonStyle ( . plain)
119124 }
120125 }
121- . buttonStyle ( . plain)
122126 }
127+ . padding ( )
123128 }
124- . padding ( )
129+ . frame ( maxWidth : 500 , maxHeight : 500 )
125130 }
126- . frame ( maxWidth: 500 , maxHeight: 500 )
127131 }
128132}
129133
0 commit comments