Merge pull request #3282 from SillyTavern/fix-chat-comp-label-wrapping Fix Chat Completion list label descriptions not correctly wrapping on non-chromium browsers
Signed| @@ -271,6 +271,24 @@ | ||
| 271 | 271 | opacity: 0.8; |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | +#completion_prompt_manager #completion_prompt_manager_list .completion_prompt_manager_prompt .drag-handle:not(.ui-sortable-handle) { | |
| 275 | + display: none; | |
| 276 | +} | |
| 277 | + | |
| 278 | +#completion_prompt_manager #completion_prompt_manager_list .completion_prompt_manager_prompt:has(.drag-handle.ui-sortable-handle) { | |
| 279 | + position: relative; | |
| 280 | + padding-left: 20px; | |
| 281 | +} | |
| 282 | + | |
| 283 | +#completion_prompt_manager #completion_prompt_manager_list .completion_prompt_manager_prompt .drag-handle { | |
| 284 | + position: absolute; | |
| 285 | + height: 100%; | |
| 286 | + top: 0; | |
| 287 | + padding: 0 5px; | |
| 288 | + display: flex; | |
| 289 | + align-items: center; | |
| 290 | +} | |
| 291 | + | |
| 274 | 292 | #completion_prompt_manager_footer_append_prompt { |
| 275 | 293 | font-size: 1em; |
| 276 | 294 | } |
| @@ -1934,22 +1934,24 @@ | ||
| 1934 | 1934 | <label for="openai_function_calling" class="checkbox_label flexWrap widthFreeExpand"> |
| 1935 | 1935 | <input id="openai_function_calling" type="checkbox" /> |
| 1936 | 1936 | <span data-i18n="Enable function calling">Enable function calling</span> |
| 1937 | + </label> | |
| 1937 | 1938 | <div class="flexBasis100p toggle-description justifyLeft"> |
| 1938 | 1939 | <span data-i18n="enable_functions_desc_1">Allows using </span><a href="https://platform.openai.com/docs/guides/function-calling" target="_blank" data-i18n="enable_functions_desc_2">function tools</a>. |
| 1939 | 1940 | <span data-i18n="enable_functions_desc_3">Can be utilized by various extensions to provide additional functionality.</span> |
| 1940 | 1941 | </div> |
| 1941 | - </label> | |
| 1942 | 1942 | </div> |
| 1943 | 1943 | <div class="range-block" data-source="openai,openrouter,makersuite,claude,custom,01ai"> |
| 1944 | 1944 | <label for="openai_image_inlining" class="checkbox_label flexWrap widthFreeExpand"> |
| 1945 | 1945 | <input id="openai_image_inlining" type="checkbox" /> |
| 1946 | 1946 | <span data-i18n="Send inline images">Send inline images</span> |
| 1947 | + </label> | |
| 1947 | 1948 | <div id="image_inlining_hint" class="flexBasis100p toggle-description justifyLeft"> |
| 1948 | 1949 | <span data-i18n="image_inlining_hint_1">Sends images in prompts if the model supports it (e.g. GPT-4V, Claude 3 or Llava 13B). Use the</span> |
| 1949 | 1950 | Use the</span> <code><i class="fa-solid fa-paperclip"></i></code> <span data-i18n="image_inlining_hint_2">action on any message or the</span> |
| 1950 | - <code><i class="fa-solid fa-wand-magic-sparkles"></i></code> <span data-i18n="image_inlining_hint_3">menu to attach an image file to the chat.</span> | |
| 1951 | + <span data-i18n="image_inlining_hint_2">action on any message or the</span> | |
| 1952 | + <code><i class="fa-solid fa-wand-magic-sparkles"></i></code> | |
| 1953 | + <span data-i18n="image_inlining_hint_3">menu to attach an image file to the chat.</span> | |
| 1951 | 1954 | </div> |
| 1952 | - </label> | |
| 1953 | 1955 | <div class="flex-container flexFlowColumn wide100p textAlignCenter marginTop10" data-source="openai,custom"> |
| 1954 | 1956 | <label for="openai_inline_image_quality" data-i18n="Inline Image Quality"> |
| 1955 | 1957 | Inline Image Quality |
| @@ -11,6 +11,7 @@ import { debounce_timeout } from './constants.js'; | ||
| 11 | 11 | import { renderTemplateAsync } from './templates.js'; |
| 12 | 12 | import { Popup } from './popup.js'; |
| 13 | 13 | import { t } from './i18n.js'; |
| 14 | +import { isMobile } from './RossAscends-mods.js'; | |
| 14 | 15 | |
| 15 | 16 | function debouncePromise(func, delay) { |
| 16 | 17 | let timeoutId; |
| @@ -1562,6 +1563,7 @@ class PromptManager { | ||
| 1562 | 1563 | |
| 1563 | 1564 | listItemHtml += ` |
| 1564 | 1565 | <li class="${prefix}prompt_manager_prompt ${draggableClass} ${enabledClass} ${markerClass} ${importantClass}" data-pm-identifier="${escapeHtml(prompt.identifier)}"> |
| 1566 | + <span class="drag-handle">☰</span> | |
| 1565 | 1567 | <span class="${prefix}prompt_manager_prompt_name" data-pm-name="${encodedName}"> |
| 1566 | 1568 | ${isMarkerPrompt ? '<span class="fa-fw fa-solid fa-thumb-tack" title="Marker"></span>' : ''} |
| 1567 | 1569 | ${isSystemPrompt ? '<span class="fa-fw fa-solid fa-square-poll-horizontal" title="Global Prompt"></span>' : ''} |
| @@ -1741,6 +1743,7 @@ class PromptManager { | ||
| 1741 | 1743 | makeDraggable() { |
| 1742 | 1744 | $(`#${this.configuration.prefix}prompt_manager_list`).sortable({ |
| 1743 | 1745 | delay: this.configuration.sortableDelay, |
| 1746 | + handle: isMobile() ? '.drag-handle' : null, | |
| 1744 | 1747 | items: `.${this.configuration.prefix}prompt_manager_prompt_draggable`, |
| 1745 | 1748 | update: (event, ui) => { |
| 1746 | 1749 | const promptOrder = this.getPromptOrderForCharacter(this.activeCharacter); |