Skip to content

Commit 232927e

Browse files
committed
Merge main and resolve conflicts
1 parent 1e261a7 commit 232927e

File tree

3 files changed

+307
-116
lines changed

3 files changed

+307
-116
lines changed

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
88
COPY packages packages/
99
COPY srcbook srcbook/
1010
COPY turbo.json ./
11+
COPY srcbook_mcp_config.json ./
1112

1213
# Install dependencies
1314
RUN pnpm install
@@ -18,6 +19,9 @@ RUN pnpm build
1819
# Create necessary directories for volumes
1920
RUN mkdir -p /root/.srcbook /root/.npm
2021

22+
# Set container environment variable
23+
ENV CONTAINER=true
24+
2125
# Source code will be mounted at runtime
2226
CMD [ "pnpm", "start" ]
2327

packages/web/src/routes/settings.tsx

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -67,42 +67,17 @@ function Settings() {
6767

6868
// If we're in a containerized environment, handle the path differently
6969
if (data.containerized) {
70-
try {
71-
// Request clipboard permission first
72-
const clipboardPermission = await navigator.permissions.query({ name: 'clipboard-write' as PermissionName });
73-
74-
if (clipboardPermission.state === 'granted' || clipboardPermission.state === 'prompt') {
75-
await navigator.clipboard.writeText(data.result);
76-
toast.success('Path copied to clipboard');
77-
78-
// Show instructions
79-
toast.message(
80-
'To find your config file:\n' +
81-
'1. Open Finder\n' +
82-
'2. Press Cmd+Shift+G\n' +
83-
'3. Paste the copied path',
84-
{ duration: 10000 }
85-
);
86-
} else {
87-
// Fallback if clipboard access is denied
88-
toast.message(
89-
`Please manually navigate to: ${data.result}\n\n` +
90-
'1. Open Finder\n' +
91-
'2. Press Cmd+Shift+G\n' +
92-
'3. Enter the path above',
93-
{ duration: 10000 }
94-
);
95-
}
96-
} catch (_clipboardError: unknown) {
97-
// Fallback if clipboard API is not available
98-
toast.message(
99-
`Please manually navigate to: ${data.result}\n\n` +
100-
'1. Open Finder\n' +
101-
'2. Press Cmd+Shift+G\n' +
102-
'3. Enter the path above',
103-
{ duration: 10000 }
104-
);
105-
}
70+
// Copy the path to clipboard
71+
await navigator.clipboard.writeText(data.result);
72+
toast.success('Path copied to clipboard');
73+
74+
// Show instructions
75+
toast.message(
76+
'To find your config file:\n' +
77+
'1. Open Finder\n' +
78+
'2. Press Cmd+Shift+G\n' +
79+
'3. Paste the copied path'
80+
);
10681
}
10782
} catch (error) {
10883
console.error('Failed to open MCP config:', error);
@@ -181,7 +156,7 @@ function Settings() {
181156
<h2 className="text-base font-medium">MCP Configuration</h2>
182157
<div>
183158
<label className="opacity-70 text-sm" htmlFor="mcp-config">
184-
Configure Model Context Protocol settings by editing the config file. Srcbook will give you the file's location on your machine when you push this button.
159+
Configure Model Context Protocol settings by editing the config file.
185160
</label>
186161
<div className="flex gap-2 mt-3">
187162
<Button

0 commit comments

Comments
 (0)