@yemi33/minions 0.1.1848 → 0.1.1850
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 +14 -34
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dashboard.js
CHANGED
|
@@ -1693,32 +1693,11 @@ function _buildSyntheticActionResultsForTurn(turnId, message, requestedAt) {
|
|
|
1693
1693
|
if (entry.id) result.id = entry.id;
|
|
1694
1694
|
if (entry.project) result.project = entry.project;
|
|
1695
1695
|
if (entry.path) result.path = entry.path;
|
|
1696
|
-
if (entry.kind === 'document-saved') result.documentSaved = true;
|
|
1697
1696
|
results.push(result);
|
|
1698
1697
|
}
|
|
1699
1698
|
return { actions, results };
|
|
1700
1699
|
}
|
|
1701
1700
|
|
|
1702
|
-
// mtime+size snapshot used by doc-chat to detect whether CC's Edit/Write
|
|
1703
|
-
// tool calls actually changed the target file during a turn. Null sentinel
|
|
1704
|
-
// distinguishes "file present" from "file absent" so deletions don't fire
|
|
1705
|
-
// a "Document saved" chip.
|
|
1706
|
-
function _snapshotDocFile(fullPath) {
|
|
1707
|
-
if (!fullPath) return null;
|
|
1708
|
-
try {
|
|
1709
|
-
const st = fs.statSync(fullPath);
|
|
1710
|
-
return { mtimeMs: st.mtimeMs, size: st.size };
|
|
1711
|
-
} catch { return null; }
|
|
1712
|
-
}
|
|
1713
|
-
|
|
1714
|
-
function _docFileChanged(before, fullPath) {
|
|
1715
|
-
if (!fullPath) return false;
|
|
1716
|
-
const after = _snapshotDocFile(fullPath);
|
|
1717
|
-
if (!after) return false;
|
|
1718
|
-
if (!before) return true;
|
|
1719
|
-
return before.mtimeMs !== after.mtimeMs || before.size !== after.size;
|
|
1720
|
-
}
|
|
1721
|
-
|
|
1722
1701
|
function _ccTurnEntryToActionType(kind) {
|
|
1723
1702
|
switch (kind) {
|
|
1724
1703
|
case 'work-item': return 'dispatch';
|
|
@@ -1730,7 +1709,6 @@ function _ccTurnEntryToActionType(kind) {
|
|
|
1730
1709
|
case 'pipeline-run': return 'trigger-pipeline';
|
|
1731
1710
|
case 'watch': return 'create-watch';
|
|
1732
1711
|
case 'meeting': return 'create-meeting';
|
|
1733
|
-
case 'document-saved': return 'document-saved';
|
|
1734
1712
|
default: return kind;
|
|
1735
1713
|
}
|
|
1736
1714
|
}
|
|
@@ -2571,6 +2549,18 @@ function _inferDocChatProject(filePath) {
|
|
|
2571
2549
|
return inferred?.name || null;
|
|
2572
2550
|
}
|
|
2573
2551
|
|
|
2552
|
+
function markdownFenceFor(content) {
|
|
2553
|
+
const runs = String(content || '').match(/`+/g) || [];
|
|
2554
|
+
const maxRun = runs.reduce((max, run) => Math.max(max, run.length), 0);
|
|
2555
|
+
return '`'.repeat(Math.max(4, maxRun + 1));
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
function fencedUntrustedBlock(label, content) {
|
|
2559
|
+
const value = String(content || '');
|
|
2560
|
+
const fence = markdownFenceFor(value);
|
|
2561
|
+
return `### ${label}\n${fence}text\n${value}\n${fence}`;
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2574
2564
|
function _formatDocChatContext({ document, title, filePath, selection, canEdit, isJson, docUnchanged }) {
|
|
2575
2565
|
const safeTitle = title || 'Document';
|
|
2576
2566
|
const location = filePath ? ` (\`${String(filePath).replace(/[\r\n]/g, ' ')}\`)` : '';
|
|
@@ -5026,11 +5016,10 @@ What would you like to discuss or change? When you're happy, say "approve" and I
|
|
|
5026
5016
|
|
|
5027
5017
|
// Per-turn correlation: render the doc-chat sysprompt with a fresh
|
|
5028
5018
|
// {{cc_turn_id}} so any /api/* calls CC makes during the turn surface
|
|
5029
|
-
// as chips
|
|
5030
|
-
//
|
|
5019
|
+
// as chips. Document saves are conveyed via the green-border "✓ Document
|
|
5020
|
+
// saved." suffix in modal-qa.js (driven by `evt.edited`), not a chip.
|
|
5031
5021
|
const ccTurnId = 'cct-' + shared.uid();
|
|
5032
5022
|
const turnSystemPrompt = renderDocChatSystemPromptForTurn(ccTurnId);
|
|
5033
|
-
const docFileBefore = _snapshotDocFile(fullPath);
|
|
5034
5023
|
|
|
5035
5024
|
let { answer, partial, warning, toolUses, error: ccError } = await ccDocCall({
|
|
5036
5025
|
message: body.message, document: currentContent, title: body.title,
|
|
@@ -5045,11 +5034,6 @@ What would you like to discuss or change? When you're happy, say "approve" and I
|
|
|
5045
5034
|
filePath: body.filePath, fullPath, isJson, canEdit,
|
|
5046
5035
|
originalContent: currentContent, delimiterContent: null,
|
|
5047
5036
|
});
|
|
5048
|
-
// Record a document-saved entry under this turn ID if the file mtime/size
|
|
5049
|
-
// changed during the call — surfaces as a "Document saved" chip.
|
|
5050
|
-
if (canEdit && _docFileChanged(docFileBefore, fullPath)) {
|
|
5051
|
-
_recordCcTurnCreation(ccTurnId, { kind: 'document-saved', path: body.filePath });
|
|
5052
|
-
}
|
|
5053
5037
|
const _synthetic = _buildSyntheticActionResultsForTurn(ccTurnId, body.message, new Date().toISOString());
|
|
5054
5038
|
const payload = _buildDocChatResponsePayload({
|
|
5055
5039
|
answer,
|
|
@@ -5136,7 +5120,6 @@ What would you like to discuss or change? When you're happy, say "approve" and I
|
|
|
5136
5120
|
// Per-turn correlation: see handleDocChat for the matching pattern.
|
|
5137
5121
|
const ccTurnId = 'cct-' + shared.uid();
|
|
5138
5122
|
const turnSystemPrompt = renderDocChatSystemPromptForTurn(ccTurnId);
|
|
5139
|
-
const docFileBefore = _snapshotDocFile(fullPath);
|
|
5140
5123
|
|
|
5141
5124
|
let { answer, partial, warning, toolUses, error: ccError } = await ccDocCallStreaming({
|
|
5142
5125
|
message: body.message, document: currentContent, title: body.title,
|
|
@@ -5154,9 +5137,6 @@ What would you like to discuss or change? When you're happy, say "approve" and I
|
|
|
5154
5137
|
filePath: body.filePath, fullPath, isJson, canEdit,
|
|
5155
5138
|
originalContent: currentContent, delimiterContent: null,
|
|
5156
5139
|
});
|
|
5157
|
-
if (canEdit && _docFileChanged(docFileBefore, fullPath)) {
|
|
5158
|
-
_recordCcTurnCreation(ccTurnId, { kind: 'document-saved', path: body.filePath });
|
|
5159
|
-
}
|
|
5160
5140
|
const _streamSynthetic = _buildSyntheticActionResultsForTurn(ccTurnId, body.message, new Date().toISOString());
|
|
5161
5141
|
const payload = _buildDocChatResponsePayload({
|
|
5162
5142
|
answer,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1850",
|
|
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"
|