You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a4f1040
Browse filesBrowse the repository at this point in the historyBrowse files
authored
docs: fix a batch of outdated and missing docs (#66803)
Co-authored-by: TuanNancy <vuanhtuan18092004@gmail.com>
Co-authored-by: yash-alla <112993411+yash-alla@users.noreply.github.com>
Co-authored-by: Johannes Starke <johannesstarke@gmail.com>
Co-authored-by: M. Pranay <mudadlapranay@gmail.com>
Co-authored-by: andreivince <andreivince21@gmail.com>
Copy file name to clipboardExpand all lines: services/site/src/docs/content/build/plugins/effect.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1037,7 +1037,7 @@ Effect tools accept the same [freeform input declaration](/build/plugins/server#
1037
1037
1038
1038
Tools have an `id` containing their effective name, and `get()` returns `undefined` when that ID is not present. Use
1039
1039
`update` and `remove` with the effective tool name, including its namespace (`acme_greeting` above). Dots in
1040
-
namespaces and unsupported characters in tool names become `_`. Missing names are ignored; creating a tool requires
1040
+
namespaces become `_`, and characters in tool names other than letters, digits, `_` and `-` become `_`. Missing names are ignored; creating a tool requires
1041
1041
`add` with a complete definition. Updates preserve the name and namespace. Assign new schemas or options to replace
1042
1042
them rather than mutating nested values. Invalid updates are logged and leave the previous definition intact.
Register a new agent with `editor.update`. If the ID already exists, it edits that agent. Otherwise, it creates one with
212
+
`Agent.Info.default(id)` before running the callback.
213
+
214
+
```ts
215
+
awaitctx.agent.transform((editor) => {
216
+
editor.update("reviewer", (agent) => {
217
+
agent.description="Reviews code for correctness and maintainability"
218
+
agent.mode="subagent"
219
+
agent.system="Review the proposed changes and report actionable findings."
220
+
})
221
+
})
222
+
```
223
+
211
224
Reload agents after external state used by a transform changes.
212
225
213
226
```ts
@@ -1042,7 +1055,7 @@ await ctx.tool.reload()
1042
1055
Use `list()` and `get()` to inspect tools currently in the editor. Tools have an `id` containing their effective name,
1043
1056
and `get()` returns `undefined` when that ID is not present. Use `update` and `remove` with the effective tool name,
1044
1057
including its namespace (`acme_greeting` above). Dots in
1045
-
namespaces and unsupported characters in tool names become `_`. Missing names are ignored; creating a tool requires
1058
+
namespaces become `_`, and characters in tool names other than letters, digits, `_` and `-` become `_`. Missing names are ignored; creating a tool requires
1046
1059
`add` with a complete definition. Updates preserve the name and namespace. Assign new schemas or options to replace
1047
1060
them rather than mutating nested values. Invalid updates are logged and leave the previous definition intact.
Copy file name to clipboardExpand all lines: services/site/src/docs/content/cli/tui.mdx
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,20 @@ Explain how authentication works in this project
16
16
17
17
Press **Shift+Enter**, **Ctrl+Enter**, **Alt+Enter**, or **Ctrl+J** for a new line. While OpenCode is working, **Enter** steers the active session; press **Ctrl+X**, then **Enter** to queue the prompt for later.
18
18
19
+
## Projects and directories
20
+
21
+
The directory you start OpenCode in is where it searches files and runs shell commands. Directories in the same Git
22
+
repository, including its worktrees, belong to one project. A directory without version control is its own project.
23
+
24
+
Pass a directory to start in another project:
25
+
26
+
```bash
27
+
opencode ~/code/another-project
28
+
```
29
+
30
+
Press **Ctrl+O** to open recent sessions and projects. Press **Right** on a project to list its worktrees, and
31
+
**Ctrl+N** there to create a new one.
32
+
19
33
## Context
20
34
21
35
Type `@` to search for a file, then select it to attach that file to the prompt. Keep typing after `@` to narrow the results.
@@ -68,7 +82,9 @@ Press **Ctrl+X**, then **A** to choose an agent, or run `/agents`. Press **Shift
68
82
69
83
## Sessions
70
84
71
-
Press **Ctrl+X**, then **N** to start a new session. Press **Ctrl+X**, then **L** or run `/sessions` to return to an existing session; **Ctrl+O** opens recent sessions and projects together.
85
+
Each session is a separate conversation with its own history and directory. Run `/new` or press **Ctrl+X**, then **N** to start one for a separate task; earlier sessions stay available. New sessions start in the directory you launched OpenCode in, or in the current session's directory with [`session.new_location`](/cli/config#sessions) set to `inherit`.
86
+
87
+
Press **Ctrl+X**, then **L** or run `/sessions` to return to an existing session. In that list, **Ctrl+A** switches between sessions in the current directory and sessions in all projects. **Ctrl+O** opens recent sessions and projects together.
72
88
73
89
Tabs are enabled by default. Use **Ctrl+Tab** and **Ctrl+Shift+Tab** to move between them, **Ctrl+X** then **W** to close one, and **Ctrl+Shift+T** to reopen the last closed tab.
0 commit comments