Skip to content

Commit 73256bc

Browse files
committed
Document diagram editor, file tree context menu, and skill send GUI
1 parent c681272 commit 73256bc

7 files changed

Lines changed: 237 additions & 17 deletions

File tree

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ PyBreeze is not just a code editor — it is a command center for the automation
6969
- Password and private key authentication
7070
- Interactive command execution
7171
- Remote file tree viewer with CRUD operations (create folder, rename, delete, upload, download)
72+
- Interactive TOFU host-key verification with confirmed keys persisted to `~/.pybreeze/ssh_known_hosts`
73+
- **Diagram Editor** — Built-in WYSIWYG architecture-diagram editor:
74+
- Rectangle, rounded rectangle, ellipse, diamond nodes, connection lines, and free text
75+
- Image insertion from local files or URLs (URL fetches are SSRF-validated and size-capped)
76+
- Mermaid `flowchart` / `graph` import
77+
- Save/Open as `.diagram.json`, export to PNG or SVG
78+
- Undo/redo, align, distribute, grid, snap, and zoom controls
79+
- **File Tree Context Menu** — Right-click any file or folder in the project tree to create files/folders, rename, delete, copy absolute or relative paths, or reveal the item in your platform file manager. Renaming or deleting a file that is currently open in an editor tab keeps the tab in sync.
7280
- **Package Manager** — Install automation modules and build tools directly from the IDE menu without leaving the editor.
7381
- **Integrated Documentation** — Quick access to documentation and GitHub pages for each automation module directly from the menu bar.
7482

@@ -82,6 +90,7 @@ PyBreeze is not just a code editor — it is a command center for the automation
8290
- Step-by-step analysis
8391
- Summary generation
8492
- **Skill Prompt Editor** — Define and manage reusable skill-based prompts (code explanation, code review templates) that can be sent to LLM APIs.
93+
- **Skill Send GUI** — Pick a skill prompt template, optionally edit the prompt text, send it to an LLM API endpoint, and view the response — all in a dedicated tab or dock.
8594

8695
### Plugin System
8796

@@ -148,7 +157,9 @@ flowchart TB
148157
T2["AI Code Review"]
149158
T3["CoT Prompt Editor"]
150159
T4["Skill Prompt Editor"]
151-
T5["JupyterLab"]
160+
T5["Skill Send GUI"]
161+
T6["Diagram Editor"]
162+
T7["JupyterLab"]
152163
end
153164
154165
subgraph Install["Install Menu"]
@@ -193,6 +204,8 @@ PyBreeze UI (PySide6)
193204
│ ├── AI Code Review Client
194205
│ ├── CoT Prompt Editor
195206
│ ├── Skill Prompt Editor
207+
│ ├── Skill Send GUI
208+
│ ├── Diagram Editor (WYSIWYG, Mermaid import, PNG/SVG export)
196209
│ └── JupyterLab Integration
197210
└── Install Menu
198211
├── Automation Module Installers
@@ -334,8 +347,9 @@ PyBreeze/
334347
│ │ └── process_executor/python_task_process_manager.py
335348
│ ├── extend_multi_language/ # Built-in translations (English, Traditional Chinese)
336349
│ ├── pybreeze_ui/
337-
│ │ ├── editor_main/ # Main window (extends JEditor)
338-
│ │ ├── connect_gui/ssh/ # SSH client widgets
350+
│ │ ├── editor_main/ # Main window (extends JEditor) + file tree context menu
351+
│ │ ├── connect_gui/ssh/ # SSH client widgets (TOFU host-key verification)
352+
│ │ ├── diagram_editor/ # WYSIWYG architecture-diagram editor
339353
│ │ ├── extend_ai_gui/ # AI code review & prompt editors
340354
│ │ ├── jupyter_lab_gui/ # JupyterLab integration
341355
│ │ ├── menu/ # Menu bar construction

