@kodaris/krubble-app-components 1.0.102 → 1.0.104

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.
@@ -6048,6 +6048,10 @@ let KRChatbot = class KRChatbot extends i$3 {
6048
6048
  stop() {
6049
6049
  this._handleStop();
6050
6050
  }
6051
+ /** Whether a turn is in flight — true from send until the stream ends. */
6052
+ isStreaming() {
6053
+ return this._isStreaming;
6054
+ }
6051
6055
  /** Open the chat panel. */
6052
6056
  open() {
6053
6057
  if (!this.opened) {
@@ -7318,122 +7322,6 @@ let KRChatbot = class KRChatbot extends i$3 {
7318
7322
  }
7319
7323
  }
7320
7324
  // --- Render ---
7321
- /**
7322
- * The composer's controls: attach, the textarea, the mic, and send/stop.
7323
- *
7324
- * While dictating, only the mic swaps — to a stop button — so the textarea
7325
- * stays visible with the transcript streaming into it and send stays reachable.
7326
- */
7327
- _renderComposerControls() {
7328
- return b `
7329
- <button
7330
- class="input-plus"
7331
- @click=${this._handlePlusClick}
7332
- >+</button>
7333
- <textarea
7334
- class="input"
7335
- .value=${this._inputValue}
7336
- placeholder=${this.placeholder}
7337
- rows="1"
7338
- @input=${this._handleInputChange}
7339
- @keydown=${this._handleKeyDown}
7340
- @paste=${this._handlePaste}
7341
- ></textarea>
7342
- ${window.SpeechRecognition || window.webkitSpeechRecognition ? b `
7343
- ${this._isDictating ? b `
7344
- <button
7345
- class="mic-stop"
7346
- title="Stop dictation"
7347
- aria-label="Stop dictation"
7348
- @click=${this._handleMicClick}
7349
- >
7350
- <svg
7351
- xmlns="http://www.w3.org/2000/svg"
7352
- fill="currentColor"
7353
- viewBox="0 0 24 24"
7354
- class="mic-stop-icon"
7355
- aria-hidden="true"
7356
- >
7357
- <rect
7358
- x="6"
7359
- y="6"
7360
- width="12"
7361
- height="12"
7362
- rx="2"
7363
- />
7364
- </svg>
7365
- </button>
7366
- ` : b `
7367
- <button
7368
- class="mic"
7369
- title="Dictate a message"
7370
- aria-label="Dictate a message"
7371
- @click=${this._handleMicClick}
7372
- >
7373
- <svg
7374
- xmlns="http://www.w3.org/2000/svg"
7375
- viewBox="0 0 24 24"
7376
- fill="none"
7377
- stroke="currentColor"
7378
- stroke-width="1.75"
7379
- stroke-linecap="round"
7380
- stroke-linejoin="round"
7381
- class="mic-icon"
7382
- aria-hidden="true"
7383
- >
7384
- <path d="M12 15a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3Z"/>
7385
- <path d="M19 11a7 7 0 0 1-14 0"/>
7386
- <path d="M12 18v3"/>
7387
- </svg>
7388
- </button>
7389
- `}
7390
- ` : A}
7391
- ${this._isStreaming ? b `
7392
- <button
7393
- class="stop"
7394
- @click=${this._handleStop}
7395
- title="Stop generating"
7396
- >
7397
- <svg
7398
- xmlns="http://www.w3.org/2000/svg"
7399
- fill="currentColor"
7400
- viewBox="0 0 24 24"
7401
- class="stop-icon"
7402
- >
7403
- <rect
7404
- x="6"
7405
- y="6"
7406
- width="12"
7407
- height="12"
7408
- rx="2"
7409
- />
7410
- </svg>
7411
- </button>
7412
- ` : b `
7413
- <button
7414
- class=${e({
7415
- 'send': true,
7416
- 'send--disabled': !this._inputValue.trim() && !this._pendingConversationFiles.length,
7417
- })}
7418
- @click=${this._handleSubmit}
7419
- title="Send message"
7420
- >
7421
- <svg
7422
- width="16"
7423
- height="16"
7424
- viewBox="0 0 24 24"
7425
- fill="none"
7426
- stroke="currentColor"
7427
- stroke-width="2.5"
7428
- stroke-linecap="round"
7429
- class="send-icon"
7430
- >
7431
- <path d="M12 19V5M5 12l7-7 7 7"/>
7432
- </svg>
7433
- </button>
7434
- `}
7435
- `;
7436
- }
7437
7325
  /** The `/` skill menu shown above the composer while typing a slash command. */
7438
7326
  _renderSkillMenu() {
7439
7327
  const skills = this._invocableSkills;
@@ -8140,7 +8028,112 @@ let KRChatbot = class KRChatbot extends i$3 {
8140
8028
  />
8141
8029
  ${this._skillMenuOpened ? this._renderSkillMenu() : A}
8142
8030
  <div class="input-wrapper">
8143
- ${this._renderComposerControls()}
8031
+ <button
8032
+ class="input-plus"
8033
+ @click=${this._handlePlusClick}
8034
+ >+</button>
8035
+ <textarea
8036
+ class="input"
8037
+ .value=${this._inputValue}
8038
+ placeholder=${this.placeholder}
8039
+ rows="1"
8040
+ @input=${this._handleInputChange}
8041
+ @keydown=${this._handleKeyDown}
8042
+ @paste=${this._handlePaste}
8043
+ ></textarea>
8044
+ ${window.SpeechRecognition || window.webkitSpeechRecognition ? b `
8045
+ ${this._isDictating ? b `
8046
+ <button
8047
+ class="mic-stop"
8048
+ title="Stop dictation"
8049
+ aria-label="Stop dictation"
8050
+ @click=${this._handleMicClick}
8051
+ >
8052
+ <svg
8053
+ xmlns="http://www.w3.org/2000/svg"
8054
+ fill="currentColor"
8055
+ viewBox="0 0 24 24"
8056
+ class="mic-stop-icon"
8057
+ aria-hidden="true"
8058
+ >
8059
+ <rect
8060
+ x="6"
8061
+ y="6"
8062
+ width="12"
8063
+ height="12"
8064
+ rx="2"
8065
+ />
8066
+ </svg>
8067
+ </button>
8068
+ ` : b `
8069
+ <button
8070
+ class="mic"
8071
+ title="Dictate a message"
8072
+ aria-label="Dictate a message"
8073
+ @click=${this._handleMicClick}
8074
+ >
8075
+ <svg
8076
+ xmlns="http://www.w3.org/2000/svg"
8077
+ viewBox="0 0 24 24"
8078
+ fill="none"
8079
+ stroke="currentColor"
8080
+ stroke-width="1.75"
8081
+ stroke-linecap="round"
8082
+ stroke-linejoin="round"
8083
+ class="mic-icon"
8084
+ aria-hidden="true"
8085
+ >
8086
+ <path d="M12 15a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3Z"/>
8087
+ <path d="M19 11a7 7 0 0 1-14 0"/>
8088
+ <path d="M12 18v3"/>
8089
+ </svg>
8090
+ </button>
8091
+ `}
8092
+ ` : A}
8093
+ ${this._isStreaming ? b `
8094
+ <button
8095
+ class="stop"
8096
+ @click=${this._handleStop}
8097
+ title="Stop generating"
8098
+ >
8099
+ <svg
8100
+ xmlns="http://www.w3.org/2000/svg"
8101
+ fill="currentColor"
8102
+ viewBox="0 0 24 24"
8103
+ class="stop-icon"
8104
+ >
8105
+ <rect
8106
+ x="6"
8107
+ y="6"
8108
+ width="12"
8109
+ height="12"
8110
+ rx="2"
8111
+ />
8112
+ </svg>
8113
+ </button>
8114
+ ` : b `
8115
+ <button
8116
+ class=${e({
8117
+ 'send': true,
8118
+ 'send--disabled': !this._inputValue.trim() && !this._pendingConversationFiles.length,
8119
+ })}
8120
+ @click=${this._handleSubmit}
8121
+ title="Send message"
8122
+ >
8123
+ <svg
8124
+ width="16"
8125
+ height="16"
8126
+ viewBox="0 0 24 24"
8127
+ fill="none"
8128
+ stroke="currentColor"
8129
+ stroke-width="2.5"
8130
+ stroke-linecap="round"
8131
+ class="send-icon"
8132
+ >
8133
+ <path d="M12 19V5M5 12l7-7 7 7"/>
8134
+ </svg>
8135
+ </button>
8136
+ `}
8144
8137
  </div>
8145
8138
  </div>
8146
8139
  ${this._skillBrowseOpened ? this._renderSkillBrowse() : A}