@widgetic/chat 0.1.31 → 0.1.32

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.
@@ -1773,7 +1773,7 @@
1773
1773
  let lastGenerationOptionsHeight = 0;
1774
1774
  let generationOptionsHeightReady = false;
1775
1775
 
1776
- // Brand kit / libraries sit in the footer. Grow the host by that height so
1776
+ // The generation options (language, libraries) sit in the footer. Grow the host by that height so
1777
1777
  // the messages area stays put and the input moves down inside the scroller.
1778
1778
  $effect(() => {
1779
1779
  const el = generationOptionsEl;
@@ -909,11 +909,11 @@
909
909
  // Local state
910
910
  let messagesContainer: HTMLElement;
911
911
  let autoScroll = $state(true);
912
- /** Model text kept after the preview is up, so thinking and code stay in the thread. */
912
+ /** Model text shown while code is streaming. Cleared when the generation finishes. */
913
913
  let keptGenerationText = $state('');
914
914
  let shownGenerationCount = $state(0);
915
915
  let thinkingShownCount = $state(0);
916
- /** The thinking line stays after the preview, until the next send. */
916
+ /** The thinking line is up only while a generation is running. */
917
917
  let thinkingHold = $state(false);
918
918
  let generationWasRunning = false;
919
919
  // The first paint is shorter than the loaded page. Scrolling then, or treating
@@ -942,6 +942,12 @@
942
942
  thinkingShownCount = 0;
943
943
  thinkingHold = true;
944
944
  }
945
+ if (!isGenerating && generationWasRunning) {
946
+ keptGenerationText = '';
947
+ shownGenerationCount = 0;
948
+ thinkingShownCount = 0;
949
+ thinkingHold = false;
950
+ }
945
951
  generationWasRunning = isGenerating;
946
952
  if (messages.length === 0 && !isGenerating) {
947
953
  keptGenerationText = '';
@@ -1559,7 +1565,7 @@
1559
1565
  {/if}
1560
1566
  </div>
1561
1567
  {#if !turn.user?.id?.startsWith('version-fork-') && !isLoading && ((commitReply && (canRestoreToMessage(commitReply) || isHeadCommitReply(commitReply))) || canRestoreFailedLastTurn(turn))}
1562
- {@const restoreIsCurrentHead = !!(commitReply && isHeadCommitReply(commitReply))}
1568
+ {@const restoreIsCurrentHead = !!(commitReply && isHeadCommitReply(commitReply) && versionNumberFromLabel(getTurnVersionLabel(turn)) !== 1)}
1563
1569
  <button
1564
1570
  class="restore-checkpoint-btn shrink-0"
1565
1571
  disabled={restoreIsCurrentHead}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widgetic/chat",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",