File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44from ghoshell_moss .core .concepts .command import CommandTask , PyCommand
55from ghoshell_moss .core .py_channel import PyChannel
66from ghoshell_moss .message import Message , new_text_message
7+ from ghoshell_moss .message .contents import Text
78
89chan = PyChannel (name = "test" )
910
@@ -219,5 +220,5 @@ def foo() -> list[Message]:
219220 # 更新后, messages 也变更了.
220221 await broker .refresh_meta ()
221222 assert len (broker .meta ().context ) == 2
222- assert broker .meta ().context [0 ].contents == [{ "type" : " text" , "data" : { "text" : " hello"}}]
223- assert broker .meta ().context [1 ].contents == [{ "type" : " text" , "data" : { "text" : " world"}}]
223+ assert broker .meta ().context [0 ].contents [ 0 ] == Text ( text = " hello"). to_content ()
224+ assert broker .meta ().context [1 ].contents [ 0 ] == Text ( text = " world"). to_content ()
You can’t perform that action at this time.
0 commit comments