Commit Graph

47 Commits

Author SHA1 Message Date
teest114514
f87ec22251 Add ZSTD decompression for message_content field
Introduces ZSTD decompression for the message_content field in the message table when retrieving data, allowing compressed messages to be displayed as plain text. Also improves error handling for invalid time arguments in chatlog route and updates CSS for table list view layout.
2026-01-19 14:59:16 +08:00
lx1056758714-glitch
b205c5386a Unescape HTML entities in media URLs
Updated SNS media parsing functions to automatically unescape HTML entities in URLs and related fields, ensuring correct URL formatting. Also added documentation in README about this URL format optimization.
2026-01-14 11:48:36 +08:00
lx1056758714-glitch
226aed7dae Update settings and gitignore for new permissions
Expanded allowed Bash commands in .claude/settings.local.json to include python, go run, and git commands. Updated .gitignore to ignore .claude/settings.local.json and cleaned up temp file patterns.
2026-01-14 10:16:54 +08:00
lx1056758714-glitch
caf4f817db Add SNS (Moments) database support with intelligent XML parsing
Features:
- Add sns.db database integration and auto-detection
- Implement XML content parser for moments data (internal/model/sns.go)
  - Extract basic info: create time, nickname, content description
  - Parse location data: city, coordinates, POI name, address
  - Recognize media types: image, video, article, finder (video account)
  - Extract structured data: image count, video duration, article info
- Add "朋友圈检索" (Moments Search) page in HTTP UI
- Support multiple output formats:
  - JSON: Structured data for programmatic access
  - Plain text: Human-readable format with emoji icons
  - Raw XML: Original XML content for debugging
  - CSV/Excel: Export for data analysis
- Support query features: filter by username, limit, offset pagination
- Database browser integration: SNS database visible in decrypted DB list

