Skip to content

Commit cdc8f73

Browse files
committed
🤖 fix: resolve Mintlify MDX compatibility issues
- Remove docs build target (Mintlify is hosted, no local build) - Use JSX comments for Mintlify MDX compatibility in system-prompt.md - Update sync script to use JSX comment markers - Add .prettierignore for system-prompt.md (prettier mangles JSX comments) - Remove invalid comment from vim-mode.md _Generated with mux_
1 parent dd87667 commit cdc8f73

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Mintlify docs that use JSX comments which prettier mangles
2+
docs/system-prompt.md

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ include fmt.mk
4949
.PHONY: test test-unit test-integration test-watch test-coverage test-e2e smoke-test
5050
.PHONY: dist dist-mac dist-win dist-linux
5151
.PHONY: vscode-ext vscode-ext-install
52-
.PHONY: docs docs-server
52+
.PHONY: docs-server
5353
.PHONY: storybook storybook-build test-storybook chromatic
5454
.PHONY: benchmark-terminal
5555
.PHONY: ensure-deps rebuild-native
@@ -337,10 +337,7 @@ vscode-ext-install: ## Build and install VS Code extension locally
337337
@$(MAKE) -C vscode install
338338

339339
## Documentation
340-
docs: ## Build documentation (Mintlify)
341-
@cd docs && npx mintlify build
342-
343-
docs-server: node_modules/.installed ## Serve documentation locally (opens browser)
340+
docs-server: node_modules/.installed ## Serve documentation locally (Mintlify dev server)
344341
@cd docs && npx mintlify dev
345342

346343
## Storybook

docs/system-prompt.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ Even with consistent support at the protocol layer, we have found that different
1313

1414
Here's a snippet from `src/node/services/systemMessage.ts` which is our shared system prompt (minus tools).
1515

16-
<!-- BEGIN SYSTEM_PROMPT_DOCS -->
16+
17+
{/* BEGIN SYSTEM_PROMPT_DOCS */}
1718

1819
```typescript
1920
// The PRELUDE is intentionally minimal to not conflict with the user's instructions.
@@ -61,4 +62,5 @@ You are in a git worktree at ${workspacePath}
6162
}
6263
```
6364

64-
<!-- END SYSTEM_PROMPT_DOCS -->
65+
66+
{/* END SYSTEM_PROMPT_DOCS */}

docs/vim-mode.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ title: Vim Mode
33
description: Vim-style editing in the mux chat input
44
---
55

6-
{/_ Keep this file in sync with: - src/components/VimTextArea.tsx (implementation) - src/utils/vim.ts (core logic) - src/utils/vim.test.ts (test suite)
7-
_/}
8-
96
mux includes a built-in Vim mode for the chat input, providing familiar Vim-style editing for power users.
107

118
## Enabling Vim Mode

scripts/sync_system_prompt_docs.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ generate_section() {
2323
}
2424

2525
# Extract the current synced section from docs
26+
# Uses JSX-style comments for Mintlify MDX compatibility
2627
extract_current_section() {
27-
sed -n '/<!-- BEGIN SYSTEM_PROMPT_DOCS -->/,/<!-- END SYSTEM_PROMPT_DOCS -->/p' "$DOCS_FILE" \
28+
sed -n '/{\/\* BEGIN SYSTEM_PROMPT_DOCS \*\/}/,/{\/\* END SYSTEM_PROMPT_DOCS \*\/}/p' "$DOCS_FILE" \
2829
| tail -n +2 | head -n -1 \
2930
|
3031
# Remove first and last lines (markers)
@@ -43,14 +44,15 @@ if [[ "${1:-}" == "check" ]]; then
4344
echo "$DOCS_FILE is in sync"
4445
else
4546
# Replace section between markers using temp file approach
47+
# Uses JSX-style comments for Mintlify MDX compatibility
4648
{
4749
# Print everything up to and including BEGIN marker
48-
sed -n '1,/<!-- BEGIN SYSTEM_PROMPT_DOCS -->/p' "$DOCS_FILE"
50+
sed -n '1,/{\/\* BEGIN SYSTEM_PROMPT_DOCS \*\/}/p' "$DOCS_FILE"
4951
echo ""
5052
generate_section
5153
echo ""
5254
# Print END marker and everything after
53-
sed -n '/<!-- END SYSTEM_PROMPT_DOCS -->/,$p' "$DOCS_FILE"
55+
sed -n '/{\/\* END SYSTEM_PROMPT_DOCS \*\/}/,$p' "$DOCS_FILE"
5456
} >"$DOCS_FILE.tmp"
5557
mv "$DOCS_FILE.tmp" "$DOCS_FILE"
5658
echo "Updated $DOCS_FILE"

0 commit comments

Comments
 (0)