Skip to content

Commit 6a87fe2

Browse files
committed
fix: auto-compress large images before passing to engine (#19)
Claude Code Read tool has a ~15000 token limit for images. Large images (>500KB) exceed this and fail silently. GolemBot now auto- compresses images before saving to disk: resize to max 1024px, convert to JPEG at 80% quality, skip SVG/GIF. Adds sharp dependency. Closes #19. Includes 11 new tests.
1 parent 56eebc6 commit 6a87fe2

5 files changed

Lines changed: 595 additions & 7 deletions

File tree

‎package.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
"dependencies": {
6464
"commander": "^13.0.0",
6565
"inquirer": "^12.0.0",
66-
"js-yaml": "^4.1.0"
66+
"js-yaml": "^4.1.0",
67+
"sharp": "^0.34.5"
6768
},
6869
"pnpm": {
6970
"onlyBuiltDependencies": [
@@ -105,6 +106,7 @@
105106
"@slack/bolt": "^4.6.0",
106107
"@types/js-yaml": "^4.0.9",
107108
"@types/node": "^22.0.0",
109+
"@types/sharp": "^0.32.0",
108110
"grammy": "^1.41.0",
109111
"husky": "^9.1.7",
110112
"lint-staged": "^16.3.2",

0 commit comments

Comments
 (0)