Reporting & DocumentationChinese & English

Generate Work Log (AI)

This plugin uses a local, offline LLM (no Ollama / LM Studio or any external software) to turn Dragonfly's session log into a structured Markdown work log — a record of which files were loaded, which were saved/exported,

Updated 2026-07-26User manual

AI Work Log (Generate Work Log)(AI 工作日志生成器)

AI Work Log (Generate Work Log) - User Manual

Dragonfly Prototype Apps · Generate Work Log (AI)...

版本 Version 1.0 · 2026-07-26


第一部分 中文手册

目录

1. 简介

2. 功能特点

3. 本地 LLM 模型

4. 使用步骤

5. 会话快照(仅 Dragonfly 内)

6. 环境需求与提示

1. 简介

本插件用一个本地运行、离线、不依赖 Ollama / LM Studio 等外部软件的大语言模型(LLM),把 Dragonfly 的会话日志自动整理成一份结构化的 Markdown 工作日志——记录本次会话加载了哪些文件、保存/导出了哪些文件、做了哪些关键操作。全程在本机完成,日志内容不出本机。

生成分两步:第一步用确定性规则对日志做预过滤(从 Dragonfly 的 ActionLog 宏记录 + Application 应用日志里抽取关键事件,同时丢弃视图切换、相机平移/旋转、图例/可见性/LUT 等无关噪声);第二步把这份紧凑的关键事件清单交给本地 LLM,让它解读并生成含 概要 / 加载的文件 / 保存的文件 / 关键操作 / 错误告警 等小节的 Markdown。文件路径由正则逐字保留,模型只负责归纳与翻译,不会臆造事实。

为什么两步分离:先用规则把大而杂的日志压缩成小而准的事件清单,既能塞进模型上下文窗口,又能保证即便用小模型也能得到可靠的总结,且路径/文件名绝对精确。

2. 功能特点

  • 完全本地 / 离线:模型下载好之后无需联网,日志内容不上传到任何服务器;不依赖 Ollama、LM Studio 等任何外部程序。
  • 确定性预过滤:能识别 Dragonfly 的两种日志格式(ActionLog_*.py 宏记录 + Application_*.log 应用日志),精确抽取数据文件的加载/保存路径与真正的操作,自动丢弃视图/相机/图例等 UI 噪声。
  • 双语输出:顶部“Output language”可选中文(默认)或英文,决定生成的 Markdown 语言。
  • 可编辑预览:右侧预览框把生成结果渲染成富文本,保存前可手动修改。
  • 日志库管理:顶部“Log Library”设置并持久化保存路径,配合 New / Overwrite / Delete 三个按钮管理 .md 日志文件;推荐把路径指向一个 Obsidian 仓库,形成可搜索、可双链的工作日志库。
  • GPU 感知:自动检测显卡显存并推荐最合适的模型档位;可在“Acceleration”里选 CPU 或 NVIDIA CUDA(12.1 / 12.4 / 12.5)。
  • 会话快照(仅在 Dragonfly 内):可把当前会话的主界面截图、Multiple-Screenshots 面板里的图片、已发布对象列表并入日志,还能另存一份 .ORSSession 会话文件(详见后文)。

3. 本地 LLM 模型

插件用 llama-cpp-python 在自建 venv 里加载 Qwen3 GGUF 量化模型(均为 Apache-2.0 许可,Q4_K_M 量化)。共三档,可在“Model”下拉里切换;插件会根据检测到的显存自动推荐:

档位

模型

大小(约)

适用

light 轻量

Qwen3-4B

2.5 GB

弱机 / 仅 CPU;速度最快

default 默认

Qwen3-8B

5 GB

质量与速度平衡,推荐默认

best 最佳

Qwen3-32B

20 GB

高质量,需 24 GB+ 显存(或大内存 + 耐心)

模型下载保存位置可在“Model folder”里自选并持久化——默认在插件目录(C 盘),可改到其他盘(如 D:\)以节省 C 盘空间(仅影响新下载,已下载的模型继续可用)。

4. 使用步骤

在 Prototype Apps ▸ Reporting & Documentation ▸ Generate Work Log (AI)... 打开面板。左栏是全部设置与按钮,右栏是预览与运行日志。

