MCPcopy Create free account
hub / github.com/GCWing/BitFun / add_assistant_message

Method add_assistant_message

src/apps/cli/src/chat_state.rs:864–876  ·  view source on GitHub ↗

Add a local assistant message (for rendered reports and other UI-only content).

(&mut self, content: String)

Source from the content-addressed store, hash-verified

862
863 /// Add a local assistant message (for rendered reports and other UI-only content).
864 pub fn add_assistant_message(&mut self, content: String) {
865 self.messages.push(ChatMessage {
866 id: uuid::Uuid::new_v4().to_string(),
867 role: MessageRole::Assistant,
868 timestamp: SystemTime::now(),
869 flow_items: vec![FlowItem::Text {
870 content,
871 is_streaming: false,
872 }],
873 is_streaming: false,
874 version: 0,
875 });
876 }
877
878 /// Clear all messages (for /clear command)
879 pub fn clear_messages(&mut self) {

Callers 1

show_usage_reportMethod · 0.80

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected