@rslsp1/fa-app-tools 2.0.56 → 2.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -116,11 +116,16 @@ async function loadHFState(namespace, token) {
|
|
|
116
116
|
meta: JSON.parse(metaStr)
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
async function loadPendingEvents(namespace, token, sinceTs) {
|
|
119
|
+
async function loadPendingEvents(namespace, token, sinceTs, knownPaths) {
|
|
120
120
|
const files = await hfListDir(namespace, "events", token);
|
|
121
|
-
const pending = files.filter((f) => f.type === "file" && tsFromEventPath(f.path) > sinceTs).sort((a, b) => a.path.localeCompare(b.path));
|
|
121
|
+
const pending = files.filter((f) => f.type === "file" && tsFromEventPath(f.path) > sinceTs && !knownPaths?.has(f.path)).sort((a, b) => a.path.localeCompare(b.path));
|
|
122
|
+
if (!pending.length) return [];
|
|
122
123
|
const raw = await Promise.all(
|
|
123
|
-
pending.map((f) =>
|
|
124
|
+
pending.map(async (f) => {
|
|
125
|
+
const result = await hfDownloadJsonByPath(f.path, token);
|
|
126
|
+
knownPaths?.add(f.path);
|
|
127
|
+
return result;
|
|
128
|
+
})
|
|
124
129
|
);
|
|
125
130
|
return raw.flatMap((e) => Array.isArray(e) ? e : [e]);
|
|
126
131
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -247,6 +247,8 @@ interface HistoryPanelProps {
|
|
|
247
247
|
currentResultId: string | null;
|
|
248
248
|
onSelect: (gen: Generation) => void;
|
|
249
249
|
onDelete: (id: string) => void;
|
|
250
|
+
visibleCount: number;
|
|
251
|
+
onLoadMore: () => void;
|
|
250
252
|
}
|
|
251
253
|
declare const HistoryPanel: React__default.FC<HistoryPanelProps>;
|
|
252
254
|
|
|
@@ -273,6 +275,8 @@ interface MediaLibraryProps {
|
|
|
273
275
|
onToggleSelection?: (id: string) => void;
|
|
274
276
|
onBatchDownload?: () => void;
|
|
275
277
|
onGenerateReference?: (item: Generation) => void;
|
|
278
|
+
visibleCount: number;
|
|
279
|
+
onLoadMore: () => void;
|
|
276
280
|
}
|
|
277
281
|
declare const MediaLibrary: React__default.FC<MediaLibraryProps>;
|
|
278
282
|
|
|
@@ -589,7 +593,7 @@ declare function hfBatchArchive(moves: Array<{
|
|
|
589
593
|
}>, token: string, summary: string): Promise<void>;
|
|
590
594
|
declare function tsFromEventPath(repoPath: string): number;
|
|
591
595
|
declare function loadHFState(namespace: string, token: string): Promise<HFStateSnapshot | null>;
|
|
592
|
-
declare function loadPendingEvents(namespace: string, token: string, sinceTs: number): Promise<HFEvent[]>;
|
|
596
|
+
declare function loadPendingEvents(namespace: string, token: string, sinceTs: number, knownPaths?: Set<string>): Promise<HFEvent[]>;
|
|
593
597
|
declare function getSessionClientId(): string;
|
|
594
598
|
declare function writeHFEvent<P>(namespace: string, token: string, type: string, payload: P, prevTs: number[]): Promise<HFEvent<P>>;
|
|
595
599
|
declare function hfBootstrapFromLegacy(namespace: string, token: string, onProgress?: (msg: string) => void): Promise<void>;
|
|
@@ -641,6 +645,6 @@ declare function findTips(dag: Dag): number[];
|
|
|
641
645
|
declare function findForks(dag: Dag): DagFork[];
|
|
642
646
|
declare function topoSort(events: HFEvent[]): HFEvent[];
|
|
643
647
|
|
|
644
|
-
declare const LIB_VERSION = "2.0.
|
|
648
|
+
declare const LIB_VERSION = "2.0.61";
|
|
645
649
|
|
|
646
650
|
export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type DagFork, type ExtractedCharacter, FaApp, type FaAppProps, FaToolsBadge, type FlowSdk, GLOBAL_STYLES, type Generation, type HFEvent, type HFEventVersion, type HFFileInfo$1 as HFFileInfo, type HFMetadataEntry, type HFStateMeta, type HFStateResult, type HFStateSnapshot, HistoryPanel, type ImageAddedPayload, InspectPanel, LIB_VERSION, LabBlend, LabCompare, type LabFrame, LabFrameExtractor, type LabFrameExtractorProps, LabImagePicker, type LabItem, LabLoop, LabRemix, type LabServices, LabsTab, ListView, type MediaItem, MediaLibrary, type MetadataUpdatedPayload, PillButton, type ProjectMeta, type ProjectSettings, ProjectSyncTab, PromptTab, SectionLabel, type SelectedLabImage, type SelectedTag, ServerTab, SetupPanel, type SyncDiff, TagManagerPanel, type TagOption, type TagUpsertedPayload, type WorkspaceTags, applyEvent, applyEvents, autoLabel, buildBlendInstruction, buildCompareInstruction, buildDag, buildFallbackPrompt, buildGenerationPrompt, buildImageGenerationOptions, buildLoopInstruction, buildPromptTabPayload, buildReferenceImageMediaIds, buildRemixInstruction, buildScanInstruction, cleanAiResponse, createFlowServices, exportProjectToZip, findForks, findTips, formatTreeToMarkdown, frameToGeneration, getFormattedTimestamp, getHFToken, getSessionClientId, groupGenerationsToLabItems, hfBatchArchive, hfBootstrapFromLegacy, hfDeleteProject, hfDownloadProject, hfListDir, hfListProjects, hfLoadImageAsBase64, hfUploadImage, hfUploadProjectForm, hfUploadSmallFile, importProjectFromZip, injectXMPMetadata, interpretSdkError, loadHFState, loadPendingEvents, parsePromptFile, parsePromptResponse, setHFToken, topoSort, tsFromEventPath, useHFState, useKeyboardNavigation, useOnClickOutside, writeHFEvent };
|
package/dist/index.d.ts
CHANGED
|
@@ -247,6 +247,8 @@ interface HistoryPanelProps {
|
|
|
247
247
|
currentResultId: string | null;
|
|
248
248
|
onSelect: (gen: Generation) => void;
|
|
249
249
|
onDelete: (id: string) => void;
|
|
250
|
+
visibleCount: number;
|
|
251
|
+
onLoadMore: () => void;
|
|
250
252
|
}
|
|
251
253
|
declare const HistoryPanel: React__default.FC<HistoryPanelProps>;
|
|
252
254
|
|
|
@@ -273,6 +275,8 @@ interface MediaLibraryProps {
|
|
|
273
275
|
onToggleSelection?: (id: string) => void;
|
|
274
276
|
onBatchDownload?: () => void;
|
|
275
277
|
onGenerateReference?: (item: Generation) => void;
|
|
278
|
+
visibleCount: number;
|
|
279
|
+
onLoadMore: () => void;
|
|
276
280
|
}
|
|
277
281
|
declare const MediaLibrary: React__default.FC<MediaLibraryProps>;
|
|
278
282
|
|
|
@@ -589,7 +593,7 @@ declare function hfBatchArchive(moves: Array<{
|
|
|
589
593
|
}>, token: string, summary: string): Promise<void>;
|
|
590
594
|
declare function tsFromEventPath(repoPath: string): number;
|
|
591
595
|
declare function loadHFState(namespace: string, token: string): Promise<HFStateSnapshot | null>;
|
|
592
|
-
declare function loadPendingEvents(namespace: string, token: string, sinceTs: number): Promise<HFEvent[]>;
|
|
596
|
+
declare function loadPendingEvents(namespace: string, token: string, sinceTs: number, knownPaths?: Set<string>): Promise<HFEvent[]>;
|
|
593
597
|
declare function getSessionClientId(): string;
|
|
594
598
|
declare function writeHFEvent<P>(namespace: string, token: string, type: string, payload: P, prevTs: number[]): Promise<HFEvent<P>>;
|
|
595
599
|
declare function hfBootstrapFromLegacy(namespace: string, token: string, onProgress?: (msg: string) => void): Promise<void>;
|
|
@@ -641,6 +645,6 @@ declare function findTips(dag: Dag): number[];
|
|
|
641
645
|
declare function findForks(dag: Dag): DagFork[];
|
|
642
646
|
declare function topoSort(events: HFEvent[]): HFEvent[];
|
|
643
647
|
|
|
644
|
-
declare const LIB_VERSION = "2.0.
|
|
648
|
+
declare const LIB_VERSION = "2.0.61";
|
|
645
649
|
|
|
646
650
|
export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type DagFork, type ExtractedCharacter, FaApp, type FaAppProps, FaToolsBadge, type FlowSdk, GLOBAL_STYLES, type Generation, type HFEvent, type HFEventVersion, type HFFileInfo$1 as HFFileInfo, type HFMetadataEntry, type HFStateMeta, type HFStateResult, type HFStateSnapshot, HistoryPanel, type ImageAddedPayload, InspectPanel, LIB_VERSION, LabBlend, LabCompare, type LabFrame, LabFrameExtractor, type LabFrameExtractorProps, LabImagePicker, type LabItem, LabLoop, LabRemix, type LabServices, LabsTab, ListView, type MediaItem, MediaLibrary, type MetadataUpdatedPayload, PillButton, type ProjectMeta, type ProjectSettings, ProjectSyncTab, PromptTab, SectionLabel, type SelectedLabImage, type SelectedTag, ServerTab, SetupPanel, type SyncDiff, TagManagerPanel, type TagOption, type TagUpsertedPayload, type WorkspaceTags, applyEvent, applyEvents, autoLabel, buildBlendInstruction, buildCompareInstruction, buildDag, buildFallbackPrompt, buildGenerationPrompt, buildImageGenerationOptions, buildLoopInstruction, buildPromptTabPayload, buildReferenceImageMediaIds, buildRemixInstruction, buildScanInstruction, cleanAiResponse, createFlowServices, exportProjectToZip, findForks, findTips, formatTreeToMarkdown, frameToGeneration, getFormattedTimestamp, getHFToken, getSessionClientId, groupGenerationsToLabItems, hfBatchArchive, hfBootstrapFromLegacy, hfDeleteProject, hfDownloadProject, hfListDir, hfListProjects, hfLoadImageAsBase64, hfUploadImage, hfUploadProjectForm, hfUploadSmallFile, importProjectFromZip, injectXMPMetadata, interpretSdkError, loadHFState, loadPendingEvents, parsePromptFile, parsePromptResponse, setHFToken, topoSort, tsFromEventPath, useHFState, useKeyboardNavigation, useOnClickOutside, writeHFEvent };
|