Skip to content

Commit 21d1064

Browse files
timoclsnnipuna-perera
authored andcommitted
docs(share): add explicit manual share mode (sst#1074)
1 parent ebe0431 commit 21d1064

File tree

3 files changed

+37
-26
lines changed

3 files changed

+37
-26
lines changed

packages/opencode/src/config/config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,11 @@ export namespace Config {
139139
theme: z.string().optional().describe("Theme name to use for the interface"),
140140
keybinds: Keybinds.optional().describe("Custom keybind configurations"),
141141
share: z
142-
.enum(["auto", "disabled"])
142+
.enum(["manual", "auto", "disabled"])
143143
.optional()
144-
.describe("Control sharing behavior: 'auto' enables automatic sharing, 'disabled' disables all sharing"),
144+
.describe(
145+
"Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing",
146+
),
145147
autoshare: z
146148
.boolean()
147149
.optional()

packages/web/src/content/docs/docs/config.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,28 +135,28 @@ With the following options:
135135
| `WARN` | Warnings and errors only |
136136
| `ERROR` | Errors only |
137137

138-
The **default** log level is `INFO`. If you are running opencode locally in
138+
The **default** log level is `INFO`. If you are running opencode locally in development mode it's set to `DEBUG`.
139139

140140
---
141141

142142
### Sharing
143143

144-
You configure the [share](/docs/share) feature through the `share` option.
144+
You can configure the [share](/docs/share) feature through the `share` option.
145145

146146
```json title="opencode.json"
147147
{
148148
"$schema": "https://opencode.ai/config.json",
149-
"share": "auto"
149+
"share": "manual"
150150
}
151151
```
152152

153153
This takes:
154154

155+
- `"manual"` - Allow manual sharing via commands (default)
155156
- `"auto"` - Automatically share new conversations
156157
- `"disabled"` - Disable sharing entirely
157158

158-
By default, you'll need to manually share new conversations.
159-
development mode it's set to `DEBUG`.
159+
By default, sharing is set to manual mode where you need to explicitly share conversations using the `/share` command.
160160

161161
---
162162

@@ -256,7 +256,7 @@ Use `{env:VARIABLE_NAME}` to substitute environment variables:
256256
"anthropic": {
257257
"options": {
258258
"apiKey": "{env:ANTHROPIC_API_KEY}"
259-
}
259+
}
260260
}
261261
}
262262
}

packages/web/src/content/docs/docs/share.mdx

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,52 +23,49 @@ When you share a conversation, opencode:
2323

2424
## Sharing
2525

26-
You can manually share a conversation or enable automatic sharing for all new conversations.
26+
opencode supports three sharing modes that control how conversations are shared:
2727

2828
---
2929

30-
### Manual
30+
### Manual (default)
3131

32-
Use the `/share` command in any conversation to create a shareable link:
32+
By default, opencode uses manual sharing mode. Sessions are not shared automatically, but you can manually share them using the `/share` command:
3333

3434
```
3535
/share
3636
```
3737

3838
This will generate a unique URL that'll be copied to your clipboard.
3939

40-
---
41-
42-
### Auto-share
43-
44-
You can enable automatic sharing for all new conversations through the `autoshare` option in your [config file](/docs/config).
40+
To explicitly set manual mode in your [config file](/docs/config):
4541

4642
```json title="opencode.json"
4743
{
4844
"$schema": "https://opencode.ai/config.json",
49-
"share": "auto"
45+
"share": "manual"
5046
}
5147
```
5248

53-
By default, automatic sharing is disabled.
54-
5549
---
5650

57-
## Un-sharing
51+
### Auto-share
5852

59-
To stop sharing a conversation and remove it from public access:
53+
You can enable automatic sharing for all new conversations by setting the `share` option to `"auto"` in your [config file](/docs/config):
6054

61-
```
62-
/unshare
55+
```json title="opencode.json"
56+
{
57+
"$schema": "https://opencode.ai/config.json",
58+
"share": "auto"
59+
}
6360
```
6461

65-
This will remove the share link and delete the data related to the conversation.
62+
With auto-share enabled, every new conversation will automatically be shared and a link will be generated.
6663

6764
---
6865

69-
## Disable
66+
### Disabled
7067

71-
If you'd like to disable sharing entirely, you can do so by setting the `share` option to `"disabled"` in your [config file](/docs/config).
68+
You can disable sharing entirely by setting the `share` option to `"disabled"` in your [config file](/docs/config):
7269

7370
```json title="opencode.json"
7471
{
@@ -81,6 +78,18 @@ To enforce this across your team for a given project, add it to the `opencode.js
8178

8279
---
8380

81+
## Un-sharing
82+
83+
To stop sharing a conversation and remove it from public access:
84+
85+
```
86+
/unshare
87+
```
88+
89+
This will remove the share link and delete the data related to the conversation.
90+
91+
---
92+
8493
## Privacy
8594

8695
There are a few things to keep in mind when sharing a conversation.

0 commit comments

Comments
 (0)