mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-08-18 12:07:01 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb60ce4984 | ||
|
|
061086f0ad | ||
|
|
d1cb6277f9 | ||
|
|
02baed9bb6 |
@@ -9,7 +9,14 @@ MAC系统 获取微信聊天记录 AI一键生成群聊总结
|
|||||||
<img src="./public/example2.png" alt="预览图2" />
|
<img src="./public/example2.png" alt="预览图2" />
|
||||||
<img src="./public/example3.png" alt="预览图3" />
|
<img src="./public/example3.png" alt="预览图3" />
|
||||||
|
|
||||||
## [点击这里下载](https://github.com/Wxw-Gu/WechatExplorer/releases/tag/v1.0.0)
|
## [点击这里下载](https://github.com/Wxw-Gu/WechatExplorer/releases)
|
||||||
|
|
||||||
|
## 📦 安装说明
|
||||||
|
|
||||||
|
1. 下载下方的 `xxx.dmg` 文件。
|
||||||
|
2. 打开 DMG 并将应用拖动到 **Applications** (应用程序) 文件夹。
|
||||||
|
3. 如果遇到“无法打开,因为开发者无法验证”的提示,请前往:
|
||||||
|
`系统设置 -> 隐私与安全性 -> 仍要打开`。
|
||||||
|
|
||||||
## ✨ 功能特性
|
## ✨ 功能特性
|
||||||
|
|
||||||
|
|||||||
+13
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "wechatexplorer",
|
"name": "wechatexplorer",
|
||||||
"version": "1.0.1",
|
"version": "1.0.3",
|
||||||
"description": "mac 版本获取微信聊天记录, AI群聊总结助手",
|
"description": "mac 版本获取微信聊天记录, AI群聊总结助手",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"wechat",
|
"wechat",
|
||||||
@@ -23,7 +23,9 @@
|
|||||||
"postinstall": "electron-builder install-app-deps",
|
"postinstall": "electron-builder install-app-deps",
|
||||||
"build:unpack": "npm run build && electron-builder --dir",
|
"build:unpack": "npm run build && electron-builder --dir",
|
||||||
"build:win": "npm run build && electron-builder --win",
|
"build:win": "npm run build && electron-builder --win",
|
||||||
"build:mac": "electron-vite build && electron-builder --mac",
|
"build:mac:x64": "electron-vite build && electron-builder --mac --x64",
|
||||||
|
"build:mac:arm64": "electron-vite build && electron-builder --mac --arm64",
|
||||||
|
"release:mac": "electron-vite build && electron-builder --mac --x64 --arm64 --publish always",
|
||||||
"build:linux": "electron-vite build && electron-builder --linux"
|
"build:linux": "electron-vite build && electron-builder --linux"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -61,5 +63,14 @@
|
|||||||
"electron",
|
"electron",
|
||||||
"esbuild"
|
"esbuild"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"build": {
|
||||||
|
"artifactName": "${productName}-${version}-${os}-${arch}.${ext}",
|
||||||
|
"mac": {
|
||||||
|
"target": [
|
||||||
|
"dmg",
|
||||||
|
"zip"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-3
@@ -161,14 +161,12 @@ app.whenReady().then(() => {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
id: msg.mesLocalID || Math.random().toString(),
|
id: msg.mesLocalID || Math.random().toString(),
|
||||||
from: msg.mesDes === '1' ? 'user' : 'assistant', // 1 通常是接收到的,0 是发送的?需要验证。Swift 说:[1: "user", 0: "assistant"]
|
from: msg.mesDes === 1 ? 'user' : 'assistant', // 1 通常是接收到的,0 是发送的?需要验证。Swift 说:[1: "user", 0: "assistant"]
|
||||||
type: MSG_TYPE_DICT[msgType] || msg.messageType,
|
type: MSG_TYPE_DICT[msgType] || msg.messageType,
|
||||||
datetime: date.toLocaleString('zh-CN', { hour12: false }),
|
datetime: date.toLocaleString('zh-CN', { hour12: false }),
|
||||||
content: content,
|
content: content,
|
||||||
isSender: msg.mesDes === '0',
|
|
||||||
img: img,
|
img: img,
|
||||||
name: name
|
name: name
|
||||||
// 实际上让我们坚持我们观察到的:1=用户(其他人), 0=助手(我)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export interface UserContact {
|
|||||||
|
|
||||||
export interface WechatMessage {
|
export interface WechatMessage {
|
||||||
mesLocalID: string
|
mesLocalID: string
|
||||||
mesDes: string
|
mesDes: number
|
||||||
messageType: string
|
messageType: string
|
||||||
msgCreateTime: string
|
msgCreateTime: string
|
||||||
msgContent: string
|
msgContent: string
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ const ChatWindow: React.FC<ChatWindowProps> = ({
|
|||||||
onRefresh,
|
onRefresh,
|
||||||
onRefreshData
|
onRefreshData
|
||||||
}) => {
|
}) => {
|
||||||
|
const isGroupChat = contact?.type === 'group' || contact?.m_nsUsrName?.endsWith('@chatroom')
|
||||||
const messagesEndRef = useRef<HTMLDivElement>(null)
|
const messagesEndRef = useRef<HTMLDivElement>(null)
|
||||||
const imageContainerRef = useRef<HTMLDivElement>(null)
|
const imageContainerRef = useRef<HTMLDivElement>(null)
|
||||||
const [generatedImage, setGeneratedImage] = useState<string | null>(null)
|
const [generatedImage, setGeneratedImage] = useState<string | null>(null)
|
||||||
@@ -115,11 +116,16 @@ const ChatWindow: React.FC<ChatWindowProps> = ({
|
|||||||
// 昨天
|
// 昨天
|
||||||
const startOfYesterday = startOfDay - 86400000
|
const startOfYesterday = startOfDay - 86400000
|
||||||
return parsed >= startOfYesterday && parsed < startOfDay
|
return parsed >= startOfYesterday && parsed < startOfDay
|
||||||
} else {
|
} else if (days === 7) {
|
||||||
// 过去 7 天
|
// 过去 7 天
|
||||||
const startOf7DaysAgo = startOfDay - 7 * 86400000
|
const startOf7DaysAgo = startOfDay - 7 * 86400000
|
||||||
return parsed >= startOf7DaysAgo
|
return parsed >= startOf7DaysAgo
|
||||||
|
} else if (days === 30) {
|
||||||
|
// 过去 30 天
|
||||||
|
const startOf30DaysAgo = startOfDay - 30 * 86400000
|
||||||
|
return parsed >= startOf30DaysAgo
|
||||||
}
|
}
|
||||||
|
return true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,7 +133,15 @@ const ChatWindow: React.FC<ChatWindowProps> = ({
|
|||||||
const csvContent = [
|
const csvContent = [
|
||||||
headers.join(','),
|
headers.join(','),
|
||||||
...filtered.map((m) => {
|
...filtered.map((m) => {
|
||||||
const content = m.content.replace(/"/g, '""').replace(/\n/g, ' ')
|
let prefix = ''
|
||||||
|
if (isGroupChat) {
|
||||||
|
prefix = m.name ? `${m.name}: ` : ''
|
||||||
|
} else {
|
||||||
|
const name = m.from === 'user' ? contact?.m_nsNickName || '未知' : '我'
|
||||||
|
prefix = `${name}: `
|
||||||
|
}
|
||||||
|
const fullContent = `${prefix}${m.content}`
|
||||||
|
const content = fullContent.replace(/"/g, '""').replace(/\n/g, ' ')
|
||||||
return `"${m.from}","${m.type}","${m.datetime}","${content}"`
|
return `"${m.from}","${m.type}","${m.datetime}","${content}"`
|
||||||
})
|
})
|
||||||
].join('\n')
|
].join('\n')
|
||||||
@@ -300,7 +314,12 @@ const ChatWindow: React.FC<ChatWindowProps> = ({
|
|||||||
display: !showAvatar ? 'flex' : 'block'
|
display: !showAvatar ? 'flex' : 'block'
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{msg.name && <div style={{ fontSize: 18 }}>{msg.name}: </div>}
|
{(msg.name || contact.m_nsNickName) && (
|
||||||
|
<div style={{ display: 'flex', fontSize: 18 }}>
|
||||||
|
{isGroupChat ? msg.name : msg.from === 'user' ? contact.m_nsNickName : '我'}
|
||||||
|
<span>{isGroupChat ? (msg.name ? ':' : '') : ':'} </span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
@@ -367,6 +386,9 @@ const ChatWindow: React.FC<ChatWindowProps> = ({
|
|||||||
<button className="toolbar-btn" onClick={() => handleExport(7)}>
|
<button className="toolbar-btn" onClick={() => handleExport(7)}>
|
||||||
📅 导出近7天
|
📅 导出近7天
|
||||||
</button>
|
</button>
|
||||||
|
<button className="toolbar-btn" onClick={() => handleExport(30)}>
|
||||||
|
📅 导出近30天
|
||||||
|
</button>
|
||||||
<button className="toolbar-btn" onClick={() => setShowSettingsModal(true)}>
|
<button className="toolbar-btn" onClick={() => setShowSettingsModal(true)}>
|
||||||
🤖 AI总结群聊
|
🤖 AI总结群聊
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user