summaryrefslogtreecommitdiffhomepage
path: root/packages/web/src/content/docs/server.mdx
diff options
context:
space:
mode:
authoropencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>2025-12-30 09:44:09 -0600
committerGitHub <[email protected]>2025-12-30 09:44:09 -0600
commit37da005a0141b099bb72671b320991c85de8cd0f (patch)
treec42dfb5fa54fe598c7409b45193baddc23b589a2 /packages/web/src/content/docs/server.mdx
parent8b708242f1eb21e40af5ef24e6e3eb4b7683a45e (diff)
downloadopencode-37da005a0141b099bb72671b320991c85de8cd0f.tar.gz
opencode-37da005a0141b099bb72671b320991c85de8cd0f.zip
docs: projects, find.files, notifications (#6438)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
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)
---