1. 首次准备(一次性,需联网):点 1. Setup Environment 自建 venv 并安装 llama-cpp-python + huggingface_hub;再点 2. Download / Switch Model 下载所选 Qwen3 GGUF(约 2.5–20 GB)。也可先点 Detect GPU & Recommend 让插件按显存推荐档位。

2. 在顶部 Log Library 设置日志库保存文件夹(推荐指向 Obsidian 仓库)。

3. 在 Log Source 选择日志来源:Live current Dragonfly session(自动定位当前会话的 ActionLog + Application 日志)或 Pick log file(s) on disk…(手动选择磁盘上的日志文件)。

4. 在 Session Snapshot(仅在 Dragonfly 内可见)按需勾选要并入的会话快照(主界面截图 / Multiple-Screenshots 图片 / 已发布对象列表 / 保存 Session 文件)。

5. 在 Generate 里选 Output language(中文/英文),点 Generate work log;插件读取并过滤日志,再用本地 LLM 生成 Markdown,结果显示在右侧可编辑预览框。

6. 保存:点 New 新建一份日志(文件名自动带时间戳)、Overwrite 覆盖当前日志、或 Delete 删除当前日志。会话快照的截图会存入 <日志名>.assets 子文件夹并以相对链接嵌入。

5. 会话快照(仅 Dragonfly 内)

在 Dragonfly 内运行时,左栏会出现 Session Snapshot 区,可把当前会话的以下内容并入工作日志:

  • 主界面截图 —— 对 Dragonfly 主窗口截图。
  • Multiple-Screenshots 面板图片 —— 逐张导出 Dragonfly 自带截图面板里的全部图片。
  • 已发布对象列表 —— 逐字列出 Channel / ROI / MultiROI / Mesh 等的名称、类型与体素尺寸(确定性生成,模型不会改写)。
  • 保存 Session 文件 —— 勾选后在日志旁另存一份 .ORSSession 会话文件,便于日后重新打开完整场景。

截图会随日志保存到 <日志名>.assets 子文件夹并以相对链接嵌入,Obsidian 可直接内联显示。对象列表与截图库是在保存时确定性追加的,模型不会臆造对象名或图片链接。

6. 环境需求与提示

  • 首次需联网两次:一次装环境(Setup Environment),一次下模型(Download Model)。之后生成完全离线。
  • CPU 即可运行(一次性生成,CPU 也可接受);有 NVIDIA 显卡时可在 Acceleration 选 CUDA 加速更快。不强制需要独立显卡。
  • 日志只读:插件只读取 Dragonfly 自身写在 %LOCALAPPDATA%\comet\<版本>\logs 下的 ActionLog / Application 日志,不修改它们。
  • 若提示“No meaningful events found”:所选日志里没有可记录的关键事件(可能全是视图/相机等噪声),换一个有实际操作的会话或日志文件再试。
  • 该插件在完整包中默认关闭(default_enabled = false),需在 App Store / Menu Item Manager 里启用后重启 Dragonfly 才会出现在菜单里。


Part II English Manual

Contents

1. Introduction

2. Features

3. Local LLM model

4. How to use

5. Session snapshot (inside Dragonfly)

6. Requirements & tips

1. Introduction

This plugin uses a local, offline LLM (no Ollama / LM Studio or any external software) to turn Dragonfly's session log into a structured Markdown work log — a record of which files were loaded, which were saved/exported, and the key operations performed in the session. Everything runs on your machine and the log never leaves it.

Generation has two steps: (1) a deterministic pre-filter extracts the key events from Dragonfly's ActionLog (macro recorder) + Application log while dropping noise (view switches, camera pan/rotate, legend/visibility/LUT tweaks); (2) the compact event list is handed to the local LLM, which writes Markdown with Summary / Files Loaded / Files Saved / Key Operations / Errors sections. File paths are kept verbatim by regex — the model only organizes and translates, and never invents facts.

Why two steps: compressing a big, noisy log into a small, accurate event list first makes it fit the model's context window, keeps the summary reliable even with a small model, and guarantees paths/filenames are exact.

