Skip to content

feat: auto-process review items with AI during ingest - #627

Open
Ken-Leo wants to merge 10 commits into
nashsu:mainfrom
Ken-Leo:feat/auto-review-process
Open

feat: auto-process review items with AI during ingest#627
Ken-Leo wants to merge 10 commits into
nashsu:mainfrom
Ken-Leo:feat/auto-review-process

Conversation

@Ken-Leo

@Ken-Leo Ken-Leo commented Jul 31, 2026

Copy link
Copy Markdown

Summary

Add auto-review system that processes review items generated during ingest automatically through the LLM, without requiring manual intervention.

Changes

  • New src/lib/auto-review.ts — Core auto-review logic that processes each review item through the ingest LLM
  • Modified src/stores/wiki-store.ts — Added autoProcessReviews field to GeneralConfig
  • Modified src/lib/project-store.ts — Persist the setting via normalizeGeneralConfig
  • Modified src/lib/ingest.ts — Integrate auto-review as Step 5.5 in the ingest pipeline
  • Modified Settings UI — Toggle in General section
  • Modified i18n — Added translation keys for en/zh

How it works

After ingest generates review items, if autoProcessReviews is enabled, each pending review is sent to the LLM which decides:

  • create → Generates wiki page content with proper frontmatter and writes it
  • skip → Dismisses the review as not actionable
  • research → Queues Deep Research for the topic
  • hold → Leaves for manual review when LLM is uncertain

Test Plan

  1. Enable 'Auto-process review items with AI' in Settings → General
  2. Ingest a source document that generates review items
  3. Verify review items are automatically processed (resolved with green checkmark)
  4. Disable toggle and verify manual review still works

Notes

  • Uses the same LLM configuration as ingest
  • Only triggers during ingest (not retroactive on existing reviews)
  • Results reported in the Activity panel
  • All 118 mock tests pass; 6 real-LLM failures are pre-existing and network-dependent

Ken-Leo added 8 commits July 31, 2026 18:05
…ing ingest

- Add autoProcessReviews toggle to GeneralConfig in wiki-store.ts
- Create src/lib/auto-review.ts with core auto-review processing logic
  - Processes each review item through the ingest LLM
  - Supports skip, create (wiki page), research (Deep Research), hold actions
  - Creates wiki pages with proper frontmatter when LLM generates content
  - Updates wiki index when pages are created
  - Reports results in the activity panel
- Integrate auto-review into ingest pipeline (Step 5.5) after review generation
- Add settings UI toggle in General section
- Persist setting via project-store normalizeGeneralConfig
…ting, loadProjectLlmOverride, normalizeMineruConfig)
…filter

- Auto-review create: resolve page type from LLM frontmatter type (fallback to
  keyword inference, then query); keep frontmatter type == folder; use stable
  slug filenames for typed pages and timestamped names only for query pages.
- Review panel: add Auto-reviewed toggle to filter items already processed by
  auto-review (resolvedAction startsWith 'auto').
- Deep Research: replace ICU-plural activeBadge (unsupported by i18next) with
  simple templates branched on queued count.
- Review items now record a resolvedAt timestamp (set on resolve). The
  Auto-reviewed filter sorts most-recently-processed first for easy checking.
- Activity panel pins running (in-progress) tasks above completed ones.
…view mode only)

When auto-review generates a page, follow the LLM-declared frontmatter type
for the canonical extra types (source, finding, thesis, methodology) in
addition to the base five. Directory, slug filename, and index section header
stay in lock-step. Manual review-created pages are unaffected.
@Ken-Leo

Ken-Leo commented Aug 1, 2026

Copy link
Copy Markdown
Author

别理这个 PR,还有问题需要解决。因为知识库中的内容太多了,ingest 过程直接爆炸,review 指数级增长,人工审太慢了,想偷懒整点歪招 :)

Add autoProcessReviews + autoReviewed keys and update research.activeBadge
to the simple (non-ICU) form to satisfy i18n parity after merging origin/main.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant