@nomad-e/bluma-cli 0.1.19 → 0.1.21
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/dist/main.js +32 -7
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -4077,13 +4077,25 @@ var SkillLoader = class _SkillLoader {
|
|
|
4077
4077
|
return { content: raw };
|
|
4078
4078
|
}
|
|
4079
4079
|
const frontmatter = {};
|
|
4080
|
+
let currentKey = "";
|
|
4081
|
+
let currentValue = "";
|
|
4080
4082
|
for (let i = 1; i < endIndex; i++) {
|
|
4081
4083
|
const line = lines[i];
|
|
4084
|
+
const isIndented = line.startsWith(" ") || line.startsWith(" ");
|
|
4085
|
+
if (isIndented && currentKey) {
|
|
4086
|
+
currentValue += " " + line.trim();
|
|
4087
|
+
frontmatter[currentKey] = currentValue;
|
|
4088
|
+
continue;
|
|
4089
|
+
}
|
|
4082
4090
|
const colonIndex = line.indexOf(":");
|
|
4083
4091
|
if (colonIndex > 0) {
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4092
|
+
currentKey = line.slice(0, colonIndex).trim();
|
|
4093
|
+
let value = line.slice(colonIndex + 1).trim();
|
|
4094
|
+
if (value === ">" || value === "|") {
|
|
4095
|
+
value = "";
|
|
4096
|
+
}
|
|
4097
|
+
currentValue = value;
|
|
4098
|
+
frontmatter[currentKey] = currentValue;
|
|
4087
4099
|
}
|
|
4088
4100
|
}
|
|
4089
4101
|
const content = lines.slice(endIndex + 1).join("\n");
|
|
@@ -5102,7 +5114,16 @@ var BluMaAgent = class {
|
|
|
5102
5114
|
skillLoader: this.skillLoader
|
|
5103
5115
|
});
|
|
5104
5116
|
if (this.history.length === 0) {
|
|
5117
|
+
const dirs = this.skillLoader.getSkillsDirs();
|
|
5118
|
+
this.eventBus.emit("backend_message", {
|
|
5119
|
+
type: "info",
|
|
5120
|
+
message: `Skills dirs \u2014 bundled: ${dirs.bundled} | project: ${dirs.project} | global: ${dirs.global}`
|
|
5121
|
+
});
|
|
5105
5122
|
const availableSkills = this.skillLoader.listAvailable();
|
|
5123
|
+
this.eventBus.emit("backend_message", {
|
|
5124
|
+
type: "info",
|
|
5125
|
+
message: `Skills loaded: ${availableSkills.length} \u2014 ${availableSkills.map((s) => `${s.name} (${s.source})`).join(", ") || "none"}`
|
|
5126
|
+
});
|
|
5106
5127
|
if (this.skillLoader.hasConflicts()) {
|
|
5107
5128
|
for (const warning of this.skillLoader.formatConflictWarnings()) {
|
|
5108
5129
|
this.eventBus.emit("backend_message", {
|
|
@@ -5355,11 +5376,10 @@ ${editData.error.display}`;
|
|
|
5355
5376
|
message2.tool_calls = toolCalls;
|
|
5356
5377
|
}
|
|
5357
5378
|
const normalizedMessage = ToolCallNormalizer.normalizeAssistantMessage(message2);
|
|
5358
|
-
if (
|
|
5359
|
-
const reasoningText = normalizedMessage.reasoning_content || normalizedMessage.reasoning;
|
|
5379
|
+
if (reasoningContent) {
|
|
5360
5380
|
this.eventBus.emit("backend_message", {
|
|
5361
5381
|
type: "reasoning",
|
|
5362
|
-
content:
|
|
5382
|
+
content: reasoningContent
|
|
5363
5383
|
});
|
|
5364
5384
|
}
|
|
5365
5385
|
this.history.push(normalizedMessage);
|
|
@@ -7754,7 +7774,9 @@ async function runAgentMode() {
|
|
|
7754
7774
|
lastAssistantMessage = payload.content;
|
|
7755
7775
|
}
|
|
7756
7776
|
if (payload?.type === "reasoning" && typeof payload.content === "string") {
|
|
7757
|
-
|
|
7777
|
+
if (!reasoningBuffer) {
|
|
7778
|
+
reasoningBuffer = payload.content;
|
|
7779
|
+
}
|
|
7758
7780
|
}
|
|
7759
7781
|
if (payload?.type === "tool_result" && payload.tool_name === "message") {
|
|
7760
7782
|
try {
|
|
@@ -7795,6 +7817,9 @@ async function runAgentMode() {
|
|
|
7795
7817
|
payload
|
|
7796
7818
|
});
|
|
7797
7819
|
});
|
|
7820
|
+
eventBus.on("stream_reasoning_chunk", (payload) => {
|
|
7821
|
+
reasoningBuffer = (reasoningBuffer || "") + (payload?.delta || "");
|
|
7822
|
+
});
|
|
7798
7823
|
writeJsonl({
|
|
7799
7824
|
event_type: "log",
|
|
7800
7825
|
level: "info",
|