Vouch request: integrate comment-checker as built-in feature (#3741) #3742
Closed
niklasschaeffer
started this conversation in
General
Replies: 1 comment
|
vouched! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What I'd like to contribute
I've built a first-party integration of
@code-yeongyu/comment-checker(the native tree-sitter-powered comment checker behind pi-comment-checker) directly into@oh-my-pi/pi-coding-agent— as a built-in extension, not a plugin, configurable via the TUI settings panel.The PR was auto-closed because I'm not vouched yet: #3741
The branch is ready on my fork (
niklasschaeffer/oh-my-pi, branchfeat/comment-checker) and can be reopened as soon as I'm vouched.What it does
After
write/edit/multiedit/apply_patchtool results, the comment-checker runs the native binary on the changed content. When it detects comments/docstrings (exit code2), it appends the warning back into the tool result so the agent must react — same behavior as the upstream pi-comment-checker extension. A missing binary is a silent no-op.It also includes omp-specific per-file edit-details extraction (
perFileResults/filesfrom edit tool details), a self-heal path that re-surfaces unfired warnings onsession_compact, an above-editor warning widget + footer status line, and a/comment-checkerslash command.Design decisions
ExtensionFactoryvialoadExtensionFromFactoryinsdk.ts(same pattern as the existingautoresearchbuilt-in), gated on thecommentChecker.enabledsetting. Lazy-loaded withawait import("./comment-checker").commentCheckerActivecondition gates the sub-settings (custom--prompt).@code-yeongyu/comment-checkeras anoptionalDependency—bun installpulls the platform binary automatically; if absent, the resolver returnsundefinedand the extension is a silent no-op. No PATH fallback needed for the common case.Files (11 changed, +1237)
src/comment-checker/core.tssrc/comment-checker/cli.tsPromise.withResolvers)src/comment-checker/ui.tssrc/comment-checker/index.tstool_result,session_start,session_compacthandlers +/comment-checkercommandsrc/config/settings-schema.tscommentChecker.enabled(defaultfalse) +commentChecker.prompt(gated oncommentCheckerActive)src/modes/components/settings-defs.tscommentCheckerActiveconditionsrc/sdk.tspackages/coding-agent/package.json@code-yeongyu/comment-checkeroptionalDependencytest/comment-checker/core.test.tspackage.json,bun.lockVerification
tsgotypecheck: cleanbiome checkon all changed files: cleanbun test test/comment-checker/core.test.ts)2with warning on// bad comment, exit0on clean codeI'd be grateful for a vouch so this PR can be reopened and reviewed. Happy to iterate on the design if there's feedback before then.
All reactions