amazon-q-developer-cli
amazon-q-developer-cli copied to clipboard
Context files are being duplicated on every message
Every user message has context files included. This drastically increases the token usage, and thus needs to be addressed.
https://github.com/aws/amazon-q-developer-cli/blob/8179b325a4cec41d9a914266ec76fd65b4007c05/crates/q_cli/src/cli/chat/conversation_state.rs#L139-L168
We already prepend the context files on every request sent to the model, so it should be safe to simply remove the logic that adds context files to new user messages. https://github.com/aws/amazon-q-developer-cli/blob/8179b325a4cec41d9a914266ec76fd65b4007c05/crates/q_cli/src/cli/chat/conversation_state.rs#L397