diff options
Diffstat (limited to 'main.html')
| -rw-r--r-- | main.html | 60 |
1 files changed, 44 insertions, 16 deletions
@@ -1112,30 +1112,56 @@ <!-- Skills Manager Modal --> <div id="skills-manager" class="modal-overlay"> - <div class="modal-content" style="max-width: 700px; max-height: 85vh;"> + <div class="modal-content" style="max-width: 750px; max-height: 90vh;"> <div class="modal-header"> <span>📚 Skills Manager</span> <span style="cursor:pointer" onclick="webx11.closeSkillsManager()">✕</span> </div> - <div class="modal-body" style="display:flex; flex-direction:column; gap:10px;"> - <div style="flex-shrink:0;"> - <h4 style="color: var(--info-color); margin-bottom: 8px;">Installed Skills</h4> - <div id="skills-list" style="max-height:200px;overflow-y:auto;"></div> + <div class="modal-body" style="display:flex; flex-direction:column; gap:8px;"> + <!-- Stats header --> + <div id="skills-stats" style="display:flex; gap:12px; flex-wrap:wrap; font-size:0.85em; color:var(--text-muted); padding-bottom:6px; border-bottom:1px solid var(--border-color);"></div> + <!-- Search + action bar --> + <div style="display:flex; gap:6px; align-items:center; flex-shrink:0;"> + <input type="text" id="skills-search-input" class="module-url-input" placeholder="🔍 Search skills..." style="flex:1;" oninput="webx11.refreshSkillsList()"> + <button class="btn" onclick="webx11.exportAllSkillsUI()" style="padding:4px 10px; font-size:0.8em">📤 Export All</button> + <button class="btn" onclick="document.getElementById('skills-import-input').click()" style="padding:4px 10px; font-size:0.8em">📥 Import</button> + <input type="file" id="skills-import-input" accept=".json" style="display:none" onchange="webx11.importSkillsUI(event)"> + <button class="btn" onclick="webx11.syncSkillsToWebdavUI()" style="padding:4px 10px; font-size:0.8em">☁️ Sync</button> </div> - <div id="skill-preview" style="display:none; flex-shrink:0; background:var(--bg-tertiary); border:1px solid var(--border-color); border-radius:4px; padding:10px; max-height:250px; overflow-y:auto; white-space:pre-wrap; font-family:var(--font-primary); font-size:0.85em; color:var(--text-color);"> + <!-- Skills list with category groups --> + <div id="skills-list" style="max-height:300px;overflow-y:auto; flex-shrink:0;"></div> + <!-- Preview (collapsible) --> + <div id="skill-preview" style="display:none; flex-shrink:0; background:var(--bg-tertiary); border:1px solid var(--border-color); border-radius:4px; padding:10px; overflow-y:auto; white-space:pre-wrap; font-family:var(--font-primary); font-size:0.85em; color:var(--text-color);"> <div style="display:flex; justify-content:space-between; margin-bottom:6px;"> <span id="skill-preview-title" style="color:var(--success-color); font-weight:bold;"></span> - <span style="cursor:pointer; color:var(--text-muted); font-size:1.2em;" onclick="webx11.closeSkillPreview()">✕</span> + <div style="display:flex; gap:6px;"> + <button class="btn" id="skill-preview-expand-btn" onclick="webx11.toggleSkillPreviewSize()" style="padding:2px 6px; font-size:0.75em">⛶ Expand</button> + <span style="cursor:pointer; color:var(--text-muted); font-size:1.2em;" onclick="webx11.closeSkillPreview()">✕</span> + </div> </div> <div id="skill-preview-content"></div> </div> - <div style="flex-shrink:0;"> - <h4 style="color: var(--info-color); margin-bottom: 8px;">Create New Skill</h4> - <input type="text" id="skill-name-input" class="module-url-input" placeholder="Skill name (e.g. web-scrape-and-summarize)"> - <input type="text" id="skill-desc-input" class="module-url-input" style="margin-top:6px" placeholder="One-line description"> - <input type="text" id="skill-tags-input" class="module-url-input" style="margin-top:6px" placeholder="Tags (comma-separated, e.g. web,research)"> - <textarea id="skill-content-input" class="module-url-input" style="margin-top:6px; height:100px; resize:vertical; font-family:var(--font-primary)" placeholder="Markdown skill content (optional — will use template)"></textarea> - <button class="btn" onclick="webx11.createSkillFromUI()" style="width:100%; margin-top:6px; border-color:var(--success-color);color:var(--success-color)">Create Skill</button> + <!-- Create form --> + <div style="flex-shrink:0; border-top:1px solid var(--border-color); padding-top:8px;"> + <h4 style="color: var(--info-color); margin-bottom: 6px;">Create New Skill</h4> + <div style="display:flex; gap:6px; flex-wrap:wrap;"> + <input type="text" id="skill-name-input" class="module-url-input" placeholder="Name (kebab-case)" style="flex:2; min-width:140px;"> + <input type="text" id="skill-desc-input" class="module-url-input" placeholder="Description" style="flex:3; min-width:180px;"> + <select id="skill-category-input" class="module-url-input" style="flex:1; min-width:100px;"> + <option value="general">general</option> + <option value="system">system</option> + <option value="research">research</option> + <option value="dev">dev</option> + <option value="productivity">productivity</option> + <option value="ui">ui</option> + <option value="security">security</option> + </select> + </div> + <div style="display:flex; gap:6px; margin-top:6px;"> + <input type="text" id="skill-tags-input" class="module-url-input" placeholder="Tags (comma-separated)" style="flex:1;"> + <button class="btn" onclick="webx11.createSkillFromUI()" style="border-color:var(--success-color);color:var(--success-color); flex-shrink:0;">Create</button> + </div> + <textarea id="skill-content-input" class="module-url-input" style="margin-top:6px; height:80px; resize:vertical; font-family:var(--font-primary)" placeholder="Markdown content (optional — will use template)"></textarea> </div> </div> <div class="modal-footer"> @@ -1278,7 +1304,7 @@ if (body && !body.children.length) { var mods = [ ['Foundation (always loaded)', ['virtual-fs.js','module-manager.js','ollama-manager.js','terminal.js'], true], - ['Built-in modules', ['module-system.js','module-fs.js','module-ollama.js','module-my.js','module-searxng.js','module-servermon.js','module-ollamamodels.js','module-config.js','module-simplegui.js','module-io.js','module-dynamicprompts.js','module-aiassist.js','module-aiasm.js','module-smartctx.js','module-duckduckgo.js','module-fetcher.js','module-skills.js','module-chatstudio.js'], false], + ['Built-in modules', ['module-system.js','module-fs.js','module-ollama.js','module-my.js','module-searxng.js','module-servermon.js','module-ollamamodels.js','module-config.js','module-simplegui.js','module-io.js','module-dynamicprompts.js','module-aiassist.js','module-aiasm.js','module-smartctx.js','module-duckduckgo.js','module-fetcher.js','module-chatstudio.js'], false], ['Extensions', ['calc.js','voice.js','cron.js','theme.js','wpm.js','mindmap.js','webdav.js','skill-pack-core.js','editor.js','diff.js','alias.js','finder.js','filemgr.js','cryptogzip.js','tutorial.js','shell.js','busybox.js','floating.js','console.js'], false] ]; var isSel = function(name) { return true; }; // default: all selected @@ -1317,11 +1343,13 @@ <!-- v4.5.63: A2A scratchpad fixes + agent-register arg fix --> <script src="modules/core/core-bundle.js?v=2026-06-18-v4.5.79"></script> -<script src="modules/ext/critical-ext-bundle.js?v=2026-06-18-v4.5.79"></script> <!-- Async dependency-ordered module loader now only initializes terminal and loads optional ext modules --> <script src="modules/core/module-loader.js?v=2026-06-18-v4.5.79"></script> + <!-- Critical ext bundle loads AFTER webx11 exists so registerModule calls work --> +<script src="modules/ext/critical-ext-bundle.js?v=2026-06-18-v4.5.79"></script> + <script> // ═══ ONE TRUE VERSION SOURCE ═══ // Reads from module-loader.js src attribute (single source of truth) |