From 13962755798cb208af7e3d3a451f8de04a65beec Mon Sep 17 00:00:00 2001 From: dj-oyu <68707227+dj-oyu@users.noreply.github.com> Date: Fri, 20 Mar 2026 02:20:19 +0900 Subject: [PATCH] fix: suppress gosmopolitan lint for intentional CJK keywords Co-Authored-By: Claude Opus 4.6 (1M context) --- pkg/agent/loop_media.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/agent/loop_media.go b/pkg/agent/loop_media.go index c2139b6c0..2a8f8e472 100644 --- a/pkg/agent/loop_media.go +++ b/pkg/agent/loop_media.go @@ -420,6 +420,8 @@ func injectImageDescriptions(content string, descriptions []string) string { const maxPreviewRunes = 500 // figureKeywords triggers --figure --figure_letter when found in the message. +// +//nolint:gosmopolitan // intentional CJK keywords for Japanese users var figureKeywords = []string{ "figure", "figures", "with images", "図版", "図付き", "画像付き", "図も", @@ -436,9 +438,9 @@ func wantFigures(content string) bool { return false } -// pdfHintMessage is sent once when a PDF is first processed to explain options. +//nolint:gosmopolitan // intentional CJK in user-facing hint const pdfHintMessage = "PDF OCR in progress. " + - "Tip: include \"figures\" or \"図版\" in your message to extract images and in-figure text." + "Tip: include \"figures\" or \"\u56f3\u7248\" in your message to extract images and in-figure text." // processPDFsInMessages finds [file:/path.pdf] tags in messages and replaces // them with [document: preview... (full: /path/to.md, N pages)] tags after