diff --git a/README.md b/README.md index 9aab030..7021fe0 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ ## 项目概述 -这是一个微信聊天记录解密工具,支持Windows平台(macOS目前支持有限)。工具通过注入DLL或内存扫描的方式获取微信数据库密钥,然后解密微信聊天数据库文件。 +这是一个微信聊天记录解密工具,当前仅支持 Windows 平台。工具通过注入DLL或内存扫描的方式获取微信数据库密钥,然后解密微信聊天数据库文件。 -**注意:当前版本已暂停对微信 3.x 版本的支持,专注于微信 4.x 版本的适配与优化。** +**注意:当前版本已移除对微信 3.x 版本的支持,仅支持微信 4.x。** ## 主要功能 @@ -38,9 +38,12 @@ #### 获取图片密钥 (Image Key) 1. 确保微信已登录。 2. 在 chatlog 主界面选择 **"获取图片密钥"** 选项。 -3. 程序会提示 "正在进行第 X 轮内存扫描... 请打开任意图片"。 -4. **此时在微信中打开任意一张聊天图片**(触发密钥加载)。 -5. 程序会自动捕获内存中的图片密钥并返回。 +3. 程序会先等待图片验证样本就绪(需要微信生成缩略图缓存文件 `*_t.dat`)。 +4. **在微信中打开任意一张聊天图片**(触发缓存/密钥相关数据生成)。 +5. 当 `*_t.dat` 生成后,程序会提示 "正在进行第 X 轮内存扫描... 请打开任意图片" 并开始扫描。 +6. 程序自动捕获内存中的图片密钥并返回。 + +> 说明:不需要“很快”打开图片;只要最终打开过图片让 `*_t.dat` 生成,程序就能稳定获取图片密钥。 *注:解密数据操作会自动尝试获取两种密钥。* @@ -69,7 +72,8 @@ - 不依赖 DLL,使用 Go 原生代码实现。 - 采用暴力内存扫描 + 特征匹配(32字节字母数字串)+ 验证(AES解密缩略图头)。 - **交互式获取**:支持长达 60 秒的轮询等待,允许用户在点击按钮后从容打开图片。 - - 验证需要本地存在缩略图缓存 (`*_t.dat`),如果未登录或无缓存将自动等待。 + - **关键依赖**:验证必须使用缩略图缓存样本 `*_t.dat`(由“打开聊天图片”触发生成)。样本未就绪时会持续等待提示,而不会进行无效扫描。 + - **稳定性说明**:为避免选到不匹配的备用 `.dat` 样本导致“扫描很多轮仍失败”,当前仅在检测到 `*_t.dat` 后才认为图片验证就绪并开始扫描。 ### 临时账户管理 @@ -93,7 +97,9 @@ 程序需要管理员权限来读取微信进程内存。 3. **V4 图片密钥**: - 对于微信 V4,图片密钥获取需要用户配合打开图片。如果长时间未获取,请检查是否打开了图片。 + 对于微信 V4,图片密钥获取需要用户配合打开图片以生成 `*_t.dat`。如果长时间未获取,请检查: + - 微信是否已登录成功(不能停留在登录界面) + - 是否打开过任意聊天图片(触发生成 `*_t.dat`) ## 更新日志 @@ -106,6 +112,7 @@ - 优化发送人显示逻辑:昵称缺失时自动降级显示账号 ID。 - **修复**: - 修复批量解密时即便所有文件失败仍提示成功的 Bug。 + - 修复图片密钥获取在样本未就绪/选到不匹配备用样本时“扫描很多轮仍无法获取”的问题:改为等待 `*_t.dat` 就绪后再开始扫描。 ### 2025年12月15日 - **重构密钥获取逻辑**:实现 Data Key (DLL) 和 Image Key (原生扫描) 的职责分离与并行执行。 diff --git a/cmd/chatlog/cmd_dumpmemory.go b/cmd/chatlog/cmd_dumpmemory.go deleted file mode 100644 index e7c5431..0000000 --- a/cmd/chatlog/cmd_dumpmemory.go +++ /dev/null @@ -1,146 +0,0 @@ -package chatlog - -import ( - "archive/zip" - "fmt" - "io" - "os" - "path/filepath" - "runtime" - "time" - - "github.com/rs/zerolog/log" - "github.com/spf13/cobra" - - "github.com/sjzar/chatlog/internal/wechat" - "github.com/sjzar/chatlog/internal/wechat/key/darwin/glance" -) - -func init() { - rootCmd.AddCommand(dumpmemoryCmd) -} - -var dumpmemoryCmd = &cobra.Command{ - Use: "dumpmemory", - Short: "dump memory", - Run: func(cmd *cobra.Command, args []string) { - if runtime.GOOS != "darwin" { - log.Info().Msg("dump memory only support macOS") - } - - session := time.Now().Format("20060102150405") - - dir, err := os.Getwd() - if err != nil { - log.Fatal().Err(err).Msg("get current directory failed") - return - } - log.Info().Msgf("current directory: %s", dir) - - // step 1. check pid - if err = wechat.Load(); err != nil { - log.Fatal().Err(err).Msg("load wechat failed") - return - } - accounts := wechat.GetAccounts() - if len(accounts) == 0 { - log.Fatal().Msg("no wechat account found") - return - } - - log.Info().Msgf("found %d wechat account", len(accounts)) - for i, a := range accounts { - log.Info().Msgf("%d. %s %d %s", i, a.FullVersion, a.PID, a.DataDir) - } - - // step 2. dump memory - account := accounts[0] - file := fmt.Sprintf("wechat_%s_%d_%s.bin", account.FullVersion, account.PID, session) - path := filepath.Join(dir, file) - log.Info().Msgf("dumping memory to %s", path) - - g := glance.NewGlance(account.PID) - b, err := g.Read() - if err != nil { - log.Fatal().Err(err).Msg("read memory failed") - return - } - - if err = os.WriteFile(path, b, 0644); err != nil { - log.Fatal().Err(err).Msg("write memory failed") - return - } - - log.Info().Msg("dump memory success") - - // step 3. copy encrypted database file - dbFile := "db_storage/session/session.db" - if account.Version == 3 { - dbFile = "Session/session_new.db" - } - from := filepath.Join(account.DataDir, dbFile) - to := filepath.Join(dir, fmt.Sprintf("wechat_%s_%d_session.db", account.FullVersion, account.PID)) - - log.Info().Msgf("copying %s to %s", from, to) - b, err = os.ReadFile(from) - if err != nil { - log.Fatal().Err(err).Msg("read session.db failed") - return - } - if err = os.WriteFile(to, b, 0644); err != nil { - log.Fatal().Err(err).Msg("write session.db failed") - return - } - log.Info().Msg("copy session.db success") - - // step 4. package - zipFile := fmt.Sprintf("wechat_%s_%d_%s.zip", account.FullVersion, account.PID, session) - zipPath := filepath.Join(dir, zipFile) - log.Info().Msgf("packaging to %s", zipPath) - - zf, err := os.Create(zipPath) - if err != nil { - log.Fatal().Err(err).Msg("create zip file failed") - return - } - defer zf.Close() - - zw := zip.NewWriter(zf) - - for _, file := range []string{file, to} { - f, err := os.Open(file) - if err != nil { - log.Fatal().Err(err).Msg("open file failed") - return - } - defer f.Close() - info, err := f.Stat() - if err != nil { - log.Fatal().Err(err).Msg("get file info failed") - return - } - header, err := zip.FileInfoHeader(info) - if err != nil { - log.Fatal().Err(err).Msg("create zip file info header failed") - return - } - header.Name = filepath.Base(file) - header.Method = zip.Deflate - writer, err := zw.CreateHeader(header) - if err != nil { - log.Fatal().Err(err).Msg("create zip file header failed") - return - } - if _, err = io.Copy(writer, f); err != nil { - log.Fatal().Err(err).Msg("copy file to zip failed") - return - } - } - if err = zw.Close(); err != nil { - log.Fatal().Err(err).Msg("close zip writer failed") - return - } - - log.Info().Msgf("package success, please send %s to developer", zipPath) - }, -} diff --git a/docs/docker.md b/docs/docker.md deleted file mode 100644 index 21c13a8..0000000 --- a/docs/docker.md +++ /dev/null @@ -1,357 +0,0 @@ -# Docker 部署指南 - -## 目录 -- [Docker 部署指南](#docker-部署指南) - - [目录](#目录) - - [部署准备](#部署准备) - - [获取微信密钥](#获取微信密钥) - - [定位微信数据目录](#定位微信数据目录) - - [Docker 镜像获取](#docker-镜像获取) - - [部署方式](#部署方式) - - [Docker Run 方式](#docker-run-方式) - - [Docker Compose 方式](#docker-compose-方式) - - [环境变量配置](#环境变量配置) - - [数据目录挂载](#数据目录挂载) - - [微信数据目录](#微信数据目录) - - [工作目录](#工作目录) - - [远程同步部署](#远程同步部署) - - [配置指南](#配置指南) - - [部署注意事项](#部署注意事项) - - [部署验证](#部署验证) - - [常见问题](#常见问题) - - [1. 容器启动失败](#1-容器启动失败) - - [2. 无法访问 HTTP 服务](#2-无法访问-http-服务) - - [3. 数据目录权限问题](#3-数据目录权限问题) - - [4. 密钥格式错误](#4-密钥格式错误) - - [5. 微信版本检测失败](#5-微信版本检测失败) - - [6. 端口冲突](#6-端口冲突) - -## 部署准备 - -由于 Docker 容器运行环境与宿主机隔离,无法直接获取微信进程密钥,因此需要预先在宿主机上获取密钥信息。 - -### 获取微信密钥 - -在宿主机上运行 chatlog 获取密钥信息: - -```shell -# 下载并运行 chatlog -$ chatlog key - -# 输出示例 -Data Key: [c0163e***ac3dc6] -Image Key: [38636***653361] -``` - -> 💡 **提示**: -> - macOS 用户需要临时关闭 SIP 才能获取密钥,详见 [macOS 版本说明](../README.md#macos-版本说明) - -### 定位微信数据目录 - -根据不同操作系统,微信数据目录位置如下: - -**Windows 系统**: -``` -# 微信 3.x 版本 -C:\Users\{用户名}\Documents\WeChat Files\{微信ID} - -# 微信 4.x 版本 -C:\Users\{用户名}\Documents\xwechat_files\{微信ID} -``` - -**macOS 系统**: -``` -# 微信 3.x 版本 -/Users/{用户名}/Library/Containers/com.tencent.xinWeChat/Data/Library/Application Support/com.tencent.xinWeChat/{版本号}/{微信ID} - -# 微信 4.x 版本 -/Users/{用户名}/Library/Containers/com.tencent.xinWeChat/Data/Documents/xwechat_files/{微信ID} -``` - -## Docker 镜像获取 - -chatlog 提供了两个镜像源: - -**Docker Hub**: -```shell -docker pull sjzar/chatlog:latest -``` - -**GitHub Container Registry (ghcr)**: -```shell -docker pull ghcr.io/sjzar/chatlog:latest -``` - -> 💡 **镜像地址**: -> - Docker Hub: https://hub.docker.com/r/sjzar/chatlog -> - GitHub Container Registry: https://ghcr.io/sjzar/chatlog - -## 部署方式 - -### Docker Run 方式 - -**基础部署**: -```shell -docker run -d \ - --name chatlog \ - -p 5030:5030 \ - -v /path/to/your/wechat/data:/app/data \ - sjzar/chatlog:latest -``` - -> 这种部署方式依赖于数据目录下的 chatlog.json 文件作为配置,通过 chatlog 获取密钥时将自动更新 chatlog.json 文件 - -**完整配置示例**: -```shell -docker run -d \ - --name chatlog \ - -p 5030:5030 \ - -e TZ=Asia/Shanghai \ - -e CHATLOG_PLATFORM=darwin \ - -e CHATLOG_VERSION=4 \ - -e CHATLOG_DATA_KEY="your-data-key" \ - -e CHATLOG_IMG_KEY="your-img-key" \ - -e CHATLOG_AUTO_DECRYPT=true \ - -e CHATLOG_HTTP_ADDR=0.0.0.0:5030 \ - -e CHATLOG_DATA_DIR=/app/data \ - -e CHATLOG_WORK_DIR=/app/work \ - -v /path/to/your/wechat/data:/app/data \ - -v /path/to/work:/app/work \ - --restart unless-stopped \ - sjzar/chatlog:latest -``` - -### Docker Compose 方式 - -**1. 创建 docker-compose.yml 文件** - -```yaml -version: '3.8' - -services: - chatlog: - image: sjzar/chatlog:latest - restart: unless-stopped - ports: - - "5030:5030" # 可修改主机端口,如 "8080:5030" - environment: - - PUID=1000 - - PGID=1000 - - TZ=Asia/Shanghai - # 微信平台类型,可选:windows, darwin - - CHATLOG_PLATFORM=darwin - # 微信版本,可选:3, 4 - - CHATLOG_VERSION=4 - # 微信数据密钥 - - CHATLOG_DATA_KEY=your-data-key - # 微信图片密钥 - - CHATLOG_IMG_KEY=your-img-key - # 是否自动解密 - - CHATLOG_AUTO_DECRYPT=true - # 服务地址 - - CHATLOG_HTTP_ADDR=0.0.0.0:5030 - # 数据目录 - - CHATLOG_DATA_DIR=/app/data - # 工作目录 - - CHATLOG_WORK_DIR=/app/work - volumes: - # 微信数据目录挂载 - - "/path/to/your/wechat/data:/app/data" - # 工作目录挂载 - - "work-dir:/app/work" - -volumes: - work-dir: - driver: local -``` - -**2. 启动服务** - -```shell -# 启动服务 -docker-compose up -d - -# 查看服务状态 -docker-compose ps - -# 查看服务日志 -docker-compose logs chatlog - -# 停止服务 -docker-compose down -``` - -## 环境变量配置 - -| 变量名 | 说明 | 默认值 | 示例 | -|--------|------|--------|------| -| `PUID` | 用户 ID | `1000` | `1000` | -| `PGID` | 用户组 ID | `1000` | `1000` | -| `TZ` | 时区设置 | `UTC` | `Asia/Shanghai` | -| `CHATLOG_PLATFORM` | 微信平台类型 | **必填** | `windows`, `darwin` | -| `CHATLOG_VERSION` | 微信版本 | **必填** | `3`, `4` | -| `CHATLOG_DATA_KEY` | 微信数据密钥 | **必填** | `c0163e***ac3dc6` | -| `CHATLOG_IMG_KEY` | 微信图片密钥 | 可选 | `38636***653361` | -| `CHATLOG_HTTP_ADDR` | HTTP 服务监听地址 | `0.0.0.0:5030` | `0.0.0.0:8080` | -| `CHATLOG_AUTO_DECRYPT` | 是否自动解密 | `false` | `true`, `false` | -| `CHATLOG_DATA_DIR` | 数据目录路径 | `/app/data` | `/app/data` | -| `CHATLOG_WORK_DIR` | 工作目录路径 | `/app/work` | `/app/work` | - -## 数据目录挂载 - -### 微信数据目录 - -**Windows 示例**: -```shell -# 微信 4.x 版本 --v "/c/Users/username/Documents/xwechat_files/wxid_xxx:/app/data" - -# 微信 3.x 版本 --v "/c/Users/username/Documents/WeChat\ Files/wxid_xxx:/app/data" -``` - -**macOS 示例**: -```shell -# 微信 4.x 版本 --v "/Users/username/Library/Containers/com.tencent.xinWeChat/Data/Documents/xwechat_files/wxid_xxx:/app/data" - -# 微信 3.x 版本 --v "/Users/username/Library/Containers/com.tencent.xinWeChat/Data/Library/Application\ Support/com.tencent.xinWeChat/2.0b4.0.9:/app/data" -``` - -### 工作目录 - -工作目录用于存放解密后的数据库文件,可以使用以下两种方式: - -**本地路径方式**: -```shell --v "/path/to/local/work:/app/work" -``` - -**命名卷方式**: -```shell --v "chatlog-work:/app/work" -``` - - -## 远程同步部署 - -对于需要将 chatlog 服务与微信客户端分离部署的场景,可以通过文件同步工具将微信数据同步到远程服务器,然后在远程服务器上运行 chatlog 服务。这种方式具有以下优势: - -- **解耦部署**:微信客户端和 chatlog 服务可以运行在不同的设备上 -- **灵活性**:可以在 NAS、VPS 等服务器上统一管理聊天数据 -- **安全性**:避免在个人电脑上长期运行服务 - -文件同步工具这里不做过多推荐,个人使用 [Syncthing](https://github.com/syncthing/syncthing),其他选择有 [Resilio Sync](https://www.resilio.com/sync/)、[rsync + inotify](https://github.com/RsyncProject/rsync) 等,可以按需选择。 - -#### 配置指南 - -- 本地配置: 同步数据目录(Data Dir),可设置为仅发送;在首次完整同步文件后,建议将 "rescanIntervalS" 设置为 0,全局扫描较为耗时,且扫描过程中会暂停同步 -- 远程服务器配置: 设置为仅接收,同样建议将 "rescanIntervalS" 设置为 0 -- 使用 Docker / Docker Compose 启动 chatlog,将数据目录映射到容器的 `/app/data` 目录 -- 按需配置 `/app/work` 映射目录,可配置到远程服务器本地路径或命名卷 -- 启动容器后,等待首次解密完成后,即可正常请求 API 或接入 MCP 服务 - -#### 部署注意事项 - -- 千万注意数据安全!chatlog 本身未提供授权机制,一定要确保服务处于安全网络环境中。 - -通过远程同步部署,您可以在保持微信客户端正常使用的同时,将 chatlog 服务部署到更适合的环境中,实现数据处理与日常使用的分离。 - -## 部署验证 - -部署完成后,通过以下方式验证服务是否正常运行: - -**1. 检查容器状态** -```shell -docker ps | grep chatlog -``` - -**2. 查看服务日志** -```shell -docker logs chatlog -``` - -**3. 访问 HTTP API** -```shell -# 检查服务健康状态 -curl http://localhost:5030/api/v1/session - -# 查看联系人列表 -curl http://localhost:5030/api/v1/contact -``` - -**4. 访问 MCP 服务** -```shell -http://localhost:5030/mcp -``` - -**5. 访问 Web 界面** - -在浏览器中打开:http://localhost:5030 - -## 常见问题 - -### 1. 容器启动失败 - -**问题**: 容器启动后立即退出 - -**解决方案**: -- 检查密钥是否正确:`docker logs chatlog` -- 确认数据目录挂载路径是否正确 -- 检查环境变量配置是否完整 - -### 2. 无法访问 HTTP 服务 - -**问题**: 浏览器无法访问 http://localhost:5030 - -**解决方案**: -- 检查端口映射是否正确:`docker port chatlog` -- 确认防火墙是否允许 5030 端口访问 -- 检查容器内服务是否正常启动 - -### 3. 数据目录权限问题 - -**问题**: 日志显示权限不足或文件无法访问 - -**解决方案**: -```shell -# Linux/macOS 系统 -chmod -R 755 /path/to/your/wechat/data - -# 或者使用 Docker 用户权限 -docker run --user $(id -u):$(id -g) ... -``` - -### 4. 密钥格式错误 - -**问题**: 显示密钥格式不正确 - -**解决方案**: -- 确保密钥为十六进制格式,不包含方括号 -- 正确格式:`CHATLOG_DATA_KEY=c0163eac3dc6` -- 错误格式:`CHATLOG_DATA_KEY=[c0163e***ac3dc6]` - -### 5. 微信版本检测失败 - -**问题**: 无法自动检测微信版本 - -**解决方案**: -- 手动设置微信平台:`CHATLOG_PLATFORM=darwin` 或 `CHATLOG_PLATFORM=windows` -- 手动设置微信版本:`CHATLOG_VERSION=4` 或 `CHATLOG_VERSION=3` - -### 6. 端口冲突 - -**问题**: 5030 端口已被占用 - -**解决方案**: -```shell -# 使用其他端口,如 8080 -docker run -p 8080:5030 ... - -# 或在 docker-compose.yml 中修改 -ports: - - "8080:5030" -``` - -> 💡 **获取更多帮助**: 如遇到其他问题,请查看项目的 [Issues](https://github.com/sjzar/chatlog/issues) 页面或提交新的问题反馈。 diff --git a/docs/mcp.md b/docs/mcp.md deleted file mode 100644 index 605e304..0000000 --- a/docs/mcp.md +++ /dev/null @@ -1,151 +0,0 @@ -# MCP 集成指南 - -## 目录 -- [MCP 集成指南](#mcp-集成指南) - - [目录](#目录) - - [前期准备](#前期准备) - - [mcp-proxy](#mcp-proxy) - - [ChatWise](#chatwise) - - [Cherry Studio](#cherry-studio) - - [Claude Desktop](#claude-desktop) - - [Monica Code](#monica-code) - - -## 前期准备 - -运行 `chatlog`,完成数据解密并开启 HTTP 服务 - -### mcp-proxy -如果遇到不支持 `SSE` 的客户端,可以尝试使用 `mcp-proxy` 将 `stdio` 的请求转换为 `SSE`。 - -项目地址:https://github.com/sparfenyuk/mcp-proxy - -安装方式: -```shell -# 使用 uv 工具安装,也可参考项目文档的其他安装方式 -uv tool install mcp-proxy - -# 查询 mcp-proxy 的路径,后续可直接使用该路径 -which mcp-proxy -/Users/sarv/.local/bin/mcp-proxy -``` - -## ChatWise - -- 官网:https://chatwise.app/ -- 使用方式:MCP SSE -- 注意事项:使用 ChatWise 的 MCP 功能需要 Pro 权限 - -1. 在 `设置 - 工具` 下新建 `SSE 请求` 工具 - -![chatwise-1](https://github.com/user-attachments/assets/87e40f39-9fbc-4ff1-954a-d95548cde4c2) - -1. 在 URL 中填写 `http://127.0.0.1:5030/sse`,并勾选 `自动执行工具`,点击 `查看工具` 即可检查连接 `chatlog` 是否正常 - -![chatwise-2](https://github.com/user-attachments/assets/8f98ef18-8e6c-40e6-ae78-8cd13e411c36) - -3. 返回主页,选择支持 MCP 调用的模型,打开 `chatlog` 工具选项 - -![chatwise-3](https://github.com/user-attachments/assets/ea2aa178-5439-492b-a92f-4f4fc08828e7) - -4. 测试功能是否正常 - -![chatwise-4](https://github.com/user-attachments/assets/8f82cb53-8372-40ee-a299-c02d3399403a) - -## Cherry Studio - -- 官网:https://cherry-ai.com/ -- 使用方式:MCP SSE - -1. 在 `设置 - MCP 服务器` 下点击 `添加服务器`,输入名称为 `chatlog`,选择类型为 `服务器发送事件(sse)`,填写 URL 为 `http://127.0.0.1:5030/sse`,点击 `保存`。(注意:点击保存前不要先点击左侧的开启按钮) - -![cherry-1](https://github.com/user-attachments/assets/93fc8b0a-9d95-499e-ab6c-e22b0c96fd6a) - -2. 选择支持 MCP 调用的模型,打开 `chatlog` 工具选项 - -![cherry-2](https://github.com/user-attachments/assets/4e5bf752-2eab-4e7c-b73b-1b759d4a5f29) - -3. 测试功能是否正常 - -![cherry-3](https://github.com/user-attachments/assets/c58a019f-fd5f-4fa3-830a-e81a60f2aa6f) - -## Claude Desktop - -- 官网:https://claude.ai/download -- 使用方式:mcp-proxy -- 参考资料:https://modelcontextprotocol.io/quickstart/user#2-add-the-filesystem-mcp-server - -1. 请先参考 [mcp-proxy](#mcp-proxy) 安装 `mcp-proxy` - -2. 进入 Claude Desktop `Settings - Developer`,点击 `Edit Config` 按钮,这样会创建一个 `claude_desktop_config.json` 配置文件,并引导你编辑该文件 - -3. 编辑 `claude_desktop_config.json` 文件,配置名称为 `chatlog`,command 为 `mcp-proxy` 的路径,args 为 `http://127.0.0.1:5030/sse`,如下所示: - -```json -{ - "mcpServers": { - "chatlog": { - "command": "/Users/sarv/.local/bin/mcp-proxy", - "args": [ - "http://localhost:5030/sse" - ] - } - }, - "globalShortcut": "" -} -``` - -4. 保存 `claude_desktop_config.json` 文件,重启 Claude Desktop,可以看到 `chatlog` 已经添加成功 - -![claude-1](https://github.com/user-attachments/assets/f4e872cc-e6c1-4e24-97da-266466949cdf) - -5. 测试功能是否正常 - -![claude-2](https://github.com/user-attachments/assets/832bb4d2-3639-4cbc-8b17-f4b812ea3637) - - -## Monica Code - -- 官网:https://monica.im/en/code -- 使用方式:mcp-proxy -- 参考资料:https://github.com/Monica-IM/Monica-Code/blob/main/Reference/config.md#modelcontextprotocolserver - -1. 请先参考 [mcp-proxy](#mcp-proxy) 安装 `mcp-proxy` - -2. 在 vscode 插件文件夹(`~/.vscode/extensions`)下找到 Monica Code 的目录,编辑 `config_schema.json` 文件。将 `experimental - modelContextProtocolServer` 中 `transport` 设置为如下内容: - -```json -{ - "experimental": { - "type": "object", - "title": "Experimental", - "description": "Experimental properties are subject to change.", - "properties": { - "modelContextProtocolServer": { - "type": "object", - "properties": { - "transport": { - "type": "stdio", - "command": "/Users/sarv/.local/bin/mcp-proxy", - "args": [ - "http://localhost:5030/sse" - ] - } - }, - "required": [ - "transport" - ] - } - } - } -} -``` - -3. 重启 vscode,可以看到 `chatlog` 已经添加成功 - -![monica-1](https://github.com/user-attachments/assets/8d0a96f2-ed05-48aa-a99a-06648ae1c500) - -4. 测试功能是否正常 - -![monica-2](https://github.com/user-attachments/assets/054e0a30-428a-48a6-9f31-d2596fb8f743) - diff --git a/docs/prompt.md b/docs/prompt.md deleted file mode 100644 index 2ff14e2..0000000 --- a/docs/prompt.md +++ /dev/null @@ -1,70 +0,0 @@ -# Prompt 指南 - -## 概述 -优秀的 `prompt` 可以极大的提高 `chatlog` 使用体验,收集了部分群友分享的 `prompt`,供大家参考。 -在处理聊天记录时,尽量选择上下文长度足够的 LLM,例如 `Gemini 2.5 Pro`、`Claude 3.5 Sonnet` 等。 -欢迎大家在 [Discussions](https://github.com/sjzar/chatlog/discussions/47) 中分享自己的使用方式,共同进步。 - - -## 群聊总结 -作者:@eyaeya - -```md -你是一个中文的群聊总结的助手,你可以为一个微信的群聊记录,提取并总结每个时间段大家在重点讨论的话题内容。 - -请帮我将 "" 在