Scope files jobs and plugins to request profile

This commit is contained in:
ekko
2026-05-24 09:25:52 +08:00
committed by ekko
parent 289a958684
commit 9708a6a521
23 changed files with 353 additions and 117 deletions
@@ -3,8 +3,7 @@ import type { Message, ContentBlock } from "@/stores/hermes/chat";
import { computed, onBeforeUnmount, onMounted, ref, watchEffect } from "vue";
import { useI18n } from "vue-i18n";
import { useMessage } from "naive-ui";
import { downloadFile } from "@/api/hermes/download";
import { getApiKey } from "@/api/client";
import { downloadFile, getDownloadUrl } from "@/api/hermes/download";
import { copyToClipboard } from "@/utils/clipboard";
import MarkdownRenderer from "./MarkdownRenderer.vue";
import { parseThinking, countThinkingChars } from "@/utils/thinking-parser";
@@ -167,13 +166,6 @@ const contentFiles = computed<DisplayContentFile[] | null>(() => {
});
});
// Generate download URL with auth token
function getDownloadUrl(path: string, name: string): string {
const token = getApiKey();
const base = `/api/hermes/download?path=${encodeURIComponent(path)}&name=${encodeURIComponent(name)}`;
return token ? `${base}&token=${encodeURIComponent(token)}` : base;
}
function getContentFileUrl(file: DisplayContentFile): string {
if (file.url) return file.url
return file.path ? getDownloadUrl(file.path, file.name) : ''