MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / append_context_block

Function append_context_block

src/hooks/steering.rs:190–198  ·  view source on GitHub ↗
(context: &mut String, block: &str)

Source from the content-addressed store, hash-verified

188}
189
190pub(super) fn append_context_block(context: &mut String, block: &str) {
191 if !context.is_empty() && !context.ends_with('\n') {
192 context.push('\n');
193 }
194 context.push_str(block);
195 if !block.ends_with('\n') {
196 context.push('\n');
197 }
198}
199
200pub(super) fn append_context_recovery_hint(context: &mut String) {
201 if !context.is_empty() && !context.ends_with('\n') {

Calls 2

pushMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected