diff --git a/packages/frontend/src/components/CommandInputBar.vue b/packages/frontend/src/components/CommandInputBar.vue
index 1e71de0..900f68d 100644
--- a/packages/frontend/src/components/CommandInputBar.vue
+++ b/packages/frontend/src/components/CommandInputBar.vue
@@ -9,7 +9,8 @@ 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';
+import { useFileEditorStore } from '../stores/fileEditor.store'; // +++ Import File Editor Store +++
+import { useWorkspaceEventEmitter } from '../composables/workspaceEvents';
// Disable attribute inheritance as this component has multiple root nodes (div + modal)
defineOptions({ inheritAttrs: false });
@@ -23,9 +24,10 @@ const settingsStore = useSettingsStore();
const quickCommandsStore = useQuickCommandsStore();
const commandHistoryStore = useCommandHistoryStore();
const sessionStore = useSessionStore(); // +++ 初始化 Session Store +++
+const fileEditorStore = useFileEditorStore(); // +++ Initialize File Editor Store +++
// Get reactive setting from store
-const { commandInputSyncTarget, showPopupFileManagerBoolean } = storeToRefs(settingsStore); // +++ Import showPopupFileManagerBoolean +++
+const { commandInputSyncTarget, showPopupFileManagerBoolean, showPopupFileEditorBoolean } = storeToRefs(settingsStore); // +++ Import showPopupFileEditorBoolean +++
// Get reactive state and actions from quick commands store
const { selectedIndex: quickCommandsSelectedIndex, flatVisibleCommands: quickCommandsFiltered } = storeToRefs(quickCommandsStore);
const { resetSelection: resetQuickCommandsSelection } = quickCommandsStore;
@@ -309,6 +311,17 @@ const openFileManagerModal = () => {
}
};
+// +++ Function to request opening the file editor modal +++
+const openFileEditorModal = () => {
+ if (activeSessionId.value) {
+ console.log(`[CommandInputBar] Triggering popup editor for session: ${activeSessionId.value}`);
+ fileEditorStore.triggerPopup('', activeSessionId.value); // Call store action directly
+ } else {
+ console.warn('[CommandInputBar] Cannot open file editor modal: No active session ID.');
+ // Optionally, show a notification to the user
+ }
+};
+
// +++ Handler for command execution from the modal +++
const handleQuickCommandExecute = (command: string) => {
console.log(`[CommandInputBar] Executing quick command: ${command}`);
@@ -420,6 +433,15 @@ const handleQuickCommandExecute = (command: string) => {
>
+
+
diff --git a/packages/frontend/src/locales/en-US.json b/packages/frontend/src/locales/en-US.json
index 8173d84..874c8e6 100644
--- a/packages/frontend/src/locales/en-US.json
+++ b/packages/frontend/src/locales/en-US.json
@@ -302,6 +302,12 @@
"reconnectingMsg": "Attempting to reconnect..."
}
},
+"fileEditor": {
+ "title": "File Editor"
+ },
+"fileEditor": {
+ "title": "File Editor"
+ },
"fileManager": {
"currentPath": "Current Path",
"loading": "Loading directory...",
diff --git a/packages/frontend/src/locales/ja-JP.json b/packages/frontend/src/locales/ja-JP.json
index e566edf..74b697c 100644
--- a/packages/frontend/src/locales/ja-JP.json
+++ b/packages/frontend/src/locales/ja-JP.json
@@ -312,6 +312,9 @@
},
"waitingForSsh": "SSH接続を待機中..."
},
+"fileEditor": {
+ "title": "ファイルエディタ"
+ },
"fileManager": {
"actions": {
"cancel": "キャンセル",
diff --git a/packages/frontend/src/locales/zh-CN.json b/packages/frontend/src/locales/zh-CN.json
index a229655..94c95f2 100644
--- a/packages/frontend/src/locales/zh-CN.json
+++ b/packages/frontend/src/locales/zh-CN.json
@@ -301,6 +301,9 @@
"reconnectingMsg": "正在尝试重新连接..."
}
},
+"fileEditor": {
+ "title": "文件编辑器"
+ },
"fileManager": {
"currentPath": "当前路径",
"loading": "正在加载目录...",