File tree Expand file tree Collapse file tree 4 files changed +43
-0
lines changed Expand file tree Collapse file tree 4 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -1329,6 +1329,19 @@ extension DataStreamRoomMethods on Room {
13291329 topic: streamHeader.topic,
13301330 timestamp: streamHeader.timestamp.toInt (),
13311331 attributes: streamHeader.attributes,
1332+ replyToStreamId: streamHeader.textHeader.hasReplyToStreamId ()
1333+ ? streamHeader.textHeader.replyToStreamId
1334+ : null ,
1335+ attachedStreamIds: streamHeader.textHeader.attachedStreamIds.toList (),
1336+ version: streamHeader.textHeader.hasVersion ()
1337+ ? streamHeader.textHeader.version
1338+ : null ,
1339+ generated: streamHeader.textHeader.hasGenerated ()
1340+ ? streamHeader.textHeader.generated
1341+ : false ,
1342+ operationType: streamHeader.textHeader.hasOperationType ()
1343+ ? streamHeader.textHeader.operationType.name
1344+ : null ,
13321345 );
13331346
13341347 final streamController = DataStreamController <lk_models.DataStream_Chunk >(
Original file line number Diff line number Diff line change @@ -1239,6 +1239,11 @@ extension DataStreamParticipantMethods on LocalParticipant {
12391239 timestamp: DateTime .timestamp ().millisecondsSinceEpoch,
12401240 topic: options? .topic ?? '' ,
12411241 size: options? .totalSize ?? 0 ,
1242+ replyToStreamId: options? .replyToStreamId,
1243+ attachedStreamIds: options? .attachedStreamIds ?? [],
1244+ version: options? .version,
1245+ generated: options? .generated ?? false ,
1246+ operationType: options? .type,
12421247 );
12431248
12441249 final header = lk_models.DataStream_Header (
Original file line number Diff line number Diff line change @@ -166,13 +166,33 @@ class ByteStreamInfo extends BaseStreamInfo {
166166}
167167
168168class TextStreamInfo extends BaseStreamInfo {
169+ /// The stream ID this message is replying to, if any
170+ final String ? replyToStreamId;
171+
172+ /// List of stream IDs that are attached to this stream
173+ final List <String > attachedStreamIds;
174+
175+ /// Version of the stream
176+ final int ? version;
177+
178+ /// Whether this text was generated by an agent
179+ final bool generated;
180+
181+ /// Operation type for the stream
182+ final String ? operationType;
183+
169184 TextStreamInfo ({
170185 required String id,
171186 required String mimeType,
172187 required String topic,
173188 required int timestamp,
174189 required int size,
175190 Map <String , String > attributes = const {},
191+ this .replyToStreamId,
192+ this .attachedStreamIds = const [],
193+ this .version,
194+ this .generated = false ,
195+ this .operationType,
176196 }) : super (
177197 id: id,
178198 mimeType: mimeType,
Original file line number Diff line number Diff line change @@ -219,6 +219,11 @@ void main() {
219219 final text = await reader.readAll ();
220220 print ('received reply message: ${text }' );
221221 expect (text, 'This is a reply to the original message' );
222+
223+ // Verify that reply metadata is accessible
224+ expect (reader.info? .replyToStreamId, originalStreamId);
225+ expect (reader.info? .version, 1 );
226+ expect (reader.info? .operationType, 'CREATE' );
222227 });
223228
224229 // Send a reply to an existing stream
You can’t perform that action at this time.
0 commit comments