README/README_zh-CN.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ PyBreeze 不仅仅是一个代码编辑器——它是自动化生命周期的
6868
- 密码与私钥认证
6969
- 交互式命令执行
7070
- 远程文件树查看器,支持 CRUD 操作(创建文件夹、重命名、删除、上传、下载)
71+
- 交互式 TOFU host key 验证,已确认的密钥会持久化到 `~/.pybreeze/ssh_known_hosts`
72+
- **架构图编辑器** — 内置的 WYSIWYG 架构图编辑器:
73+
- 矩形、圆角矩形、椭圆、菱形节点、连线、自由文本
74+
- 从本地文件或 URL 插入图片(URL 下载会做 SSRF 验证并有大小上限)
75+
- 支持 Mermaid `flowchart` / `graph` 导入
76+
- 保存/打开为 `.diagram.json`,导出为 PNG 或 SVG
77+
- Undo/redo、对齐、分布、Grid、Snap、Zoom 控制
78+
- **文件树右键菜单** — 在项目文件树中对任何文件或文件夹右键,可创建文件/文件夹、重命名、删除、复制绝对或相对路径、在系统文件管理器中打开。重命名或删除当前已在编辑器标签页中打开的文件时,标签页会同步更新。
7179
- **包管理器** — 直接从 IDE 菜单安装自动化模块和构建工具,无需离开编辑器。
7280
- **集成文档** — 从菜单栏快速访问每个自动化模块的文档和 GitHub 页面。
7381

@@ -81,6 +89,7 @@ PyBreeze 不仅仅是一个代码编辑器——它是自动化生命周期的
8189
- 逐步分析
8290
- 摘要生成
8391
- **Skill 提示词编辑器** — 定义和管理可重复使用的技能型提示词(代码解说、代码审查模板),可发送至 LLM API。
92+
- **Skill Send GUI** — 在独立的标签页或停靠面板中选择技能提示词模板、按需编辑提示词内容、发送到 LLM API 端点并查看响应。
8493

8594
### 插件系统
8695

@@ -147,7 +156,9 @@ flowchart TB
147156
T2["AI 代码审查"]
148157
T3["CoT 提示词编辑器"]
149158
T4["Skill 提示词编辑器"]
150-
T5["JupyterLab"]
159+
T5["Skill Send GUI"]
160+
T6["架构图编辑器"]
161+
T7["JupyterLab"]
151162
end
152163
153164
subgraph Install["安装菜单"]
@@ -192,6 +203,8 @@ PyBreeze UI (PySide6)
192203
│ ├── AI 代码审查客户端
193204
│ ├── CoT 提示词编辑器
194205
│ ├── Skill 提示词编辑器
206+
│ ├── Skill Send GUI
207+
│ ├── 架构图编辑器(WYSIWYG、Mermaid 导入、PNG/SVG 导出)
195208
│ └── JupyterLab 集成
196209
└── 安装菜单
197210
├── 自动化模块安装器
@@ -333,8 +346,9 @@ PyBreeze/
333346
│ │ └── process_executor/python_task_process_manager.py
334347
│ ├── extend_multi_language/ # 内置翻译(英语、繁体中文)
335348
│ ├── pybreeze_ui/
336-
│ │ ├── editor_main/ # 主窗口(扩展 JEditor)
337-
│ │ ├── connect_gui/ssh/ # SSH 客户端组件
349+
│ │ ├── editor_main/ # 主窗口(扩展 JEditor)+ 文件树右键菜单
350+
│ │ ├── connect_gui/ssh/ # SSH 客户端组件(TOFU host key 验证)
351+
│ │ ├── diagram_editor/ # WYSIWYG 架构图编辑器
338352
│ │ ├── extend_ai_gui/ # AI 代码审查与提示词编辑器
339353
│ │ ├── jupyter_lab_gui/ # JupyterLab 集成
340354
│ │ ├── menu/ # 菜单栏构建

README/README_zh-TW.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ PyBreeze 不僅僅是一個程式碼編輯器——它是自動化生命週期
6868
- 密碼與私鑰驗證
6969
- 互動式指令執行
7070
- 遠端檔案樹檢視器,支援 CRUD 操作(建立資料夾、重新命名、刪除、上傳、下載)
71+
- 互動式 TOFU host key 驗證,已確認的金鑰會持久化到 `~/.pybreeze/ssh_known_hosts`
72+
- **架構圖編輯器** — 內建的 WYSIWYG 架構圖編輯器:
73+
- 矩形、圓角矩形、橢圓、菱形節點、連線、自由文字
74+
- 從本地檔案或 URL 插入圖片(URL 下載會做 SSRF 驗證並有大小上限)
75+
- 支援 Mermaid `flowchart` / `graph` 匯入
76+
- 儲存/開啟為 `.diagram.json`,匯出為 PNG 或 SVG
77+
- Undo/redo、對齊、分佈、Grid、Snap、Zoom 控制
78+
- **檔案樹右鍵選單** — 在專案檔案樹中對任何檔案或資料夾按右鍵,可建立檔案/資料夾、重新命名、刪除、複製絕對或相對路徑、在系統檔案管理器中開啟。重新命名或刪除目前已開在編輯器分頁中的檔案時,分頁會同步更新。
7179
- **套件管理器** — 直接從 IDE 選單安裝自動化模組和建構工具,無需離開編輯器。
7280
- **整合文件** — 從選單列快速存取每個自動化模組的文件和 GitHub 頁面。
7381

