From 4b51b6da0c525744c078f188cf3e7b2f98051257 Mon Sep 17 00:00:00 2001 From: A-znk <145305286+Yuki-zik@users.noreply.github.com> Date: Wed, 8 Jul 2026 11:06:53 +0800 Subject: [PATCH] feat(regex): detect %-style (LaTeX/Matlab) comments Add % to the default taskvision.regex.regex comment-prefix alternation so TODO/FIXME tags in LaTeX/Matlab/Erlang % comments are detected. Sync the reset-to-default command and the repro stub, add a QUnit case asserting % TODO fix this is matched, and record a CHANGELOG entry. Fixes #3 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- CHANGELOG.md | 4 ++++ agent/tasks.md | 10 +++++----- agent/timeline.md | 1 + package.json | 2 +- reproduce_issue_v9.js | 2 +- src/extension.js | 2 +- test/tests.js | 16 ++++++++++++++++ 7 files changed, 29 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96f1a67..7680fd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # TaskVision Change Log +## Unreleased + +- Detect `TODO`/`FIXME` (and other tags) in `%`-style comments used by LaTeX, Matlab and Erlang by adding `%` to the default detection regex. (#3) + ## v2.0.1 - 2026-02-21 - Fix image URL warning during extension packaging by updating package.json repository field. diff --git a/agent/tasks.md b/agent/tasks.md index a208c23..79e6a06 100644 --- a/agent/tasks.md +++ b/agent/tasks.md @@ -9,11 +9,11 @@ ## Session Summary -- Active focus: Reanalyzed the AI context feature's data flow, product logic, and agent handoff contract after sidecar write hardening. -- Verification: read-only source/docs/tests review plus `git --no-pager ls-files .taskvision .gitignore`; no test suite was run because no runtime code changed. +- Active focus: Fixed GitHub issue #3 — added the `%` comment prefix (LaTeX/Matlab/Erlang) to the default TODO/FIXME detection regex so `% TODO`/`% FIXME` are detected. +- Verification: `npm ci`, `npm test` (120 passing, 0 failing, including the new `%`-comment case), `npm run webpack` (build succeeded). ## Active Session Task -| Priority | Task | Status | Owner | Due | -| -------- | ----------------------------- | --------- | ----- | ---------- | -| P1 | Reanalyze AI context logic | Completed | AI | 2026-04-29 | +| Priority | Task | Status | Owner | Due | +| -------- | --------------------------------------------------- | --------- | ----- | ---------- | +| P1 | Support `%`-style comment TODO detection (issue #3) | Completed | AI | 2026-07-08 | diff --git a/agent/timeline.md b/agent/timeline.md index 55e172f..4ea2b77 100644 --- a/agent/timeline.md +++ b/agent/timeline.md @@ -2,6 +2,7 @@ | 日期时间 | 任务/变更 | 修改文件 | 实现逻辑 | 修改动机 | 结果/备注 | | ---------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 2026-07-08 11:05 | 支持 `%` 注释风格下的 TODO/FIXME 识别 (issue #3) | package.json, src/extension.js, reproduce_issue_v9.js, test/tests.js, CHANGELOG.md, agent/tasks.md, agent/timeline.md | 在默认检测正则 `taskvision.regex.regex` 的注释前缀选择组中加入 `%`(`(//\|#\|