Merge branch 'main' into chat-history

This commit is contained in:
Paul Gauthier 2023-07-26 07:29:54 -03:00
commit 8ea4629e73

View file

@ -152,8 +152,13 @@ class Commands:
limit = self.coder.main_model.max_context_tokens
remaining = limit - total
if remaining > 0:
if remaining > 1024:
self.io.tool_output(f"{fmt(remaining)} tokens remaining in context window")
elif remaining > 0:
self.io.tool_error(
f"{fmt(remaining)} tokens remaining in context window (use /drop or /clear to make"
" space)"
)
else:
self.io.tool_error(f"{fmt(remaining)} tokens remaining, window exhausted!")
self.io.tool_output(f"{fmt(limit)} tokens max context window size")