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

Method add_system_message

src/apps/cli/src/chat_state.rs:849–861  ·  view source on GitHub ↗

Add a system message (for commands like /help, /clear, etc.)

(&mut self, content: String)

Source from the content-addressed store, hash-verified

847
848 /// Add a system message (for commands like /help, /clear, etc.)
849 pub fn add_system_message(&mut self, content: String) {
850 self.messages.push(ChatMessage {
851 id: uuid::Uuid::new_v4().to_string(),
852 role: MessageRole::System,
853 timestamp: SystemTime::now(),
854 flow_items: vec![FlowItem::Text {
855 content,
856 is_streaming: false,
857 }],
858 is_streaming: false,
859 version: 0,
860 });
861 }
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) {

Callers 15

runMethod · 0.80
apply_exit_reasonMethod · 0.80
handle_commandMethod · 0.80
show_usage_reportMethod · 0.80
show_model_selectorMethod · 0.80
show_agent_selectorMethod · 0.80
apply_agent_selectionMethod · 0.80
execute_mcp_toggleMethod · 0.80
execute_mcp_addMethod · 0.80
execute_mcp_deleteMethod · 0.80
open_mcp_configMethod · 0.80

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected