sync snapshot from LAN repo (source xuhd-new @ edb08220)

This commit is contained in:
gozeros committed 2026-11-05 11:03:21 +08:00
1 parent ea9dcff9c0
commit bbe365429d
404 files changed
+3576 -47782

No files matched your search

+3 -17
View File
@@ -17,26 +17,12 @@ export async function loadArtifactContent({
isMock?: boolean;
publicShareCode?: string;
}) {
const isSkillArchive = filepath.endsWith(".skill");
let enhancedFilepath = filepath;
if (isSkillArchive) {
if (filepath.endsWith(".skill")) {
enhancedFilepath = filepath + "/SKILL.md";
}
const url = urlOfArtifact({
filepath: enhancedFilepath,
threadId,
isMock,
publicShareCode,
});
// Normal artifacts are mutable: render scripts and bash commands may replace
// the same path without producing a write_file/str_replace revision in the
// message stream. Bypass the browser HTTP cache so a React Query refetch
// always reads the bytes currently on disk. Skill archives are immutable in
// this view and deliberately keep their existing five-minute cache.
const response = await apiFetch(
url,
isSkillArchive ? undefined : { cache: "no-store" },
);
const url = urlOfArtifact({ filepath: enhancedFilepath, threadId, isMock, publicShareCode });
const response = await apiFetch(url);
const text = await response.text();
if (!response.ok) {
let detail = text.trim();