From 91e8169fa78c7f4285c31e9e597ddc5f3dfcc9a4 Mon Sep 17 00:00:00 2001
From: Baobhan Sith <80159437+Heavrnl@users.noreply.github.com>
Date: Wed, 28 May 2025 09:18:44 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B7=AF=E5=BE=84=E6=94=B6=E8=97=8F?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=91=E9=80=81=E5=88=B0=E7=BB=88=E7=AB=AF?=
=?UTF-8?q?=E6=8C=89=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/FavoritePathsModal.vue | 13 ++++++++++
packages/frontend/src/components/Terminal.vue | 25 +++++++++++++++----
.../src/composables/workspaceEvents.ts | 1 +
3 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/packages/frontend/src/components/FavoritePathsModal.vue b/packages/frontend/src/components/FavoritePathsModal.vue
index 41d96d9..c7fde6e 100644
--- a/packages/frontend/src/components/FavoritePathsModal.vue
+++ b/packages/frontend/src/components/FavoritePathsModal.vue
@@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n';
import { useFavoritePathsStore, type FavoritePathItem } from '../stores/favoritePaths.store';
import { useSessionStore } from '../stores/session.store';
import AddEditFavoritePathForm from './AddEditFavoritePathForm.vue';
+import { useWorkspaceEventEmitter } from '../composables/workspaceEvents';
const PADDING = 8; // px
@@ -23,6 +24,7 @@ const emit = defineEmits(['close', 'navigateToPath']);
const { t } = useI18n();
const favoritePathsStore = useFavoritePathsStore();
const sessionStore = useSessionStore();
+const emitWorkspaceEvent = useWorkspaceEventEmitter();
const searchTerm = ref('');
const showAddEditModal = ref(false);
@@ -89,6 +91,11 @@ const handleDelete = async (pathItem: FavoritePathItem) => {
}
};
+const handleSendToTerminal = (pathItem: FavoritePathItem) => {
+ emitWorkspaceEvent('favoritePath:sendToActiveTerminal', { path: pathItem.path });
+ closeModal(); // Optionally close modal after sending
+};
+
const closeModal = () => {
emit('close');
};
@@ -255,6 +262,12 @@ onBeforeUnmount(() => {
+