소스 검색

docs(share): add explicit manual share mode (#1074)

Timo Clasen 7 달 전
부모
커밋
3c6c2bf13b
3개의 변경된 파일37개의 추가작업 그리고 26개의 파일을 삭제
  1. 4 2
      packages/opencode/src/config/config.ts
  2. 6 6
      packages/web/src/content/docs/docs/config.mdx
  3. 27 18
      packages/web/src/content/docs/docs/share.mdx

+ 4 - 2
packages/opencode/src/config/config.ts

@@ -139,9 +139,11 @@ export namespace Config {
       theme: z.string().optional().describe("Theme name to use for the interface"),
       keybinds: Keybinds.optional().describe("Custom keybind configurations"),
       share: z
-        .enum(["auto", "disabled"])
+        .enum(["manual", "auto", "disabled"])
         .optional()
-        .describe("Control sharing behavior: 'auto' enables automatic sharing, 'disabled' disables all sharing"),
+        .describe(
+          "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing",
+        ),
       autoshare: z
         .boolean()
         .optional()

+ 6 - 6
packages/web/src/content/docs/docs/config.mdx

@@ -135,28 +135,28 @@ With the following options:
 | `WARN`  | Warnings and errors only                 |
 | `ERROR` | Errors only                              |
 
-The **default** log level is `INFO`. If you are running opencode locally in
+The **default** log level is `INFO`. If you are running opencode locally in development mode it's set to `DEBUG`.
 
 ---
 
 ### Sharing
 
-You configure the [share](/docs/share) feature through the `share` option.
+You can configure the [share](/docs/share) feature through the `share` option.
 
 ```json title="opencode.json"
 {
   "$schema": "https://opencode.ai/config.json",
-  "share": "auto"
+  "share": "manual"
 }
 ```
 
 This takes:
 
+- `"manual"` - Allow manual sharing via commands (default)
 - `"auto"` - Automatically share new conversations
 - `"disabled"` - Disable sharing entirely
 
-By default, you'll need to manually share new conversations.
-development mode it's set to `DEBUG`.
+By default, sharing is set to manual mode where you need to explicitly share conversations using the `/share` command.
 
 ---
 
@@ -256,7 +256,7 @@ Use `{env:VARIABLE_NAME}` to substitute environment variables:
     "anthropic": {
       "options": {
         "apiKey": "{env:ANTHROPIC_API_KEY}"
-        }
+      }
     }
   }
 }

+ 27 - 18
packages/web/src/content/docs/docs/share.mdx

@@ -23,13 +23,13 @@ When you share a conversation, opencode:
 
 ## Sharing
 
-You can manually share a conversation or enable automatic sharing for all new conversations.
+opencode supports three sharing modes that control how conversations are shared:
 
 ---
 
-### Manual
+### Manual (default)
 
-Use the `/share` command in any conversation to create a shareable link:
+By default, opencode uses manual sharing mode. Sessions are not shared automatically, but you can manually share them using the `/share` command:
 
 ```
 /share
@@ -37,38 +37,35 @@ Use the `/share` command in any conversation to create a shareable link:
 
 This will generate a unique URL that'll be copied to your clipboard.
 
----
-
-### Auto-share
-
-You can enable automatic sharing for all new conversations through the `autoshare` option in your [config file](/docs/config).
+To explicitly set manual mode in your [config file](/docs/config):
 
 ```json title="opencode.json"
 {
   "$schema": "https://opencode.ai/config.json",
-  "share": "auto"
+  "share": "manual"
 }
 ```
 
-By default, automatic sharing is disabled.
-
 ---
 
-## Un-sharing
+### Auto-share
 
-To stop sharing a conversation and remove it from public access:
+You can enable automatic sharing for all new conversations by setting the `share` option to `"auto"` in your [config file](/docs/config):
 
-```
-/unshare
+```json title="opencode.json"
+{
+  "$schema": "https://opencode.ai/config.json",
+  "share": "auto"
+}
 ```
 
-This will remove the share link and delete the data related to the conversation.
+With auto-share enabled, every new conversation will automatically be shared and a link will be generated.
 
 ---
 
-## Disable
+### Disabled
 
-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).
+You can disable sharing entirely by setting the `share` option to `"disabled"` in your [config file](/docs/config):
 
 ```json title="opencode.json"
 {
@@ -81,6 +78,18 @@ To enforce this across your team for a given project, add it to the `opencode.js
 
 ---
 
+## Un-sharing
+
+To stop sharing a conversation and remove it from public access:
+
+```
+/unshare
+```
+
+This will remove the share link and delete the data related to the conversation.
+
+---
+
 ## Privacy
 
 There are a few things to keep in mind when sharing a conversation.