@yemi33/minions 0.1.1754 → 0.1.1755
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 +5 -0
- package/dashboard/js/modal-qa.js +17 -7
- package/engine/copilot-models.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dashboard/js/modal-qa.js
CHANGED
|
@@ -30,13 +30,23 @@ const QA_QUEUE_CAP = 10; // max queued messages
|
|
|
30
30
|
const QA_STREAM_STALL_MS = 6 * 60 * 1000; // allow the full doc-chat timeout before treating heartbeat-only streams as stalled
|
|
31
31
|
let _qaSessionKey = ''; // key for current conversation (title or filePath)
|
|
32
32
|
|
|
33
|
+
// Insert html at the bottom of the thread but above any pending "Queued: ..."
|
|
34
|
+
// strips, so queued messages always remain visually below the active progress
|
|
35
|
+
// UX / answer / errors.
|
|
36
|
+
function _qaInsertBeforeQueued(container, html) {
|
|
37
|
+
if (!container) return;
|
|
38
|
+
const firstQueued = container.querySelector && container.querySelector('.qa-queued-item');
|
|
39
|
+
if (firstQueued) firstQueued.insertAdjacentHTML('beforebegin', html);
|
|
40
|
+
else container.insertAdjacentHTML('beforeend', html);
|
|
41
|
+
}
|
|
42
|
+
|
|
33
43
|
function _renderQaUserMessage(thread, message, selection) {
|
|
34
44
|
let qHtml = '<div class="modal-qa-q">' + escHtml(message);
|
|
35
45
|
if (selection) {
|
|
36
46
|
qHtml += '<span class="selection-ref">Re: "' + escHtml(selection.slice(0, 100)) + ((selection.length > 100) ? '...' : '') + '"</span>';
|
|
37
47
|
}
|
|
38
48
|
qHtml += '</div>';
|
|
39
|
-
thread
|
|
49
|
+
_qaInsertBeforeQueued(thread, qHtml);
|
|
40
50
|
thread.scrollTop = thread.scrollHeight;
|
|
41
51
|
_showThreadWrap();
|
|
42
52
|
}
|
|
@@ -442,7 +452,7 @@ async function _processQaMessage(message, selection, opts) {
|
|
|
442
452
|
const loadingId = 'chat-loading-' + Date.now();
|
|
443
453
|
const loadingHtml = _qaBuildLoadingHtml(loadingId, runtime.queue.length);
|
|
444
454
|
const startThreadHtml = _qaMutateThreadHtml(sessionKey, tmp => {
|
|
445
|
-
tmp
|
|
455
|
+
_qaInsertBeforeQueued(tmp, loadingHtml);
|
|
446
456
|
});
|
|
447
457
|
_qaPersistSession(sessionKey, {
|
|
448
458
|
threadHtml: startThreadHtml,
|
|
@@ -606,8 +616,8 @@ async function _processQaMessage(message, selection, opts) {
|
|
|
606
616
|
let updatedThreadHtml = _qaMutateThreadHtml(sessionKey, tmp => {
|
|
607
617
|
const loadingEl = tmp.querySelector('#' + loadingId);
|
|
608
618
|
if (loadingEl) loadingEl.remove();
|
|
609
|
-
tmp
|
|
610
|
-
if (rawErrorHtml) tmp
|
|
619
|
+
_qaInsertBeforeQueued(tmp, answerHtml);
|
|
620
|
+
if (rawErrorHtml) _qaInsertBeforeQueued(tmp, rawErrorHtml);
|
|
611
621
|
});
|
|
612
622
|
|
|
613
623
|
runtime.history.push({ role: 'user', text: message });
|
|
@@ -621,7 +631,7 @@ async function _processQaMessage(message, selection, opts) {
|
|
|
621
631
|
} else if (evt.actionParseError) {
|
|
622
632
|
const warning = '<div class="modal-qa-a" style="color:var(--red)">Actions block emitted but JSON could not be parsed — no actions were executed. Resend or rephrase. (' + escHtml(String(evt.actionParseError).slice(0, 200)) + ')</div>';
|
|
623
633
|
updatedThreadHtml = _qaMutateThreadHtml(sessionKey, tmp => {
|
|
624
|
-
tmp
|
|
634
|
+
_qaInsertBeforeQueued(tmp, warning);
|
|
625
635
|
});
|
|
626
636
|
}
|
|
627
637
|
|
|
@@ -698,7 +708,7 @@ async function _processQaMessage(message, selection, opts) {
|
|
|
698
708
|
const updatedThreadHtml = _qaMutateThreadHtml(sessionKey, tmp => {
|
|
699
709
|
const loadingEl = tmp.querySelector('#' + loadingId);
|
|
700
710
|
if (loadingEl) loadingEl.remove();
|
|
701
|
-
tmp
|
|
711
|
+
_qaInsertBeforeQueued(tmp, messageHtml);
|
|
702
712
|
});
|
|
703
713
|
_qaPersistSession(sessionKey, {
|
|
704
714
|
threadHtml: updatedThreadHtml,
|
|
@@ -733,7 +743,7 @@ async function _processQaMessage(message, selection, opts) {
|
|
|
733
743
|
const nextThreadHtml = _qaMutateThreadHtml(sessionKey, tmp => {
|
|
734
744
|
const queuedEl = tmp.querySelector('.qa-queued-item');
|
|
735
745
|
if (queuedEl) queuedEl.remove();
|
|
736
|
-
tmp
|
|
746
|
+
_qaInsertBeforeQueued(tmp, _qaBuildUserMessageHtml(next.message, next.selection));
|
|
737
747
|
});
|
|
738
748
|
_qaPersistSession(sessionKey, {
|
|
739
749
|
threadHtml: nextThreadHtml,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1755",
|
|
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"
|