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

Source from the content-addressed store, hash-verified

1613
1614 #[test]
1615 fn test_set_first_prompt_truncated() {
1616 let mut s = make_session();
1617 let long_prompt = "a".repeat(300);
1618 s.set_first_prompt(&long_prompt);
1619 let stored = s.first_prompt.unwrap();
1620 assert!(stored.len() <= AgentSession::MAX_PROMPT_LENGTH);
1621 assert!(stored.ends_with("..."));
1622 }
1623
1624 // Files touched
1625

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