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

Source from the content-addressed store, hash-verified

820
821 #[test]
822 fn test_set_first_prompt_truncated() {
823 let mut s = make_session();
824 let long_prompt = "a".repeat(300);
825 s.set_first_prompt(&long_prompt);
826 let stored = s.first_prompt.unwrap();
827 assert!(stored.len() <= AgentSession::MAX_PROMPT_LENGTH);
828 assert!(stored.ends_with("..."));
829 }
830
831 // Files touched
832

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