From fb5304563bb7ed3522e0b4e4704f3447441bd8e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Sun, 6 Sep 2026 15:22:25 +0100 Subject: [PATCH] export FileTree, so a plugin can have the code editor's tree MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It only lists — opening is the caller's callback — so a panel that wants the editor's file list against its own directory no longer has to draw one. fofos-website is the first: it was rendering its own tree, and the editor's is the one people recognise. --- src/workspaces/officerdev/src/apps/CodeEditor/index.ts | 3 +++ src/workspaces/officerdev/src/index.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/workspaces/officerdev/src/apps/CodeEditor/index.ts b/src/workspaces/officerdev/src/apps/CodeEditor/index.ts index 508b1966..b096c2a2 100644 --- a/src/workspaces/officerdev/src/apps/CodeEditor/index.ts +++ b/src/workspaces/officerdev/src/apps/CodeEditor/index.ts @@ -5,6 +5,9 @@ import { CodeEditorHeader } from './CodeEditorHeader'; import { panelName } from '../../locales'; export { CodeEditorView } from './CodeEditor'; +// The tree on its own, for a panel that wants the editor's file list against its own directory rather +// than the whole editor. It only LISTS — opening is the caller's callback. +export { FileTree } from './FileTree'; export const appRegistryMetas: AppRegistryMeta[] = [ { diff --git a/src/workspaces/officerdev/src/index.ts b/src/workspaces/officerdev/src/index.ts index 614293be..c2bf4716 100644 --- a/src/workspaces/officerdev/src/index.ts +++ b/src/workspaces/officerdev/src/index.ts @@ -36,7 +36,7 @@ export { SessionList, ChatDetailPanel } from './apps/ChatHistory'; export type { SelectedSession } from './apps/ChatHistory'; // The chat URL vocabulary, so the /chat screen, the panels and the server all spell a group the same way. export { chatListPath, chatNewPath, chatSessionPath, cwdFromSplat, GROUP_SEGMENT } from './apps/ChatHistory'; -export { CodeEditorView } from './apps/CodeEditor'; +export { CodeEditorView, FileTree } from './apps/CodeEditor'; // Same for /system-monitor, where the param is the scope rather than a section. export { DEFAULT_MONITOR_SCOPE, monitorScopePath, isMonitorScope } from './apps/SystemMonitor/shared';