@@ -81,6 +89,7 @@ PyBreeze 不僅僅是一個程式碼編輯器——它是自動化生命週期
8189
- 逐步分析
8290
- 摘要生成
8391
- **Skill 提示詞編輯器** — 定義和管理可重複使用的技能型提示詞(程式碼解說、程式碼審查範本),可傳送至 LLM API。
92+
- **Skill Send GUI** — 在獨立的分頁或停靠面板中選擇技能提示詞範本、視需要編輯提示詞內容、傳送到 LLM API 端點並檢視回應。
8493

8594
### 插件系統
8695

@@ -147,7 +156,9 @@ flowchart TB
147156
T2["AI 程式碼審查"]
148157
T3["CoT 提示詞編輯器"]
149158
T4["Skill 提示詞編輯器"]
150-
T5["JupyterLab"]
159+
T5["Skill Send GUI"]
160+
T6["架構圖編輯器"]
161+
T7["JupyterLab"]
151162
end
152163
153164
subgraph Install["安裝選單"]
@@ -192,6 +203,8 @@ PyBreeze UI (PySide6)
192203
│ ├── AI 程式碼審查用戶端
193204
│ ├── CoT 提示詞編輯器
194205
│ ├── Skill 提示詞編輯器
206+
│ ├── Skill Send GUI
207+
│ ├── 架構圖編輯器(WYSIWYG、Mermaid 匯入、PNG/SVG 匯出)
195208
│ └── JupyterLab 整合
196209
└── 安裝選單
197210
├── 自動化模組安裝器
@@ -333,8 +346,9 @@ PyBreeze/
333346
│ │ └── process_executor/python_task_process_manager.py
334347
│ ├── extend_multi_language/ # 內建翻譯(英文、繁體中文)
335348
│ ├── pybreeze_ui/
336-
│ │ ├── editor_main/ # 主視窗(擴展 JEditor)
337-
│ │ ├── connect_gui/ssh/ # SSH 用戶端元件
349+
│ │ ├── editor_main/ # 主視窗(擴展 JEditor)+ 檔案樹右鍵選單
350+
│ │ ├── connect_gui/ssh/ # SSH 用戶端元件(TOFU host key 驗證)
351+
│ │ ├── diagram_editor/ # WYSIWYG 架構圖編輯器
338352
│ │ ├── extend_ai_gui/ # AI 程式碼審查與提示詞編輯器
339353
│ │ ├── jupyter_lab_gui/ # JupyterLab 整合
340354
│ │ ├── menu/ # 選單列建構

docs/source/Eng/menu_tools.rst

Lines changed: 64 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
Tools Menu
22
==========
33

4-
The **Tools** menu provides access to SSH client and AI-powered development tools.
5-
Each tool can be opened either as a **Tab** (in the main tab widget) or as a
6-
**Dock** (a floating/dockable panel).
4+
The **Tools** menu provides access to the SSH client, AI-powered development
5+
tools, and the built-in WYSIWYG architecture-diagram editor. Each tool can be
6+
opened either as a **Tab** (in the main tab widget) or as a **Dock** (a
7+
floating/dockable panel).
78

89
SSH
910
---
@@ -46,6 +47,66 @@ Skill Send GUI Tab / Dock
4647
Opens the Skill Prompt Sender interface for sending prompts to an LLM API
4748
and viewing responses. See :doc:`ai_tools` for full details.
4849

