fix: disable proper noun detection by default (too many false positives)
Proper noun detection (flagging capitalized phrases like "Getting Started", "Generate Design", "Introduction Getting Started") now disabled by default. Enable via popup → Options tab → Detect proper nouns. The pattern-based detection (IPs, emails, API keys, addresses, paths, etc.) remains always-on and reliable. The capitalized phrase heuristic was producing too many false positives on normal UI phrases, headings, and instructions — adding words to the filter was a losing game. Added detectProperNouns toggle to popup Options tab. Updated README to note it's opt-in. https://claude.ai/code/session_01SWSwDfMVij53bCTNSCLMwn
This commit is contained in:
@@ -136,7 +136,7 @@ const AutoDetect = {
|
||||
*
|
||||
* Returns array of { name, value, hint, category, index }
|
||||
*/
|
||||
scan(text, identity) {
|
||||
scan(text, identity, options) {
|
||||
if (!text || text.length < 5) return [];
|
||||
|
||||
const hasContext = CONTEXT_WORDS.test(text);
|
||||
@@ -194,8 +194,11 @@ const AutoDetect = {
|
||||
}
|
||||
|
||||
// Proper noun heuristic — catch names, company names, project names
|
||||
const properNouns = this._detectProperNouns(text, configured);
|
||||
findings.push(...properNouns);
|
||||
// Disabled by default (too many false positives). Pass detectProperNouns: true to enable.
|
||||
if (options?.detectProperNouns) {
|
||||
const properNouns = this._detectProperNouns(text, configured);
|
||||
findings.push(...properNouns);
|
||||
}
|
||||
|
||||
// Deduplicate overlapping matches
|
||||
findings.sort((a, b) => (a.index || 0) - (b.index || 0));
|
||||
|
||||
Reference in New Issue
Block a user