MCPcopy Create free account
hub / github.com/AI45Lab/Code / build_with_message

Method build_with_message

core/src/prompts.rs:464–469  ·  view source on GitHub ↗

Build the final system prompt, auto-detecting style from the initial message. If `self.style` is explicitly set, that style is used regardless of message content. Otherwise, the style is detected from `initial_message` using keyword analysis.

(&self, initial_message: &str)

Source from the content-addressed store, hash-verified

462 /// If `self.style` is explicitly set, that style is used regardless of message content.
463 /// Otherwise, the style is detected from `initial_message` using keyword analysis.
464 pub fn build_with_message(&self, initial_message: &str) -> String {
465 let style = self
466 .style
467 .unwrap_or_else(|| AgentStyle::detect_from_message(initial_message));
468 self.build_with_style(style)
469 }
470
471 /// Build the prompt with an explicitly specified style.
472 fn build_with_style(&self, style: AgentStyle) -> String {

Calls 1

build_with_styleMethod · 0.80