Skip to content

Commit ce582cd

Browse files
committed
docs: add openRemote example to Cursor documentation
1 parent 887d80c commit ce582cd

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

apps/docs/zh/apps/cursor.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ layout: doc
55
<script setup lang="ts">
66
import { ref, computed } from 'vue';
77
import VPLink from 'vitepress/dist/client/theme-default/components/VPLink.vue';
8-
import { installMCP, openFile, openFolder, openSettings, createChat } from 'protocol-launcher/cursor';
8+
import { installMCP, openFile, openFolder, openRemote, openSettings, createChat } from 'protocol-launcher/cursor';
99
import { SelectInstallationMethod } from '../../.vitepress/components';
1010
import { useAppStore } from '../../.vitepress/stores/app';
1111
import {
@@ -14,6 +14,7 @@ import {
1414
installSSEMCPServerParams,
1515
openFileParams,
1616
openFolderParams,
17+
openRemoteParams,
1718
} from '../../.vitepress/constants/cursor';
1819

1920
const appStore = useAppStore();
@@ -124,6 +125,22 @@ const url = {{currentMethod === 'On-Demand' ? '' : 'cursor.'}}openFolder({
124125
</VPLink>
125126
</div>
126127

128+
### 远程开发
129+
```ts-vue [{{currentMethod}}]
130+
import { {{ currentMethod === 'On-Demand' ? 'openRemote' : 'cursor' }} } from '{{ importPath }}'
131+
132+
const url = {{currentMethod === 'On-Demand' ? '' : 'cursor.'}}openRemote({
133+
type: 'ssh-remote',
134+
host: 'root@172.18.105.209:22',
135+
path: '/code/my-project',
136+
})
137+
```
138+
<div class="flex justify-center">
139+
<VPLink :href="openRemote(openRemoteParams)" target="_self">
140+
在 Cursor 中打开
141+
</VPLink>
142+
</div>
143+
127144
### 打开设置
128145
```ts-vue [{{currentMethod}}]
129146
import { {{ currentMethod === 'On-Demand' ? 'openSettings' : 'cursor' }} } from '{{ importPath }}'

0 commit comments

Comments
 (0)