chore: format
This commit is contained in:
@@ -314,7 +314,8 @@
|
||||
if (tool && tool.authenticated === false) {
|
||||
const parts = id.split(':');
|
||||
const serverId = parts.at(-1) ?? id;
|
||||
const authType = parts.length > 1 ? parts[0] === 'server' ? parts[1] : parts[0] : null;
|
||||
const authType =
|
||||
parts.length > 1 ? (parts[0] === 'server' ? parts[1] : parts[0]) : null;
|
||||
unauthed.push({ id, name: tool.name ?? id, serverId, authType });
|
||||
} else {
|
||||
authed.push(id);
|
||||
@@ -1770,9 +1771,7 @@
|
||||
}
|
||||
|
||||
if (pendingOAuthTools.length > 0) {
|
||||
toast.warning(
|
||||
$i18n.t('Please connect all required integrations before sending a message')
|
||||
);
|
||||
toast.warning($i18n.t('Please connect all required integrations before sending a message'));
|
||||
return;
|
||||
}
|
||||
if (userPrompt === '' && files.length === 0) {
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
|
||||
$: toolCallCount = tokens.filter((t) => t?.attributes?.type === 'tool_calls').length;
|
||||
$: reasoningCount = tokens.filter((t) => t?.attributes?.type === 'reasoning').length;
|
||||
$: hasPending = !messageDone && tokens.some(
|
||||
(t) => t?.attributes?.done !== undefined && t?.attributes?.done !== 'true'
|
||||
);
|
||||
$: hasPending =
|
||||
!messageDone &&
|
||||
tokens.some((t) => t?.attributes?.done !== undefined && t?.attributes?.done !== 'true');
|
||||
|
||||
$: codeInterpreterCount = tokens.filter((t) => t?.attributes?.type === 'code_interpreter').length;
|
||||
|
||||
|
||||
@@ -367,7 +367,11 @@
|
||||
</ul>
|
||||
{/if}
|
||||
{:else if token.type === 'detail_group'}
|
||||
<ConsecutiveDetailsGroup id={`${id}-${tokenIdx}-detail-group`} tokens={token.items} messageDone={done}>
|
||||
<ConsecutiveDetailsGroup
|
||||
id={`${id}-${tokenIdx}-detail-group`}
|
||||
tokens={token.items}
|
||||
messageDone={done}
|
||||
>
|
||||
<div slot="content" class="space-y-1">
|
||||
{#each token.items as detailToken, detailIdx}
|
||||
{@const textContent = getDetailTextContent(detailToken)}
|
||||
|
||||
@@ -140,12 +140,16 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<ArchivedChatsModal bind:show={showArchivedChatsModal} onUpdate={handleArchivedChatsChange} onDelete={(id) => {
|
||||
if ($chatId === id) {
|
||||
goto('/');
|
||||
chatId.set('');
|
||||
}
|
||||
}} />
|
||||
<ArchivedChatsModal
|
||||
bind:show={showArchivedChatsModal}
|
||||
onUpdate={handleArchivedChatsChange}
|
||||
onDelete={(id) => {
|
||||
if ($chatId === id) {
|
||||
goto('/');
|
||||
chatId.set('');
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<SharedChatsModal bind:show={showSharedChatsModal} />
|
||||
<FilesModal bind:show={showFilesModal} />
|
||||
|
||||
|
||||
@@ -74,7 +74,8 @@
|
||||
>
|
||||
<div
|
||||
class=" w-full flex items-center justify-between gap-2 {attributes?.done &&
|
||||
attributes?.done !== 'true' && !messageDone
|
||||
attributes?.done !== 'true' &&
|
||||
!messageDone
|
||||
? 'shimmer'
|
||||
: ''}
|
||||
"
|
||||
|
||||
@@ -118,17 +118,9 @@
|
||||
{#if open}
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<!-- Outer wrapper: positioned flush with trigger, invisible padding bridges the gap -->
|
||||
<div
|
||||
use:portal
|
||||
bind:this={contentEl}
|
||||
on:mouseleave={handleContentMouseLeave}
|
||||
>
|
||||
<div use:portal bind:this={contentEl} on:mouseleave={handleContentMouseLeave}>
|
||||
<!-- Inner content: visual styles and transition -->
|
||||
<div
|
||||
class={contentClass}
|
||||
style="max-width: {maxWidth}px;"
|
||||
transition:flyAndScale
|
||||
>
|
||||
<div class={contentClass} style="max-width: {maxWidth}px;" transition:flyAndScale>
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -452,10 +452,7 @@
|
||||
// Escape HTML entities in the line FIRST so we don't corrupt
|
||||
// user text that happens to contain < or >, then re-inject
|
||||
// the mention spans.
|
||||
const escaped = line
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
const escaped = line.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
||||
// Now replace the escaped mention patterns back into real spans
|
||||
const withMentions = escaped.replace(
|
||||
/<([@#$])([\w.\-:/]+)(?:\|([^&]*?))?>/g,
|
||||
|
||||
Reference in New Issue
Block a user