Skip to content

fix: warn on malformed ~/.klaatai/config.json - #11

Closed
Devil1716 wants to merge 1 commit into
KlaatAI:mainfrom
Devil1716:fix/8-config-parse-warning
Closed

fix: warn on malformed ~/.klaatai/config.json#11
Devil1716 wants to merge 1 commit into
KlaatAI:mainfrom
Devil1716:fix/8-config-parse-warning

Conversation

@Devil1716

Copy link
Copy Markdown
Contributor

Summary

  • loadConfig() still falls back to defaults on parse failure, but now writes a one-line stderr warning with the file path and error.
  • Valid configs are unchanged (no extra output).

Test plan

  • Break ~/.klaatai/config.json (trailing comma) and run klaatcode — see warning
  • Restore valid config — no warning

Fixes #8

Note: issue is currently assigned to @itxhadi27-cmd — happy to close/defer if they already have a PR in progress.

Malformed config previously fell back to defaults with no signal. Print
a one-line stderr warning naming the file and parse error, then continue.

Co-authored-by: Cursor <cursoragent@cursor.com>
@aakashrajput

Copy link
Copy Markdown
Member

@Devil1716 can you please try to attach a screenshot with your comment.

@Devil1716

Devil1716 commented Jul 20, 2026 via email

Copy link
Copy Markdown
Contributor Author

@aakashrajput

Copy link
Copy Markdown
Member

@Devil1716 you are always welcome to do improvement in the project. If you have idea or a better improvement open a issue and work on it. also you can join the discord (link can be found on readme) and use Contribution channel to ask to create issue and assign to you.

Happy Coding.

@Devil1716

Devil1716 commented Jul 20, 2026 via email

Copy link
Copy Markdown
Contributor Author

@Devil1716

Devil1716 commented Jul 20, 2026 via email

Copy link
Copy Markdown
Contributor Author

@Devil1716

Devil1716 commented Jul 20, 2026 via email

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

~/.klaatai/config.json parse errors fail silently — should warn instead

2 participants