Technical changes:
- internal/wechatdb/datasource/v4/datasource.go: Add SNS group config and query methods
- internal/wechatdb/datasource/datasource.go: Add SNS interface methods
- internal/wechatdb/wechatdb.go: Add GetSNSTimeline and GetSNSCount
- internal/chatlog/database/service.go: Add SNS service layer methods
- internal/chatlog/http/route.go: Add /api/v1/sns endpoint with format support
- internal/chatlog/http/static/index.htm: Add moments search tab and UI
- .gitignore: Ignore tmpclaude directories and sns.md test file
- README.md: Update changelog for 2026-01-14

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 10:12:32 +08:00
lx1056758714-glitch
c60c252dcf Update .gitignore to exclude tmpclaude directories
Added several tmpclaude-* directories to .gitignore to prevent temporary files from being tracked in version control.
2026-01-13 18:56:10 +08:00
lx1056758714-glitch
9de140dd15 Enhance image file handling and Rec directory support
Improved image file access by supporting files in Rec subdirectories using the extra_buffer field, and enhanced decryption logic to handle files without extensions as .dat files, with fallback to serving as-is if decryption fails. Updated MediaV4 model and datasource to extract and use extra_buffer, and revised README to document these changes.
2026-01-13 18:55:42 +08:00
lx1056758714-glitch
2f21b8ed77 Optimize image access with MD5-path cache and fallback
Introduces an MD5-to-path cache for media files, improving image access reliability. The /image/{md5} endpoint now uses a three-level fallback: hardlink table, cache-based path with suffix matching, and directory recursion. This addresses issues with image retrieval, especially for WeChat v4 packed_info_data cases, and updates the README with details of the new mechanism.
2026-01-13 18:13:53 +08:00
lx1056758714-glitch
813fe332fc Update README with ChatLab support and new features
Added details about full ChatLab standard format support, enhanced type mapping, and new UI features such as one-click download and JSON formatting. Introduced a recommended tools section highlighting ChatLab, and updated the main features list to include standardized export.
2025-12-30 12:37:24 +08:00
lx1056758714-glitch
84222b3ca8 Add ChatLab JSON export support
Introduces support for exporting chat logs in the ChatLab standardized JSON format. Adds a new export option in the UI, implements format conversion in the backend, and provides a download feature for the exported data. Also includes the initial ChatLab format specification and related model conversion logic.
2025-12-30 12:28:36 +08:00
lx1056758714-glitch
89aa44de28 feat(ui): display cache usage in TUI info bar and update README 2025-12-27 17:41:48 +08:00
lx1056758714-glitch
2b6fbefcb0 fix(filecopy): implement retry mechanism for failed file deletions on Windows 2025-12-27 17:36:10 +08:00
lx1056758714-glitch
850f9810bb Merge branch 'main' of https://github.com/teest114514/chatlog_alpha 2025-12-26 15:24:26 +08:00
lx1056758714-glitch
70a80559ce docs: sync README.md with todo.md and add recent feature updates 2025-12-26 15:20:46 +08:00
lx1056758714-glitch
5217a50c70 fix: safe path calculation using filepath.Rel to avoid incorrect filename syntax error on Windows 2025-12-26 15:15:28 +08:00
lx1056758714-glitch
8081bf78e9 feat: add application mutex to prevent multiple instances 2025-12-26 14:56:16 +08:00
lx1056758714-glitch
f63e82ca50 fix: re-apply regex syntax fix in index.htm 2025-12-26 14:47:48 +08:00
lx1056758714-glitch
1c5c08868f feat: add sql execution, keyword search, and generic export 2025-12-26 14:46:22 +08:00
lx1056758714-glitch
f5e1bc54e9 fix: correctly display filename in db list by splitting on backslash 2025-12-26 14:40:40 +08:00
lx1056758714-glitch
9c88f1184a fix: syntax error in database viewer javascript 2025-12-26 14:37:41 +08:00
lx1056758714-glitch
0a20176d57 feat: add raw database viewer and table data explorer 2025-12-26 14:35:21 +08:00
lx1056758714-glitch
5ceb2f2ffa feat: add db list view, search, and excel export 2025-12-26 14:30:00 +08:00
teest114514
b961dc1af8 Update README with usage notes and changelog
Added important usage notes and update log to README.
2025-12-24 23:10:44 +08:00
lx1056758714-glitch
27243d1e75 Remove wx_key module and related source files
Deleted the entire wx_key module, including all source, header, vendor, and project files, as well as associated logs. This removes the DLL hook controller implementation and all supporting code, dependencies, and build configuration.
2025-12-22 12:41:42 +08:00
lx1056758714-glitch
1cbad609fa Add per-file locking to prevent concurrent copy races
Introduced a sync.Map of mutexes in FileCopyManager to serialize concurrent file copy operations for the same file cache key. Updated GetTempCopy to use double-checked locking, ensuring only one goroutine creates or updates a cached file at a time. Improved atomicCopyFile to handle destination file existence gracefully, avoiding errors when concurrent processes create the same file.
2025-12-21 10:02:03 +08:00
lx1056758714-glitch
6c04569123 Refactor UI: replace dashboard and sidebar with infobar
Removed dashboard, sidebar, layout, and logs components, consolidating status and account information into a new infobar component. Updated app structure to use tabbed pages and the infobar for displaying key information. Simplified menu and settings handling, and removed legacy UI code for a more streamlined interface.
2025-12-19 16:33:22 +08:00
lx1056758714-glitch
d18e413df0 Refactor UI layout and add dashboard, logs, sidebar
Replaces the infobar with a new dashboard component, introduces a sidebar for navigation, and adds a logs view for runtime messages. Refactors the main app layout to use a sidebar and content pages, updates menu handling, and improves modularity of UI components. Removes infobar and related code, and adds new files for dashboard, layout, logs, and sidebar.
2025-12-19 15:39:25 +08:00
lx1056758714-glitch
a5dc514fcb Update release workflow for main branch builds
Modified the release workflow to use 'goreleaser release' for main branch builds and added a step to update the 'latest' prerelease on GitHub with development builds from the main branch. This improves automation and makes the latest development artifacts easily accessible for testing.
latest
2025-12-18 22:17:27 +08:00
lx1056758714-glitch
367fcc2e5a v1.0.0 Update release artifact path and add binary archive
v1.0.0
- **MCP 扩展功能大版本更新**:
  - **媒体感知服务 (Media Perception)**:
    - 新增 `get_media_content` 工具:支持根据消息 ID 获取解码后的媒体文件(图片自动解密、语音转 MP3)。
    - 新增 `ocr_image_message` 工具:支持对特定图片消息进行视觉 OCR 解析(由模型驱动)。
  - **实时消息交互 (Real-time Interaction)**:
    - 新增 `subscribe_new_messages` 工具:允许模型通过资源更新机制订阅特定联系人或群组的实时消息流(资源路径:`chatlog://realtime/{talker}`)。
    - 新增 `send_webhook_notification` 工具:允许模型在分析完成后触发外部 Webhook。
  - **社交画像与分析 (Social Insights)**:
    - 新增 `analyze_chat_activity` 工具:统计发言频率、活跃时段(带柱状图可视化模拟)。
    - 新增 `get_user_profile` 工具:获取详细的联系人备注、群成员、群主等背景信息。
  - **增强型提示词模板 (Prompts)**:
    - 内置 `chat_summary_daily`(每日摘要)、`conflict_detector`(情绪冲突检测)、`relationship_milestones`(关系里程碑)模板。
  - **跨应用检索**:
    - 新增 `search_shared_files` 工具:专项搜索聊天记录中发送的共享文件元数据。
- **系统底层优化**:
  - **唯一消息 ID 系统**:引入 `(timestamp * 1000000 + local_id)` 算法,彻底解决多媒体消息在同一秒内发送导致的 ID 冲突问题。
  - **多格式适配**:PlainText、CSV、JSON 均已同步支持显示唯一的 `MessageID` (seq)。
  - **文本清理**:优化聊天记录输出,简化图片、语音、视频消息的显示标签(例如 `[图片]`),使模型处理更高效。
