fix: Reference Chats in a chat opened in a tab offers that same chat (#34204)

In a chat opened in a tab beside another chat, the Reference Chats list left out the chat in the main view and offered the tab's own chat, so a chat could be attached to itself. The list now leaves out the chat you are typing in, whether it is open in the main view or in a tab.

Fixes #34203
This commit is contained in:
Classic298 authored and GitHub committed 2026-11-12 21:43:51 +09:00
1 parent 2ccf69ceac
commit 0ae9a1a6e1
3 files changed
+5 -3

No files matched your search

@@ -8,11 +8,11 @@
import Tooltip from '$lib/components/common/Tooltip.svelte';
import Spinner from '$lib/components/common/Spinner.svelte';
import Loader from '$lib/components/common/Loader.svelte';
import { chatId } from '$lib/stores';
import SearchInput from './SearchInput.svelte';
const i18n = getContext<typeof import('$lib/i18n').default>('i18n');
export let chatId: string = '';
export let onSelect = (e) => {};
let loaded = false;
@@ -90,7 +90,7 @@
items = [
...items,
...res
.filter((item) => item?.id !== $chatId)
.filter((item) => item?.id !== chatId)
.map((item) => {
return {
...item,