aboutsummaryrefslogtreecommitdiff
path: root/skills/module-management.md
blob: d57f957aeb18dea4d1ddfe3912c0703e429f5ba8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
name: module-management
description: How to view, edit, test, reload modules and manage startup configuration
tags: [modules, editing, code, self-improvement]
category: dev
---
## Steps
1. **View module source:**
   - view_module(name) — fetches original source or reads from _mods/ if edited
   - Supports all loaded modules: SystemModule, FileSystemModule, SearXNGModule, etc.

2. **Edit a module:**
   - edit_module(name) — copies source to _mods/<name>.js and opens code editor
   - Editor shows the full source in a textarea
   - Click "Save & Test" to save and auto-load the edited version

3. **Test and reload:**
   - test_module(name) — loads edited module from _mods/ for live testing
   - reload_module(name) — discards edits and reloads from original URL
   - list_modified_modules — shows all modules with pending edits

4. **Check for updates:**
   - check_updates — HEAD-requests all loaded module URLs to verify reachability

5. **Manage startup:**
   - startup-modules — opens the Startup Modules UI to select which modules load
   - load-local <path> — load a module from VFS or URL without editing

6. **When to use:**
   - User reports a bug in a module → view_module, edit_module, test_module
   - User asks "can you add X feature?" → same workflow
   - Always save edits before testing. If test fails, the original module stays loaded.