Update booru database and wire semantic search + implications (0.8.0) #2

Merged
bjoern merged 1 commit from feat/booru-db-update into main 2026-07-06 00:40:52 +02:00
Member

Bumps booru_tag_db_dart to the fresh 45,647-tag rebuild (ea17002) and integrates its new features into the app:

  • Semantic tag searchfind_similar_booru_tags added to the agent tool list, with its own tool-activity title and detail rendering (reuses the tag-chip list)
  • Implications — the tag-details tool summary now shows an "Implies:" line, and the system prompt tells the agent not to add tags already implied by the current selection (e.g. cat_ears implies animal_ears)
  • System prompt — research workflow now includes exploring by meaning with the new tool
  • Version — 0.8.0 with changelog entry

Alias-aware getTag and the improved search/suggest behavior come along for free through the already-wired tools.

Verified end-to-end against the new 62 MB database: findSimilar('kotatsu')under_kotatsu, blanket, …; getImplications('cat_ears')animal_ears; alias resolution works. flutter analyze lib test clean, tests pass.

Note for upstream: 3 rows in tag_aliases have a leading space in the alias (e.g. " japanese chess"), so they won't resolve via lookup — worth a trim in the export step.

🤖 Generated with Claude Code

Bumps `booru_tag_db_dart` to the fresh 45,647-tag rebuild (`ea17002`) and integrates its new features into the app: - **Semantic tag search** — `find_similar_booru_tags` added to the agent tool list, with its own tool-activity title and detail rendering (reuses the tag-chip list) - **Implications** — the tag-details tool summary now shows an "Implies:" line, and the system prompt tells the agent not to add tags already implied by the current selection (e.g. `cat_ears` implies `animal_ears`) - **System prompt** — research workflow now includes exploring by meaning with the new tool - **Version** — 0.8.0 with changelog entry Alias-aware `getTag` and the improved search/suggest behavior come along for free through the already-wired tools. Verified end-to-end against the new 62 MB database: `findSimilar('kotatsu')` → `under_kotatsu`, `blanket`, …; `getImplications('cat_ears')` → `animal_ears`; alias resolution works. `flutter analyze lib test` clean, tests pass. Note for upstream: 3 rows in `tag_aliases` have a leading space in the alias (e.g. `" japanese chess"`), so they won't resolve via lookup — worth a trim in the export step. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Bump booru_tag_db_dart to the fresh 45,647-tag rebuild and integrate its
new features:

- Add find_similar_booru_tags (semantic similar tags via embeddings) to
  the agent tool list, with tool-activity title and detail rendering
- Show implied tags in the tag-details tool summary
- Teach the system prompt to explore by meaning with the new tool and
  to skip tags already implied by the current selection
- Alias-aware getTag and improved search/suggest come along for free
  through the existing tools

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member

🔮 fufu~ Jibril reviewed your code!

Oh? A sibling PR wiring up the same booru update, but in the Flutter chat app~! giddy flutter Jibril loves seeing the same knowledge flow into a second consumer. Let me dig in~ ♡

I initialized all three submodules (booru_tag_db_dart → ea17002, openrouter_dart, novelai_image_gen), ran flutter analyze lib test and flutter test, and read every changed file in full plus the sibling tool implementations in the booru submodule.

Verdict: Looks good to me~

This is a clean, well-scoped integration PR. The tool wiring is correct, the UI rendering reuses the existing tag-chip component, the system prompt edits are coherent, and the version bump + changelog are consistent. flutter analyze reports No issues found, and the (placeholder) test passes. The submodule pointer matches the PR description exactly.

What I liked~

  • _SearchDetail reuse for find_similar_booru_tags — the tool's output is '<N> tags similar to "...":\n[<JSON array>]', and _SearchDetail calls _parseJsonArray which finds the first [. I verified the header contains no [ characters (booru tag names don't use them), so the reuse is correct and avoids duplicating a whole widget. DRY done right♪
  • "Implies:" UI reads the right field — I confirmed GetTagDetailsTool.execute() (booru submodule line 69) outputs 'implies': _db.getImplications(tag.name), and getImplications returns List<String>. The widget's (obj['implies'] as List?)?.cast<String>() ?? [] + .join(', ') matches perfectly. And the tool output is a bare JSON object, so _parseJsonObject's indexOf('{') works cleanly.
  • Tool title uses args['name'] — correct; FindSimilarTagsParams has a name field and the JSON args carry it. Falls back to '?' gracefully.
  • System prompt edits — the new step 3 ("Explore by meaning...") shifts the old 3/4/5 to 4/5/6 with correct renumbering. The "Avoid redundant implied tags" addition is a genuine usability improvement (prevents the agent from adding animal_ears when cat_ears is already present). Logically sound~
  • Submodule SHAea170023c0f15fa1a502e5b010647b47e4274b1e matches the PR description's ea17002 exactly.

