Skip to content

Commit 908666e

Browse files
docs
1 parent caa2d1c commit 908666e

File tree

7 files changed

+97
-23
lines changed

7 files changed

+97
-23
lines changed

docs/docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"group": "Ask Sourcebot",
4747
"pages": [
4848
"docs/features/ask/overview",
49+
"docs/features/ask/chat-sharing",
4950
"docs/features/ask/add-model-providers"
5051
]
5152
},
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: Chat Sharing
3+
---
4+
5+
Chat sharing allows you to share Ask Sourcebot conversations with others. Whether you want to share insights with your team or make a conversation publicly accessible, Sourcebot provides flexible sharing options.
6+
7+
<Frame>
8+
<img src="/images/chat-sharing-dialog.png" alt="Chat sharing dialog" />
9+
</Frame>
10+
11+
## Visibility Options
12+
13+
Every chat has a visibility setting that controls who can access it:
14+
15+
<Frame>
16+
<img src="/images/chat-visibility-dropdown.png" alt="Chat visibility dropdown" />
17+
</Frame>
18+
19+
### Private (Default)
20+
- Only the chat owner can view the conversation
21+
- Other users cannot access the chat, even with the link
22+
- You can explicitly invite specific org members to view the chat (requires [Enterprise license](/docs/license-key))
23+
24+
### Public
25+
- Anyone with the link can view the conversation
26+
- If [anonymous access](/docs/configuration/auth/access-settings) is enabled, no authentication is required to view
27+
- Useful for sharing insights with your team or creating reference documentation
28+
- Public chats can be duplicated by others
29+
30+
## Sharing with Specific Users
31+
32+
<Note>Sharing with specific users requires an [Enterprise license](/docs/license-key).</Note>
33+
34+
<Frame>
35+
<img src="/images/chat-invite-users.png" alt="Invite users dialog" />
36+
</Frame>
37+
38+
Chat owners can invite specific organization members to view their private chats:
39+
40+
1. Open the chat you want to share
41+
2. Click the **Share** button in the top-right corner
42+
3. Search for users by name or email
43+
4. Select the users you want to invite
44+
5. Click **Invite** to grant them access
45+
46+
Invited users will be able to:
47+
- View the full conversation
48+
- See all messages and code citations
49+
- Navigate through referenced code snippets
50+
51+
Invited users **cannot**:
52+
- Edit or delete the chat
53+
- Send new messages
54+
- Invite other users
55+
56+
### Removing Access
57+
58+
<Frame>
59+
<img src="/images/chat-remove-user.png" alt="Remove user from chat" />
60+
</Frame>
61+
62+
To remove a user's access to your chat:
63+
64+
1. Open the Share dialog
65+
2. Find the user in the "People with access" list
66+
3. Click the **X** button next to their name

docs/images/chat-invite-users.png

102 KB
Loading

docs/images/chat-remove-user.png

43.3 KB
Loading
137 KB
Loading
35.9 KB
Loading

packages/web/src/app/[domain]/chat/components/shareChatPopover/shareSettings.tsx

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { Separator } from "@/components/ui/separator";
1515
import { cn } from "@/lib/utils";
1616
import placeholderAvatar from "@/public/placeholder_avatar.png";
1717
import { ChatVisibility } from "@sourcebot/db";
18+
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
1819
import { Info, Link2Icon, Loader2, Lock, X } from "lucide-react";
1920
import Link from "next/link";
2021
import { usePathname } from "next/navigation";
@@ -130,27 +131,32 @@ export const ShareSettings = ({
130131
)}
131132
</div>
132133
</div>
133-
<Button
134-
variant="ghost"
135-
size="icon"
136-
className="h-8 w-8 text-muted-foreground hover:text-foreground"
137-
disabled={removingUserIds.has(user.id)}
138-
onClick={async () => {
139-
setRemovingUserIds(prev => new Set(prev).add(user.id));
140-
await onRemoveSharedWithUser(user.id);
141-
setRemovingUserIds(prev => {
142-
const next = new Set(prev);
143-
next.delete(user.id);
144-
return next;
145-
});
146-
}}
147-
>
148-
{removingUserIds.has(user.id) ? (
149-
<Loader2 className="h-4 w-4 animate-spin" />
150-
) : (
151-
<X className="h-4 w-4" />
152-
)}
153-
</Button>
134+
<Tooltip>
135+
<TooltipTrigger asChild>
136+
<Button
137+
variant="ghost"
138+
size="icon"
139+
className="h-8 w-8 text-muted-foreground hover:text-foreground"
140+
disabled={removingUserIds.has(user.id)}
141+
onClick={async () => {
142+
setRemovingUserIds(prev => new Set(prev).add(user.id));
143+
await onRemoveSharedWithUser(user.id);
144+
setRemovingUserIds(prev => {
145+
const next = new Set(prev);
146+
next.delete(user.id);
147+
return next;
148+
});
149+
}}
150+
>
151+
{removingUserIds.has(user.id) ? (
152+
<Loader2 className="h-4 w-4 animate-spin" />
153+
) : (
154+
<X className="h-4 w-4" />
155+
)}
156+
</Button>
157+
</TooltipTrigger>
158+
<TooltipContent side="bottom">Remove user</TooltipContent>
159+
</Tooltip>
154160
</div>
155161
))}
156162
</div>
@@ -204,9 +210,10 @@ export const ShareSettings = ({
204210
)}
205211
<Separator className="-mx-4 w-auto my-4" />
206212
<div className="flex justify-between items-center">
207-
{/* @todo: link to docs */}
208213
<Link
209-
href="#"
214+
href="https://docs.sourcebot.dev/docs/features/ask/chat-sharing"
215+
target="_blank"
216+
rel="noopener noreferrer"
210217
className="flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors"
211218
>
212219
<Info className="h-4 w-4" />

0 commit comments

Comments
 (0)