50+
Diagram Editor
51+
--------------
52+
53+
Diagram Editor Tab / Dock
54+
^^^^^^^^^^^^^^^^^^^^^^^^^
55+
56+
Opens the built-in WYSIWYG architecture-diagram editor. Use it to sketch
57+
flowcharts and architecture diagrams directly inside PyBreeze without
58+
switching to an external tool.
59+
60+
Drawing tools
61+
"""""""""""""
62+
63+
- **Select** -- pick, move, multi-select with rubber-band
64+
- **Rectangle / Rounded Rectangle / Ellipse / Diamond** -- node shapes
65+
- **Connection** -- connect two nodes with a labelled line
66+
- **Text** -- free-floating text annotation
67+
- **Image (file)** -- insert a local image file
68+
- **Image (URL)** -- download and insert an image from a URL (validated
69+
against private/loopback IP ranges and capped at 20 MB to prevent SSRF)
70+
71+
File operations
72+
"""""""""""""""
73+
74+
.. list-table::
75+
:header-rows: 1
76+
:widths: 25 75
77+
78+
* - Action
79+
- Description
80+
* - **New**
81+
- Discards the current diagram (with confirmation if non-empty).
82+
* - **Open**
83+
- Loads a previously saved ``.diagram.json`` file.
84+
* - **Save** / **Save As** (``Ctrl+S`` / ``Ctrl+Shift+S``)
85+
- Saves the diagram as ``.diagram.json``.
86+
* - **Import Mermaid**
87+
- Pastes Mermaid ``flowchart`` / ``graph`` source and converts it to
88+
editable nodes and edges.
89+
* - **Export PNG / SVG**
90+
- Renders the canvas to a raster (PNG) or vector (SVG) image.
91+
92+
Editing helpers
93+
"""""""""""""""
94+
95+
- **Undo / Redo** (``Ctrl+Z`` / ``Ctrl+Y``) -- full undo stack with named
96+
commands (Add, Move, Delete, Import, etc.)
97+
- **Copy / Paste / Duplicate / Select All** -- standard shortcuts plus
98+
``Ctrl+D`` to duplicate selected items
99+
- **Align** -- align selection by left, right, top, bottom, horizontal
100+
centre, or vertical centre
101+
- **Distribute** -- distribute three or more selected items evenly
102+
horizontally or vertically
103+
- **Grid** -- toggle background grid rendering
104+
- **Snap** -- snap node positions to grid while dragging
105+
- **Property Panel** (right side) -- edit text, colours, line width,
106+
shape, and connection style of the selected item
107+
- **Zoom** -- zoom in/out (``Ctrl+=`` / ``Ctrl+-``), reset to 100%
108+
(``Ctrl+0``), or fit-to-content
109+
49110
Tab vs. Dock
50111
------------
51112

docs/source/Eng/ui_overview.rst

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The menu bar includes these top-level menus (from left to right):
2525
- **UI Style** -- Theme switching
2626
- **Automation** -- All automation module menus (AutoControl, APITestka, WebRunner, etc.)
2727
- **Install** -- Install automation packages and build tools
28-
- **Tools** -- SSH client, AI tools
28+
- **Tools** -- SSH client, AI tools, diagram editor
2929
- **Plugins** -- Plugin browser and loaded plugins
3030
- **Run With** -- Run files with different compilers/interpreters
3131

@@ -37,7 +37,38 @@ directory. You can:
3737