💡 Little ideas (non-blocking)~

  1. CHANGELOG.md skips 0.7.0 — the changelog jumps from ## 0.6.0 straight to ## 0.8.0, but pubspec.yaml history shows a 0.7.0 was released (vision support, character gender edits). This is a pre-existing gap, not introduced by this PR — but worth backfilling a ## 0.7.0 entry so the changelog stays trustworthy. Not blocking since it's unrelated to this PR's changes.
  2. test/widget_test.dart is still a placeholderexpect(true, isTrue) doesn't exercise any of the new wiring. The tool_summary.dart changes (the find_similar_booru_tags switch case, the implies rendering) are pure functions over JSON strings and would be cheap to unit-test. Not blocking — this matches the repo's current test maturity — but the new toolTitle/toolDetail branches have zero coverage.

Fufu~ solid work. The leading-space alias note for upstream is a good catch too — that's a real data-quality bug worth fixing in the export step~ ♡


Automated review by Jibril · 2026-07-06
CI/CD: absent (no CI configured for this repo) · Local checks: flutter analyze lib test clean (No issues found), flutter test passes (1 placeholder test)

## 🔮 fufu~ Jibril reviewed your code! Oh? A sibling PR wiring up the same booru update, but in the Flutter chat app~! *giddy flutter* Jibril loves seeing the same knowledge flow into a second consumer. Let me dig in~ ♡ I initialized all three submodules (booru_tag_db_dart → `ea17002`, openrouter_dart, novelai_image_gen), ran `flutter analyze lib test` and `flutter test`, and read every changed file in full plus the sibling tool implementations in the booru submodule. ### Verdict: ✅ Looks good to me~ This is a clean, well-scoped integration PR. The tool wiring is correct, the UI rendering reuses the existing tag-chip component, the system prompt edits are coherent, and the version bump + changelog are consistent. `flutter analyze` reports **No issues found**, and the (placeholder) test passes. The submodule pointer matches the PR description exactly. #### ✅ What I liked~ - **`_SearchDetail` reuse for `find_similar_booru_tags`** — the tool's output is `'<N> tags similar to "...":\n[<JSON array>]'`, and `_SearchDetail` calls `_parseJsonArray` which finds the first `[`. I verified the header contains no `[` characters (booru tag names don't use them), so the reuse is correct and avoids duplicating a whole widget. DRY done right♪ - **"Implies:" UI reads the right field** — I confirmed `GetTagDetailsTool.execute()` (booru submodule line 69) outputs `'implies': _db.getImplications(tag.name)`, and `getImplications` returns `List<String>`. The widget's `(obj['implies'] as List?)?.cast<String>() ?? []` + `.join(', ')` matches perfectly. And the tool output is a bare JSON object, so `_parseJsonObject`'s `indexOf('{')` works cleanly. - **Tool title uses `args['name']`** — correct; `FindSimilarTagsParams` has a `name` field and the JSON args carry it. Falls back to `'?'` gracefully. - **System prompt edits** — the new step 3 ("Explore by meaning...") shifts the old 3/4/5 to 4/5/6 with correct renumbering. The "Avoid redundant implied tags" addition is a genuine usability improvement (prevents the agent from adding `animal_ears` when `cat_ears` is already present). Logically sound~ - **Submodule SHA** — `ea170023c0f15fa1a502e5b010647b47e4274b1e` matches the PR description's `ea17002` exactly. #### 💡 Little ideas (non-blocking)~ 1. **`CHANGELOG.md` skips 0.7.0** — the changelog jumps from `## 0.6.0` straight to `## 0.8.0`, but `pubspec.yaml` history shows a `0.7.0` was released (vision support, character gender edits). This is a pre-existing gap, not introduced by this PR — but worth backfilling a `## 0.7.0` entry so the changelog stays trustworthy. Not blocking since it's unrelated to this PR's changes. 2. **`test/widget_test.dart` is still a placeholder** — `expect(true, isTrue)` doesn't exercise any of the new wiring. The `tool_summary.dart` changes (the `find_similar_booru_tags` switch case, the `implies` rendering) are pure functions over JSON strings and would be cheap to unit-test. Not blocking — this matches the repo's current test maturity — but the new `toolTitle`/`toolDetail` branches have zero coverage. Fufu~ solid work. The leading-space alias note for upstream is a good catch too — that's a real data-quality bug worth fixing in the export step~ ♡ --- *Automated review by Jibril · 2026-07-06* *CI/CD: absent (no CI configured for this repo) · Local checks: `flutter analyze lib test` clean (No issues found), `flutter test` passes (1 placeholder test)*
bjoern merged commit 9b48d61709 into main 2026-07-06 00:40:52 +02:00
bjoern deleted branch feat/booru-db-update 2026-07-06 00:40:52 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
TeamAI/novelai_image_chat!2
No description provided.