handsomeboyck/dsh-wps-plugings ↗★ 5
dsh-wps-plugin
集成金山文档 WPS 能力,可列出、搜索、读取与新建云文档。 适合需在对话中操作 WPS 云文档的用户;需 WPS 账号并重启 DSH。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:handsomeboyck/dsh-wps-plugings说明文档
阅读完整 README ↗使用方式
对话中使用(推荐)
装上之后,用自然语言即可,例如:
| 你说的话 | 实际调用的工具 |
|---|---|
| 「看看我最近的文件」 | list_latest_items |
| 「列出我的云文档根目录」 | list_my_files |
| 「搜一下含『周报』的文件」 | search_files |
| 「读一下这个文档」 | read_file |
| 「新建一个 docx 文档,内容是……」 | create_file_with_content |
| 「把这份周报上传到 WPS」 | upload_file / create_file_with_content |
| 「看下这个文件的详情 / 下载链接」 | get_file_info / download_file |
编程式调用(API)
import { initPlugin } from 'dsh-wps-plugin';
const plugin = await initPlugin();
// 列出我的云文档根目录
const files = await plugin.callTool('list_my_files', { page_size: 10 });
// 搜索文件
const searchResult = await plugin.callTool('search_files', {
keyword: '周报',
file_type: 'file',
page_size: 5
});
// 创建带内容的文档(root 目录 parent_id 为 "0")
const newDoc = await plugin.callTool('create_file_with_content', {
name: '我的文档',
content: '# 标题\n\n正文内容',
file_extension: 'docx', // 支持 .otl/.docx/.pdf/.xls/.xlsx/.ksheet/.dbt
parent_id: '0'
});
// 读取文档内容
const content = await plugin.callTool('read_file', {
file_id: 'your_file_id_here',
format: 'markdown'
});
对话中使用(推荐)
装上之后,用自然语言即可,例如:
| 你说的话 | 实际调用的工具 |
|---|---|
| 「看看我最近的文件」 | list_latest_items |
| 「列出我的云文档根目录」 | list_my_files |
| 「搜一下含『周报』的文件」 | search_files |
| 「读一下这个文档」 | read_file |
| 「新建一个 docx 文档,内容是……」 | create_file_with_content |
| 「把这份周报上传到 WPS」 | upload_file / create_file_with_content |
| 「看下这个文件的详情 / 下载链接」 | get_file_info / download_file |