cody icon indicating copy to clipboard operation
cody copied to clipboard

`Chat token usage must be updated before Context.`

Open Kynlos opened this issue 1 year ago • 0 comments

Version

Latest (stable and pre)

Describe the bug

Chat token usage must be updated before Context.

Caused when pasting too much text into the chat window at the same time then submitting.

Expected behavior

Text input in the chat window for Cody should be character limited to the amount of tokens allowed based on the chosen LLM.

Additional context

Behaviour experienced by myself several times when trying to work with larger chunks of code or information and not paying attention to how much I pasted.

Issue also reported by po'boy on Discord: https://discord.com/channels/969688426372825169/969688427232641136/1240681675684577341

Screenshot_2024-05-16-17-15-17-85_572064f74bd5f9fa804b05334aa4f912

Kynlos avatar May 16 '24 16:05 Kynlos