2. Features

  • Fully local / offline: once the model is downloaded no internet is needed; the log content is never uploaded, and there is no dependency on Ollama, LM Studio or any external app.
  • Deterministic pre-filter: understands both Dragonfly log formats (ActionLog_*.py macro recorder + Application_*.log), extracts data-file load/save paths and real operations exactly, and drops view/camera/legend UI noise.
  • Bilingual output: the top Output language selector chooses Chinese (default) or English for the generated Markdown.
  • Editable preview: the right-hand pane renders the result as rich text so you can edit it before saving.
  • Log-library management: the Log Library field sets a persisted save folder, with New / Overwrite / Delete buttons to manage the .md files; point it at an Obsidian vault for a searchable, back-linked work-log library.
  • GPU-aware: it detects your VRAM and recommends the right model tier; Acceleration lets you pick CPU or NVIDIA CUDA (12.1 / 12.4 / 12.5).
  • Session snapshot (inside Dragonfly only): fold the main-window screenshot, the Multiple-Screenshots panel images, and the list of published objects into the log, and optionally save a .ORSSession file (see below).

3. Local LLM model

Inference runs via llama-cpp-python loading a Qwen3 GGUF in the plugin's own venv (all Apache-2.0, Q4_K_M quantization). There are three tiers in the Model dropdown; the plugin recommends one from your detected VRAM:

Tier

Model

Size (approx.)

Best for

light

Qwen3-4B

2.5 GB

Weak machines / CPU-only; fastest

default

Qwen3-8B

5 GB

Balanced quality/speed; recommended default

best

Qwen3-32B

20 GB

Highest quality; needs a 24 GB+ GPU (or lots of RAM + patience)

The model download folder is user-selectable and persisted under Model folder — it defaults to the plugin folder (C: drive) but can point at another drive (e.g. D:\) to save C: space (affects new downloads only; an already-downloaded model keeps working).

4. How to use

Open the panel at Prototype Apps ▸ Reporting & Documentation ▸ Generate Work Log (AI)... The left column holds all settings and buttons; the right column is the preview + run log.

1. First-time setup (one-time, needs internet): click 1. Setup Environment to build the venv and install llama-cpp-python + huggingface_hub, then 2. Download / Switch Model to fetch the chosen Qwen3 GGUF (~2.5–20 GB). Optionally click Detect GPU & Recommend first to let the plugin pick a tier by VRAM.

2. Set the log-library save folder in Log Library at the top (point it at an Obsidian vault if you like).

3. In Log Source, choose Live current Dragonfly session (auto-locates the running session's ActionLog + Application log) or Pick log file(s) on disk… (hand-pick log files).

4. In Session Snapshot (visible only inside Dragonfly) tick what to fold in (main-window screenshot / Multiple-Screenshots images / published-objects list / save session file).

5. In Generate, pick the Output language (Chinese/English) and click Generate work log; the plugin reads and filters the logs, then the local LLM writes the Markdown into the editable preview on the right.

6. Save with New (a new timestamped file), Overwrite (the current log), or Delete (the current log). Snapshot screenshots are stored in a <logname>.assets sub-folder and embedded with relative links.

5. Session snapshot (inside Dragonfly)

When running inside Dragonfly, a Session Snapshot group appears in the left column. It can fold the following pieces of the current session into the work log:

  • Main-window screenshot — a screenshot of the Dragonfly main window.
  • Multiple-Screenshots panel images — every image sitting in Dragonfly's built-in screenshots panel, exported one by one.
  • Published-objects list — Channels / ROIs / MultiROIs / Meshes… listed verbatim with names, types and voxel dimensions (generated deterministically; not re-typed by the model).
  • Save session file — when ticked, writes a .ORSSession file beside the log so the exact scene can be reopened later.

Screenshots are saved into a <logname>.assets sub-folder next to the log and embedded with relative links (Obsidian renders them inline). The object list and screenshot gallery are appended deterministically at save time, so the model never fabricates object names or image links.

6. Requirements & tips

  • Internet is needed twice on first run: once to build the environment (Setup Environment) and once to download the model (Download Model). Generation afterwards is fully offline.
  • Runs on CPU (a one-shot summary is fine on CPU); on NVIDIA GPUs pick a CUDA option under Acceleration for more speed. No discrete GPU is required.
  • Read-only logs: the plugin only reads Dragonfly's own ActionLog / Application logs under %LOCALAPPDATA%\comet\<version>\logs; it never modifies them.
  • If you see 'No meaningful events found': the selected log had no log-worthy events (possibly all view/camera noise) — try a session or log file with real operations.
  • This plugin is disabled by default in the Full Package (default_enabled = false); enable it in the App Store / Menu Item Manager and restart Dragonfly for it to appear in the menu.
You’ve reached the end of this manual.Explore the library →