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:796–803  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

794
795 #[test]
796 fn test_set_first_prompt_truncated() {
797 let mut s = make_session();
798 let long_prompt = "a".repeat(300);
799 s.set_first_prompt(&long_prompt);
800 let stored = s.first_prompt.unwrap();
801 assert!(stored.len() <= AgentSession::MAX_PROMPT_LENGTH);
802 assert!(stored.ends_with("..."));
803 }
804
805 // Files touched
806

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