From 2b10954002147fdd684d066a61140781eaa68fa9 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Fri, 20 Sep 2024 20:34:29 +0300 Subject: [PATCH 01/11] Fix mobile screen funkiness by smashing it with a big hammer Fixes #2879 --- public/css/mobile-styles.css | 19 +++++++++---------- public/scripts/RossAscends-mods.js | 10 ++++++++++ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/public/css/mobile-styles.css b/public/css/mobile-styles.css index d43a9462d..a5c8b3176 100644 --- a/public/css/mobile-styles.css +++ b/public/css/mobile-styles.css @@ -103,7 +103,6 @@ touch-action: none; overflow: hidden; position: fixed; - } .world_entry_form_control { @@ -112,7 +111,7 @@ .drawer-content { min-width: unset; - width: 100%; + width: 100dvw; max-height: calc(100vh - 45px); max-height: calc(100dvh - 45px); position: fixed; @@ -159,9 +158,9 @@ #sheld, #character_popup, .drawer-content { - width: 100% !important; + width: 100dvw !important; margin: 0 auto; - max-width: 100%; + max-width: 100dvw; left: 0 !important; resize: none !important; top: var(--topBarBlockSize); @@ -233,9 +232,9 @@ /* 100vh are fallback units for browsers that don't support dvh */ height: calc(100vh - 45px); height: calc(100dvh - 45px); - min-width: 100% !important; - width: 100% !important; - max-width: 100% !important; + min-width: 100dvw !important; + width: 100dvw !important; + max-width: 100dvw !important; overflow-y: hidden; border-left: 1px solid var(--SmartThemeBorderColor); border-right: 1px solid var(--SmartThemeBorderColor); @@ -481,10 +480,10 @@ margin: 0 auto; height: calc(100vh - 70px); height: calc(100dvh - 70px); - width: calc(100% - 5px); + width: calc(100dvw - 5px); max-height: calc(100vh - 70px); max-height: calc(100dvh - 70px); - max-width: calc(100% - 5px); + max-width: calc(100dvw - 5px); } @@ -502,4 +501,4 @@ #horde_model { height: unset; } -} \ No newline at end of file +} diff --git a/public/scripts/RossAscends-mods.js b/public/scripts/RossAscends-mods.js index 7a3f84a58..92278f35c 100644 --- a/public/scripts/RossAscends-mods.js +++ b/public/scripts/RossAscends-mods.js @@ -737,6 +737,16 @@ export function initRossMods() { RA_autoconnect(); } + if (isMobile()) { + const fixFunkyPositioning = () => { + console.debug('[Mobile] Device viewport change detected.'); + document.documentElement.style.position = 'fixed'; + requestAnimationFrame(() => document.documentElement.style.position = ''); + }; + window.addEventListener('resize', fixFunkyPositioning); + window.addEventListener('orientationchange', fixFunkyPositioning); + } + $('#main_api').change(function () { var PrevAPI = main_api; setTimeout(() => RA_autoconnect(PrevAPI), 100); From a5fea35f12457347c39bdc9fb97f7121486bc386 Mon Sep 17 00:00:00 2001 From: AlpinDale Date: Sat, 21 Sep 2024 08:18:06 +0000 Subject: [PATCH 02/11] chore: update aphrodite samplers --- public/index.html | 4 ++-- public/scripts/textgen-settings.js | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/public/index.html b/public/index.html index 26de88a79..f306f5a1f 100644 --- a/public/index.html +++ b/public/index.html @@ -1341,7 +1341,7 @@ -
+

@@ -1401,7 +1401,7 @@

-
+

