@kodaris/krubble-app-components 1.0.78 → 1.0.79
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/chatbot.d.ts +8 -1
- package/dist/chatbot.d.ts.map +1 -1
- package/dist/chatbot.js +77 -11
- package/dist/chatbot.js.map +1 -1
- package/dist/krubble-app.bundled.js +77 -11
- package/dist/krubble-app.bundled.js.map +1 -1
- package/dist/krubble-app.bundled.min.js +25 -11
- package/dist/krubble-app.bundled.min.js.map +1 -1
- package/dist/krubble-app.umd.js +77 -11
- package/dist/krubble-app.umd.js.map +1 -1
- package/dist/krubble-app.umd.min.js +17 -3
- package/dist/krubble-app.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/krubble-app.umd.js
CHANGED
|
@@ -6169,11 +6169,16 @@
|
|
|
6169
6169
|
}
|
|
6170
6170
|
}
|
|
6171
6171
|
_handleKeyDown(e) {
|
|
6172
|
-
// When the skill menu is open, arrow keys / Enter / Escape drive it. The
|
|
6173
|
-
//
|
|
6174
|
-
// filtered skills
|
|
6172
|
+
// When the skill menu is open, arrow keys / Enter / Escape drive it. The top
|
|
6173
|
+
// actions (Attach Files, Browse All Skills, plus the two debug test triggers
|
|
6174
|
+
// when enabled) come first, then the filtered skills — all one navigable list.
|
|
6175
6175
|
if (this._skillMenuOpened) {
|
|
6176
|
-
const
|
|
6176
|
+
const debugActions = this.variant === 'inline' && this._aiFrameworkConfig.debugTelemetryEnabled === true;
|
|
6177
|
+
let actionCount = 2;
|
|
6178
|
+
if (debugActions) {
|
|
6179
|
+
actionCount = 4;
|
|
6180
|
+
}
|
|
6181
|
+
const count = actionCount + this._skillResults.length;
|
|
6177
6182
|
if (e.key === 'ArrowDown') {
|
|
6178
6183
|
e.preventDefault();
|
|
6179
6184
|
this._skillHighlighted = (this._skillHighlighted + 1) % count;
|
|
@@ -6200,8 +6205,13 @@
|
|
|
6200
6205
|
this._handleSubmit();
|
|
6201
6206
|
}
|
|
6202
6207
|
}
|
|
6203
|
-
/** Run the skill-menu item at the given flat index (
|
|
6208
|
+
/** Run the skill-menu item at the given flat index (actions first, then skills). */
|
|
6204
6209
|
_activateSkillMenuItem(index) {
|
|
6210
|
+
const debugActions = this.variant === 'inline' && this._aiFrameworkConfig.debugTelemetryEnabled === true;
|
|
6211
|
+
let actionCount = 2;
|
|
6212
|
+
if (debugActions) {
|
|
6213
|
+
actionCount = 4;
|
|
6214
|
+
}
|
|
6205
6215
|
if (index === 0) {
|
|
6206
6216
|
this._openFilePicker();
|
|
6207
6217
|
return;
|
|
@@ -6210,7 +6220,23 @@
|
|
|
6210
6220
|
this._handleSkillBrowseOpen();
|
|
6211
6221
|
return;
|
|
6212
6222
|
}
|
|
6213
|
-
|
|
6223
|
+
if (debugActions && index === 2) {
|
|
6224
|
+
this._skillMenuOpened = false;
|
|
6225
|
+
this._send({
|
|
6226
|
+
message: '/test-warning',
|
|
6227
|
+
internalFiles: [],
|
|
6228
|
+
});
|
|
6229
|
+
return;
|
|
6230
|
+
}
|
|
6231
|
+
if (debugActions && index === 3) {
|
|
6232
|
+
this._skillMenuOpened = false;
|
|
6233
|
+
this._send({
|
|
6234
|
+
message: '/test-limit',
|
|
6235
|
+
internalFiles: [],
|
|
6236
|
+
});
|
|
6237
|
+
return;
|
|
6238
|
+
}
|
|
6239
|
+
const skill = this._skillResults[index - actionCount];
|
|
6214
6240
|
if (skill) {
|
|
6215
6241
|
this._handleSkillSelect(skill);
|
|
6216
6242
|
}
|
|
@@ -6550,9 +6576,21 @@
|
|
|
6550
6576
|
if (submitEvent.defaultPrevented) {
|
|
6551
6577
|
return;
|
|
6552
6578
|
}
|
|
6579
|
+
this._send({
|
|
6580
|
+
message: messageText,
|
|
6581
|
+
internalFiles
|
|
6582
|
+
});
|
|
6583
|
+
}
|
|
6584
|
+
/**
|
|
6585
|
+
* Append the user message and stream the response. Split out of `_handleSubmit`
|
|
6586
|
+
* so debug test triggers can send a specific message without going through the
|
|
6587
|
+
* composer input. `_handleSubmit` owns reading/validating the composer and
|
|
6588
|
+
* firing the cancelable `message-submit` event; this owns the send + stream.
|
|
6589
|
+
*/
|
|
6590
|
+
_send(params) {
|
|
6553
6591
|
const userMessage = {
|
|
6554
6592
|
type: 'user',
|
|
6555
|
-
content:
|
|
6593
|
+
content: params.message,
|
|
6556
6594
|
};
|
|
6557
6595
|
this.messages = [...this.messages, userMessage];
|
|
6558
6596
|
this._inputValue = '';
|
|
@@ -6618,9 +6656,9 @@
|
|
|
6618
6656
|
};
|
|
6619
6657
|
}
|
|
6620
6658
|
this.send({
|
|
6621
|
-
message:
|
|
6659
|
+
message: params.message,
|
|
6622
6660
|
messages: this.messages.slice(0, -1),
|
|
6623
|
-
internalFiles,
|
|
6661
|
+
internalFiles: params.internalFiles,
|
|
6624
6662
|
}).then((response) => {
|
|
6625
6663
|
if (!response.ok) {
|
|
6626
6664
|
this._handleStreamError('Request failed: ' + response.status);
|
|
@@ -6841,6 +6879,14 @@
|
|
|
6841
6879
|
/** The `/` skill menu shown above the composer while typing a slash command. */
|
|
6842
6880
|
_renderSkillMenu() {
|
|
6843
6881
|
const skills = this._skillResults;
|
|
6882
|
+
// Debug test triggers are extra actions after Attach Files / Browse. The
|
|
6883
|
+
// flat keyboard index counts actions first, then skills, so the skills'
|
|
6884
|
+
// index offset is the number of actions shown.
|
|
6885
|
+
const debugActions = this.variant === 'inline' && this._aiFrameworkConfig.debugTelemetryEnabled === true;
|
|
6886
|
+
let actionCount = 2;
|
|
6887
|
+
if (debugActions) {
|
|
6888
|
+
actionCount = 4;
|
|
6889
|
+
}
|
|
6844
6890
|
return b `
|
|
6845
6891
|
<div class="skill-menu">
|
|
6846
6892
|
<div class="skill-menu__actions">
|
|
@@ -6862,6 +6908,26 @@
|
|
|
6862
6908
|
>
|
|
6863
6909
|
Browse All Skills
|
|
6864
6910
|
</button>
|
|
6911
|
+
${debugActions ? b `
|
|
6912
|
+
<button
|
|
6913
|
+
class=${e({
|
|
6914
|
+
'skill-menu__action': true,
|
|
6915
|
+
'skill-menu__item--highlighted': this._skillHighlighted === 2,
|
|
6916
|
+
})}
|
|
6917
|
+
@click=${() => this._activateSkillMenuItem(2)}
|
|
6918
|
+
>
|
|
6919
|
+
Test: context warning
|
|
6920
|
+
</button>
|
|
6921
|
+
<button
|
|
6922
|
+
class=${e({
|
|
6923
|
+
'skill-menu__action': true,
|
|
6924
|
+
'skill-menu__item--highlighted': this._skillHighlighted === 3,
|
|
6925
|
+
})}
|
|
6926
|
+
@click=${() => this._activateSkillMenuItem(3)}
|
|
6927
|
+
>
|
|
6928
|
+
Test: context limit
|
|
6929
|
+
</button>
|
|
6930
|
+
` : A}
|
|
6865
6931
|
</div>
|
|
6866
6932
|
${skills.length ? b `
|
|
6867
6933
|
<ul class="skill-menu__list">
|
|
@@ -6870,7 +6936,7 @@
|
|
|
6870
6936
|
<button
|
|
6871
6937
|
class=${e({
|
|
6872
6938
|
'skill-menu__item': true,
|
|
6873
|
-
'skill-menu__item--highlighted': index +
|
|
6939
|
+
'skill-menu__item--highlighted': index + actionCount === this._skillHighlighted,
|
|
6874
6940
|
})}
|
|
6875
6941
|
@click=${() => this._handleSkillSelect(skill)}
|
|
6876
6942
|
>
|
|
@@ -7182,7 +7248,7 @@
|
|
|
7182
7248
|
'panel--opened': this.opened,
|
|
7183
7249
|
'panel--resizing-debug': this._isDebugResizing,
|
|
7184
7250
|
})}
|
|
7185
|
-
style=${o(this._debugPanelOpen ? { paddingRight: `${this._debugDrawerWidth}px` } : {})}
|
|
7251
|
+
style=${o(isDebugEnabled && this._debugPanelOpen ? { paddingRight: `${this._debugDrawerWidth}px` } : {})}
|
|
7186
7252
|
@dragenter=${this._handleDragEnter}
|
|
7187
7253
|
@dragover=${this._handleDragOver}
|
|
7188
7254
|
@dragleave=${this._handleDragLeave}
|