fix(core): Remove dead code and documentation related to the obsolete list tool. (#22672)

This commit is contained in:
Ariane Emory
2026-04-15 18:44:53 -04:00
committed by GitHub
parent 6bed7d469d
commit d2ea6700aa
60 changed files with 37 additions and 516 deletions

View File

@@ -230,7 +230,6 @@ Markdown 檔案名稱即為模式名稱(例如,`review.md` 建立一個名
| `read` | 讀取檔案內容 |
| `grep` | 搜尋檔案內容 |
| `glob` | 按模式尋找檔案 |
| `list` | 列出目錄內容 |
| `patch` | 對檔案套用補丁 |
| `todowrite` | 管理待辦事項清單 |
| `webfetch` | 擷取網頁內容 |

View File

@@ -88,7 +88,7 @@ OpenCode 使用 `permission` 設定來決定某個操作是否應自動執行、
### 外部目錄
使用 `external_directory` 允許工具呼叫存取 OpenCode 啟動時工作目錄之外的路徑。這適用於任何接受路徑作為輸入的工具(例如 `read`、`edit`、`list`、`glob`、`grep` 以及許多 `bash` 指令)。
使用 `external_directory` 允許工具呼叫存取 OpenCode 啟動時工作目錄之外的路徑。這適用於任何接受路徑作為輸入的工具(例如 `read`、`edit`、`glob`、`grep` 以及許多 `bash` 指令)。
主目錄展開(如 `~/...`)僅影響模式的書寫方式。它不會將外部路徑納入當前工作空間,因此工作目錄之外的路徑仍然必須透過 `external_directory` 來允許。
@@ -133,7 +133,6 @@ OpenCode 的權限以工具名稱為鍵,外加幾個安全防護項:
- `edit` — 所有檔案修改(涵蓋 `edit`、`write`、`patch`、`multiedit`
- `glob` — 檔案萬用字元比對(比對萬用字元模式)
- `grep` — 內容搜尋(比對正規表示式模式)
- `list` — 列出目錄中的檔案(比對目錄路徑)
- `bash` — 執行 shell 指令(比對解析後的指令,如 `git status --porcelain`
- `task` — 啟動子代理(比對子代理類型)
- `skill` — 載入技能(比對技能名稱)

View File

@@ -149,22 +149,6 @@ description: 管理 LLM 可以使用的工具。
使用 `**/*.js` 或 `src/**/*.ts` 等 glob 模式搜尋檔案。回傳按修改時間排序的匹配檔案路徑。
---
### list
列出指定路徑下的檔案和目錄。
```json title="opencode.json" {4}
{
"$schema": "https://opencode.ai/config.json",
"permission": {
"list": "allow"
}
}
```
該工具用於列出目錄內容。它接受 glob 模式來過濾結果。
---
@@ -341,7 +325,7 @@ MCPModel Context Protocol伺服器允許您整合外部工具和服務
## 內部機制
在內部,`grep``glob` 和 `list` 等工具底層使用 [ripgrep](https://github.com/BurntSushi/ripgrep)。預設情況下ripgrep 遵循 `.gitignore` 中的模式,這意味著 `.gitignore` 中列出的檔案和目錄將被排除在搜尋和列表結果之外。
在內部,`grep``glob` 等工具底層使用 [ripgrep](https://github.com/BurntSushi/ripgrep)。預設情況下ripgrep 遵循 `.gitignore` 中的模式,這意味著 `.gitignore` 中列出的檔案和目錄將被排除在搜尋和列表結果之外。
---