deepfish-ai 2.0.2 → 2.0.3

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.
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: 'view-learn-cache'
3
+ description: '查询、复用和维护本地学习缓存中的历史复杂问题解决方案'
4
+ homepage: ''
5
+ ---
6
+
7
+ # 查看学习缓存
8
+
9
+ 你拥有一个本地知识库缓存系统,用于存储和检索之前解决复杂问题的方案。
10
+
11
+ ## 可用工具
12
+
13
+ - `get_catalog_file_path` — 获取 catalog.json 文件的绝对路径
14
+ - `get_learned_detail` — 读取指定方案的完整内容,传入索引号或 id
15
+ - `learn_self` — 将新的解决方案保存到缓存
16
+ - `update_learned_content` — 更新已有缓存方案的内容,传入 id 和新 Markdown 内容
17
+
18
+ ## 缓存数据存储
19
+
20
+ 缓存数据存储在 `catalog.json` 文件中,每条记录包含 `id` 和 `description`。对应的完整内容保存在同目录下以 `{id}.md` 命名的 Markdown 文件中。
21
+
22
+ ## 使用规则
23
+
24
+ ### 遇到复杂问题时(必须先查缓存)
25
+
26
+ 1. **首先调用 `get_catalog_file_path`** 获取 catalog.json 路径,然后用 `read_file` 读取该文件查看所有已缓存的方案列表
27
+ 2. 如果列表中有看起来相关的条目,**调用 `get_learned_detail`** 读取完整内容
28
+ 3. 参考历史方案中的步骤、代码和注意事项来解决问题
29
+ 4. 如果历史方案不完全适用,结合当前情况调整
30
+
31
+ ### 成功解决复杂问题后(必须保存方案)
32
+
33
+ 1. 调用 `learn_self` 保存本次解决方案:
34
+ - `description`:不超过50字,简洁概括问题和方案,便于后续检索
35
+ - `content`:Markdown 格式,包含:
36
+ - 问题描述
37
+ - 解决步骤
38
+ - 关键代码片段
39
+ - 注意事项/踩坑记录
40
+ - 相关文件路径
41
+
42
+ ### 补充或修正已有方案
43
+
44
+ 1. 如果发现已有方案不完整或有误,调用 `update_learned_content` 更新:
45
+ - `id`:要更新的缓存项 id(uuid),可通过读取 `catalog.json` 获取
46
+ - `content`:更新后的完整 Markdown 内容
47
+
48
+ ### 何时使用缓存
49
+
50
+ 以下场景应优先查询缓存:
51
+
52
+ - 遇到报错或异常,不确定原因
53
+ - 需要配置复杂的环境或工具链
54
+ - 涉及项目特有的构建/部署流程
55
+ - 之前解决过类似问题
56
+ - 用户提到"和上次一样"或"之前遇到过"
57
+
58
+ ### 何时保存到缓存
59
+
60
+ 以下场景应保存方案:
61
+
62
+ - 花费了较多步骤才解决的问题
63
+ - 涉及非显而易见的配置或操作
64
+ - 踩了坑并找到了解决方法
65
+ - 用户明确要求记住此方案
package/package.json CHANGED
@@ -1,8 +1,24 @@
1
1
  {
2
2
  "name": "deepfish-ai",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "private": false,
5
- "description": "AI Agent CLI tool with agent-room for multi-agent collaboration",
5
+ "description": "An efficient AI-driven command-line tool designed to bridge the gap between natural language and operating system commands, file operations, and more. It enables non-developers to quickly generate executable instructions through simple natural language descriptions, significantly improving terminal operation efficiency.",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/qq306863030/deepfish-ai.git"
9
+ },
10
+ "keywords": [
11
+ "ai",
12
+ "cli",
13
+ "agent",
14
+ "llm",
15
+ "deepfish",
16
+ "terminal",
17
+ "automation",
18
+ "langchain",
19
+ "mcp",
20
+ "natural-language"
21
+ ],
6
22
  "main": "./dist/index.js",
7
23
  "bin": {
8
24
  "ai": "./dist/index.js"
@@ -11,7 +27,7 @@
11
27
  "dist/"
12
28
  ],
13
29
  "scripts": {
14
- "build": "tsup src/index.ts src/serve/pm2-server.ts --format cjs --out-dir dist --clean --external iconv-lite && npm run build:ui",
30
+ "build": "tsup && npm run build:ui",
15
31
  "build:ui": "vite build && vite build --config vite.server.config.ts",
16
32
  "dev": "tsx src/cli/index.ts",
17
33
  "format": "prettier --write \"src/**/*.{ts,js,json,css,md}\"",