Conversation
snapshot.ts->renderContext():remove mtime field in prompt (generated_at、projection_lag_ms、source_context_mtime、stale_context、context_file_stale、audit_after_context) , filter warnings/next-actions pointing to active-context.md. retry.ts-> add `RETRY_MAX_ATTEMPTS = 5` to prevent unlimited retry, `policy()` will stop after retry 5 attempts. instruction.ts-> `system()` will not concat context package, add `context()` to return rendered package. prompt.ts -> main loop switch to call `instruction.context()` ,keep system prompt prefix is static, and the package is wrapped in `<system-reminder>` and injected at the end of messages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, numasec
after a penetration testing session, I found that numasec had used up 143M tokens (approximately $18), which is an unusually high amount for the DeepSeek V4 Flash model. Having analysed local logs and token usage, I implemented the following modifications. Subsequent testing showed that Numasec consumed just $0.28 while using 32.2M tokens.
snapshot.ts->
renderContext():remove mtime field in prompt (generated_at、projection_lag_ms、source_context_mtime、stale_context、context_file_stale、audit_after_context) , filter warnings/next-actions pointing to active-context.md.retry.ts-> add
RETRY_MAX_ATTEMPTS = 5to prevent unlimited retry,policy()will stop after retry 5 attempts.instruction.ts->
system()will not concat context package, addcontext()to return rendered package.prompt.ts -> main loop switch to call
instruction.context(),keep system prompt prefix is static, and the package is wrapped in<system-reminder>and injected at the end of messages.