增加拖拽添加连接的功能
This commit is contained in:
parent
78634e6327
commit
bca49f01de
@ -109,7 +109,6 @@ function handleDrop(event: DragEvent) {
|
||||
client.value.connectionArgs.connectionType = 'STDIO';
|
||||
client.value.connectionArgs.commandString = command;
|
||||
client.value.connectionArgs.cwd = cwd;
|
||||
client.value.handleEnvSwitch(true);
|
||||
}
|
||||
|
||||
isDraging.value = false;
|
||||
|
@ -49,7 +49,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineComponent, computed } from 'vue';
|
||||
import { defineComponent, computed, reactive } from 'vue';
|
||||
import ConnectionPanel from './connection-panel.vue';
|
||||
import { McpClient, mcpClientAdapter } from './core';
|
||||
import { ElMessage } from 'element-plus';
|
||||
@ -61,9 +61,8 @@ function selectServer(index: number) {
|
||||
mcpClientAdapter.currentClientIndex = index;
|
||||
}
|
||||
|
||||
|
||||
function addServer() {
|
||||
const client = new McpClient();
|
||||
const client = reactive(new McpClient());
|
||||
mcpClientAdapter.clients.push(client);
|
||||
mcpClientAdapter.currentClientIndex = mcpClientAdapter.clients.length - 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user