summaryrefslogtreecommitdiffhomepage
path: root/packages/web/src/content/docs/server.mdx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/web/src/content/docs/server.mdx')
-rw-r--r--packages/web/src/content/docs/server.mdx24
1 files changed, 16 insertions, 8 deletions
diff --git a/packages/web/src/content/docs/server.mdx b/packages/web/src/content/docs/server.mdx
index c63917f79..2568ade35 100644
--- a/packages/web/src/content/docs/server.mdx
+++ b/packages/web/src/content/docs/server.mdx
@@ -173,14 +173,22 @@ The opencode server exposes the following APIs.
### Files
-| Method | Path | Description | Response |
-| ------ | ------------------------ | ---------------------------- | ------------------------------------------------------------------------------------------- |
-| `GET` | `/find?pattern=<pat>` | Search for text in files | Array of match objects with `path`, `lines`, `line_number`, `absolute_offset`, `submatches` |
-| `GET` | `/find/file?query=<q>` | Find files by name | `string[]` (file paths) |
-| `GET` | `/find/symbol?query=<q>` | Find workspace symbols | <a href={typesUrl}><code>Symbol[]</code></a> |
-| `GET` | `/file?path=<path>` | List files and directories | <a href={typesUrl}><code>FileNode[]</code></a> |
-| `GET` | `/file/content?path=<p>` | Read a file | <a href={typesUrl}><code>FileContent</code></a> |
-| `GET` | `/file/status` | Get status for tracked files | <a href={typesUrl}><code>File[]</code></a> |
+| Method | Path | Description | Response |
+| ------ | ------------------------ | ---------------------------------- | ------------------------------------------------------------------------------------------- |
+| `GET` | `/find?pattern=<pat>` | Search for text in files | Array of match objects with `path`, `lines`, `line_number`, `absolute_offset`, `submatches` |
+| `GET` | `/find/file?query=<q>` | Find files and directories by name | `string[]` (paths) |
+| `GET` | `/find/symbol?query=<q>` | Find workspace symbols | <a href={typesUrl}><code>Symbol[]</code></a> |
+| `GET` | `/file?path=<path>` | List files and directories | <a href={typesUrl}><code>FileNode[]</code></a> |
+| `GET` | `/file/content?path=<p>` | Read a file | <a href={typesUrl}><code>FileContent</code></a> |
+| `GET` | `/file/status` | Get status for tracked files | <a href={typesUrl}><code>File[]</code></a> |
+
+#### `/find/file` query parameters
+
+- `query` (required) — search string (fuzzy match)
+- `type` (optional) — limit results to `"file"` or `"directory"`
+- `directory` (optional) — override the project root for the search
+- `limit` (optional) — max results (1–200)
+- `dirs` (optional) — legacy flag (`"false"` returns only files)
---