@elyracode/btw 0.9.55 → 0.9.57
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 +8 -0
- package/extensions/index.ts +10 -18
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.57] - 2026-11-10
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- `/btw :inject` and `/btw :summarize` crashed with `ctx.sendUserMessage is not a function`; now sent via `elyra.sendUserMessage` as a follow-up
|
|
8
|
+
|
|
9
|
+
## [0.9.56] - 2026-11-01
|
|
10
|
+
|
|
3
11
|
## [0.9.55] - 2026-10-21
|
|
4
12
|
|
|
5
13
|
## [0.9.54] - 2026-10-14
|
package/extensions/index.ts
CHANGED
|
@@ -35,9 +35,7 @@ export default function (elyra: ExtensionAPI): void {
|
|
|
35
35
|
ctx.ui.notify("BTW thread is empty", "info");
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
const formatted = thread
|
|
39
|
-
.map((e) => `[${e.role}] ${e.text}`)
|
|
40
|
-
.join("\n\n");
|
|
38
|
+
const formatted = thread.map((e) => `[${e.role}] ${e.text}`).join("\n\n");
|
|
41
39
|
ctx.ui.notify(`BTW thread (${thread.length} entries):\n\n${formatted}`, "info");
|
|
42
40
|
return;
|
|
43
41
|
}
|
|
@@ -48,13 +46,11 @@ export default function (elyra: ExtensionAPI): void {
|
|
|
48
46
|
return;
|
|
49
47
|
}
|
|
50
48
|
const extra = args.slice(":inject".length).trim();
|
|
51
|
-
const formatted = thread
|
|
52
|
-
.map((e) => `[${e.role}] ${e.text}`)
|
|
53
|
-
.join("\n\n");
|
|
49
|
+
const formatted = thread.map((e) => `[${e.role}] ${e.text}`).join("\n\n");
|
|
54
50
|
const message = extra
|
|
55
51
|
? `From a side conversation (BTW):\n\n${formatted}\n\nInstructions: ${extra}`
|
|
56
52
|
: `From a side conversation (BTW):\n\n${formatted}`;
|
|
57
|
-
|
|
53
|
+
elyra.sendUserMessage(message, { deliverAs: "followUp" });
|
|
58
54
|
thread.length = 0;
|
|
59
55
|
ctx.ui.notify("BTW thread injected into main session and cleared", "info");
|
|
60
56
|
return;
|
|
@@ -66,9 +62,7 @@ export default function (elyra: ExtensionAPI): void {
|
|
|
66
62
|
return;
|
|
67
63
|
}
|
|
68
64
|
const extra = args.slice(":summarize".length).trim();
|
|
69
|
-
const formatted = thread
|
|
70
|
-
.map((e) => `[${e.role}] ${e.text}`)
|
|
71
|
-
.join("\n\n");
|
|
65
|
+
const formatted = thread.map((e) => `[${e.role}] ${e.text}`).join("\n\n");
|
|
72
66
|
|
|
73
67
|
// Use elyra -p to summarize in isolation
|
|
74
68
|
ctx.ui.notify("Summarizing BTW thread...", "info");
|
|
@@ -80,7 +74,7 @@ export default function (elyra: ExtensionAPI): void {
|
|
|
80
74
|
});
|
|
81
75
|
|
|
82
76
|
const summary = result.stdout.trim() || "(summary failed)";
|
|
83
|
-
|
|
77
|
+
elyra.sendUserMessage(`Summary from a side conversation (BTW):\n\n${summary}`, { deliverAs: "followUp" });
|
|
84
78
|
thread.length = 0;
|
|
85
79
|
ctx.ui.notify("BTW summary injected and thread cleared", "info");
|
|
86
80
|
return;
|
|
@@ -90,10 +84,7 @@ export default function (elyra: ExtensionAPI): void {
|
|
|
90
84
|
const question = args.trim();
|
|
91
85
|
if (!question) {
|
|
92
86
|
if (thread.length === 0) {
|
|
93
|
-
ctx.ui.notify(
|
|
94
|
-
"Usage: /btw <question>\n\nSub-commands: :inject, :summarize, :clear, :thread",
|
|
95
|
-
"info",
|
|
96
|
-
);
|
|
87
|
+
ctx.ui.notify("Usage: /btw <question>\n\nSub-commands: :inject, :summarize, :clear, :thread", "info");
|
|
97
88
|
} else {
|
|
98
89
|
ctx.ui.notify(
|
|
99
90
|
`BTW thread has ${thread.length} entries.\n\nSub-commands: :inject, :summarize, :clear, :thread`,
|
|
@@ -104,9 +95,10 @@ export default function (elyra: ExtensionAPI): void {
|
|
|
104
95
|
}
|
|
105
96
|
|
|
106
97
|
// Build context from thread history for continuity
|
|
107
|
-
const historyContext =
|
|
108
|
-
|
|
109
|
-
|
|
98
|
+
const historyContext =
|
|
99
|
+
thread.length > 0
|
|
100
|
+
? `Previous side conversation:\n${thread.map((e) => `[${e.role}] ${e.text}`).join("\n")}\n\nNew question: ${question}`
|
|
101
|
+
: question;
|
|
110
102
|
|
|
111
103
|
// Add user entry
|
|
112
104
|
thread.push({ role: "user", text: question, timestamp: Date.now() });
|