sync update from LAN repo (source master @ ca48c4ec)

This commit is contained in:
gozeros committed 2026-11-05 10:53:54 +08:00
1 parent 8bc8b0e082
commit ea9dcff9c0
873 files changed
+107866 -14011

No files matched your search

+17 -3
View File
@@ -17,12 +17,26 @@ export async function loadArtifactContent({
isMock?: boolean;
publicShareCode?: string;
}) {
const isSkillArchive = filepath.endsWith(".skill");
let enhancedFilepath = filepath;
if (filepath.endsWith(".skill")) {
if (isSkillArchive) {
enhancedFilepath = filepath + "/SKILL.md";
}
const url = urlOfArtifact({ filepath: enhancedFilepath, threadId, isMock, publicShareCode });
const response = await apiFetch(url);
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 text = await response.text();
if (!response.ok) {
let detail = text.trim();