3838
- Browse files and folders
3939
- Double-click to open files in the editor
40-
- Right-click for context menu options
40+
- Right-click any file or folder to access the context menu (see below)
41+
42+
File Tree Context Menu
43+
""""""""""""""""""""""
44+
45+
Right-clicking the file tree opens a context menu with the following actions:
46+
47+
.. list-table::
48+
:header-rows: 1
49+
:widths: 25 75
50+
51+
* - Action
52+
- Description
53+
* - **New File**
54+
- Prompts for a name and creates an empty file in the clicked directory
55+
(or the directory containing the clicked file).
56+
* - **New Folder**
57+
- Prompts for a name and creates a new directory.
58+
* - **Rename**
59+
- Renames the selected file or folder. If the file is currently open in
60+
an editor tab, the tab title and the editor's stored path are updated
61+
to match.
62+
* - **Delete**
63+
- Deletes the selected file or folder after a confirmation dialog. If
64+
the file is open in an editor tab, the tab is closed first.
65+
* - **Copy Path**
66+
- Copies the absolute path of the selected item to the clipboard.
67+
* - **Copy Relative Path**
68+
- Copies the path relative to the file tree's root directory.
69+
* - **Reveal in Explorer**
70+
- Opens the selected item's containing folder in the platform file
71+
manager (Explorer on Windows, Finder on macOS, ``xdg-open`` on Linux).
4172

4273
Code Editor (Tab Widget)
4374
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -82,6 +113,7 @@ arrange them freely around the main window:
82113
- CoT Prompt Editor Dock
83114
- Skill Prompt Editor Dock
84115
- Skill Send GUI Dock
116+
- Diagram Editor Dock
85117

86118
Dock widgets can be dragged, resized, and snapped to any edge of the main window.
87119

docs/source/Zh/menu_tools.rst

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Tools 選單
22
==========
33

4-
**Tools** 選單提供 SSH 用戶端和 AI 開發工具的存取
4+
**Tools** 選單提供 SSH 用戶端、AI 開發工具,以及內建的 WYSIWYG 架構圖編輯器
55
每個工具都可以作為 **分頁**(在主分頁元件中)或 **停靠面板**(浮動/可停靠面板)開啟。
66
77
SSH
@@ -44,6 +44,60 @@ Skill Send GUI Tab / Dock
4444
開啟技能提示詞傳送介面,用於將提示詞發送到 LLM API 並查看回應。
4545
詳細資訊請參閱 :doc:`ai_tools`。
4646

47+
架構圖編輯器
48+
------------
49+
50+
Diagram Editor Tab / Dock
51+
^^^^^^^^^^^^^^^^^^^^^^^^^
52+
53+
開啟內建的 WYSIWYG 架構圖編輯器,可直接在 PyBreeze 中繪製流程圖與架構圖,
54+
不需要切換到外部工具。
55+
56+
繪圖工具
57+
""""""""
58+
59+
- **選取(Select)** -- 點選、搬移、橡皮筋多選
60+
- **矩形 / 圓角矩形 / 橢圓 / 菱形** -- 節點形狀
61+
- **連線(Connection)** -- 將兩個節點以可加標籤的連線串接
62+
- **文字(Text)** -- 浮動文字註記
63+
- **圖片(檔案)** -- 插入本地圖片檔
64+
- **圖片(URL)** -- 從 URL 下載並插入圖片(會驗證
65+
目標 IP 不在 private/loopback 範圍,並限制 20 MB 上限以防止 SSRF)
66+
67+
檔案操作
68+
""""""""
69+
70+
.. list-table::
71+
:header-rows: 1
72+
:widths: 25 75
73+
74+
* - 操作
75+
- 說明
76+
* - **New**
77+
- 清除目前圖形(畫布非空時會跳出確認)。
78+
* - **Open**
79+
- 載入先前儲存的 ``.diagram.json`` 檔案。
80+
* - **Save / Save As** (``Ctrl+S`` / ``Ctrl+Shift+S``)
81+
- 將圖形儲存為 ``.diagram.json``。
82+
* - **Import Mermaid**
83+
- 貼上 Mermaid ``flowchart`` / ``graph`` 原始碼,轉換為可編輯的節點與邊。
84+
* - **Export PNG / SVG**
85+
- 將畫布輸出為點陣圖(PNG)或向量圖(SVG)。
86+
87+
編輯輔助
88+
""""""""
89+
90+
- **Undo / Redo** (``Ctrl+Z`` / ``Ctrl+Y``) -- 完整的 undo stack,含具名指令
91+
(新增、搬移、刪除、Import 等)
92+
- **Copy / Paste / Duplicate / Select All** -- 標準快捷鍵;``Ctrl+D`` 可複製選取項目
93+
- **對齊(Align)** -- 將選取項目以左、右、上、下、水平置中、垂直置中對齊
94+
- **分佈(Distribute)** -- 三個以上選取項目可水平或垂直平均分佈
95+
- **Grid** -- 切換背景格線
96+
- **Snap** -- 拖曳節點時對齊格線
97+
- **屬性面板(右側)** -- 編輯選取項目的文字、顏色、線寬、形狀、連線樣式
98+
- **Zoom** -- 放大/縮小 (``Ctrl+=`` / ``Ctrl+-``)、重設 100%
99+
(``Ctrl+0``)、Fit-to-content
100+
47101
分頁 vs. 停靠面板
48102
------------------
49103

0 commit comments

Comments
 (0)