llmasaservice-ui 0.4.4 → 0.4.5

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/index.js CHANGED
@@ -424,9 +424,17 @@ var ChatPanel = ({
424
424
  `;
425
425
  Object.entries(history2).forEach(([prompt, response2], index) => {
426
426
  if (hideInitialPrompt && index === 0) {
427
- return;
428
- }
429
- html += `
427
+ html += `
428
+ <div class="history-entry">
429
+ <div class="response-container">
430
+ <div class="response">${convertMarkdownToHTML(
431
+ response2.content
432
+ )}</div>
433
+ </div>
434
+ </div>
435
+ `;
436
+ } else {
437
+ html += `
430
438
  <div class="history-entry">
431
439
  <div class="prompt-container">
432
440
  <div class="prompt">${convertMarkdownToHTML(prompt)}</div>
@@ -436,6 +444,7 @@ var ChatPanel = ({
436
444
  </div>
437
445
  </div>
438
446
  `;
447
+ }
439
448
  });
440
449
  html += `
441
450
  </div>
package/dist/index.mjs CHANGED
@@ -391,9 +391,17 @@ var ChatPanel = ({
391
391
  `;
392
392
  Object.entries(history2).forEach(([prompt, response2], index) => {
393
393
  if (hideInitialPrompt && index === 0) {
394
- return;
395
- }
396
- html += `
394
+ html += `
395
+ <div class="history-entry">
396
+ <div class="response-container">
397
+ <div class="response">${convertMarkdownToHTML(
398
+ response2.content
399
+ )}</div>
400
+ </div>
401
+ </div>
402
+ `;
403
+ } else {
404
+ html += `
397
405
  <div class="history-entry">
398
406
  <div class="prompt-container">
399
407
  <div class="prompt">${convertMarkdownToHTML(prompt)}</div>
@@ -403,6 +411,7 @@ var ChatPanel = ({
403
411
  </div>
404
412
  </div>
405
413
  `;
414
+ }
406
415
  });
407
416
  html += `
408
417
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llmasaservice-ui",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Prebuilt UI components for LLMAsAService.io",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/src/ChatPanel.tsx CHANGED
@@ -471,10 +471,17 @@ const ChatPanel: React.FC<ChatPanelProps & ExtraProps> = ({
471
471
 
472
472
  Object.entries(history).forEach(([prompt, response], index) => {
473
473
  if (hideInitialPrompt && index === 0) {
474
- return;
475
- }
476
-
477
- html += `
474
+ html += `
475
+ <div class="history-entry">
476
+ <div class="response-container">
477
+ <div class="response">${convertMarkdownToHTML(
478
+ response.content
479
+ )}</div>
480
+ </div>
481
+ </div>
482
+ `;
483
+ } else {
484
+ html += `
478
485
  <div class="history-entry">
479
486
  <div class="prompt-container">
480
487
  <div class="prompt">${convertMarkdownToHTML(prompt)}</div>
@@ -484,6 +491,7 @@ const ChatPanel: React.FC<ChatPanelProps & ExtraProps> = ({
484
491
  </div>
485
492
  </div>
486
493
  `;
494
+ }
487
495
  });
488
496
 
489
497
  html += `