@umituz/react-native-ai-generation-content 1.83.78 → 1.83.80
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.
- package/package.json +1 -1
- package/src/domain/interfaces/provider-lifecycle.interface.ts +5 -4
- package/src/domains/creations/presentation/screens/CreationsGalleryScreen.tsx +5 -1
- package/src/domains/generation/infrastructure/executors/image-executor.ts +5 -4
- package/src/domains/generation/wizard/infrastructure/strategies/image-generation.executor.ts +5 -4
- package/src/infrastructure/services/multi-image-generation.executor.ts +5 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.83.
|
|
3
|
+
"version": "1.83.80",
|
|
4
4
|
"description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -32,13 +32,14 @@ export interface IAIProviderLifecycle {
|
|
|
32
32
|
reset(): void;
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* Get log entries from
|
|
36
|
-
*
|
|
35
|
+
* Get log entries from a specific generation session.
|
|
36
|
+
* If sessionId omitted, uses the most recent session (not safe for concurrent use).
|
|
37
37
|
*/
|
|
38
|
-
getSessionLogs?(): ProviderLogEntry[];
|
|
38
|
+
getSessionLogs?(sessionId?: string): ProviderLogEntry[];
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* End log session and return all entries. Clears the buffer.
|
|
42
|
+
* If sessionId omitted, uses the most recent session (not safe for concurrent use).
|
|
42
43
|
*/
|
|
43
|
-
endLogSession?(): ProviderLogEntry[];
|
|
44
|
+
endLogSession?(sessionId?: string): ProviderLogEntry[];
|
|
44
45
|
}
|
|
@@ -167,7 +167,11 @@ export function CreationsGalleryScreen({
|
|
|
167
167
|
</View>
|
|
168
168
|
) : (
|
|
169
169
|
<View style={styles.listContent}>
|
|
170
|
-
{filters.filtered.map((item) =>
|
|
170
|
+
{filters.filtered.map((item) => (
|
|
171
|
+
<React.Fragment key={item.id}>
|
|
172
|
+
{renderItem({ item })}
|
|
173
|
+
</React.Fragment>
|
|
174
|
+
))}
|
|
171
175
|
</View>
|
|
172
176
|
)}
|
|
173
177
|
<FilterSheet visible={filters.statusFilterVisible} onClose={filters.closeStatusFilter} options={filters.statusFilter.filterOptions} selectedIds={[filters.statusFilter.selectedId]} onFilterPress={filters.statusFilter.selectFilter} onClearFilters={filters.statusFilter.clearFilter} title={t(config.translations.statusFilterTitle ?? "creations.filter.status")} clearLabel={t(config.translations.clearFilter ?? "common.clear")} />
|
|
@@ -64,8 +64,9 @@ export class ImageExecutor
|
|
|
64
64
|
},
|
|
65
65
|
});
|
|
66
66
|
|
|
67
|
-
// Collect provider logs
|
|
68
|
-
const
|
|
67
|
+
// Collect provider logs — use providerSessionId for concurrent safety
|
|
68
|
+
const providerSessionId = (result as { __providerSessionId?: string })?.__providerSessionId;
|
|
69
|
+
const providerLogs = provider.endLogSession?.(providerSessionId) ?? provider.getSessionLogs?.(providerSessionId) ?? [];
|
|
69
70
|
addGenerationLogs(sid, providerLogs);
|
|
70
71
|
|
|
71
72
|
options?.onProgress?.(90);
|
|
@@ -81,10 +82,10 @@ export class ImageExecutor
|
|
|
81
82
|
addGenerationLog(sid, TAG, `Generation SUCCESS in ${elapsed}ms`, 'info', { imageUrl, elapsed });
|
|
82
83
|
return { success: true, data: { imageUrl } };
|
|
83
84
|
} catch (error) {
|
|
84
|
-
// Collect provider logs even on failure
|
|
85
|
+
// Collect provider logs even on failure — no providerSessionId available in catch
|
|
85
86
|
const provider = providerRegistry.getActiveProvider();
|
|
86
87
|
if (provider) {
|
|
87
|
-
const providerLogs = provider.endLogSession?.() ??
|
|
88
|
+
const providerLogs = provider.endLogSession?.() ?? [];
|
|
88
89
|
addGenerationLogs(sid, providerLogs);
|
|
89
90
|
}
|
|
90
91
|
|
package/src/domains/generation/wizard/infrastructure/strategies/image-generation.executor.ts
CHANGED
|
@@ -103,8 +103,9 @@ export async function executeImageGeneration(
|
|
|
103
103
|
},
|
|
104
104
|
});
|
|
105
105
|
|
|
106
|
-
// Collect provider logs
|
|
107
|
-
const
|
|
106
|
+
// Collect provider logs — use providerSessionId for concurrent safety
|
|
107
|
+
const providerSessionId = (result as { __providerSessionId?: string })?.__providerSessionId;
|
|
108
|
+
const providerLogs = provider.endLogSession?.(providerSessionId) ?? provider.getSessionLogs?.(providerSessionId) ?? [];
|
|
108
109
|
addGenerationLogs(sid, providerLogs);
|
|
109
110
|
|
|
110
111
|
const rawResult = result as Record<string, unknown>;
|
|
@@ -125,8 +126,8 @@ export async function executeImageGeneration(
|
|
|
125
126
|
});
|
|
126
127
|
return { success: false, error: "No image generated", logSessionId: sid };
|
|
127
128
|
} catch (error) {
|
|
128
|
-
// Collect provider logs even on failure
|
|
129
|
-
const providerLogs = provider.endLogSession?.() ??
|
|
129
|
+
// Collect provider logs even on failure — no providerSessionId available in catch
|
|
130
|
+
const providerLogs = provider.endLogSession?.() ?? [];
|
|
130
131
|
addGenerationLogs(sid, providerLogs);
|
|
131
132
|
|
|
132
133
|
const elapsed = Date.now() - startTime;
|
|
@@ -84,8 +84,9 @@ export async function executeMultiImageGeneration(
|
|
|
84
84
|
timeoutMs: GENERATION_TIMEOUT_MS,
|
|
85
85
|
});
|
|
86
86
|
|
|
87
|
-
// Collect provider logs
|
|
88
|
-
const
|
|
87
|
+
// Collect provider logs — use providerSessionId for concurrent safety
|
|
88
|
+
const providerSessionId = (result as { __providerSessionId?: string })?.__providerSessionId;
|
|
89
|
+
const providerLogs = provider.endLogSession?.(providerSessionId) ?? provider.getSessionLogs?.(providerSessionId) ?? [];
|
|
89
90
|
addGenerationLogs(sid, providerLogs);
|
|
90
91
|
|
|
91
92
|
const rawResult = result as Record<string, unknown>;
|
|
@@ -122,8 +123,8 @@ export async function executeMultiImageGeneration(
|
|
|
122
123
|
});
|
|
123
124
|
return { success: false, error: "No image generated", logSessionId: sid };
|
|
124
125
|
} catch (error) {
|
|
125
|
-
// Collect provider logs even on failure
|
|
126
|
-
const providerLogs = provider.endLogSession?.() ??
|
|
126
|
+
// Collect provider logs even on failure — no providerSessionId available in catch
|
|
127
|
+
const providerLogs = provider.endLogSession?.() ?? [];
|
|
127
128
|
addGenerationLogs(sid, providerLogs);
|
|
128
129
|
|
|
129
130
|
const elapsed = Date.now() - startTime;
|