Skip to content

Conversation

@spoons-and-mirrors
Copy link
Collaborator

do not inject system prompt, nudge and prunable tool list so long as tool outputs token count is less than 5000 (default value, configurable)

continue
}
if (part.state.status === "completed") {
const output = part.state.output
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably check for the tool type because write and edit tools have different parts pruned and add those differently


prune(state, logger, config, output.messages)

state.thresholdState = getThreshold(state, output.messages)
Copy link
Collaborator

@Tarquinen Tarquinen Dec 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be done within inject.ts as well?

@Tarquinen
Copy link
Collaborator

Tarquinen commented Dec 29, 2025

I split prune.ts into two files for a cleaner seperation of responsibilites, should be easy to move your prune.ts changes into inject.ts instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants