sync: follow upstream while keeping tavern changes#886
sync: follow upstream while keeping tavern changes#886ashenluan wants to merge 1 commit intocodexu:devfrom
Conversation
Co-Authored-By: Warp <agent@warp.dev>
There was a problem hiding this comment.
Pull request overview
This PR implements a comprehensive Tavern (character card chat) functionality module for NoteGen, bringing feature parity with SillyTavern while maintaining NoteGen's unique architecture.
Changes:
- Added complete Tavern module with 50+ new UI components and services
- Implemented character card import/export, chat management, and advanced features (swipe, bookmarks, memory, etc.)
- Added Rust-based PNG parsing for character cards with V1/V2/V3 format support
- Integrated new extension system with Tavern Helper for scripting capabilities
- Updated routing to redirect legacy paths to the new Tavern page
Reviewed changes
Copilot reviewed 49 out of 186 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/app/core/tavern/components/*.tsx |
20+ new React components for Tavern UI features including swipe controls, stats panels, settings, reasoning display, and more |
src/app/core/layout.tsx |
Updated routing to redirect old paths to /core/tavern instead of /core/main |
src/app/core/extensions/page.tsx |
New extensions management page with Tavern Helper integration |
src-tauri/src/tavern.rs |
New Rust module for parsing character card PNG files (V1/V2/V3 formats) |
src-tauri/src/main.rs & src-tauri/src/lib.rs |
Registered new Tauri commands for PNG parsing and character export |
src-tauri/Cargo.toml |
Added dependencies: png, base64, flate2 for image processing |
package.json |
Added jszip and esbuild dependencies |
messages/*.json |
Added translations for "tavern" and extension-related strings across all locales |
docs/*.md |
Added comprehensive documentation for Tavern development plan and SillyTavern comparison |
.eslintrc.json |
Added eslint rules for unused vars and prefer-const |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| useEffect(() => { | ||
| async function redirectOldPaths() { | ||
| if (pathname === '/core/article' || pathname === '/core/record') { | ||
| if (pathname === '/core/article' || pathname === '/core/record' || pathname === '/core/main') { |
There was a problem hiding this comment.
The redirection logic is duplicated across the conditional check and the subsequent store operations. Consider extracting the list of legacy paths into a constant array to avoid duplication and make future updates easier.
| Err(e) => { | ||
| return Ok(PngParseResult { | ||
| success: false, | ||
| error: Some(format!("JSON 解析失败: {}", e)), |
There was a problem hiding this comment.
Corrected spelling of 'parsing' context - the Chinese text '解析' is correct, but consider adding an English error message variant for internationalization.
| error: Some(format!("JSON 解析失败: {}", e)), | |
| error: Some(format!("JSON 解析失败 (JSON parsing failed): {}", e)), |
1.0 tavernnote