Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when interacting with an empty file in CodeLLM #5

Closed
rajeshkanaka opened this issue Dec 21, 2024 · 2 comments
Closed

Error when interacting with an empty file in CodeLLM #5

rajeshkanaka opened this issue Dec 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@rajeshkanaka
Copy link

Description

When I open an empty file in the CodeLLM-supported editor and attempt to interact with the chat (e.g., sending a simple "hi"), an error occurs. The error message indicates an invalid parameter fileContents.

Steps to Reproduce

  1. Open the CodeLLM-supported code editor.
  2. Create or open an empty file (no content in the file).
  3. Type "hi" (or any input) in the CodeLLM chat interface.
  4. Observe the error message.

Expected Behavior

The interaction with the chat should process without throwing an error, even if the file is empty.

Actual Behavior

An error message is displayed:

Error: Invalid parameter 'fileContents'. Received: '{"/path/to/empty/file.py": ""}'. File contents must be a dictionary with file names (str) as keys and file contents (str) as values.

Additional Context

The issue seems to stem from the CodeLLM extension failing to handle files with empty content. The system attempts to pass an empty string for the file contents but fails validation. A screenshot is attached for further clarification.

CleanShot 2024-12-22 at 01 21 14@2x

@aminya aminya added the bug Something isn't working label Dec 25, 2024
@aminya
Copy link
Member

aminya commented Dec 25, 2024

Thanks for reporting this bug. I can confirm the issue.

@aminya
Copy link
Member

aminya commented Dec 27, 2024

This is now fixed in the latest version.
https://github.com/abacusai/codellm-releases/releases/tag/1.95.3.24362

@aminya aminya closed this as completed Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants