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) => { > + +