chore: format
This commit is contained in:
@@ -201,7 +201,7 @@
|
||||
if (storedQueueData) {
|
||||
try {
|
||||
const restoredQueue = JSON.parse(storedQueueData);
|
||||
|
||||
|
||||
if (restoredQueue.length > 0) {
|
||||
sessionStorage.removeItem(`chat-queue-${chatIdProp}`);
|
||||
// Check if there are pending tasks (still generating)
|
||||
@@ -1971,8 +1971,8 @@
|
||||
..._messages.map((message) => ({
|
||||
...message,
|
||||
content: processDetails(message.content),
|
||||
// Include output for temp chats (backend will use it and strip before LLM)
|
||||
...(message.output ? { output: message.output } : {})
|
||||
// Include output for temp chats (backend will use it and strip before LLM)
|
||||
...(message.output ? { output: message.output } : {})
|
||||
}))
|
||||
].filter((message) => message);
|
||||
|
||||
@@ -2027,7 +2027,8 @@
|
||||
const skillMentionRegex = /<\$([^|>]+)\|?[^>]*>/g;
|
||||
const skillIds = [];
|
||||
for (const message of messages) {
|
||||
const content = typeof message.content === 'string' ? message.content : message.content?.[0]?.text ?? '';
|
||||
const content =
|
||||
typeof message.content === 'string' ? message.content : (message.content?.[0]?.text ?? '');
|
||||
for (const match of content.matchAll(skillMentionRegex)) {
|
||||
if (!skillIds.includes(match[1])) {
|
||||
skillIds.push(match[1]);
|
||||
|
||||
@@ -172,7 +172,9 @@
|
||||
>{$i18n.t('Select a tool')}</option
|
||||
>
|
||||
|
||||
{#each $tools.filter((tool) => !tool?.id?.startsWith('server:')).sort((a, b) => (a.name ?? '').localeCompare(b.name ?? '')) as tool, toolIdx}
|
||||
{#each $tools
|
||||
.filter((tool) => !tool?.id?.startsWith('server:'))
|
||||
.sort((a, b) => (a.name ?? '').localeCompare(b.name ?? '')) as tool, toolIdx}
|
||||
<option value={tool.id} class="bg-gray-100 dark:bg-gray-800">{tool.name}</option>
|
||||
{/each}
|
||||
{:else if tab === 'functions'}
|
||||
@@ -180,7 +182,7 @@
|
||||
>{$i18n.t('Select a function')}</option
|
||||
>
|
||||
|
||||
{#each $functions.sort((a, b) => (a.name ?? '').localeCompare(b.name ?? '')) as func, funcIdx}
|
||||
{#each $functions.sort( (a, b) => (a.name ?? '').localeCompare(b.name ?? '') ) as func, funcIdx}
|
||||
<option value={func.id} class="bg-gray-100 dark:bg-gray-800">{func.name}</option>
|
||||
{/each}
|
||||
{/if}
|
||||
|
||||
@@ -390,7 +390,8 @@
|
||||
|
||||
let command = '';
|
||||
export let showCommands = false;
|
||||
$: showCommands = ['/', '#', '@', '$'].includes(command?.charAt(0)) || '\\#' === command?.slice(0, 2);
|
||||
$: showCommands =
|
||||
['/', '#', '@', '$'].includes(command?.charAt(0)) || '\\#' === command?.slice(0, 2);
|
||||
let suggestions = null;
|
||||
|
||||
let showTools = false;
|
||||
|
||||
@@ -43,7 +43,11 @@
|
||||
stroke="currentColor"
|
||||
class="size-3.5"
|
||||
>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18" />
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
</Tooltip>
|
||||
|
||||
@@ -46,7 +46,11 @@
|
||||
marked.use(footnoteExtension(options));
|
||||
marked.use(disableSingleTilde);
|
||||
marked.use({
|
||||
extensions: [mentionExtension({ triggerChar: '@' }), mentionExtension({ triggerChar: '#' }), mentionExtension({ triggerChar: '$' })]
|
||||
extensions: [
|
||||
mentionExtension({ triggerChar: '@' }),
|
||||
mentionExtension({ triggerChar: '#' }),
|
||||
mentionExtension({ triggerChar: '$' })
|
||||
]
|
||||
});
|
||||
|
||||
$: (async () => {
|
||||
|
||||
@@ -258,8 +258,12 @@
|
||||
class="flex cursor-pointer items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-850 w-full px-3 py-2 rounded-xl transition"
|
||||
>
|
||||
<div class="self-center">
|
||||
<div class="text-sm font-medium">{$i18n.t('Leave a public review for {{modelName}}', { modelName: message.model })}</div>
|
||||
<div class="text-xs text-gray-500">{$i18n.t('Help the community discover great models')}</div>
|
||||
<div class="text-sm font-medium">
|
||||
{$i18n.t('Leave a public review for {{modelName}}', { modelName: message.model })}
|
||||
</div>
|
||||
<div class="text-xs text-gray-500">
|
||||
{$i18n.t('Help the community discover great models')}
|
||||
</div>
|
||||
</div>
|
||||
<ChevronRight className="size-4" />
|
||||
</a>
|
||||
|
||||
@@ -105,7 +105,10 @@
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
window.open(`https://openwebui.com/models?q=${encodeURIComponent(model?.id ?? '')}`, '_blank');
|
||||
window.open(
|
||||
`https://openwebui.com/models?q=${encodeURIComponent(model?.id ?? '')}`,
|
||||
'_blank'
|
||||
);
|
||||
show = false;
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user