chore: format
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
type AutomationRunModel
|
||||
} from '$lib/apis/automations';
|
||||
|
||||
|
||||
import Spinner from '$lib/components/common/Spinner.svelte';
|
||||
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||
import DeleteConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
|
||||
@@ -42,7 +41,6 @@
|
||||
let model_id = '';
|
||||
let is_active = true;
|
||||
|
||||
|
||||
let loading = false;
|
||||
let saving = false;
|
||||
let showDeleteConfirm = false;
|
||||
@@ -335,7 +333,6 @@
|
||||
<span class="text-gray-600 dark:text-gray-400">{$i18n.t('Model')}</span>
|
||||
<ModelDropdown bind:model_id side="bottom" align="end" onChange={markDirty} />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -46,11 +46,13 @@
|
||||
}}
|
||||
>
|
||||
<Tooltip
|
||||
content={DOMPurify.sanitize(marked.parse(
|
||||
sanitizeResponseContent(
|
||||
models[selectedModelIdx]?.info?.meta?.description ?? ''
|
||||
).replaceAll('\n', '<br>')
|
||||
))}
|
||||
content={DOMPurify.sanitize(
|
||||
marked.parse(
|
||||
sanitizeResponseContent(
|
||||
models[selectedModelIdx]?.info?.meta?.description ?? ''
|
||||
).replaceAll('\n', '<br>')
|
||||
)
|
||||
)}
|
||||
placement="right"
|
||||
>
|
||||
<img
|
||||
@@ -97,11 +99,13 @@
|
||||
<div
|
||||
class="mt-0.5 text-base font-normal text-gray-500 dark:text-gray-400 line-clamp-3 markdown"
|
||||
>
|
||||
{@html DOMPurify.sanitize(marked.parse(
|
||||
sanitizeResponseContent(
|
||||
models[selectedModelIdx]?.info?.meta?.description
|
||||
).replaceAll('\n', '<br>')
|
||||
))}
|
||||
{@html DOMPurify.sanitize(
|
||||
marked.parse(
|
||||
sanitizeResponseContent(
|
||||
models[selectedModelIdx]?.info?.meta?.description
|
||||
).replaceAll('\n', '<br>')
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
{#if models[selectedModelIdx]?.info?.meta?.user}
|
||||
<div class="mt-0.5 text-sm font-normal text-gray-400 dark:text-gray-500">
|
||||
|
||||
@@ -399,7 +399,8 @@
|
||||
{/if}
|
||||
<iframe
|
||||
src={serveUrl}
|
||||
sandbox="allow-scripts allow-same-origin allow-downloads{($settings?.iframeSandboxAllowForms ?? false)
|
||||
sandbox="allow-scripts allow-same-origin allow-downloads{($settings?.iframeSandboxAllowForms ??
|
||||
false)
|
||||
? ' allow-forms'
|
||||
: ''}"
|
||||
class="w-full h-full border-none bg-white"
|
||||
|
||||
@@ -102,9 +102,7 @@
|
||||
<Cloud className="size-3.5" strokeWidth="2" />
|
||||
|
||||
{#if $selectedTerminalId && selectedLabel}
|
||||
<span class="truncate text-[13px] max-w-[100px] sm:max-w-[150px]"
|
||||
>{selectedLabel}</span
|
||||
>
|
||||
<span class="truncate text-[13px] max-w-[100px] sm:max-w-[150px]">{selectedLabel}</span>
|
||||
{/if}
|
||||
</button>
|
||||
</Tooltip>
|
||||
|
||||
@@ -165,21 +165,25 @@
|
||||
{#if models[selectedModelIdx]?.info?.meta?.description ?? null}
|
||||
<Tooltip
|
||||
className=" w-fit"
|
||||
content={DOMPurify.sanitize(marked.parse(
|
||||
sanitizeResponseContent(
|
||||
models[selectedModelIdx]?.info?.meta?.description ?? ''
|
||||
).replaceAll('\n', '<br>')
|
||||
))}
|
||||
content={DOMPurify.sanitize(
|
||||
marked.parse(
|
||||
sanitizeResponseContent(
|
||||
models[selectedModelIdx]?.info?.meta?.description ?? ''
|
||||
).replaceAll('\n', '<br>')
|
||||
)
|
||||
)}
|
||||
placement="top"
|
||||
>
|
||||
<div
|
||||
class="mt-0.5 px-2 text-sm font-normal text-gray-500 dark:text-gray-400 line-clamp-2 max-w-xl markdown"
|
||||
>
|
||||
{@html DOMPurify.sanitize(marked.parse(
|
||||
sanitizeResponseContent(
|
||||
models[selectedModelIdx]?.info?.meta?.description ?? ''
|
||||
).replaceAll('\n', '<br>')
|
||||
))}
|
||||
{@html DOMPurify.sanitize(
|
||||
marked.parse(
|
||||
sanitizeResponseContent(
|
||||
models[selectedModelIdx]?.info?.meta?.description ?? ''
|
||||
).replaceAll('\n', '<br>')
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
</Tooltip>
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
import { splitStream } from '$lib/utils';
|
||||
import Spinner from '$lib/components/common/Spinner.svelte';
|
||||
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
|
||||
@@ -101,9 +101,7 @@ export const tokenizeDisplayMath = (
|
||||
() => !requireBlockBoundary || isBlockBoundary(src, afterClose)
|
||||
];
|
||||
|
||||
return validators.every((v) => v())
|
||||
? { type, raw, text, displayMode: true }
|
||||
: undefined;
|
||||
return validators.every((v) => v()) ? { type, raw, text, displayMode: true } : undefined;
|
||||
};
|
||||
|
||||
export default function (options = {}) {
|
||||
|
||||
@@ -41,7 +41,11 @@ export function mentionExtension(opts: MentionOptions = {}) {
|
||||
// mentionStart fires on every '<' in the document, making the tokenizer a hot path.
|
||||
const trigger = opts.triggerChar ?? '@';
|
||||
const re = new RegExp(`^<\\${trigger}([\\w.\\-:/]+)(?:\\|([^>]*))?>`);
|
||||
const snapshot: MentionOptions = { triggerChar: trigger, className: opts.className, extraAttrs: opts.extraAttrs };
|
||||
const snapshot: MentionOptions = {
|
||||
triggerChar: trigger,
|
||||
className: opts.className,
|
||||
extraAttrs: opts.extraAttrs
|
||||
};
|
||||
|
||||
return {
|
||||
name: 'mention',
|
||||
|
||||
@@ -728,7 +728,8 @@
|
||||
|
||||
// Apply theme classes (mirrors logic from chat/Settings/General.svelte)
|
||||
const themes = ['dark', 'light', 'oled-dark'];
|
||||
let themeToApply = newTheme === 'oled-dark' ? 'dark' : newTheme === 'her' ? 'light' : newTheme;
|
||||
let themeToApply =
|
||||
newTheme === 'oled-dark' ? 'dark' : newTheme === 'her' ? 'light' : newTheme;
|
||||
if (newTheme === 'system') {
|
||||
themeToApply = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
||||
}
|
||||
@@ -988,13 +989,15 @@
|
||||
console.error('Error refreshing backend config:', error);
|
||||
}
|
||||
|
||||
// Relay auth token to desktop app for API access
|
||||
if (window.electronAPI?.send) {
|
||||
window.electronAPI.send({
|
||||
type: 'token:update',
|
||||
token: localStorage.token
|
||||
}).catch(() => {});
|
||||
}
|
||||
// Relay auth token to desktop app for API access
|
||||
if (window.electronAPI?.send) {
|
||||
window.electronAPI
|
||||
.send({
|
||||
type: 'token:update',
|
||||
token: localStorage.token
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
} else {
|
||||
// Redirect Invalid Session User to /auth Page
|
||||
localStorage.removeItem('token');
|
||||
|
||||
Reference in New Issue
Block a user