ShtukbaseStandard
package file→ .shtukbase/packages/chat/lens/chat.html

lens/chat.html

56 lines, 4.3 KB.

The file as it is in the package. Some comments in it may not be in English yet.

  1. <!doctype html>
  2. <html lang="ru" data-skin="desktop">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>Чат</title>
  7. <link rel="stylesheet" href="/_kit/kit.css" data-kit>
  8. <link rel="stylesheet" href="/_kit/skins/calm.css" data-kit>
  9. <link rel="stylesheet" href="/_kit/skins/desktop.css" data-kit>
  10. <link rel="stylesheet" href="chat.css">
  11. <script>
  12. // Hosted (under /_pkg/ or in the shell's frame) uses the host's kit as linked above; opened as a
  13. // file or from a plain server it points the kit links and scripts into the repo by relative paths.
  14. (function () {
  15. var hosted = window.parent !== window || location.pathname.indexOf('/_pkg/') === 0;
  16. window.CHAT_HOSTED = hosted;
  17. if (!hosted) document.querySelectorAll('link[data-kit]').forEach(function (l) {
  18. l.href = '../../kit-style/pages/design/kit-style/' + l.getAttribute('href').slice('/_kit/'.length);
  19. });
  20. var pkg = hosted ? '/_pkg/' : '../../';
  21. document.write('<script src="' + pkg + 'layout-basic/lens.js"><\/script>' +
  22. '<script src="' + pkg + 'llm-provider/llm.js"><\/script>');
  23. })();
  24. </script>
  25. </head>
  26. <body>
  27. <div class="chat">
  28. <header class="chat-head">
  29. <span class="chat-title">Чат</span>
  30. <span class="chat-where" data-where></span>
  31. <span class="chat-spacer"></span>
  32. <button type="button" class="chat-icon-btn" data-folder hidden title="Открыть папку пространства" aria-label="Открыть папку пространства"><svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M2 4.5a1 1 0 0 1 1-1h3l1.5 1.5H13a1 1 0 0 1 1 1V12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1z" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round"/></svg></button>
  33. <button type="button" class="chat-icon-btn" data-clear title="Новый разговор" aria-label="Новый разговор"><svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M8 3v10M3 8h10" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/></svg></button>
  34. <button type="button" class="chat-icon-btn" data-gear title="Настройки модели" aria-label="Настройки модели"><svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><circle cx="3.5" cy="8" r="1.2" fill="currentColor"/><circle cx="8" cy="8" r="1.2" fill="currentColor"/><circle cx="12.5" cy="8" r="1.2" fill="currentColor"/></svg></button>
  35. </header>
  36. <div class="chat-settings" data-settings role="group" aria-label="Настройки модели" hidden>
  37. <p class="chat-note">Ключ хранится только в этом браузере<span data-memnote hidden> (в рамке — только до перезагрузки)</span>.</p>
  38. <label>Адрес провайдера<input data-field name="baseUrl" autocomplete="off" spellcheck="false"></label>
  39. <label>Модель<input data-field name="model" autocomplete="off" spellcheck="false"></label>
  40. <label>Ключ API<input data-field name="apiKey" type="password" autocomplete="off" spellcheck="false"></label>
  41. <div class="chat-row"><button type="button" class="chat-btn chat-btn-primary" data-save>Сохранить</button><button type="button" class="chat-btn" data-cancel>Отмена</button></div>
  42. </div>
  43. <div class="chat-log" data-log aria-live="polite">
  44. <div class="chat-list" data-list></div>
  45. </div>
  46. <div class="chat-compose">
  47. <textarea rows="1" data-input placeholder="Спросите о пространстве…" aria-label="Сообщение"></textarea>
  48. <button type="button" class="chat-send" data-send title="Отправить" aria-label="Отправить"><svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M8 13V3.5M4 7.5l4-4 4 4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg></button>
  49. <button type="button" class="chat-send" data-stop title="Стоп" aria-label="Стоп" hidden><svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><rect x="4.5" y="4.5" width="7" height="7" rx="1.5" fill="currentColor"/></svg></button>
  50. </div>
  51. </div>
  52. <script src="markdown.js"></script>
  53. <script src="fs-store.js"></script>
  54. <script src="chat.js"></script>
  55. </body>
  56. </html>