@kodaris/krubble-app-components 1.0.155 → 1.0.157
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 +40 -7
- package/dist/chatbot.d.ts.map +1 -1
- package/dist/chatbot.js +417 -45
- package/dist/chatbot.js.map +1 -1
- package/dist/krubble-app.bundled.js +417 -45
- package/dist/krubble-app.bundled.js.map +1 -1
- package/dist/krubble-app.bundled.min.js +304 -37
- package/dist/krubble-app.bundled.min.js.map +1 -1
- package/dist/krubble-app.umd.js +417 -45
- package/dist/krubble-app.umd.js.map +1 -1
- package/dist/krubble-app.umd.min.js +304 -37
- package/dist/krubble-app.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/chatbot.js
CHANGED
|
@@ -451,6 +451,18 @@ export class KRChatbot extends LitElement {
|
|
|
451
451
|
this._copiedIndex = -1;
|
|
452
452
|
/** Whether the "Browse all skills" dialog is open. */
|
|
453
453
|
this._skillBrowseOpened = false;
|
|
454
|
+
/**
|
|
455
|
+
* The skill whose detail view is showing inside the browse dialog, else null.
|
|
456
|
+
* While set, the browse dialog shows that skill's summary, author, price, roles
|
|
457
|
+
* and actions in place of the search field and tabs.
|
|
458
|
+
*/
|
|
459
|
+
this._skillBrowseDetail = null;
|
|
460
|
+
/**
|
|
461
|
+
* The billable global skill awaiting the user's install confirmation, else null.
|
|
462
|
+
* Set when Install is clicked on a billable skill; the confirm dialog renders
|
|
463
|
+
* while it is set and the request only fires once the user confirms.
|
|
464
|
+
*/
|
|
465
|
+
this._skillInstallConfirm = null;
|
|
454
466
|
/**
|
|
455
467
|
* Active tab in the browse dialog. `org` shows `_orgSkills` (this instance's
|
|
456
468
|
* skills); `kodaris` shows `_globalSkills` (the shared global catalog).
|
|
@@ -1449,9 +1461,11 @@ export class KRChatbot extends LitElement {
|
|
|
1449
1461
|
* Enable or disable a global skill on this instance via
|
|
1450
1462
|
* `/aiskills/global/{code}/enabled`, then reflect the server's result on the
|
|
1451
1463
|
* matching card. Ignores clicks while a request for the same code is pending.
|
|
1464
|
+
* Installing a billable skill opens a confirmation instead; see
|
|
1465
|
+
* `_handleSkillInstallConfirm` for the request that runs once the user accepts.
|
|
1452
1466
|
*/
|
|
1453
1467
|
_handleGlobalSkillEnable(skill, e) {
|
|
1454
|
-
// The card body
|
|
1468
|
+
// The card body opens the detail view; the install button must not also do that.
|
|
1455
1469
|
e.stopPropagation();
|
|
1456
1470
|
// The button is shown to everyone so the catalog reads the same for all users,
|
|
1457
1471
|
// but the enable endpoint requires administrator/superuser/skillEdit. Without
|
|
@@ -1467,6 +1481,12 @@ export class KRChatbot extends LitElement {
|
|
|
1467
1481
|
if (this._globalSkillPending.has(skill.code)) {
|
|
1468
1482
|
return;
|
|
1469
1483
|
}
|
|
1484
|
+
// Installing a billable skill charges the account, so confirm before sending.
|
|
1485
|
+
// Uninstalling is never billed and free installs are one click to undo.
|
|
1486
|
+
if (!skill.enabled && skill.billable) {
|
|
1487
|
+
this._skillInstallConfirm = skill;
|
|
1488
|
+
return;
|
|
1489
|
+
}
|
|
1470
1490
|
// Drive the clicked button's own spinner (KRButton disables itself while
|
|
1471
1491
|
// loading, so a second click can't fire until the request settles).
|
|
1472
1492
|
const btn = e.currentTarget;
|
|
@@ -1484,6 +1504,20 @@ export class KRChatbot extends LitElement {
|
|
|
1484
1504
|
skill.enabled = res?.data?.enabled;
|
|
1485
1505
|
btn?.reset();
|
|
1486
1506
|
this.requestUpdate();
|
|
1507
|
+
if (skill.enabled) {
|
|
1508
|
+
KRSnackbar.show({
|
|
1509
|
+
title: 'Skill Installed',
|
|
1510
|
+
message: `${skill.name} is now available to use.`,
|
|
1511
|
+
type: 'success',
|
|
1512
|
+
});
|
|
1513
|
+
}
|
|
1514
|
+
else {
|
|
1515
|
+
KRSnackbar.show({
|
|
1516
|
+
title: 'Skill Uninstalled',
|
|
1517
|
+
message: `${skill.name} is no longer available to use.`,
|
|
1518
|
+
type: 'success',
|
|
1519
|
+
});
|
|
1520
|
+
}
|
|
1487
1521
|
})
|
|
1488
1522
|
.catch((error) => {
|
|
1489
1523
|
console.error('kr-chatbot: global skill enable failed', error);
|
|
@@ -1493,6 +1527,52 @@ export class KRChatbot extends LitElement {
|
|
|
1493
1527
|
this._globalSkillPending.delete(skill.code);
|
|
1494
1528
|
});
|
|
1495
1529
|
}
|
|
1530
|
+
/** Cancel the billable install confirmation without sending anything. */
|
|
1531
|
+
_handleSkillInstallCancel() {
|
|
1532
|
+
this._skillInstallConfirm = null;
|
|
1533
|
+
}
|
|
1534
|
+
/**
|
|
1535
|
+
* The user accepted the charge: run the install with the dialog's own Install
|
|
1536
|
+
* button spinning, and close the dialog once the server confirms. On failure
|
|
1537
|
+
* the button shows the error and the dialog stays open so they can retry or cancel.
|
|
1538
|
+
*/
|
|
1539
|
+
_handleSkillInstallConfirm(e) {
|
|
1540
|
+
if (!this._skillInstallConfirm) {
|
|
1541
|
+
return;
|
|
1542
|
+
}
|
|
1543
|
+
if (this._globalSkillPending.has(this._skillInstallConfirm.code)) {
|
|
1544
|
+
return;
|
|
1545
|
+
}
|
|
1546
|
+
const skill = this._skillInstallConfirm;
|
|
1547
|
+
const btn = e.currentTarget;
|
|
1548
|
+
this._globalSkillPending.add(skill.code);
|
|
1549
|
+
btn?.showLoading();
|
|
1550
|
+
KRHttp.fetch({
|
|
1551
|
+
url: `/api/system/opensearch/aiskills/global/${encodeURIComponent(skill.code)}/enabled`,
|
|
1552
|
+
method: 'POST',
|
|
1553
|
+
body: { enabled: true },
|
|
1554
|
+
})
|
|
1555
|
+
.then((r) => r.json())
|
|
1556
|
+
.then((res) => {
|
|
1557
|
+
// Reflect the server's returned flag on the card and close the confirmation.
|
|
1558
|
+
skill.enabled = res?.data?.enabled;
|
|
1559
|
+
btn?.reset();
|
|
1560
|
+
this._skillInstallConfirm = null;
|
|
1561
|
+
this.requestUpdate();
|
|
1562
|
+
KRSnackbar.show({
|
|
1563
|
+
title: 'Skill Installed',
|
|
1564
|
+
message: `${skill.name} is now available to use.`,
|
|
1565
|
+
type: 'success',
|
|
1566
|
+
});
|
|
1567
|
+
})
|
|
1568
|
+
.catch((error) => {
|
|
1569
|
+
console.error('kr-chatbot: global skill install failed', error);
|
|
1570
|
+
btn?.showError('Error');
|
|
1571
|
+
})
|
|
1572
|
+
.finally(() => {
|
|
1573
|
+
this._globalSkillPending.delete(skill.code);
|
|
1574
|
+
});
|
|
1575
|
+
}
|
|
1496
1576
|
/** The `+` button toggles the skill/attachment menu open (showing all skills). */
|
|
1497
1577
|
_handlePlusClick() {
|
|
1498
1578
|
if (this._skillMenuOpened) {
|
|
@@ -1648,11 +1728,11 @@ export class KRChatbot extends LitElement {
|
|
|
1648
1728
|
this._skillBrowseOpened = false;
|
|
1649
1729
|
this._inputEl?.focus();
|
|
1650
1730
|
}
|
|
1651
|
-
/**
|
|
1731
|
+
/** Open a skill card via keyboard (Enter/Space), since it's a div role=button. */
|
|
1652
1732
|
_handleSkillCardKeydown(e, skill) {
|
|
1653
1733
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
1654
1734
|
e.preventDefault();
|
|
1655
|
-
this.
|
|
1735
|
+
this._handleSkillCardOpen(skill);
|
|
1656
1736
|
}
|
|
1657
1737
|
}
|
|
1658
1738
|
/**
|
|
@@ -1690,6 +1770,29 @@ export class KRChatbot extends LitElement {
|
|
|
1690
1770
|
}
|
|
1691
1771
|
_handleSkillBrowseClose() {
|
|
1692
1772
|
this._skillBrowseOpened = false;
|
|
1773
|
+
this._skillBrowseDetail = null;
|
|
1774
|
+
}
|
|
1775
|
+
/** Open a skill's detail view inside the browse dialog. */
|
|
1776
|
+
_handleSkillCardOpen(skill) {
|
|
1777
|
+
this._skillBrowseDetail = skill;
|
|
1778
|
+
}
|
|
1779
|
+
/** Return from the detail view to the grid, keeping the tab and search text. */
|
|
1780
|
+
_handleSkillDetailBack() {
|
|
1781
|
+
this._skillBrowseDetail = null;
|
|
1782
|
+
}
|
|
1783
|
+
/** Try It on the detail view: insert the open skill into the composer. */
|
|
1784
|
+
_handleSkillDetailTry() {
|
|
1785
|
+
if (!this._skillBrowseDetail) {
|
|
1786
|
+
return;
|
|
1787
|
+
}
|
|
1788
|
+
this._handleSkillSelect(this._skillBrowseDetail);
|
|
1789
|
+
}
|
|
1790
|
+
/** Install/Uninstall on the detail view for the open global skill. */
|
|
1791
|
+
_handleSkillDetailEnable(e) {
|
|
1792
|
+
if (!this._skillBrowseDetail) {
|
|
1793
|
+
return;
|
|
1794
|
+
}
|
|
1795
|
+
this._handleGlobalSkillEnable(this._skillBrowseDetail, e);
|
|
1693
1796
|
}
|
|
1694
1797
|
_handleSkillBrowseSearch(e) {
|
|
1695
1798
|
this._skillBrowseQuery = e.target.value;
|
|
@@ -3189,8 +3292,8 @@ export class KRChatbot extends LitElement {
|
|
|
3189
3292
|
@click=${() => this._handleSkillSelect(skill)}
|
|
3190
3293
|
>
|
|
3191
3294
|
<span class="skill-menu__name">${skill.name}</span>
|
|
3192
|
-
${skill.
|
|
3193
|
-
<span class="skill-menu__desc">${skill.
|
|
3295
|
+
${skill.summary ? html `
|
|
3296
|
+
<span class="skill-menu__desc">${skill.summary}</span>
|
|
3194
3297
|
` : nothing}
|
|
3195
3298
|
</button>
|
|
3196
3299
|
</li>
|
|
@@ -3212,43 +3315,134 @@ export class KRChatbot extends LitElement {
|
|
|
3212
3315
|
return html `
|
|
3213
3316
|
<kr-dialog
|
|
3214
3317
|
opened
|
|
3215
|
-
label="Browse Skills"
|
|
3216
3318
|
width="720px"
|
|
3217
3319
|
@close=${this._handleSkillBrowseClose}
|
|
3218
3320
|
>
|
|
3321
|
+
<kr-dialog-header>
|
|
3322
|
+
<div class="skill-browse__header">
|
|
3323
|
+
${this._skillBrowseDetail ? html `
|
|
3324
|
+
<button
|
|
3325
|
+
type="button"
|
|
3326
|
+
class="skill-browse__back"
|
|
3327
|
+
aria-label="Back"
|
|
3328
|
+
@click=${this._handleSkillDetailBack}
|
|
3329
|
+
>
|
|
3330
|
+
<svg
|
|
3331
|
+
width="22"
|
|
3332
|
+
height="22"
|
|
3333
|
+
viewBox="0 0 24 24"
|
|
3334
|
+
fill="none"
|
|
3335
|
+
stroke="currentColor"
|
|
3336
|
+
stroke-width="2"
|
|
3337
|
+
stroke-linecap="round"
|
|
3338
|
+
stroke-linejoin="round"
|
|
3339
|
+
>
|
|
3340
|
+
<path d="M19 12H5M12 19l-7-7 7-7"/>
|
|
3341
|
+
</svg>
|
|
3342
|
+
</button>
|
|
3343
|
+
` : html `
|
|
3344
|
+
<h2>Browse Skills</h2>
|
|
3345
|
+
`}
|
|
3346
|
+
<button
|
|
3347
|
+
type="button"
|
|
3348
|
+
class="skill-browse__close"
|
|
3349
|
+
aria-label="Close"
|
|
3350
|
+
@click=${this._handleSkillBrowseClose}
|
|
3351
|
+
>
|
|
3352
|
+
<svg
|
|
3353
|
+
viewBox="0 0 24 24"
|
|
3354
|
+
fill="none"
|
|
3355
|
+
stroke="currentColor"
|
|
3356
|
+
stroke-width="1.5"
|
|
3357
|
+
stroke-linecap="round"
|
|
3358
|
+
stroke-linejoin="round"
|
|
3359
|
+
>
|
|
3360
|
+
<path d="M6 18 18 6M6 6l12 12"/>
|
|
3361
|
+
</svg>
|
|
3362
|
+
</button>
|
|
3363
|
+
</div>
|
|
3364
|
+
</kr-dialog-header>
|
|
3219
3365
|
<div class="skill-browse">
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3366
|
+
${this._skillBrowseDetail ? html `
|
|
3367
|
+
<div class="skill-detail">
|
|
3368
|
+
<div class="skill-detail__body">
|
|
3369
|
+
<div class="skill-detail__section">
|
|
3370
|
+
<span class="skill-detail__title">${this._skillBrowseDetail.name}</span>
|
|
3371
|
+
${this._skillBrowseDetail.summary ? html `
|
|
3372
|
+
<p class="skill-detail__summary">${this._skillBrowseDetail.summary}</p>
|
|
3373
|
+
` : nothing}
|
|
3374
|
+
</div>
|
|
3375
|
+
<div class="skill-detail__row">
|
|
3376
|
+
<span class="skill-detail__label">Author</span>
|
|
3377
|
+
<span class="skill-detail__value">${this._skillBrowseDetail.global ? 'Kodaris' : 'Your organization'}</span>
|
|
3378
|
+
</div>
|
|
3379
|
+
${this._skillBrowseDetail.global ? html `
|
|
3380
|
+
<div class="skill-detail__row">
|
|
3381
|
+
<span class="skill-detail__label">Price</span>
|
|
3382
|
+
<span class="skill-detail__value">${this._skillBrowseDetail.priceLabel}</span>
|
|
3383
|
+
</div>
|
|
3384
|
+
` : nothing}
|
|
3385
|
+
${this._skillBrowseDetail.allowedRoles?.length ? html `
|
|
3386
|
+
<div class="skill-detail__row">
|
|
3387
|
+
<span class="skill-detail__label">Roles</span>
|
|
3388
|
+
<div class="skill-detail__chips">
|
|
3389
|
+
${this._skillBrowseDetail.allowedRoles.map((role) => html `
|
|
3390
|
+
<span class="skill-detail__chip">${role}</span>
|
|
3391
|
+
`)}
|
|
3392
|
+
</div>
|
|
3393
|
+
</div>
|
|
3394
|
+
` : nothing}
|
|
3395
|
+
</div>
|
|
3396
|
+
<div class="skill-detail__footer">
|
|
3397
|
+
${this._skillBrowseDetail.canRun !== false && (!this._skillBrowseDetail.global || this._skillBrowseDetail.enabled) ? html `
|
|
3398
|
+
<kr-button
|
|
3399
|
+
variant="flat"
|
|
3400
|
+
color="primary"
|
|
3401
|
+
@click=${this._handleSkillDetailTry}
|
|
3402
|
+
>Try It</kr-button>
|
|
3403
|
+
` : nothing}
|
|
3404
|
+
${this._skillBrowseDetail.global ? html `
|
|
3405
|
+
<kr-button
|
|
3406
|
+
variant=${this._skillBrowseDetail.enabled ? 'outline' : 'flat'}
|
|
3407
|
+
color=${this._skillBrowseDetail.enabled ? 'secondary' : 'primary'}
|
|
3408
|
+
@click=${this._handleSkillDetailEnable}
|
|
3409
|
+
>${this._skillBrowseDetail.enabled ? 'Uninstall' : 'Install'}</kr-button>
|
|
3410
|
+
` : nothing}
|
|
3411
|
+
</div>
|
|
3412
|
+
</div>
|
|
3413
|
+
` : html `
|
|
3414
|
+
<kr-text-field
|
|
3415
|
+
placeholder="Search skills..."
|
|
3416
|
+
.value=${this._skillBrowseQuery}
|
|
3417
|
+
@input=${this._handleSkillBrowseSearch}
|
|
3418
|
+
></kr-text-field>
|
|
3419
|
+
<kr-tab-group
|
|
3420
|
+
active-tab-id=${this._skillBrowseSource}
|
|
3421
|
+
@tab-change=${this._handleSkillBrowseTabChange}
|
|
3422
|
+
>
|
|
3423
|
+
<kr-tab id="org" label="Your Org">
|
|
3424
|
+
${this._renderSkillGrid()}
|
|
3235
3425
|
</kr-tab>
|
|
3236
|
-
|
|
3237
|
-
|
|
3426
|
+
${this._aiFrameworkConfig.registryServer === true ? nothing : html `
|
|
3427
|
+
<kr-tab id="kodaris" label="Kodaris">
|
|
3428
|
+
${this._renderSkillGrid(true)}
|
|
3429
|
+
</kr-tab>
|
|
3430
|
+
`}
|
|
3431
|
+
</kr-tab-group>
|
|
3432
|
+
`}
|
|
3238
3433
|
</div>
|
|
3239
3434
|
</kr-dialog>
|
|
3240
3435
|
`;
|
|
3241
3436
|
}
|
|
3242
3437
|
/**
|
|
3243
3438
|
* The card grid of skill search results for the browse dialog. Clicking a card
|
|
3244
|
-
*
|
|
3245
|
-
* card also gets a footer row with an
|
|
3439
|
+
* opens its detail view inside `_renderSkillBrowse`, which is where Try It lives.
|
|
3440
|
+
* In the shared-Kodaris (`global`) tab each card also gets a footer row with an
|
|
3441
|
+
* Install/Uninstall button as a shortcut.
|
|
3246
3442
|
*
|
|
3247
3443
|
* The Kodaris tab is the whole published catalog, deliberately NOT role-filtered so
|
|
3248
|
-
* users can discover skills they don't have yet.
|
|
3249
|
-
*
|
|
3250
|
-
* installed here (not `enabled`). Neither looks clickable; clicking either explains
|
|
3251
|
-
* why via `_handleSkillSelect`.
|
|
3444
|
+
* users can discover skills they don't have yet. Every card is clickable; the detail
|
|
3445
|
+
* view lists the roles and shows Install when the skill isn't installed here.
|
|
3252
3446
|
*/
|
|
3253
3447
|
_renderSkillGrid(global = false) {
|
|
3254
3448
|
let skills = this._orgSkills;
|
|
@@ -3262,18 +3456,15 @@ export class KRChatbot extends LitElement {
|
|
|
3262
3456
|
<div class="skill-browse__grid">
|
|
3263
3457
|
${skills.map((skill) => html `
|
|
3264
3458
|
<div
|
|
3265
|
-
class
|
|
3266
|
-
'skill-card': true,
|
|
3267
|
-
'skill-card--unavailable': skill.canRun === false || (!!skill.global && !skill.enabled),
|
|
3268
|
-
})}
|
|
3459
|
+
class="skill-card"
|
|
3269
3460
|
role="button"
|
|
3270
3461
|
tabindex="0"
|
|
3271
|
-
@click=${() => this.
|
|
3462
|
+
@click=${() => this._handleSkillCardOpen(skill)}
|
|
3272
3463
|
@keydown=${(e) => this._handleSkillCardKeydown(e, skill)}
|
|
3273
3464
|
>
|
|
3274
3465
|
<span class="skill-card__name">${skill.name}</span>
|
|
3275
|
-
${skill.
|
|
3276
|
-
<span class="skill-card__desc">${skill.
|
|
3466
|
+
${skill.summary ? html `
|
|
3467
|
+
<span class="skill-card__desc">${skill.summary}</span>
|
|
3277
3468
|
` : nothing}
|
|
3278
3469
|
${!global && skill.global ? html `
|
|
3279
3470
|
<span class="skill-card__badge">Global</span>
|
|
@@ -4545,6 +4736,32 @@ export class KRChatbot extends LitElement {
|
|
|
4545
4736
|
</div>
|
|
4546
4737
|
</div>
|
|
4547
4738
|
${this._skillBrowseOpened ? this._renderSkillBrowse() : nothing}
|
|
4739
|
+
${this._skillInstallConfirm ? html `
|
|
4740
|
+
<kr-dialog
|
|
4741
|
+
opened
|
|
4742
|
+
label="Install Paid Skill"
|
|
4743
|
+
width="480px"
|
|
4744
|
+
@close=${this._handleSkillInstallCancel}
|
|
4745
|
+
>
|
|
4746
|
+
<kr-dialog-content>
|
|
4747
|
+
<div class="skill-install-confirm">
|
|
4748
|
+
<p>
|
|
4749
|
+
<strong>${this._skillInstallConfirm.name}</strong> is a paid skill. Installing it will
|
|
4750
|
+
charge your account <strong>${this._skillInstallConfirm.priceLabel}</strong>.
|
|
4751
|
+
</p>
|
|
4752
|
+
<p>Please confirm you would like to proceed.</p>
|
|
4753
|
+
</div>
|
|
4754
|
+
</kr-dialog-content>
|
|
4755
|
+
<kr-dialog-footer>
|
|
4756
|
+
<kr-button color="secondary" @click=${this._handleSkillInstallCancel}>Cancel</kr-button>
|
|
4757
|
+
<kr-button
|
|
4758
|
+
variant="flat"
|
|
4759
|
+
color="primary"
|
|
4760
|
+
@click=${this._handleSkillInstallConfirm}
|
|
4761
|
+
>Install</kr-button>
|
|
4762
|
+
</kr-dialog-footer>
|
|
4763
|
+
</kr-dialog>
|
|
4764
|
+
` : nothing}
|
|
4548
4765
|
${this._renderDrawer()}
|
|
4549
4766
|
</div>
|
|
4550
4767
|
`;
|
|
@@ -6292,6 +6509,70 @@ KRChatbot.styles = css `
|
|
|
6292
6509
|
height: 70vh;
|
|
6293
6510
|
}
|
|
6294
6511
|
|
|
6512
|
+
/* Slotted replacement for the dialog's built-in header so the detail view can
|
|
6513
|
+
put its back control where the title normally sits. Mirrors kr-dialog's
|
|
6514
|
+
own header: title left, close on the right. */
|
|
6515
|
+
.skill-browse__header {
|
|
6516
|
+
display: flex;
|
|
6517
|
+
flex: 1;
|
|
6518
|
+
align-items: center;
|
|
6519
|
+
justify-content: space-between;
|
|
6520
|
+
gap: 16px;
|
|
6521
|
+
}
|
|
6522
|
+
|
|
6523
|
+
.skill-browse__header h2 {
|
|
6524
|
+
margin: 0;
|
|
6525
|
+
font-size: 18px;
|
|
6526
|
+
font-weight: 600;
|
|
6527
|
+
}
|
|
6528
|
+
|
|
6529
|
+
.skill-browse__back {
|
|
6530
|
+
display: flex;
|
|
6531
|
+
align-items: center;
|
|
6532
|
+
justify-content: center;
|
|
6533
|
+
width: 36px;
|
|
6534
|
+
height: 36px;
|
|
6535
|
+
margin-left: -8px;
|
|
6536
|
+
padding: 0;
|
|
6537
|
+
border: none;
|
|
6538
|
+
border-radius: 6px;
|
|
6539
|
+
background: none;
|
|
6540
|
+
color: #000000;
|
|
6541
|
+
cursor: pointer;
|
|
6542
|
+
transition: background-color 0.15s;
|
|
6543
|
+
}
|
|
6544
|
+
|
|
6545
|
+
.skill-browse__back:hover {
|
|
6546
|
+
background: rgba(0, 0, 0, 0.06);
|
|
6547
|
+
}
|
|
6548
|
+
|
|
6549
|
+
.skill-browse__close {
|
|
6550
|
+
flex-shrink: 0;
|
|
6551
|
+
display: flex;
|
|
6552
|
+
align-items: center;
|
|
6553
|
+
justify-content: center;
|
|
6554
|
+
width: 36px;
|
|
6555
|
+
height: 36px;
|
|
6556
|
+
margin-right: -8px;
|
|
6557
|
+
padding: 0;
|
|
6558
|
+
background: none;
|
|
6559
|
+
border: none;
|
|
6560
|
+
border-radius: 6px;
|
|
6561
|
+
color: #000000;
|
|
6562
|
+
cursor: pointer;
|
|
6563
|
+
transition: background-color 0.15s, color 0.15s;
|
|
6564
|
+
}
|
|
6565
|
+
|
|
6566
|
+
.skill-browse__close:hover {
|
|
6567
|
+
background: rgba(0, 0, 0, 0.06);
|
|
6568
|
+
color: #000000;
|
|
6569
|
+
}
|
|
6570
|
+
|
|
6571
|
+
.skill-browse__close svg {
|
|
6572
|
+
width: 22px;
|
|
6573
|
+
height: 22px;
|
|
6574
|
+
}
|
|
6575
|
+
|
|
6295
6576
|
.skill-browse kr-text-field {
|
|
6296
6577
|
display: block;
|
|
6297
6578
|
margin: 20px 20px 16px;
|
|
@@ -6340,15 +6621,6 @@ KRChatbot.styles = css `
|
|
|
6340
6621
|
/* A Kodaris-tab card the user can't invoke — not in their roles, or not installed
|
|
6341
6622
|
here yet. Clicking it does nothing, so it drops the pointer cursor and the hover
|
|
6342
6623
|
highlight. The Install button inside keeps its own pointer cursor. */
|
|
6343
|
-
.skill-card--unavailable {
|
|
6344
|
-
cursor: default;
|
|
6345
|
-
}
|
|
6346
|
-
|
|
6347
|
-
.skill-card--unavailable:hover {
|
|
6348
|
-
border-color: #e5e7eb;
|
|
6349
|
-
box-shadow: none;
|
|
6350
|
-
}
|
|
6351
|
-
|
|
6352
6624
|
/* Marks a globally-published skill listed on the Your Org tab — only happens on
|
|
6353
6625
|
kodaris.com, which has no Kodaris tab for its own published skills. */
|
|
6354
6626
|
.skill-card__badge {
|
|
@@ -6384,6 +6656,18 @@ KRChatbot.styles = css `
|
|
|
6384
6656
|
color: #000000;
|
|
6385
6657
|
}
|
|
6386
6658
|
|
|
6659
|
+
.skill-install-confirm {
|
|
6660
|
+
display: flex;
|
|
6661
|
+
flex-direction: column;
|
|
6662
|
+
gap: 12px;
|
|
6663
|
+
font-size: 14px;
|
|
6664
|
+
line-height: 1.5;
|
|
6665
|
+
}
|
|
6666
|
+
|
|
6667
|
+
.skill-install-confirm p {
|
|
6668
|
+
margin: 0;
|
|
6669
|
+
}
|
|
6670
|
+
|
|
6387
6671
|
.skill-card__name {
|
|
6388
6672
|
font-weight: 600;
|
|
6389
6673
|
}
|
|
@@ -6399,6 +6683,88 @@ KRChatbot.styles = css `
|
|
|
6399
6683
|
overflow: hidden;
|
|
6400
6684
|
}
|
|
6401
6685
|
|
|
6686
|
+
.skill-detail {
|
|
6687
|
+
display: flex;
|
|
6688
|
+
flex-direction: column;
|
|
6689
|
+
flex: 1;
|
|
6690
|
+
min-height: 0;
|
|
6691
|
+
}
|
|
6692
|
+
|
|
6693
|
+
.skill-detail__body {
|
|
6694
|
+
display: flex;
|
|
6695
|
+
flex-direction: column;
|
|
6696
|
+
flex: 1;
|
|
6697
|
+
min-height: 0;
|
|
6698
|
+
gap: 18px;
|
|
6699
|
+
padding: 24px;
|
|
6700
|
+
overflow-y: auto;
|
|
6701
|
+
}
|
|
6702
|
+
|
|
6703
|
+
/* Pinned to the bottom of the fixed-height dialog, mirroring kr-dialog-footer
|
|
6704
|
+
but left-aligned. */
|
|
6705
|
+
.skill-detail__footer {
|
|
6706
|
+
display: flex;
|
|
6707
|
+
justify-content: flex-start;
|
|
6708
|
+
flex-shrink: 0;
|
|
6709
|
+
gap: 8px;
|
|
6710
|
+
padding: 16px 24px;
|
|
6711
|
+
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
|
6712
|
+
}
|
|
6713
|
+
|
|
6714
|
+
.skill-detail__section {
|
|
6715
|
+
display: flex;
|
|
6716
|
+
flex-direction: column;
|
|
6717
|
+
gap: 6px;
|
|
6718
|
+
}
|
|
6719
|
+
|
|
6720
|
+
.skill-detail__row {
|
|
6721
|
+
display: flex;
|
|
6722
|
+
align-items: baseline;
|
|
6723
|
+
gap: 8px;
|
|
6724
|
+
}
|
|
6725
|
+
|
|
6726
|
+
/* Fixed label width so the Author and Price values start in the same column. */
|
|
6727
|
+
.skill-detail__row .skill-detail__label {
|
|
6728
|
+
flex-shrink: 0;
|
|
6729
|
+
width: 60px;
|
|
6730
|
+
}
|
|
6731
|
+
|
|
6732
|
+
.skill-detail__title {
|
|
6733
|
+
font-size: 16px;
|
|
6734
|
+
font-weight: 600;
|
|
6735
|
+
color: #000000;
|
|
6736
|
+
}
|
|
6737
|
+
|
|
6738
|
+
.skill-detail__label {
|
|
6739
|
+
font-size: 14px;
|
|
6740
|
+
font-weight: 600;
|
|
6741
|
+
color: #000000;
|
|
6742
|
+
}
|
|
6743
|
+
|
|
6744
|
+
.skill-detail__summary {
|
|
6745
|
+
margin: 0;
|
|
6746
|
+
color: #000000;
|
|
6747
|
+
white-space: pre-wrap;
|
|
6748
|
+
}
|
|
6749
|
+
|
|
6750
|
+
.skill-detail__value {
|
|
6751
|
+
color: #000000;
|
|
6752
|
+
}
|
|
6753
|
+
|
|
6754
|
+
.skill-detail__chips {
|
|
6755
|
+
display: flex;
|
|
6756
|
+
flex-wrap: wrap;
|
|
6757
|
+
gap: 6px;
|
|
6758
|
+
}
|
|
6759
|
+
|
|
6760
|
+
.skill-detail__chip {
|
|
6761
|
+
padding: 2px 8px;
|
|
6762
|
+
border-radius: 6px;
|
|
6763
|
+
background: #f3f4f6;
|
|
6764
|
+
font-size: 12px;
|
|
6765
|
+
color: #000000;
|
|
6766
|
+
}
|
|
6767
|
+
|
|
6402
6768
|
.skill-browse__empty {
|
|
6403
6769
|
height: 100%;
|
|
6404
6770
|
padding: 32px;
|
|
@@ -6696,6 +7062,12 @@ __decorate([
|
|
|
6696
7062
|
__decorate([
|
|
6697
7063
|
state()
|
|
6698
7064
|
], KRChatbot.prototype, "_skillBrowseOpened", void 0);
|
|
7065
|
+
__decorate([
|
|
7066
|
+
state()
|
|
7067
|
+
], KRChatbot.prototype, "_skillBrowseDetail", void 0);
|
|
7068
|
+
__decorate([
|
|
7069
|
+
state()
|
|
7070
|
+
], KRChatbot.prototype, "_skillInstallConfirm", void 0);
|
|
6699
7071
|
__decorate([
|
|
6700
7072
|
state()
|
|
6701
7073
|
], KRChatbot.prototype, "_skillBrowseSource", void 0);
|