chore: format

This commit is contained in:
Timothy Jaeryang Baek
2026-06-01 13:56:55 -07:00
parent 1f49ebf431
commit 6fce92aa12
139 changed files with 92569 additions and 3249 deletions
@@ -81,9 +81,10 @@
// Convert Linkup params JSON string to object before sending
const linkupParams =
typeof webConfig.LINKUP_SEARCH_PARAMS === 'string' && webConfig.LINKUP_SEARCH_PARAMS.trim() !== ''
typeof webConfig.LINKUP_SEARCH_PARAMS === 'string' &&
webConfig.LINKUP_SEARCH_PARAMS.trim() !== ''
? JSON.parse(webConfig.LINKUP_SEARCH_PARAMS)
: webConfig.LINKUP_SEARCH_PARAMS ?? {};
: (webConfig.LINKUP_SEARCH_PARAMS ?? {});
const res = await updateRAGConfig(localStorage.token, {
web: { ...webConfig, LINKUP_SEARCH_PARAMS: linkupParams }
@@ -135,7 +136,7 @@
webConfig.LINKUP_SEARCH_PARAMS =
typeof webConfig.LINKUP_SEARCH_PARAMS === 'object'
? JSON.stringify(webConfig.LINKUP_SEARCH_PARAMS ?? {}, null, 2)
: webConfig.LINKUP_SEARCH_PARAMS ?? '';
: (webConfig.LINKUP_SEARCH_PARAMS ?? '');
}
});
</script>
@@ -261,7 +261,6 @@
<td class=" px-3 py-1">
{dayjs(user.last_active_at * 1000).fromNow()}
</td>
</tr>
{/each}
</tbody>
+23 -19
View File
@@ -438,24 +438,24 @@
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-4 h-4"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"
/>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
/>
</svg>
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-4 h-4"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"
/>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
/>
</svg>
</button>
</Tooltip>
{/if}
@@ -555,5 +555,9 @@
{/if}
{#if selectedUser}
<UserPreviewModal bind:show={showUserPreviewModal} userId={selectedUser.id} userName={selectedUser.name} />
<UserPreviewModal
bind:show={showUserPreviewModal}
userId={selectedUser.id}
userName={selectedUser.name}
/>
{/if}
@@ -24,13 +24,14 @@
? $models.find((m) => m.id === model_id)?.name || model_id
: $i18n.t('Select model');
$: filteredModels = (modelSearch
? $models.filter(
(m) =>
m.name.toLowerCase().includes(modelSearch.toLowerCase()) ||
m.id.toLowerCase().includes(modelSearch.toLowerCase())
)
: $models
$: filteredModels = (
modelSearch
? $models.filter(
(m) =>
m.name.toLowerCase().includes(modelSearch.toLowerCase()) ||
m.id.toLowerCase().includes(modelSearch.toLowerCase())
)
: $models
).filter((m) => !(m?.info?.meta?.hidden ?? false));
</script>
-1
View File
@@ -184,7 +184,6 @@
let files = [];
let params = {};
$: if (chatIdProp) {
navigateHandler();
}
@@ -230,7 +230,8 @@
{id}
content={model?.info?.meta?.capabilities?.citations == false
? replaceOutsideCode(content, (segment) =>
segment.replace(/\s*(\[(?:\d+(?:#[^,\]\s]+)?(?:,\s*\d+(?:#[^,\]\s]+)?)*)\])+/g, ''))
segment.replace(/\s*(\[(?:\d+(?:#[^,\]\s]+)?(?:,\s*\d+(?:#[^,\]\s]+)?)*)\])+/g, '')
)
: content}
{model}
{save}
+7 -1
View File
@@ -169,7 +169,13 @@
on:resize={positionContent}
/>
<span use:trigger style="display: contents; cursor: pointer;" role="button" aria-haspopup="true" aria-expanded={show}>
<span
use:trigger
style="display: contents; cursor: pointer;"
role="button"
aria-haspopup="true"
aria-expanded={show}
>
<slot />
</span>
@@ -368,7 +368,9 @@
// For the active chat, prefer the live dropdown selection.
if (id === $chatId) {
try { model = JSON.parse(sessionStorage.selectedModels || '[]').find((m) => m) ?? ''; } catch {}
try {
model = JSON.parse(sessionStorage.selectedModels || '[]').find((m) => m) ?? '';
} catch {}
}
if (!model && history?.messages && history?.currentId) {
@@ -1117,7 +1117,10 @@
onDestroy(() => {
clearTimeout(searchDebounceTimer);
if (pendingPollTimer) { clearInterval(pendingPollTimer); pendingPollTimer = null; }
if (pendingPollTimer) {
clearInterval(pendingPollTimer);
pendingPollTimer = null;
}
mediaQuery?.removeEventListener('change', handleMediaQuery);
const dropZone = document.querySelector('body');
dropZone?.removeEventListener('dragover', onDragOver);
@@ -1125,7 +1128,6 @@
dropZone?.removeEventListener('dragleave', onDragLeave);
});
const decodeString = (str: string) => {
try {
return decodeURIComponent(str);
@@ -64,10 +64,7 @@
: 'hover:bg-gray-100 dark:hover:bg-gray-850'}"
draggable="true"
on:dragstart={(e) => {
e.dataTransfer?.setData(
'application/x-kb-dir-move',
JSON.stringify({ dirId: directory.id })
);
e.dataTransfer?.setData('application/x-kb-dir-move', JSON.stringify({ dirId: directory.id }));
}}
on:dblclick={() => {
if (writeAccess) startRename();
@@ -83,10 +83,7 @@
on:dragstart={(e) => {
const fileId = file?.id ?? file?.tempId;
if (fileId) {
e.dataTransfer?.setData(
'application/x-kb-file-move',
JSON.stringify({ fileId })
);
e.dataTransfer?.setData('application/x-kb-file-move', JSON.stringify({ fileId }));
}
}}
>
@@ -61,9 +61,7 @@
{breadcrumbs.length === 0
? 'text-gray-700 dark:text-gray-300'
: 'text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-400'}
{dragOverCrumb === -1
? 'bg-gray-100 dark:bg-gray-800 rounded-lg'
: ''}"
{dragOverCrumb === -1 ? 'bg-gray-100 dark:bg-gray-800 rounded-lg' : ''}"
on:click={() => onNavigate(null)}
on:dragover={(e) => handleDragOver(e, -1)}
on:dragleave={() => handleDragLeave(-1)}
@@ -79,9 +77,7 @@
{i === breadcrumbs.length - 1
? 'text-gray-700 dark:text-gray-300'
: 'text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-400'}
{dragOverCrumb === i
? 'bg-gray-100 dark:bg-gray-800 rounded-lg'
: ''}"
{dragOverCrumb === i ? 'bg-gray-100 dark:bg-gray-800 rounded-lg' : ''}"
on:click={() => onNavigate(crumb.id)}
on:dragover={(e) => handleDragOver(e, i)}
on:dragleave={() => handleDragLeave(i)}
@@ -15,9 +15,7 @@
$: filteredSkillKeys = Object.keys(_skills).filter((id) => {
if (!searchQuery.trim()) return true;
const q = searchQuery.toLowerCase();
return (
_skills[id].name?.toLowerCase().includes(q) || _skills[id].id?.toLowerCase().includes(q)
);
return _skills[id].name?.toLowerCase().includes(q) || _skills[id].id?.toLowerCase().includes(q);
});
onMount(() => {