diff --git a/public/scripts/textgen-settings.js b/public/scripts/textgen-settings.js index 1033ee005..2b7591f06 100644 --- a/public/scripts/textgen-settings.js +++ b/public/scripts/textgen-settings.js @@ -1203,7 +1203,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate, 'repetition_penalty': settings.rep_pen, 'seed': settings.seed >= 0 ? settings.seed : undefined, 'stop': getStoppingStrings(isImpersonate, isContinue), - 'temperature': settings.temp, + 'temperature': dynatemp ? (settings.min_temp + settings.max_temp) / 2 : settings.temp, 'temperature_last': settings.temperature_last, 'top_p': settings.top_p, 'top_k': settings.top_k, @@ -1223,6 +1223,14 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate, 'guided_json': settings.json_schema, 'early_stopping': false, // hacks 'include_stop_str_in_output': false, + 'dynatemp_min': dynatemp ? settings.min_temp : undefined, + 'dynatemp_max': dynatemp ? settings.max_temp : undefined, + 'dynatemp_exponent': dynatemp ? settings.dynatemp_exponent : undefined, + 'xtc_threshold': settings.xtc_threshold, + 'xtc_probability': settings.xtc_probability, + 'custom_token_bans': [APHRODITE, MANCER].includes(settings.type) ? + toIntArray(banned_tokens) : + banned_tokens, }; if (settings.type === OPENROUTER) { From aaf8fa13e586f73cac6b3874aeca835ec7b7e295 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 21 Sep 2024 13:18:52 +0300 Subject: [PATCH 03/11] Remove condition --- public/scripts/textgen-settings.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/public/scripts/textgen-settings.js b/public/scripts/textgen-settings.js index 2b7591f06..29d7732dc 100644 --- a/public/scripts/textgen-settings.js +++ b/public/scripts/textgen-settings.js @@ -1228,9 +1228,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate, 'dynatemp_exponent': dynatemp ? settings.dynatemp_exponent : undefined, 'xtc_threshold': settings.xtc_threshold, 'xtc_probability': settings.xtc_probability, - 'custom_token_bans': [APHRODITE, MANCER].includes(settings.type) ? - toIntArray(banned_tokens) : - banned_tokens, + 'custom_token_bans': toIntArray(banned_tokens), }; if (settings.type === OPENROUTER) { From 165cc39a9ab8f560d9e00992496560cec930c792 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 21 Sep 2024 14:06:57 +0300 Subject: [PATCH 04/11] Set max-height on popup body Fixes #2886 --- public/css/popup.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/css/popup.css b/public/css/popup.css index 6809d7248..d184dc1fb 100644 --- a/public/css/popup.css +++ b/public/css/popup.css @@ -47,6 +47,10 @@ dialog { padding: 1px; } +.popup:not(:has(.img_enlarged_container)) .popup-body { + max-height: 95dvh; +} + .popup .popup-content { margin-top: 10px; padding: 0 8px; From 8030ce9dddf743741bda822cf35b6cb336beff78 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 21 Sep 2024 14:28:43 +0300 Subject: [PATCH 05/11] Unify select styles across browsers --- public/img/down-arrow.svg | 3 +++ public/style.css | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 public/img/down-arrow.svg diff --git a/public/img/down-arrow.svg b/public/img/down-arrow.svg new file mode 100644 index 000000000..6704feda7 --- /dev/null +++ b/public/img/down-arrow.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/style.css b/public/style.css index eb0595926..ee1e1ba86 100644 --- a/public/style.css +++ b/public/style.css @@ -2570,20 +2570,25 @@ input[type="file"] { /*#################################################################*/ select { - + -moz-appearance: none; + -webkit-appearance: none; + appearance: none; padding: 3px 2px; background-color: var(--black30a); border: 1px solid var(--SmartThemeBorderColor); border-radius: 5px; margin-bottom: 5px; height: min-content; + background-image: url('/img/down-arrow.svg'); + background-repeat: no-repeat; + background-position: right 6px center; + background-size: 8px 5px; } select option { /* works to highlight selected/active option */ background-color: var(--white50a); color: var(--black70a); - } select option:not(:checked) { From d3408c496ffc64209c1b4f1c6f19610da29c1fe2 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 21 Sep 2024 16:23:59 +0300 Subject: [PATCH 06/11] Change a log type for empty prompt messages --- public/scripts/openai.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/openai.js b/public/scripts/openai.js index b7483d203..0cafa379a 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -2885,7 +2885,7 @@ export class ChatCompletion { const message = { role: item.role, content: item.content, ...(item.name ? { name: item.name } : {}) }; chat.push(message); } else { - console.warn('Invalid message in collection', item); + this.log(`Skipping invalid or empty message in collection: ${JSON.stringify(item)}`); } } return chat; From ae53527c23fe95992197667b1a74a496a82fe5fc Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 21 Sep 2024 16:36:20 +0300 Subject: [PATCH 07/11] #2888 Hide non-functioning checkboxes from Comfy --- public/scripts/extensions/stable-diffusion/settings.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/extensions/stable-diffusion/settings.html b/public/scripts/extensions/stable-diffusion/settings.html index 1514debce..f43ed7246 100644 --- a/public/scripts/extensions/stable-diffusion/settings.html +++ b/public/scripts/extensions/stable-diffusion/settings.html @@ -349,7 +349,7 @@
-
+
+![][cover] + +
+ English | [中文](readme-zh_cn.md) | [日本語](readme-ja_jp.md) | [Русский](readme-ru_ru.md) -![][cover] +[![GitHub Stars](https://img.shields.io/github/stars/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/stargazers) +[![GitHub Forks](https://img.shields.io/github/forks/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/network) +[![GitHub Issues](https://img.shields.io/github/issues/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/issues) +[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/pulls) + +
+ +--- SillyTavern provides a single unified interface for many LLM APIs (KoboldAI/CPP, Horde, NovelAI, Ooba, Tabby, OpenAI, OpenRouter, Claude, Mistral and more), a mobile-friendly layout, Visual Novel Mode, Automatic1111 & ComfyUI API image generation integration, TTS, WorldInfo (lorebooks), customizable UI, auto-translate, more prompt options than you'd ever want or need, and endless growth potential via third-party extensions. @@ -65,8 +76,8 @@ Or get in touch with the developers directly: ## Screenshots -image -image +image +image ## Character Cards @@ -363,6 +374,6 @@ GNU Affero General Public License for more details.** [![Contributors](https://contrib.rocks/image?repo=SillyTavern/SillyTavern)](https://github.com/SillyTavern/SillyTavern/graphs/contributors) -[cover]: https://github.com/SillyTavern/SillyTavern/assets/18619528/c2be4c3f-aada-4f64-87a3-ae35a68b61a4 +[cover]: https://github.com/user-attachments/assets/01a6ae9a-16aa-45f2-8bff-32b5dc587e44 [discord-link]: https://discord.gg/sillytavern [discord-shield-badge]: https://img.shields.io/discord/1100685673633153084?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=for-the-badge From de2dd0e087562cb0b3af26cc324990df45d937c9 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 21 Sep 2024 21:47:42 +0300 Subject: [PATCH 11/11] Update translated readmes --- .github/readme-ja_jp.md | 20 +++++++++++++++++--- .github/readme-ru_ru.md | 19 +++++++++++++++---- .github/readme-zh_cn.md | 20 +++++++++++++++++--- 3 files changed, 49 insertions(+), 10 deletions(-) diff --git a/.github/readme-ja_jp.md b/.github/readme-ja_jp.md index 780bda218..68c9e97c3 100644 --- a/.github/readme-ja_jp.md +++ b/.github/readme-ja_jp.md @@ -1,9 +1,20 @@ > [!IMPORTANT] > ここに掲載されている情報は、古かったり不完全であったりする可能性があります。最新の情報は英語版をご利用ください。 +![][cover] + +
+ [English](readme.md) | [中文](readme-zh_cn.md) | 日本語 | [Русский](readme-ru_ru.md) -![SillyTavern-Banner](https://github.com/SillyTavern/SillyTavern/assets/18619528/c2be4c3f-aada-4f64-87a3-ae35a68b61a4) +[![GitHub Stars](https://img.shields.io/github/stars/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/stargazers) +[![GitHub Forks](https://img.shields.io/github/forks/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/network) +[![GitHub Issues](https://img.shields.io/github/issues/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/issues) +[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/pulls) + +
+ +--- モバイルデバイスにも適したレイアウト・マルチAPI(KoboldAI/CPP、Horde、NovelAI、Ooba、OpenAI、OpenRouter、Claude、Scale)、VN ライクな Waifu モード、Stable Diffusion、TTS、WorldInfo(伝承本)、カスタマイズ可能なUI、自動翻訳、大量のプロンプトオプション+サードパーティの拡張機能をインストールする機能 @@ -284,8 +295,8 @@ ST サーバを再起動すると、ユーザ名とパスワードさえ知っ ## スクリーンショット -image -image +image +image ## ライセンスとクレジット @@ -314,3 +325,6 @@ ST サーバを再起動すると、ユーザ名とパスワードさえ知っ * @doloroushyeonse による韓国語翻訳 * k_euler_a による Horde のサポート * [@XXpE3](https://github.com/XXpE3) による中国語翻訳、中国語 ISSUES の連絡先は @XXpE3 + + +[cover]: https://github.com/user-attachments/assets/01a6ae9a-16aa-45f2-8bff-32b5dc587e44 diff --git a/.github/readme-ru_ru.md b/.github/readme-ru_ru.md index 61619a818..658edf924 100644 --- a/.github/readme-ru_ru.md +++ b/.github/readme-ru_ru.md @@ -3,9 +3,20 @@ +![][cover] + +
+ [English](readme.md) | [中文](readme-zh_cn.md) | [日本語](readme-ja_jp.md) | Русский -![][cover] +[![GitHub Stars](https://img.shields.io/github/stars/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/stargazers) +[![GitHub Forks](https://img.shields.io/github/forks/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/network) +[![GitHub Issues](https://img.shields.io/github/issues/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/issues) +[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/pulls) + +
+ +--- Мобайл-френдли интерфейс, поддержка множества API (KoboldAI/CPP, Horde, NovelAI, Ooba, OpenAI, OpenRouter, Claude, Scale), ВН-образный режим Вайфу, Stable Diffusion, TTS, поддержка миров (лорбуков), кастомизируемый UI, автоперевод, тончайшая настройка промптов + возможность устанавливать расширения. @@ -29,8 +40,8 @@ SillyTavern — это форк версии TavernAI 1.2.8, который ра ## Скриншоты -image -image +image +image ### Ветки @@ -355,7 +366,7 @@ SillyTavern сохраняет ключи от ваших API в файле `sec [back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square -[cover]: https://github.com/SillyTavern/SillyTavern/assets/18619528/c2be4c3f-aada-4f64-87a3-ae35a68b61a4 +[cover]: https://github.com/user-attachments/assets/01a6ae9a-16aa-45f2-8bff-32b5dc587e44 [discord-link]: https://discord.gg/sillytavern [discord-shield]: https://img.shields.io/discord/1100685673633153084?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square [discord-shield-badge]: https://img.shields.io/discord/1100685673633153084?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=for-the-badge diff --git a/.github/readme-zh_cn.md b/.github/readme-zh_cn.md index 0ed0b94f4..a2f3a3623 100644 --- a/.github/readme-zh_cn.md +++ b/.github/readme-zh_cn.md @@ -1,9 +1,20 @@ > [!IMPORTANT] > 这里的信息可能已经过时或不完整,仅供您参考。请使用英文版本获取最新信息。 +![][cover] + +
+ [English](readme.md) | 中文 | [日本語](readme-ja_jp.md) | [Русский](readme-ru_ru.md) -![image](https://github.com/SillyTavern/SillyTavern/assets/18619528/c2be4c3f-aada-4f64-87a3-ae35a68b61a4) +[![GitHub Stars](https://img.shields.io/github/stars/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/stargazers) +[![GitHub Forks](https://img.shields.io/github/forks/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/network) +[![GitHub Issues](https://img.shields.io/github/issues/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/issues) +[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/pulls) + +
+ +--- 移动设备界面友好,多种人工智能服务或模型支持(KoboldAI/CPP, Horde, NovelAI, Ooba, OpenAI, OpenRouter, Claude, Scale),类似 Galgame 的 老 婆 模 式,Horde SD,文本系统语音生成,世界信息(Lorebooks),可定制的界面,自动翻译,和比你所需要的更多的 Prompt。附带扩展服务,支持文本绘画生成与语音生成和基于向量数据库 的聊天信息总结。 @@ -278,8 +289,8 @@ SillyTavern 会将 API 密钥保存在目录中的 `secrets.json` 文件内。 ## 屏幕截图 -image -image +image +image ## 许可证和贡献 @@ -306,3 +317,6 @@ SillyTavern 会将 API 密钥保存在目录中的 `secrets.json` 文件内。 * Default content (characters and lore books) provided by @OtisAlejandro, @RossAscends and @kallmeflocc * Korean translation by @doloroushyeonse * 中文翻译由 [@XXpE3](https://github.com/XXpE3) 完成,中文 ISSUES 可以联系 @XXpE3 + + +[cover]: https://github.com/user-attachments/assets/01a6ae9a-16aa-45f2-8bff-32b5dc587e44