@yemi33/minions 0.1.107 → 0.1.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dashboard/js/render-kb.js +4 -1
- package/dashboard/js/utils.js +27 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -162,7 +162,10 @@ async function kbOpenItem(category, file) {
|
|
|
162
162
|
const content = await fetch('/api/knowledge/' + category + '/' + encodeURIComponent(file)).then(r => r.text());
|
|
163
163
|
const display = content.replace(/^---[\s\S]*?---\n*/m, '');
|
|
164
164
|
document.getElementById('modal-title').textContent = file;
|
|
165
|
-
document.getElementById('modal-body')
|
|
165
|
+
const modalBody = document.getElementById('modal-body');
|
|
166
|
+
modalBody.innerHTML = '<div style="font-size:12px;line-height:1.6">' + renderMd(display) + '</div>';
|
|
167
|
+
modalBody.style.fontFamily = "'Segoe UI', system-ui, sans-serif";
|
|
168
|
+
modalBody.style.whiteSpace = 'normal';
|
|
166
169
|
_modalDocContext = { title: file, content: display, selection: '' };
|
|
167
170
|
_modalFilePath = 'knowledge/' + category + '/' + file; showModalQa();
|
|
168
171
|
// Clear notification badge when opening this document
|
package/dashboard/js/utils.js
CHANGED
|
@@ -114,6 +114,33 @@ function renderMd(s) {
|
|
|
114
114
|
continue;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
+
// Table: detect | col | col | rows, consume until non-table line
|
|
118
|
+
if (line.match(/^\|.+\|/)) {
|
|
119
|
+
closeList();
|
|
120
|
+
var tableRows = [];
|
|
121
|
+
var sepIdx = -1;
|
|
122
|
+
while (i < lines.length && lines[i].match(/^\|.+\|/)) {
|
|
123
|
+
var row = lines[i].replace(/^\|/, '').replace(/\|$/, '').split('|').map(function(c) { return c.trim(); });
|
|
124
|
+
if (lines[i].match(/^\|[\s:]*-{2,}[\s:]*\|/)) { sepIdx = tableRows.length; }
|
|
125
|
+
else { tableRows.push(row); }
|
|
126
|
+
i++;
|
|
127
|
+
}
|
|
128
|
+
i--; // back up one since the for loop will increment
|
|
129
|
+
var tableHtml = '<table class="pr-table" style="margin:4px 0;font-size:11px"><thead><tr>';
|
|
130
|
+
if (tableRows.length > 0) {
|
|
131
|
+
tableRows[0].forEach(function(c) { tableHtml += '<th>' + c + '</th>'; });
|
|
132
|
+
tableHtml += '</tr></thead><tbody>';
|
|
133
|
+
for (var ti = 1; ti < tableRows.length; ti++) {
|
|
134
|
+
tableHtml += '<tr>';
|
|
135
|
+
tableRows[ti].forEach(function(c) { tableHtml += '<td>' + c + '</td>'; });
|
|
136
|
+
tableHtml += '</tr>';
|
|
137
|
+
}
|
|
138
|
+
tableHtml += '</tbody></table>';
|
|
139
|
+
}
|
|
140
|
+
out.push(tableHtml);
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
|
|
117
144
|
// Checkbox list (must come before UL — both start with - )
|
|
118
145
|
var cbMatch = line.match(/^(\s*)[-*]\s\[([ xX])\]\s(.+)/);
|
|
119
146
|
if (cbMatch) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.109",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|