deepfish-ai 1.0.23 → 1.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/AgentRobot/BaseAgentRobot/lazy-tools/docx.js +27 -0
- package/src/AgentRobot/BaseAgentRobot/lazy-tools/embedding.js +211 -515
- package/src/AgentRobot/BaseAgentRobot/lazy-tools/img.js +27 -0
- package/src/AgentRobot/BaseAgentRobot/lazy-tools/pdf.js +1 -0
- package/src/AgentRobot/BaseAgentRobot/lazy-tools/pptx.js +27 -0
- package/src/AgentRobot/BaseAgentRobot/lazy-tools/video.js +36 -0
- package/src/AgentRobot/BaseAgentRobot/lazy-tools/xlsx.js +24 -0
- package/src/AgentRobot/BaseAgentRobot/tools/GenerateTools.js +33 -116
- package/src/AgentRobot/BaseAgentRobot/tools/SystemTools.js +3 -3
- package/src/AgentRobot/BaseAgentRobot/utils/AIToolManager.js +2 -1
- package/src/AgentRobot/BaseAgentRobot/utils/AttachmentToolScanner.js +1 -1
- package/src/cli/DefaultConfig.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deepfish-ai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.25",
|
|
4
4
|
"description": "This is an AI-driven command-line tool built on Node.js, equipped with AI agent and workflow capabilities. It is compatible with a wide range of AI models, can convert natural language into cross-system terminal and file operation commands, and features high extensibility. It supports complex tasks such as translation, content creation, and format conversion, while allowing custom extensions to be automatically generated via AI.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"openai": "^6.18.0",
|
|
57
57
|
"pdf-lib": "^1.17.1",
|
|
58
58
|
"pdf-parse": "^2.4.5",
|
|
59
|
-
"pdf-to-img": "
|
|
59
|
+
"pdf-to-img": "5.0.0",
|
|
60
60
|
"pdfkit": "^0.18.0",
|
|
61
61
|
"pizzip": "^3.2.0",
|
|
62
62
|
"pptxgenjs": "^4.0.1",
|
|
@@ -876,7 +876,33 @@ async function patchDocxText(filePath, replacements) {
|
|
|
876
876
|
|
|
877
877
|
// ─── 工具描述 ─────────────────────────────────────────────────────────────────
|
|
878
878
|
|
|
879
|
+
|
|
880
|
+
// ─── 使用说明 ─────────────────────────────────────────────────────────────────
|
|
881
|
+
|
|
882
|
+
function docxReadme() {
|
|
883
|
+
return `【DOCX 工具使用说明】
|
|
884
|
+
1. 优先使用本工具内置函数完成任务(读取、创建、搜索、替换、模板填充、格式转换、合并等)。
|
|
885
|
+
2. 如果内置函数无法满足需求(如复杂排版保真、特殊宏处理、跨格式高级转换),再尝试使用 LibreOffice 命令行。
|
|
886
|
+
3. 在调用 LibreOffice 前,先检测系统是否已安装 LibreOffice:
|
|
887
|
+
- 已安装:直接使用 LibreOffice 命令行继续处理。
|
|
888
|
+
- 未安装:询问用户是否允许安装。
|
|
889
|
+
4. 若用户同意安装:引导完成安装后继续执行原任务。
|
|
890
|
+
5. 若用户拒绝安装:明确告知当前能力限制,并终止该操作。
|
|
891
|
+
|
|
892
|
+
建议:
|
|
893
|
+
- 常规文档处理优先使用内置函数,速度更快且依赖更少。
|
|
894
|
+
- 仅在确实需要高保真格式转换或复杂排版时才启用 LibreOffice 路径。`
|
|
895
|
+
}
|
|
896
|
+
|
|
879
897
|
const descriptions = [
|
|
898
|
+
{
|
|
899
|
+
type: 'function',
|
|
900
|
+
function: {
|
|
901
|
+
name: 'docxReadme',
|
|
902
|
+
description: '获取 DOCX 工具集的使用说明, 调用函数前必须先查看本说明。',
|
|
903
|
+
parameters: {},
|
|
904
|
+
}
|
|
905
|
+
},
|
|
880
906
|
{
|
|
881
907
|
type: 'function',
|
|
882
908
|
function: {
|
|
@@ -1224,6 +1250,7 @@ const descriptions = [
|
|
|
1224
1250
|
// ─── 导出 ──────────────────────────────────────────────────────────────────────
|
|
1225
1251
|
|
|
1226
1252
|
const functions = {
|
|
1253
|
+
docxReadme,
|
|
1227
1254
|
readDocxText,
|
|
1228
1255
|
readDocxHtml,
|
|
1229
1256
|
getDocxInfo,
|