2025-12-18 22:05:45 +08:00
lx1056758714-glitch
4993398ffd Update artifact upload path and build ID
Changed the artifact upload path in the release workflow to include all .exe files in the dist directory. Also updated the build ID from 'chatlog-builds' to 'chatlog' in .goreleaser.yaml for consistency.
2025-12-18 21:57:55 +08:00
lx1056758714-glitch
f577b3956d Remove Docker and non-Windows builds from release process
This commit updates the GitHub Actions workflow, GoReleaser config, and Makefile to only build and release Windows/amd64 binaries. Docker image builds, multi-arch support, and related configuration have been removed to simplify the release process and focus on Windows releases.
2025-12-18 21:52:28 +08:00
lx1056758714-glitch
428dabe05a Add MCP media tools, real-time subscriptions, and UI
Major MCP extension: adds tools for media content retrieval, OCR, real-time message subscription with webhook push, chat activity analysis, user profile, and shared file search. Implements persistent subscription management, new prompt templates, and real-time resource endpoints. Updates UI to display active MCP subscriptions, enhances CSV export with MessageID, and documents all new features in the changelog. Removes Dockerfile and docker-compose.yml.
2025-12-18 21:37:55 +08:00
teest114514
ec41b0d2be Remove macOS/WeChat 3.x support and related code
Dropped all code, documentation, and models related to macOS and WeChat 3.x (darwinv3) support, including command-line tools, model definitions, and documentation files. Updated README to clarify that only Windows and WeChat 4.x are supported, and improved instructions for image key acquisition. Enhanced restart-and-get-key logic with status callbacks and retry handling for more robust key extraction after WeChat restarts.
2025-12-16 21:35:01 +08:00
teest114514
1a214ea4c4 Enhance auto decryption and UI message preview
Added pre-check and error handler for auto decryption: the system now tests decryption before enabling auto mode and stops with a popup if errors occur during operation. The footer UI now displays a real-time preview of the latest message, including sender, time, and content summary, with improved fallback for missing nicknames. Also fixed a bug where batch decryption incorrectly reported success when all files failed.
2025-12-16 03:28:06 +08:00
teest114514
cbf5201216 Refactor key extraction: drop V3 support, parallelize V4
Removed all code and logic related to WeChat V3 key extraction, including darwin and windows V3 extractors. Updated extractor selection to return an error for V3. Refactored Windows DLL extractor to run DLL and native (Dart-style) memory scan in parallel for V4, reporting keys as soon as found. Improved image key acquisition flow in the TUI and updated documentation to reflect the new focus on V4, parallel key extraction, and the deprecation of V3 support.
2025-12-16 00:15:59 +08:00
lx1056758714-glitch
91ae4a0886 Remove old DLL log files
Deleted multiple log files from the logs directory to clean up old DLL initialization and key retrieval logs.
2025-12-14 19:29:09 +08:00
lx1056758714-glitch
154bf5707f Merge branch 'main' of https://github.com/teest114514/chatlog_alpha 2025-12-14 19:25:37 +08:00
lx1056758714-glitch
e4f91629f4 Add restart-and-get-key feature and improve key handling
Introduces a new menu item and Manager method to restart WeChat and automatically retrieve the data key. Refactors menu indices, improves context key synchronization, and allows key extraction attempts even if WeChat is offline. Also ensures saved keys are loaded for accounts and enhances robustness in command-line key retrieval.
2025-12-14 19:25:17 +08:00
teest114514
90d5c5354b Update README with tested WeChat version
Added information about the tested WeChat version.
2025-12-14 18:00:26 +08:00
lx1056758714-glitch
0afaf9ec00 集成wx_key.dll并优化微信进程与密钥管理
新增DLL方式的微信数据库密钥提取(优先于原生方式),集成wx_key.dll相关代码和开发文档,完善临时账户名称与进程PID的动态管理,增强微信进程状态监控和自动切换逻辑。更新README,详细说明项目功能、使用方法和DLL集成指南。
2025-12-14 17:47:30 +08:00
teest114514
f61df0e7c9 4 2025-12-14 09:17:51 +08:00
teest114514
a64a752ada Update README with key retrieval instructions
Added a section for obtaining keys and updated the changelog.
2025-12-14 09:17:16 +08:00
lx1056758714-glitch
1a8f8aec53 3 2025-12-13 17:41:31 +08:00
lx1056758714-glitch
d4be0aa32b 2 2025-12-13 17:40:51 +08:00
lx1056758714-glitch
3d04a7f3eb 同步本地代码 2025-12-13 17:30:38 +08:00
lx1056758714-glitch
76fa3b4538 1 2025-12-13 17:28:23 +08:00
lx1056758714-glitch
6ca6b2bd39 修改readme文件 2025-12-13 17:28:03 +08:00
lx1056758714-glitch
94e62bea76 Initial commit 2025-12-13 17:23:59 +08:00