fix(review): language-tagged suggestion fence for Gitea syntax highlighting
Gitea 1.26.x has no GitHub-style 'Apply suggestion' button — a ```suggestion fence is just an unknown-language code block, so chroma does not highlight it and there is no apply control. Switch inline_comment_body to wrap the suggested fix in a fence tagged with the file's language (new _lang_for_path helper, .java→java, .ts→typescript, .py→python, ...), so Gitea syntax-highlights the code. No capability lost (there was never an apply button on this Gitea version). Correct the docstrings/skills/README that wrongly claimed an apply-button was rendered. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -42,8 +42,10 @@ message — so the JSON must be the last thing, and it must be valid.
|
||||
- `suggestion` — the literal new code replacing the flagged line(s). Minimal,
|
||||
just the changed lines, indented as they appear in the file. **Empty string**
|
||||
when no safe textual replacement exists (missing test, architectural note, a
|
||||
fix that needs context beyond one hunk). This is wrapped in a ```suggestion
|
||||
fence → Gitea renders an **apply button**.
|
||||
fix that needs context beyond one hunk). The pilot wraps this in a fenced code
|
||||
block tagged with the file's language so Gitea syntax-highlights it. (Gitea
|
||||
1.26.x has no GitHub-style "Apply suggestion" button, so a ```suggestion fence
|
||||
is not used — a language-tagged fence gives highlighting and loses nothing.)
|
||||
- `reference` — a URL (CVE, library docs, spec) backing the finding, or `""`.
|
||||
Only link authoritative sources; don't fabricate URLs.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user