MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_set_first_prompt_truncated

Function test_set_first_prompt_truncated

atomic-agent/src/turn/session.rs:768–775  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

766
767 #[test]
768 fn test_set_first_prompt_truncated() {
769 let mut s = make_session();
770 let long_prompt = "a".repeat(300);
771 s.set_first_prompt(&long_prompt);
772 let stored = s.first_prompt.unwrap();
773 assert!(stored.len() <= AgentSession::MAX_PROMPT_LENGTH);
774 assert!(stored.ends_with("..."));
775 }
776
777 // Files touched
778

Callers

nothing calls this directly

Calls 3

set_first_promptMethod · 0.80
make_sessionFunction · 0.70
unwrapMethod · 0.45

Tested by

no test coverage detected