llmasaservice-ui 0.4.3 → 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>
@@ -462,7 +471,7 @@ var ChatPanel = ({
462
471
  const handleSuggestionClick = (suggestion) => {
463
472
  continueChat(suggestion);
464
473
  };
465
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, console.log("history", history), /* @__PURE__ */ import_react.default.createElement(
474
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
466
475
  "div",
467
476
  {
468
477
  style: { width, height },
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>
@@ -429,7 +438,7 @@ var ChatPanel = ({
429
438
  const handleSuggestionClick = (suggestion) => {
430
439
  continueChat(suggestion);
431
440
  };
432
- return /* @__PURE__ */ React.createElement(React.Fragment, null, console.log("history", history), /* @__PURE__ */ React.createElement(
441
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
433
442
  "div",
434
443
  {
435
444
  style: { width, height },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llmasaservice-ui",
3
- "version": "0.4.3",
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 += `
@@ -518,7 +526,6 @@ const ChatPanel: React.FC<ChatPanelProps & ExtraProps> = ({
518
526
 
519
527
  return (
520
528
  <>
521
- {console.log("history", history)}
522
529
  <div
523
530
  style={{ width: width, height: height }}
524
531
  className={"side-panel" + (theme === "light" ? "" : "-dark")}