2026-04-11 15:59:14 +08:00
|
|
|
<script setup lang="ts">
|
2026-05-07 13:49:57 +08:00
|
|
|
import { renameSession, setSessionWorkspace, batchDeleteSessions, exportSession } from "@/api/hermes/sessions";
|
2026-05-03 22:10:40 +08:00
|
|
|
import { useChatStore, type Session } from "@/stores/hermes/chat";
|
|
|
|
|
import { useSessionBrowserPrefsStore } from "@/stores/hermes/session-browser-prefs";
|
|
|
|
|
import {
|
|
|
|
|
NButton,
|
|
|
|
|
NDropdown,
|
|
|
|
|
NInput,
|
|
|
|
|
NModal,
|
|
|
|
|
NTooltip,
|
2026-05-06 16:15:42 +08:00
|
|
|
NPopconfirm,
|
2026-05-03 22:10:40 +08:00
|
|
|
useMessage,
|
|
|
|
|
} from "naive-ui";
|
|
|
|
|
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from "vue";
|
|
|
|
|
import { useI18n } from "vue-i18n";
|
|
|
|
|
import { getSourceLabel } from "@/shared/session-display";
|
|
|
|
|
import { copyToClipboard } from "@/utils/clipboard";
|
|
|
|
|
import FolderPicker from "./FolderPicker.vue";
|
|
|
|
|
import ChatInput from "./ChatInput.vue";
|
|
|
|
|
import ConversationMonitorPane from "./ConversationMonitorPane.vue";
|
|
|
|
|
import MessageList from "./MessageList.vue";
|
|
|
|
|
import SessionListItem from "./SessionListItem.vue";
|
|
|
|
|
import DrawerPanel from "./DrawerPanel.vue";
|
|
|
|
|
|
|
|
|
|
const chatStore = useChatStore();
|
|
|
|
|
const sessionBrowserPrefsStore = useSessionBrowserPrefsStore();
|
|
|
|
|
const message = useMessage();
|
|
|
|
|
const { t } = useI18n();
|
|
|
|
|
|
|
|
|
|
const showDrawer = ref(false);
|
|
|
|
|
const drawerActiveTab = ref<"terminal" | "files">("files");
|
|
|
|
|
|
|
|
|
|
const currentMode = ref<"chat" | "live">("chat");
|
2026-04-22 02:09:58 +02:00
|
|
|
|
2026-05-06 16:15:42 +08:00
|
|
|
// Batch selection mode
|
|
|
|
|
const isBatchMode = ref(false);
|
|
|
|
|
const selectedSessionIds = ref<Set<string>>(new Set());
|
|
|
|
|
|
2026-04-18 00:00:24 +08:00
|
|
|
// Initialize synchronously from the media query so first paint is correct.
|
|
|
|
|
// On narrow viewports the session list is an absolute-positioned overlay
|
|
|
|
|
// (z-index 10) on top of the chat area; if we default to `true`, onMounted
|
|
|
|
|
// only flips it to `false` AFTER the first render, causing a visible flash
|
|
|
|
|
// where the session list covers the chat content ("auto-fixes after a
|
|
|
|
|
// moment" — that was the race).
|
|
|
|
|
const showSessions = ref(
|
2026-05-03 22:10:40 +08:00
|
|
|
typeof window === "undefined" ||
|
|
|
|
|
!window.matchMedia("(max-width: 768px)").matches,
|
|
|
|
|
);
|
|
|
|
|
let mobileQuery: MediaQueryList | null = null;
|
|
|
|
|
const isMobile = ref(false);
|
2026-04-15 09:12:54 +08:00
|
|
|
|
2026-04-15 10:28:53 +08:00
|
|
|
function handleSessionClick(sessionId: string) {
|
2026-05-03 22:10:40 +08:00
|
|
|
chatStore.switchSession(sessionId);
|
|
|
|
|
if (mobileQuery?.matches) showSessions.value = false;
|
2026-04-15 10:28:53 +08:00
|
|
|
}
|
|
|
|
|
|
2026-04-15 09:12:54 +08:00
|
|
|
function handleMobileChange(e: MediaQueryListEvent | MediaQueryList) {
|
2026-05-03 22:10:40 +08:00
|
|
|
isMobile.value = e.matches;
|
2026-04-15 09:12:54 +08:00
|
|
|
if (e.matches && showSessions.value) {
|
2026-05-03 22:10:40 +08:00
|
|
|
showSessions.value = false;
|
2026-04-15 09:12:54 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
2026-05-03 22:10:40 +08:00
|
|
|
mobileQuery = window.matchMedia("(max-width: 768px)");
|
|
|
|
|
handleMobileChange(mobileQuery);
|
|
|
|
|
mobileQuery.addEventListener("change", handleMobileChange);
|
|
|
|
|
});
|
2026-04-15 09:12:54 +08:00
|
|
|
|
|
|
|
|
onUnmounted(() => {
|
2026-05-03 22:10:40 +08:00
|
|
|
mobileQuery?.removeEventListener("change", handleMobileChange);
|
|
|
|
|
});
|
|
|
|
|
const showRenameModal = ref(false);
|
|
|
|
|
const renameValue = ref("");
|
|
|
|
|
const renameSessionId = ref<string | null>(null);
|
|
|
|
|
const renameInputRef = ref<InstanceType<typeof NInput> | null>(null);
|
|
|
|
|
const collapsedGroups = ref<Set<string>>(
|
|
|
|
|
new Set(JSON.parse(localStorage.getItem("hermes_collapsed_groups") || "[]")),
|
|
|
|
|
);
|
2026-04-11 15:59:14 +08:00
|
|
|
|
2026-04-13 00:52:34 +08:00
|
|
|
// Source sort order: api_server first, cron last, others alphabetical
|
|
|
|
|
function sourceSortKey(source: string): number {
|
2026-05-03 22:10:40 +08:00
|
|
|
if (source === "api_server") return -1;
|
|
|
|
|
if (source === "cron") return 999;
|
|
|
|
|
return 0;
|
2026-04-13 00:52:34 +08:00
|
|
|
}
|
|
|
|
|
|
2026-04-19 19:34:14 +08:00
|
|
|
function sortSessionsWithActiveFirst(items: Session[]): Session[] {
|
|
|
|
|
return [...items].sort((a, b) => {
|
2026-05-03 22:10:40 +08:00
|
|
|
return (b.updatedAt || 0) - (a.updatedAt || 0);
|
|
|
|
|
});
|
2026-04-19 19:34:14 +08:00
|
|
|
}
|
|
|
|
|
|
2026-04-13 00:52:34 +08:00
|
|
|
// Group sessions by source, with sort order
|
|
|
|
|
interface SessionGroup {
|
2026-05-03 22:10:40 +08:00
|
|
|
source: string;
|
|
|
|
|
label: string;
|
|
|
|
|
sessions: Session[];
|
2026-04-13 00:52:34 +08:00
|
|
|
}
|
|
|
|
|
|
2026-04-22 02:09:58 +02:00
|
|
|
const pinnedSessions = computed(() =>
|
2026-05-03 22:10:40 +08:00
|
|
|
sortSessionsWithActiveFirst(
|
|
|
|
|
chatStore.sessions.filter((session) =>
|
|
|
|
|
sessionBrowserPrefsStore.isPinned(session.id),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
2026-04-22 02:09:58 +02:00
|
|
|
|
2026-04-13 00:52:34 +08:00
|
|
|
const groupedSessions = computed<SessionGroup[]>(() => {
|
2026-05-03 22:10:40 +08:00
|
|
|
const map = new Map<string, Session[]>();
|
2026-04-19 19:34:14 +08:00
|
|
|
for (const s of chatStore.sessions) {
|
2026-05-03 22:10:40 +08:00
|
|
|
if (sessionBrowserPrefsStore.isPinned(s.id)) continue;
|
|
|
|
|
const key = s.source || "";
|
|
|
|
|
if (!map.has(key)) map.set(key, []);
|
|
|
|
|
map.get(key)!.push(s);
|
2026-04-13 00:52:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const keys = [...map.keys()].sort((a, b) => {
|
2026-05-03 22:10:40 +08:00
|
|
|
const ka = sourceSortKey(a);
|
|
|
|
|
const kb = sourceSortKey(b);
|
|
|
|
|
if (ka !== kb) return ka - kb;
|
|
|
|
|
return a.localeCompare(b);
|
|
|
|
|
});
|
2026-04-13 00:52:34 +08:00
|
|
|
|
2026-05-03 22:10:40 +08:00
|
|
|
return keys.map((key) => ({
|
2026-04-13 00:52:34 +08:00
|
|
|
source: key,
|
2026-05-03 22:10:40 +08:00
|
|
|
label: key ? getSourceLabel(key) : t("chat.other"),
|
2026-04-19 19:34:14 +08:00
|
|
|
sessions: sortSessionsWithActiveFirst(map.get(key)!),
|
2026-05-03 22:10:40 +08:00
|
|
|
}));
|
|
|
|
|
});
|
2026-04-11 15:59:14 +08:00
|
|
|
|
2026-04-13 00:52:34 +08:00
|
|
|
function toggleGroup(source: string) {
|
2026-05-03 22:10:40 +08:00
|
|
|
const isExpanded = !collapsedGroups.value.has(source);
|
2026-04-13 00:52:34 +08:00
|
|
|
if (isExpanded) {
|
2026-05-03 22:10:40 +08:00
|
|
|
collapsedGroups.value = new Set([...collapsedGroups.value, source]);
|
2026-04-13 00:52:34 +08:00
|
|
|
} else {
|
|
|
|
|
collapsedGroups.value = new Set(
|
2026-05-03 22:10:40 +08:00
|
|
|
groupedSessions.value.map((g) => g.source).filter((s) => s !== source),
|
|
|
|
|
);
|
|
|
|
|
const group = groupedSessions.value.find((g) => g.source === source);
|
2026-04-13 00:52:34 +08:00
|
|
|
if (group?.sessions.length) {
|
2026-05-03 22:10:40 +08:00
|
|
|
chatStore.switchSession(group.sessions[0].id);
|
2026-04-13 00:52:34 +08:00
|
|
|
}
|
|
|
|
|
}
|
2026-05-03 22:10:40 +08:00
|
|
|
localStorage.setItem(
|
|
|
|
|
"hermes_collapsed_groups",
|
|
|
|
|
JSON.stringify([...collapsedGroups.value]),
|
|
|
|
|
);
|
2026-04-13 00:52:34 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-03 22:10:40 +08:00
|
|
|
watch(
|
|
|
|
|
groupedSessions,
|
|
|
|
|
(groups) => {
|
|
|
|
|
if (localStorage.getItem("hermes_collapsed_groups") !== null) {
|
|
|
|
|
const activeSource = chatStore.activeSession?.source;
|
|
|
|
|
if (activeSource && collapsedGroups.value.has(activeSource)) {
|
|
|
|
|
collapsedGroups.value = new Set(
|
|
|
|
|
[...collapsedGroups.value].filter(
|
|
|
|
|
(source) => source !== activeSource,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
localStorage.setItem(
|
|
|
|
|
"hermes_collapsed_groups",
|
|
|
|
|
JSON.stringify([...collapsedGroups.value]),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
return;
|
2026-04-15 11:00:47 +08:00
|
|
|
}
|
2026-05-03 22:10:40 +08:00
|
|
|
collapsedGroups.value = new Set(
|
|
|
|
|
groups.slice(1).map((group) => group.source),
|
|
|
|
|
);
|
|
|
|
|
localStorage.setItem(
|
|
|
|
|
"hermes_collapsed_groups",
|
|
|
|
|
JSON.stringify([...collapsedGroups.value]),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
{ once: true },
|
|
|
|
|
);
|
2026-04-13 00:52:34 +08:00
|
|
|
|
2026-04-22 02:09:58 +02:00
|
|
|
watch(
|
2026-05-03 22:10:40 +08:00
|
|
|
() => [
|
|
|
|
|
chatStore.sessionsLoaded,
|
|
|
|
|
...chatStore.sessions.map((session) => session.id),
|
|
|
|
|
],
|
|
|
|
|
(value) => {
|
|
|
|
|
const sessionIds = value.slice(1) as string[];
|
|
|
|
|
if (!value[0] || sessionIds.length === 0) return;
|
|
|
|
|
sessionBrowserPrefsStore.pruneMissingSessions(sessionIds);
|
2026-04-22 02:09:58 +02:00
|
|
|
},
|
|
|
|
|
{ immediate: true },
|
2026-05-03 22:10:40 +08:00
|
|
|
);
|
2026-04-22 02:09:58 +02:00
|
|
|
|
2026-05-03 22:10:40 +08:00
|
|
|
const activeSessionTitle = computed(
|
|
|
|
|
() => chatStore.activeSession?.title || t("chat.newChat"),
|
|
|
|
|
);
|
2026-04-12 23:59:18 +08:00
|
|
|
|
2026-04-22 02:09:58 +02:00
|
|
|
const headerTitle = computed(() =>
|
2026-05-03 22:10:40 +08:00
|
|
|
currentMode.value === "live"
|
|
|
|
|
? t("chat.liveSessions")
|
|
|
|
|
: activeSessionTitle.value,
|
|
|
|
|
);
|
2026-04-22 02:09:58 +02:00
|
|
|
|
2026-04-12 23:59:18 +08:00
|
|
|
const activeSessionSource = computed(() =>
|
2026-05-03 22:10:40 +08:00
|
|
|
currentMode.value === "chat" ? chatStore.activeSession?.source || "" : "",
|
|
|
|
|
);
|
2026-04-11 15:59:14 +08:00
|
|
|
|
|
|
|
|
function handleNewChat() {
|
2026-05-03 22:10:40 +08:00
|
|
|
chatStore.newChat();
|
2026-04-11 15:59:14 +08:00
|
|
|
}
|
|
|
|
|
|
2026-04-23 12:09:39 +08:00
|
|
|
async function copySessionId(id?: string) {
|
2026-05-03 22:10:40 +08:00
|
|
|
const sessionId = id || chatStore.activeSessionId;
|
2026-04-12 23:59:18 +08:00
|
|
|
if (sessionId) {
|
2026-05-03 22:10:40 +08:00
|
|
|
const ok = await copyToClipboard(sessionId);
|
|
|
|
|
if (ok) message.success(t("common.copied"));
|
|
|
|
|
else message.error(t("common.copied") + " ✗");
|
2026-04-11 15:59:14 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function handleDeleteSession(id: string) {
|
2026-05-03 22:10:40 +08:00
|
|
|
sessionBrowserPrefsStore.removePinned(id);
|
|
|
|
|
chatStore.deleteSession(id);
|
|
|
|
|
message.success(t("chat.sessionDeleted"));
|
2026-04-11 15:59:14 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-06 16:15:42 +08:00
|
|
|
function toggleBatchMode() {
|
|
|
|
|
isBatchMode.value = !isBatchMode.value;
|
|
|
|
|
if (!isBatchMode.value) {
|
|
|
|
|
selectedSessionIds.value.clear();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function toggleSessionSelection(id: string) {
|
|
|
|
|
if (selectedSessionIds.value.has(id)) {
|
|
|
|
|
selectedSessionIds.value.delete(id);
|
|
|
|
|
} else {
|
|
|
|
|
selectedSessionIds.value.add(id);
|
|
|
|
|
}
|
|
|
|
|
selectedSessionIds.value = new Set(selectedSessionIds.value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function isSessionSelected(id: string): boolean {
|
|
|
|
|
return selectedSessionIds.value.has(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function handleBatchDelete() {
|
|
|
|
|
if (selectedSessionIds.value.size === 0) return;
|
|
|
|
|
|
|
|
|
|
const ids = Array.from(selectedSessionIds.value);
|
|
|
|
|
try {
|
|
|
|
|
const result = await batchDeleteSessions(ids);
|
|
|
|
|
if (result.deleted > 0) {
|
|
|
|
|
// Remove from pinned sessions
|
|
|
|
|
for (const id of ids) {
|
|
|
|
|
sessionBrowserPrefsStore.removePinned(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Remove deleted sessions from local store (without calling API again)
|
|
|
|
|
// Use loadSessions to refresh from server instead of manual filtering
|
|
|
|
|
await chatStore.loadSessions();
|
|
|
|
|
|
|
|
|
|
message.success(t("chat.batchDeleteSuccess", { count: result.deleted }));
|
|
|
|
|
if (result.failed > 0) {
|
|
|
|
|
message.warning(t("chat.batchDeletePartial", { failed: result.failed }));
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
message.error(t("chat.batchDeleteFailed"));
|
|
|
|
|
}
|
|
|
|
|
} catch (err: any) {
|
|
|
|
|
message.error(t("chat.batchDeleteFailed"));
|
|
|
|
|
} finally {
|
|
|
|
|
isBatchMode.value = false;
|
|
|
|
|
selectedSessionIds.value.clear();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function selectAllSessions() {
|
|
|
|
|
selectedSessionIds.value.clear();
|
|
|
|
|
for (const session of chatStore.sessions) {
|
|
|
|
|
if (session.id !== chatStore.activeSessionId) {
|
|
|
|
|
selectedSessionIds.value.add(session.id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
selectedSessionIds.value = new Set(selectedSessionIds.value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const selectedCount = computed(() => selectedSessionIds.value.size);
|
|
|
|
|
const canSelectAll = computed(() => {
|
|
|
|
|
return chatStore.sessions.some(s => s.id !== chatStore.activeSessionId);
|
|
|
|
|
});
|
|
|
|
|
|
2026-05-03 22:10:40 +08:00
|
|
|
const contextSessionId = ref<string | null>(null);
|
2026-04-22 02:09:58 +02:00
|
|
|
const contextSessionPinned = computed(() =>
|
2026-05-03 22:10:40 +08:00
|
|
|
contextSessionId.value
|
|
|
|
|
? sessionBrowserPrefsStore.isPinned(contextSessionId.value)
|
|
|
|
|
: false,
|
|
|
|
|
);
|
2026-04-12 23:59:18 +08:00
|
|
|
|
2026-04-13 15:15:14 +08:00
|
|
|
const contextMenuOptions = computed(() => [
|
2026-05-03 22:10:40 +08:00
|
|
|
{
|
|
|
|
|
label: t(contextSessionPinned.value ? "chat.unpin" : "chat.pin"),
|
|
|
|
|
key: "pin",
|
|
|
|
|
},
|
|
|
|
|
{ label: t("chat.rename"), key: "rename" },
|
|
|
|
|
{ label: t("chat.setWorkspace"), key: "workspace" },
|
2026-05-07 13:49:57 +08:00
|
|
|
{
|
|
|
|
|
label: t("chat.export"),
|
|
|
|
|
key: "export",
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
label: t("chat.exportFull"),
|
|
|
|
|
key: "export-full",
|
|
|
|
|
children: [
|
|
|
|
|
{ label: "JSON", key: "export-full-json" },
|
|
|
|
|
{ label: "TXT", key: "export-full-txt" },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: t("chat.exportCompressed"),
|
|
|
|
|
key: "export-compressed",
|
|
|
|
|
children: [
|
|
|
|
|
{ label: "JSON", key: "export-compressed-json" },
|
|
|
|
|
{ label: "TXT", key: "export-compressed-txt" },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
2026-05-03 22:10:40 +08:00
|
|
|
{ label: t("chat.copySessionId"), key: "copy-id" },
|
|
|
|
|
]);
|
2026-04-12 23:59:18 +08:00
|
|
|
|
|
|
|
|
function handleContextMenu(e: MouseEvent, sessionId: string) {
|
2026-05-03 22:10:40 +08:00
|
|
|
e.preventDefault();
|
|
|
|
|
contextSessionId.value = sessionId;
|
|
|
|
|
showContextMenu.value = true;
|
|
|
|
|
contextMenuX.value = e.clientX;
|
|
|
|
|
contextMenuY.value = e.clientY;
|
2026-04-12 23:59:18 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-03 22:10:40 +08:00
|
|
|
const showContextMenu = ref(false);
|
|
|
|
|
const contextMenuX = ref(0);
|
|
|
|
|
const contextMenuY = ref(0);
|
2026-04-12 23:59:18 +08:00
|
|
|
|
2026-05-07 13:49:57 +08:00
|
|
|
function parseExportKey(key: string): { mode: 'full' | 'compressed'; ext: 'json' | 'txt' } | null {
|
|
|
|
|
if (key === 'export-full-json') return { mode: 'full', ext: 'json' }
|
|
|
|
|
if (key === 'export-full-txt') return { mode: 'full', ext: 'txt' }
|
|
|
|
|
if (key === 'export-compressed-json') return { mode: 'compressed', ext: 'json' }
|
|
|
|
|
if (key === 'export-compressed-txt') return { mode: 'compressed', ext: 'txt' }
|
|
|
|
|
return null
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function handleContextMenuSelect(key: string) {
|
2026-05-03 22:10:40 +08:00
|
|
|
showContextMenu.value = false;
|
|
|
|
|
if (!contextSessionId.value) return;
|
|
|
|
|
if (key === "pin") {
|
|
|
|
|
sessionBrowserPrefsStore.togglePinned(contextSessionId.value);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (key === "copy-id") {
|
|
|
|
|
copySessionId(contextSessionId.value);
|
2026-05-07 13:49:57 +08:00
|
|
|
} else if (parseExportKey(key)) {
|
|
|
|
|
const { mode, ext } = parseExportKey(key)!;
|
|
|
|
|
const loadingMsg = mode === "compressed" ? message.loading(t("chat.exportCompressing"), { duration: 0 }) : null;
|
|
|
|
|
try {
|
|
|
|
|
await exportSession(contextSessionId.value, mode, ext);
|
|
|
|
|
loadingMsg?.destroy();
|
|
|
|
|
message.success(t("chat.exportSuccess"));
|
|
|
|
|
} catch {
|
|
|
|
|
loadingMsg?.destroy();
|
|
|
|
|
message.error(t("chat.exportFailed"));
|
|
|
|
|
}
|
2026-05-03 22:10:40 +08:00
|
|
|
} else if (key === "workspace") {
|
|
|
|
|
const session = chatStore.sessions.find(
|
|
|
|
|
(s) => s.id === contextSessionId.value,
|
|
|
|
|
);
|
|
|
|
|
workspaceSessionId.value = contextSessionId.value;
|
|
|
|
|
workspaceValue.value = session?.workspace || "";
|
|
|
|
|
showWorkspaceModal.value = true;
|
|
|
|
|
} else if (key === "rename") {
|
|
|
|
|
const session = chatStore.sessions.find(
|
|
|
|
|
(s) => s.id === contextSessionId.value,
|
|
|
|
|
);
|
|
|
|
|
renameSessionId.value = contextSessionId.value;
|
|
|
|
|
renameValue.value = session?.title || "";
|
|
|
|
|
showRenameModal.value = true;
|
2026-04-12 23:59:18 +08:00
|
|
|
nextTick(() => {
|
2026-05-03 22:10:40 +08:00
|
|
|
renameInputRef.value?.focus();
|
|
|
|
|
});
|
2026-04-12 23:59:18 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function handleClickOutside() {
|
2026-05-03 22:10:40 +08:00
|
|
|
showContextMenu.value = false;
|
2026-04-12 23:59:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function handleRenameConfirm() {
|
2026-05-03 22:10:40 +08:00
|
|
|
if (!renameSessionId.value || !renameValue.value.trim()) return;
|
|
|
|
|
const ok = await renameSession(
|
|
|
|
|
renameSessionId.value,
|
|
|
|
|
renameValue.value.trim(),
|
|
|
|
|
);
|
2026-04-12 23:59:18 +08:00
|
|
|
if (ok) {
|
2026-05-03 22:10:40 +08:00
|
|
|
const session = chatStore.sessions.find(
|
|
|
|
|
(s) => s.id === renameSessionId.value,
|
|
|
|
|
);
|
|
|
|
|
if (session) session.title = renameValue.value.trim();
|
2026-04-12 23:59:18 +08:00
|
|
|
if (chatStore.activeSession?.id === renameSessionId.value) {
|
2026-05-03 22:10:40 +08:00
|
|
|
chatStore.activeSession.title = renameValue.value.trim();
|
2026-04-12 23:59:18 +08:00
|
|
|
}
|
2026-05-03 22:10:40 +08:00
|
|
|
message.success(t("chat.renamed"));
|
2026-04-12 23:59:18 +08:00
|
|
|
} else {
|
2026-05-03 22:10:40 +08:00
|
|
|
message.error(t("chat.renameFailed"));
|
2026-04-12 23:59:18 +08:00
|
|
|
}
|
2026-05-03 22:10:40 +08:00
|
|
|
showRenameModal.value = false;
|
2026-04-12 23:59:18 +08:00
|
|
|
}
|
2026-04-30 20:17:38 +08:00
|
|
|
|
2026-05-03 22:10:40 +08:00
|
|
|
const showWorkspaceModal = ref(false);
|
|
|
|
|
const workspaceValue = ref("");
|
|
|
|
|
const workspaceSessionId = ref<string | null>(null);
|
2026-04-30 20:17:38 +08:00
|
|
|
|
|
|
|
|
async function handleWorkspaceConfirm() {
|
2026-05-03 22:10:40 +08:00
|
|
|
if (!workspaceSessionId.value) return;
|
|
|
|
|
const ok = await setSessionWorkspace(
|
|
|
|
|
workspaceSessionId.value,
|
|
|
|
|
workspaceValue.value || null,
|
|
|
|
|
);
|
2026-04-30 20:17:38 +08:00
|
|
|
if (ok) {
|
2026-05-03 22:10:40 +08:00
|
|
|
const session = chatStore.sessions.find(
|
|
|
|
|
(s) => s.id === workspaceSessionId.value,
|
|
|
|
|
);
|
|
|
|
|
if (session) session.workspace = workspaceValue.value || null;
|
2026-04-30 20:17:38 +08:00
|
|
|
if (chatStore.activeSession?.id === workspaceSessionId.value) {
|
2026-05-03 22:10:40 +08:00
|
|
|
chatStore.activeSession.workspace = workspaceValue.value || null;
|
2026-04-30 20:17:38 +08:00
|
|
|
}
|
2026-05-03 22:10:40 +08:00
|
|
|
message.success(t("chat.workspaceSet"));
|
2026-04-30 20:17:38 +08:00
|
|
|
} else {
|
2026-05-03 22:10:40 +08:00
|
|
|
message.error(t("chat.workspaceSetFailed"));
|
2026-04-30 20:17:38 +08:00
|
|
|
}
|
2026-05-03 22:10:40 +08:00
|
|
|
showWorkspaceModal.value = false;
|
2026-04-30 20:17:38 +08:00
|
|
|
}
|
2026-04-11 15:59:14 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div class="chat-panel">
|
2026-05-03 22:10:40 +08:00
|
|
|
<div
|
|
|
|
|
v-if="currentMode === 'chat'"
|
|
|
|
|
class="session-backdrop"
|
|
|
|
|
:class="{ active: showSessions }"
|
|
|
|
|
@click="showSessions = false"
|
|
|
|
|
/>
|
|
|
|
|
<aside
|
|
|
|
|
v-if="currentMode === 'chat'"
|
|
|
|
|
class="session-list"
|
|
|
|
|
:class="{ collapsed: !showSessions }"
|
|
|
|
|
>
|
2026-04-11 15:59:14 +08:00
|
|
|
<div class="session-list-header">
|
2026-05-03 22:10:40 +08:00
|
|
|
<span v-if="showSessions" class="session-list-title">{{
|
|
|
|
|
t("chat.webUiSessions")
|
|
|
|
|
}}</span>
|
2026-04-15 10:28:53 +08:00
|
|
|
<div class="session-list-actions">
|
|
|
|
|
<button class="session-close-btn" @click="showSessions = false">
|
2026-05-03 22:10:40 +08:00
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="18" y1="6" x2="6" y2="18" />
|
|
|
|
|
<line x1="6" y1="6" x2="18" y2="18" />
|
|
|
|
|
</svg>
|
2026-04-15 10:28:53 +08:00
|
|
|
</button>
|
2026-05-06 16:15:42 +08:00
|
|
|
<NButton
|
|
|
|
|
v-if="!isBatchMode"
|
|
|
|
|
quaternary
|
|
|
|
|
size="tiny"
|
|
|
|
|
@click="toggleBatchMode"
|
|
|
|
|
:title="t('chat.toggleBatchMode')"
|
|
|
|
|
>
|
|
|
|
|
<template #icon>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<path d="M9 11l3 3L22 4" />
|
|
|
|
|
<path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11" />
|
|
|
|
|
</svg>
|
|
|
|
|
</template>
|
|
|
|
|
</NButton>
|
|
|
|
|
<NButton
|
|
|
|
|
v-if="isBatchMode"
|
|
|
|
|
quaternary
|
|
|
|
|
size="tiny"
|
|
|
|
|
@click="selectAllSessions"
|
|
|
|
|
:disabled="!canSelectAll"
|
|
|
|
|
:title="t('chat.selectAll')"
|
|
|
|
|
>
|
|
|
|
|
<template #icon>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<path d="M9 11l3 3L22 4" />
|
|
|
|
|
<path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11" />
|
|
|
|
|
</svg>
|
|
|
|
|
</template>
|
|
|
|
|
</NButton>
|
|
|
|
|
<NPopconfirm
|
|
|
|
|
v-if="isBatchMode && selectedCount > 0"
|
|
|
|
|
@positive-click="handleBatchDelete"
|
|
|
|
|
>
|
|
|
|
|
<template #trigger>
|
|
|
|
|
<NButton quaternary size="tiny" type="error">
|
|
|
|
|
<template #icon>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<polyline points="3 6 5 6 21 6" />
|
|
|
|
|
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
|
|
|
|
|
</svg>
|
|
|
|
|
</template>
|
|
|
|
|
</NButton>
|
|
|
|
|
</template>
|
|
|
|
|
{{ t('chat.confirmBatchDelete', { count: selectedCount }) }}
|
|
|
|
|
</NPopconfirm>
|
|
|
|
|
<NButton
|
|
|
|
|
v-if="isBatchMode"
|
|
|
|
|
quaternary
|
|
|
|
|
size="tiny"
|
|
|
|
|
@click="toggleBatchMode"
|
|
|
|
|
>
|
|
|
|
|
<template #icon>
|
|
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="18" y1="6" x2="6" y2="18" />
|
|
|
|
|
<line x1="6" y1="6" x2="18" y2="18" />
|
|
|
|
|
</svg>
|
|
|
|
|
</template>
|
|
|
|
|
</NButton>
|
2026-04-15 10:28:53 +08:00
|
|
|
<NButton quaternary size="tiny" @click="handleNewChat" circle>
|
2026-04-22 02:09:58 +02:00
|
|
|
<template #icon>
|
2026-05-03 22:10:40 +08:00
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="12" y1="5" x2="12" y2="19" />
|
|
|
|
|
<line x1="5" y1="12" x2="19" y2="12" />
|
|
|
|
|
</svg>
|
2026-04-22 02:09:58 +02:00
|
|
|
</template>
|
|
|
|
|
</NButton>
|
2026-04-15 10:28:53 +08:00
|
|
|
</div>
|
2026-04-11 15:59:14 +08:00
|
|
|
</div>
|
2026-05-02 03:00:47 +02:00
|
|
|
<div v-if="showSessions" class="session-scope-note">
|
2026-05-03 22:10:40 +08:00
|
|
|
<span>{{ t("chat.sessionScopeHint") }}</span>
|
2026-05-02 03:00:47 +02:00
|
|
|
<RouterLink class="session-scope-link" :to="{ name: 'hermes.history' }">
|
2026-05-03 22:10:40 +08:00
|
|
|
{{ t("chat.openHistory") }}
|
2026-05-02 03:00:47 +02:00
|
|
|
</RouterLink>
|
|
|
|
|
</div>
|
2026-04-11 15:59:14 +08:00
|
|
|
<div v-if="showSessions" class="session-items">
|
2026-05-03 22:10:40 +08:00
|
|
|
<div
|
|
|
|
|
v-if="chatStore.isLoadingSessions && chatStore.sessions.length === 0"
|
|
|
|
|
class="session-loading"
|
|
|
|
|
>
|
|
|
|
|
{{ t("common.loading") }}
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else-if="chatStore.sessions.length === 0" class="session-empty">
|
|
|
|
|
{{ t("chat.noSessions") }}
|
|
|
|
|
</div>
|
2026-04-22 02:09:58 +02:00
|
|
|
|
|
|
|
|
<template v-if="pinnedSessions.length > 0">
|
|
|
|
|
<div class="session-group-header session-group-header--static">
|
2026-05-03 22:10:40 +08:00
|
|
|
<span class="session-group-label">{{ t("chat.pinned") }}</span>
|
2026-04-22 02:09:58 +02:00
|
|
|
<span class="session-group-count">{{ pinnedSessions.length }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<SessionListItem
|
|
|
|
|
v-for="s in pinnedSessions"
|
|
|
|
|
:key="`pinned-${s.id}`"
|
|
|
|
|
:session="s"
|
|
|
|
|
:active="s.id === chatStore.activeSessionId"
|
|
|
|
|
:pinned="true"
|
2026-05-03 22:10:40 +08:00
|
|
|
:can-delete="
|
|
|
|
|
s.id !== chatStore.activeSessionId ||
|
|
|
|
|
chatStore.sessions.length > 1
|
|
|
|
|
"
|
2026-04-29 16:26:24 +08:00
|
|
|
:streaming="chatStore.isSessionLive(s.id)"
|
2026-05-06 16:15:42 +08:00
|
|
|
:selectable="isBatchMode"
|
|
|
|
|
:selected="isSessionSelected(s.id)"
|
2026-04-22 02:09:58 +02:00
|
|
|
@select="handleSessionClick(s.id)"
|
|
|
|
|
@contextmenu="handleContextMenu($event, s.id)"
|
|
|
|
|
@delete="handleDeleteSession(s.id)"
|
2026-05-06 16:15:42 +08:00
|
|
|
@toggle-select="toggleSessionSelection(s.id)"
|
2026-04-22 02:09:58 +02:00
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
|
2026-04-13 00:52:34 +08:00
|
|
|
<template v-for="group in groupedSessions" :key="group.source">
|
|
|
|
|
<div class="session-group-header" @click="toggleGroup(group.source)">
|
2026-05-03 22:10:40 +08:00
|
|
|
<svg
|
|
|
|
|
width="10"
|
|
|
|
|
height="10"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
class="group-chevron"
|
|
|
|
|
:class="{ collapsed: collapsedGroups.has(group.source) }"
|
|
|
|
|
>
|
|
|
|
|
<polyline points="9 18 15 12 9 6" />
|
|
|
|
|
</svg>
|
2026-04-13 00:52:34 +08:00
|
|
|
<span class="session-group-label">{{ group.label }}</span>
|
|
|
|
|
<span class="session-group-count">{{ group.sessions.length }}</span>
|
2026-04-11 15:59:14 +08:00
|
|
|
</div>
|
2026-04-13 00:52:34 +08:00
|
|
|
<template v-if="!collapsedGroups.has(group.source)">
|
2026-04-22 02:09:58 +02:00
|
|
|
<SessionListItem
|
2026-04-13 00:52:34 +08:00
|
|
|
v-for="s in group.sessions"
|
|
|
|
|
:key="s.id"
|
2026-04-22 02:09:58 +02:00
|
|
|
:session="s"
|
|
|
|
|
:active="s.id === chatStore.activeSessionId"
|
|
|
|
|
:pinned="false"
|
2026-05-03 22:10:40 +08:00
|
|
|
:can-delete="
|
|
|
|
|
s.id !== chatStore.activeSessionId ||
|
|
|
|
|
chatStore.sessions.length > 1
|
|
|
|
|
"
|
2026-04-29 16:26:24 +08:00
|
|
|
:streaming="chatStore.isSessionLive(s.id)"
|
2026-05-06 16:15:42 +08:00
|
|
|
:selectable="isBatchMode"
|
|
|
|
|
:selected="isSessionSelected(s.id)"
|
2026-04-22 02:09:58 +02:00
|
|
|
@select="handleSessionClick(s.id)"
|
2026-04-13 00:52:34 +08:00
|
|
|
@contextmenu="handleContextMenu($event, s.id)"
|
2026-04-22 02:09:58 +02:00
|
|
|
@delete="handleDeleteSession(s.id)"
|
2026-05-06 16:15:42 +08:00
|
|
|
@toggle-select="toggleSessionSelection(s.id)"
|
2026-04-22 02:09:58 +02:00
|
|
|
/>
|
2026-04-13 00:52:34 +08:00
|
|
|
</template>
|
|
|
|
|
</template>
|
2026-04-11 15:59:14 +08:00
|
|
|
</div>
|
|
|
|
|
</aside>
|
|
|
|
|
|
2026-04-12 23:59:18 +08:00
|
|
|
<NDropdown
|
|
|
|
|
placement="bottom-start"
|
|
|
|
|
trigger="manual"
|
|
|
|
|
:x="contextMenuX"
|
|
|
|
|
:y="contextMenuY"
|
|
|
|
|
:options="contextMenuOptions"
|
|
|
|
|
:show="showContextMenu"
|
|
|
|
|
@select="handleContextMenuSelect"
|
|
|
|
|
@clickoutside="handleClickOutside"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<NModal
|
|
|
|
|
v-model:show="showRenameModal"
|
|
|
|
|
preset="dialog"
|
2026-04-13 15:15:14 +08:00
|
|
|
:title="t('chat.renameSession')"
|
|
|
|
|
:positive-text="t('common.ok')"
|
|
|
|
|
:negative-text="t('common.cancel')"
|
2026-04-12 23:59:18 +08:00
|
|
|
@positive-click="handleRenameConfirm"
|
|
|
|
|
>
|
|
|
|
|
<NInput
|
|
|
|
|
ref="renameInputRef"
|
|
|
|
|
v-model:value="renameValue"
|
2026-04-13 15:15:14 +08:00
|
|
|
:placeholder="t('chat.enterNewTitle')"
|
2026-04-12 23:59:18 +08:00
|
|
|
@keydown.enter="handleRenameConfirm"
|
|
|
|
|
/>
|
|
|
|
|
</NModal>
|
|
|
|
|
|
2026-04-30 20:17:38 +08:00
|
|
|
<NModal
|
|
|
|
|
v-model:show="showWorkspaceModal"
|
|
|
|
|
preset="dialog"
|
|
|
|
|
:title="t('chat.setWorkspaceTitle')"
|
|
|
|
|
:positive-text="t('common.ok')"
|
|
|
|
|
:negative-text="t('common.cancel')"
|
|
|
|
|
style="width: 520px"
|
|
|
|
|
@positive-click="handleWorkspaceConfirm"
|
|
|
|
|
>
|
|
|
|
|
<FolderPicker v-model="workspaceValue" />
|
|
|
|
|
</NModal>
|
|
|
|
|
|
2026-04-11 15:59:14 +08:00
|
|
|
<div class="chat-main">
|
|
|
|
|
<header class="chat-header">
|
|
|
|
|
<div class="header-left">
|
2026-05-03 22:10:40 +08:00
|
|
|
<NButton
|
|
|
|
|
v-if="currentMode === 'chat'"
|
|
|
|
|
quaternary
|
|
|
|
|
size="small"
|
|
|
|
|
@click="showSessions = !showSessions"
|
|
|
|
|
circle
|
|
|
|
|
>
|
2026-04-11 15:59:14 +08:00
|
|
|
<template #icon>
|
2026-05-03 22:10:40 +08:00
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="1.5"
|
|
|
|
|
>
|
|
|
|
|
<rect x="3" y="3" width="7" height="7" />
|
|
|
|
|
<rect x="14" y="3" width="7" height="7" />
|
|
|
|
|
<rect x="3" y="14" width="7" height="7" />
|
|
|
|
|
<rect x="14" y="14" width="7" height="7" />
|
|
|
|
|
</svg>
|
2026-04-11 15:59:14 +08:00
|
|
|
</template>
|
|
|
|
|
</NButton>
|
2026-04-22 02:09:58 +02:00
|
|
|
<span class="header-session-title">{{ headerTitle }}</span>
|
2026-05-03 22:10:40 +08:00
|
|
|
<span v-if="activeSessionSource" class="source-badge">{{
|
|
|
|
|
getSourceLabel(activeSessionSource)
|
|
|
|
|
}}</span>
|
|
|
|
|
<span
|
|
|
|
|
v-if="chatStore.activeSession?.workspace"
|
|
|
|
|
class="workspace-badge"
|
|
|
|
|
:title="chatStore.activeSession.workspace"
|
|
|
|
|
>📁
|
|
|
|
|
{{
|
|
|
|
|
chatStore.activeSession.workspace.split("/").pop() ||
|
|
|
|
|
chatStore.activeSession.workspace
|
|
|
|
|
}}</span
|
|
|
|
|
>
|
2026-04-12 23:23:50 +08:00
|
|
|
</div>
|
2026-04-11 15:59:14 +08:00
|
|
|
<div class="header-actions">
|
2026-04-29 16:26:24 +08:00
|
|
|
<!-- chat/live mode toggle hidden -->
|
2026-04-22 02:09:58 +02:00
|
|
|
<template v-if="currentMode === 'chat'">
|
|
|
|
|
<NTooltip trigger="hover">
|
|
|
|
|
<template #trigger>
|
2026-05-03 22:10:40 +08:00
|
|
|
<NButton
|
|
|
|
|
quaternary
|
|
|
|
|
size="small"
|
|
|
|
|
@click="copySessionId()"
|
|
|
|
|
circle
|
|
|
|
|
>
|
2026-04-22 02:09:58 +02:00
|
|
|
<template #icon>
|
2026-05-03 22:10:40 +08:00
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="1.5"
|
|
|
|
|
>
|
|
|
|
|
<rect x="9" y="9" width="13" height="13" rx="2" ry="2" />
|
|
|
|
|
<path
|
|
|
|
|
d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"
|
|
|
|
|
/>
|
|
|
|
|
</svg>
|
2026-04-22 02:09:58 +02:00
|
|
|
</template>
|
|
|
|
|
</NButton>
|
|
|
|
|
</template>
|
2026-05-03 22:10:40 +08:00
|
|
|
{{ t("chat.copySessionId") }}
|
2026-04-22 02:09:58 +02:00
|
|
|
</NTooltip>
|
2026-04-22 08:47:44 +08:00
|
|
|
<NButton size="small" :circle="isMobile" @click="handleNewChat">
|
2026-04-22 02:09:58 +02:00
|
|
|
<template #icon>
|
2026-05-03 22:10:40 +08:00
|
|
|
<svg
|
|
|
|
|
width="14"
|
|
|
|
|
height="14"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
>
|
|
|
|
|
<line x1="12" y1="5" x2="12" y2="19" />
|
|
|
|
|
<line x1="5" y1="12" x2="19" y2="12" />
|
|
|
|
|
</svg>
|
2026-04-22 02:09:58 +02:00
|
|
|
</template>
|
2026-05-03 22:10:40 +08:00
|
|
|
<template v-if="!isMobile">{{ t("chat.newChat") }}</template>
|
2026-04-22 02:09:58 +02:00
|
|
|
</NButton>
|
|
|
|
|
</template>
|
2026-04-11 15:59:14 +08:00
|
|
|
</div>
|
|
|
|
|
</header>
|
|
|
|
|
|
2026-04-22 02:09:58 +02:00
|
|
|
<template v-if="currentMode === 'chat'">
|
|
|
|
|
<MessageList />
|
|
|
|
|
<ChatInput />
|
|
|
|
|
</template>
|
2026-05-03 22:10:40 +08:00
|
|
|
<ConversationMonitorPane
|
|
|
|
|
v-else
|
|
|
|
|
:human-only="sessionBrowserPrefsStore.humanOnly"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Floating drawer button -->
|
|
|
|
|
<div class="drawer-button-wrapper">
|
|
|
|
|
<div class="drawer-button" @click="showDrawer = true">
|
|
|
|
|
<svg
|
|
|
|
|
width="20"
|
|
|
|
|
height="20"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-width="1.5"
|
|
|
|
|
>
|
|
|
|
|
<rect x="3" y="3" width="18" height="18" rx="2" ry="2" />
|
|
|
|
|
<line x1="9" y1="3" x2="9" y2="21" />
|
|
|
|
|
<line x1="15" y1="3" x2="15" y2="21" />
|
|
|
|
|
</svg>
|
|
|
|
|
</div>
|
2026-04-11 15:59:14 +08:00
|
|
|
</div>
|
2026-05-03 22:10:40 +08:00
|
|
|
|
|
|
|
|
<DrawerPanel v-model:show="showDrawer" :active-tab="drawerActiveTab" />
|
2026-04-11 15:59:14 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
2026-05-03 22:10:40 +08:00
|
|
|
@use "@/styles/variables" as *;
|
2026-04-11 15:59:14 +08:00
|
|
|
|
|
|
|
|
.chat-panel {
|
|
|
|
|
display: flex;
|
|
|
|
|
height: 100%;
|
2026-04-15 10:28:53 +08:00
|
|
|
position: relative;
|
2026-04-11 15:59:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.session-list {
|
|
|
|
|
width: 220px;
|
|
|
|
|
border-right: 1px solid $border-color;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
flex-shrink: 0;
|
2026-05-03 22:10:40 +08:00
|
|
|
transition:
|
|
|
|
|
width $transition-normal,
|
|
|
|
|
opacity $transition-normal;
|
2026-04-11 15:59:14 +08:00
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
|
|
&.collapsed {
|
|
|
|
|
width: 0;
|
|
|
|
|
border-right: none;
|
|
|
|
|
opacity: 0;
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
}
|
2026-04-15 10:28:53 +08:00
|
|
|
|
|
|
|
|
@media (max-width: $breakpoint-mobile) {
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
height: 100%;
|
|
|
|
|
z-index: 10;
|
|
|
|
|
background: $bg-card;
|
|
|
|
|
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
|
|
|
|
|
width: 280px;
|
|
|
|
|
|
|
|
|
|
&.collapsed {
|
|
|
|
|
transform: translateX(-100%);
|
|
|
|
|
opacity: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: $breakpoint-mobile) {
|
|
|
|
|
.session-close-btn {
|
|
|
|
|
display: flex;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.session-backdrop {
|
|
|
|
|
position: absolute;
|
|
|
|
|
inset: 0;
|
|
|
|
|
background: rgba(0, 0, 0, 0.4);
|
|
|
|
|
z-index: 9;
|
|
|
|
|
opacity: 0;
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
transition: opacity $transition-fast;
|
|
|
|
|
|
|
|
|
|
&.active {
|
|
|
|
|
opacity: 1;
|
|
|
|
|
pointer-events: auto;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-04-11 15:59:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.session-list-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
padding: 12px;
|
|
|
|
|
flex-shrink: 0;
|
2026-05-06 16:15:42 +08:00
|
|
|
min-height: 0;
|
2026-04-11 15:59:14 +08:00
|
|
|
}
|
|
|
|
|
|
2026-04-15 10:28:53 +08:00
|
|
|
.session-list-actions {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 4px;
|
2026-05-06 16:15:42 +08:00
|
|
|
height: 22px;
|
|
|
|
|
|
|
|
|
|
.n-button {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
height: 22px;
|
|
|
|
|
min-height: 22px;
|
|
|
|
|
}
|
2026-04-15 10:28:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.session-close-btn {
|
|
|
|
|
display: none;
|
|
|
|
|
border: none;
|
|
|
|
|
background: none;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
color: $text-secondary;
|
|
|
|
|
padding: 4px;
|
|
|
|
|
border-radius: $radius-sm;
|
2026-05-06 16:15:42 +08:00
|
|
|
height: 22px;
|
|
|
|
|
min-height: 22px;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
2026-04-15 10:28:53 +08:00
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
background: rgba($accent-primary, 0.06);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-11 15:59:14 +08:00
|
|
|
.session-list-title {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: $text-muted;
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
letter-spacing: 0.5px;
|
2026-05-06 16:15:42 +08:00
|
|
|
line-height: 22px;
|
2026-04-11 15:59:14 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-02 03:00:47 +02:00
|
|
|
.session-scope-note {
|
|
|
|
|
margin: 0 12px 10px;
|
|
|
|
|
padding: 8px 10px;
|
|
|
|
|
border: 1px solid rgba($accent-primary, 0.16);
|
|
|
|
|
border-radius: $radius-sm;
|
|
|
|
|
background: rgba($accent-primary, 0.06);
|
|
|
|
|
color: $text-secondary;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
line-height: 1.45;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.session-scope-link {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
margin-left: 4px;
|
|
|
|
|
color: $accent-primary;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-13 00:52:34 +08:00
|
|
|
.session-group-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 4px;
|
|
|
|
|
padding: 6px 10px 4px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
user-select: none;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-22 02:09:58 +02:00
|
|
|
.session-group-header--static {
|
|
|
|
|
cursor: default;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-13 00:52:34 +08:00
|
|
|
.group-chevron {
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
transition: transform 0.15s ease;
|
|
|
|
|
transform: rotate(90deg);
|
|
|
|
|
|
|
|
|
|
&.collapsed {
|
|
|
|
|
transform: rotate(0deg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.session-group-label {
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: $text-muted;
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
letter-spacing: 0.5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.session-group-count {
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
color: $text-muted;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-11 15:59:14 +08:00
|
|
|
.session-items {
|
|
|
|
|
flex: 1;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
padding: 0 6px 12px;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-11 21:33:04 +08:00
|
|
|
.session-loading,
|
|
|
|
|
.session-empty {
|
|
|
|
|
padding: 16px 10px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: $text-muted;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-22 02:09:58 +02:00
|
|
|
:deep(.session-item) {
|
2026-04-11 15:59:14 +08:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
width: 100%;
|
|
|
|
|
padding: 8px 10px;
|
|
|
|
|
border: none;
|
|
|
|
|
background: none;
|
|
|
|
|
border-radius: $radius-sm;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
text-align: left;
|
|
|
|
|
color: $text-secondary;
|
|
|
|
|
transition: all $transition-fast;
|
|
|
|
|
margin-bottom: 2px;
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
background: rgba($accent-primary, 0.06);
|
|
|
|
|
color: $text-primary;
|
|
|
|
|
|
|
|
|
|
.session-item-delete {
|
|
|
|
|
opacity: 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.active {
|
2026-04-17 09:09:50 +08:00
|
|
|
background: rgba(var(--accent-primary-rgb), 0.12);
|
2026-04-11 15:59:14 +08:00
|
|
|
color: $text-primary;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
}
|
2026-04-19 19:34:14 +08:00
|
|
|
|
|
|
|
|
&.active .session-item-title {
|
|
|
|
|
color: $accent-primary;
|
|
|
|
|
}
|
2026-04-11 15:59:14 +08:00
|
|
|
}
|
|
|
|
|
|
2026-04-22 02:09:58 +02:00
|
|
|
:deep(.session-item-content) {
|
2026-04-11 15:59:14 +08:00
|
|
|
flex: 1;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-22 02:09:58 +02:00
|
|
|
:deep(.session-item-title-row) {
|
2026-04-19 19:34:14 +08:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
min-width: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-22 02:09:58 +02:00
|
|
|
:deep(.session-item-title) {
|
2026-04-11 15:59:14 +08:00
|
|
|
display: block;
|
2026-04-23 04:49:00 +02:00
|
|
|
flex: 1 1 auto;
|
|
|
|
|
min-width: 0;
|
2026-04-11 15:59:14 +08:00
|
|
|
font-size: 13px;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-29 16:26:24 +08:00
|
|
|
:deep(.session-item-streaming) {
|
|
|
|
|
display: inline-block;
|
2026-04-19 19:34:14 +08:00
|
|
|
flex-shrink: 0;
|
2026-04-29 16:26:24 +08:00
|
|
|
margin-right: 4px;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
animation: spin 1.2s linear infinite;
|
2026-04-19 19:34:14 +08:00
|
|
|
color: $accent-primary;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-29 16:26:24 +08:00
|
|
|
@keyframes spin {
|
2026-05-03 22:10:40 +08:00
|
|
|
from {
|
|
|
|
|
transform: rotate(0deg);
|
|
|
|
|
}
|
|
|
|
|
to {
|
|
|
|
|
transform: rotate(360deg);
|
|
|
|
|
}
|
2026-04-23 04:49:00 +02:00
|
|
|
}
|
|
|
|
|
|
2026-04-22 02:09:58 +02:00
|
|
|
:deep(.session-item-pin) {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
color: $accent-primary;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.session-item-time) {
|
2026-04-11 15:59:14 +08:00
|
|
|
font-size: 11px;
|
|
|
|
|
color: $text-muted;
|
2026-04-12 23:23:50 +08:00
|
|
|
}
|
|
|
|
|
|
2026-04-22 02:09:58 +02:00
|
|
|
:deep(.session-item-meta) {
|
2026-04-12 23:23:50 +08:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 6px;
|
2026-04-11 15:59:14 +08:00
|
|
|
margin-top: 2px;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-22 02:09:58 +02:00
|
|
|
:deep(.session-item-model) {
|
2026-04-12 23:23:50 +08:00
|
|
|
font-size: 10px;
|
|
|
|
|
color: $accent-primary;
|
|
|
|
|
background: rgba($accent-primary, 0.08);
|
|
|
|
|
padding: 0 5px;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
line-height: 16px;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
max-width: 100px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-22 02:09:58 +02:00
|
|
|
:deep(.session-item-delete) {
|
2026-04-11 15:59:14 +08:00
|
|
|
flex-shrink: 0;
|
2026-04-15 10:28:53 +08:00
|
|
|
opacity: 0.5;
|
2026-04-11 15:59:14 +08:00
|
|
|
padding: 2px;
|
|
|
|
|
border: none;
|
|
|
|
|
background: none;
|
|
|
|
|
color: $text-muted;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
transition: all $transition-fast;
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
color: $error;
|
|
|
|
|
background: rgba($error, 0.1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.chat-main {
|
|
|
|
|
flex: 1;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
min-width: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.chat-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
2026-04-15 08:50:10 +08:00
|
|
|
padding: 21px 20px;
|
2026-04-11 15:59:14 +08:00
|
|
|
border-bottom: 1px solid $border-color;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.header-left {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
overflow: hidden;
|
2026-04-12 23:23:50 +08:00
|
|
|
flex: 1;
|
|
|
|
|
min-width: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-11 15:59:14 +08:00
|
|
|
.header-session-title {
|
2026-04-15 08:50:10 +08:00
|
|
|
font-size: 16px;
|
|
|
|
|
font-weight: 600;
|
2026-04-11 15:59:14 +08:00
|
|
|
color: $text-primary;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-12 23:59:18 +08:00
|
|
|
.source-badge {
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
color: $text-muted;
|
|
|
|
|
background: rgba($text-muted, 0.12);
|
|
|
|
|
padding: 1px 7px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
line-height: 16px;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-11 15:59:14 +08:00
|
|
|
.header-actions {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 4px;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
2026-04-14 14:47:18 +08:00
|
|
|
|
2026-04-22 02:09:58 +02:00
|
|
|
.chat-mode-toggle {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 4px;
|
|
|
|
|
margin-right: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-15 09:12:54 +08:00
|
|
|
@media (max-width: $breakpoint-mobile) {
|
|
|
|
|
.chat-header {
|
|
|
|
|
padding: 16px 12px 16px 52px;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-04-30 20:17:38 +08:00
|
|
|
|
|
|
|
|
.workspace-badge {
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
color: $text-muted;
|
|
|
|
|
background: rgba(255, 255, 255, 0.05);
|
|
|
|
|
padding: 2px 8px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
max-width: 160px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
cursor: default;
|
|
|
|
|
}
|
2026-05-03 22:10:40 +08:00
|
|
|
|
|
|
|
|
// ─── Drawer button ─────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
.drawer-button-wrapper {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 16px;
|
|
|
|
|
top: 50%;
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
z-index: 100;
|
|
|
|
|
background: $bg-card;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
box-shadow:
|
|
|
|
|
0 0 10px rgba(255, 107, 107, 0.4),
|
|
|
|
|
0 0 20px rgba(255, 107, 107, 0.2);
|
|
|
|
|
animation: rainbow-glow 8s linear infinite;
|
|
|
|
|
transition: all $transition-fast;
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
animation-play-state: paused;
|
|
|
|
|
box-shadow:
|
|
|
|
|
0 0 15px rgba(255, 107, 107, 0.6),
|
|
|
|
|
0 0 30px rgba(255, 107, 107, 0.3);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.drawer-button {
|
|
|
|
|
width: 40px;
|
|
|
|
|
height: 40px;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
background: rgba(var(--accent-primary-rgb), 0.1);
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: all $transition-fast;
|
|
|
|
|
|
|
|
|
|
svg {
|
|
|
|
|
width: 18px;
|
|
|
|
|
height: 18px;
|
|
|
|
|
color: var(--accent-primary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
transform: scale(1.1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@keyframes rainbow-glow {
|
|
|
|
|
0% {
|
|
|
|
|
box-shadow:
|
|
|
|
|
0 0 0 2px #ff6b6b,
|
|
|
|
|
0 0 10px rgba(255, 107, 107, 0.4),
|
|
|
|
|
0 0 20px rgba(255, 107, 107, 0.2);
|
|
|
|
|
border-color: #ff6b6b;
|
|
|
|
|
color: #ff6b6b;
|
|
|
|
|
}
|
|
|
|
|
16.66% {
|
|
|
|
|
box-shadow:
|
|
|
|
|
0 0 0 2px #feca57,
|
|
|
|
|
0 0 10px rgba(254, 202, 87, 0.4),
|
|
|
|
|
0 0 20px rgba(254, 202, 87, 0.2);
|
|
|
|
|
border-color: #feca57;
|
|
|
|
|
color: #feca57;
|
|
|
|
|
}
|
|
|
|
|
33.33% {
|
|
|
|
|
box-shadow:
|
|
|
|
|
0 0 0 2px #48dbfb,
|
|
|
|
|
0 0 10px rgba(72, 219, 251, 0.4),
|
|
|
|
|
0 0 20px rgba(72, 219, 251, 0.2);
|
|
|
|
|
border-color: #48dbfb;
|
|
|
|
|
color: #48dbfb;
|
|
|
|
|
}
|
|
|
|
|
50% {
|
|
|
|
|
box-shadow:
|
|
|
|
|
0 0 0 2px #ff9ff3,
|
|
|
|
|
0 0 10px rgba(255, 159, 243, 0.4),
|
|
|
|
|
0 0 20px rgba(255, 159, 243, 0.2);
|
|
|
|
|
border-color: #ff9ff3;
|
|
|
|
|
color: #ff9ff3;
|
|
|
|
|
}
|
|
|
|
|
66.66% {
|
|
|
|
|
box-shadow:
|
|
|
|
|
0 0 0 2px #54a0ff,
|
|
|
|
|
0 0 10px rgba(84, 160, 255, 0.4),
|
|
|
|
|
0 0 20px rgba(84, 160, 255, 0.2);
|
|
|
|
|
border-color: #54a0ff;
|
|
|
|
|
color: #54a0ff;
|
|
|
|
|
}
|
|
|
|
|
83.33% {
|
|
|
|
|
box-shadow:
|
|
|
|
|
0 0 0 2px #5f27cd,
|
|
|
|
|
0 0 10px rgba(95, 39, 205, 0.4),
|
|
|
|
|
0 0 20px rgba(95, 39, 205, 0.2);
|
|
|
|
|
border-color: #5f27cd;
|
|
|
|
|
color: #5f27cd;
|
|
|
|
|
}
|
|
|
|
|
100% {
|
|
|
|
|
box-shadow:
|
|
|
|
|
0 0 0 2px #ff6b6b,
|
|
|
|
|
0 0 10px rgba(255, 107, 107, 0.4),
|
|
|
|
|
0 0 20px rgba(255, 107, 107, 0.2);
|
|
|
|
|
border-color: #ff6b6b;
|
|
|
|
|
color: #ff6b6b;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: $breakpoint-mobile) {
|
|
|
|
|
.drawer-button-wrapper {
|
|
|
|
|
right: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.drawer-button {
|
|
|
|
|
width: 36px;
|
|
|
|
|
height: 36px;
|
|
|
|
|
|
|
|
|
|
svg {
|
|
|
|
|
width: 16px;
|
|
|
|
|
height: 16px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-04-11 15:59:14 +08:00
|
|
|
</style>
|