From ee44b2f78f864c0b173663fe45144fc860893971 Mon Sep 17 00:00:00 2001
From: Baobhan Sith <80159437+Heavrnl@users.noreply.github.com>
Date: Sat, 10 May 2025 13:32:06 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E9=80=82?=
=?UTF-8?q?=E9=85=8D=E6=8C=82=E8=B5=B7=E4=BC=9A=E8=AF=9D=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E5=99=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/CommandInputBar.vue | 25 ++++++
.../components/SuspendedSshSessionsModal.vue | 81 +++++++++++++++++++
.../src/composables/workspaceEvents.ts | 3 +
.../src/views/SuspendedSshSessionsView.vue | 6 ++
4 files changed, 115 insertions(+)
create mode 100644 packages/frontend/src/components/SuspendedSshSessionsModal.vue
diff --git a/packages/frontend/src/components/CommandInputBar.vue b/packages/frontend/src/components/CommandInputBar.vue
index 3e736b9..3875e1e 100644
--- a/packages/frontend/src/components/CommandInputBar.vue
+++ b/packages/frontend/src/components/CommandInputBar.vue
@@ -8,6 +8,7 @@ import { useSettingsStore } from '../stores/settings.store';
import { useQuickCommandsStore } from '../stores/quickCommands.store';
import { useCommandHistoryStore } from '../stores/commandHistory.store';
import QuickCommandsModal from './QuickCommandsModal.vue'; // +++ Import the modal component +++
+import SuspendedSshSessionsModal from './SuspendedSshSessionsModal.vue'; // +++ Import the new modal +++
import { useWorkspaceEventEmitter } from '../composables/workspaceEvents'; // +++ 新增导入 +++
// Disable attribute inheritance as this component has multiple root nodes (div + modal)
@@ -46,6 +47,7 @@ const props = defineProps<{
const isSearching = ref(false);
const searchTerm = ref('');
const showQuickCommands = ref(false); // +++ Add state for modal visibility +++
+const showSuspendedSshSessionsModal = ref(false); // +++ Add state for suspended SSH sessions modal +++
// *** 移除本地的搜索结果 ref ***
// const searchResultCount = ref(0);
// const currentSearchResultIndex = ref(0);
@@ -280,6 +282,15 @@ const closeQuickCommandsModal = () => {
showQuickCommands.value = false;
};
+// +++ Functions to control the suspended SSH sessions modal +++
+const openSuspendedSshSessionsModal = () => {
+ showSuspendedSshSessionsModal.value = true;
+};
+
+const closeSuspendedSshSessionsModal = () => {
+ showSuspendedSshSessionsModal.value = false;
+};
+
// +++ Handler for command execution from the modal +++
const handleQuickCommandExecute = (command: string) => {
console.log(`[CommandInputBar] Executing quick command: ${command}`);
@@ -362,6 +373,15 @@ const handleQuickCommandExecute = (command: string) => {
>
+
+