@kapeta/local-cluster-service 0.77.3 → 0.77.4
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/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [0.77.4](https://github.com/kapetacom/local-cluster-service/compare/v0.77.3...v0.77.4) (2024-10-08)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* add missing conversationId to image prompt ([6046767](https://github.com/kapetacom/local-cluster-service/commit/6046767a6612f8f44921c0063bde60788b4b5aad))
|
7
|
+
|
1
8
|
## [0.77.3](https://github.com/kapetacom/local-cluster-service/compare/v0.77.2...v0.77.3) (2024-10-04)
|
2
9
|
|
3
10
|
|
@@ -142,7 +142,7 @@ class PageQueue extends node_events_1.EventEmitter {
|
|
142
142
|
await this.addImagePrompt({
|
143
143
|
...reference,
|
144
144
|
content: event.payload.content,
|
145
|
-
}).catch((err) => {
|
145
|
+
}, event.payload.conversationId).catch((err) => {
|
146
146
|
console.error('Failed to generate image for reference', reference.name, err);
|
147
147
|
this.emit('error', err);
|
148
148
|
});
|
@@ -230,7 +230,7 @@ class PageQueue extends node_events_1.EventEmitter {
|
|
230
230
|
await this.queue.onIdle();
|
231
231
|
}
|
232
232
|
}
|
233
|
-
async addImagePrompt(prompt) {
|
233
|
+
async addImagePrompt(prompt, conversationId) {
|
234
234
|
if (this.images.has(prompt.url)) {
|
235
235
|
//console.log('Ignoring duplicate image prompt', prompt);
|
236
236
|
return;
|
@@ -245,7 +245,7 @@ class PageQueue extends node_events_1.EventEmitter {
|
|
245
245
|
}
|
246
246
|
const client = new stormClient_1.StormClient(this.handle, this.systemId);
|
247
247
|
this.images.set(prompt.url, prompt.description);
|
248
|
-
const result = await client.createImage(`Create an image for the url "${prompt.url}" with this description: ${prompt.description}`.trim());
|
248
|
+
const result = await client.createImage(`Create an image for the url "${prompt.url}" with this description: ${prompt.description}`.trim(), conversationId);
|
249
249
|
let imageEvent = null;
|
250
250
|
result.on('data', (event) => {
|
251
251
|
if (event.type === 'IMAGE') {
|
@@ -142,7 +142,7 @@ class PageQueue extends node_events_1.EventEmitter {
|
|
142
142
|
await this.addImagePrompt({
|
143
143
|
...reference,
|
144
144
|
content: event.payload.content,
|
145
|
-
}).catch((err) => {
|
145
|
+
}, event.payload.conversationId).catch((err) => {
|
146
146
|
console.error('Failed to generate image for reference', reference.name, err);
|
147
147
|
this.emit('error', err);
|
148
148
|
});
|
@@ -230,7 +230,7 @@ class PageQueue extends node_events_1.EventEmitter {
|
|
230
230
|
await this.queue.onIdle();
|
231
231
|
}
|
232
232
|
}
|
233
|
-
async addImagePrompt(prompt) {
|
233
|
+
async addImagePrompt(prompt, conversationId) {
|
234
234
|
if (this.images.has(prompt.url)) {
|
235
235
|
//console.log('Ignoring duplicate image prompt', prompt);
|
236
236
|
return;
|
@@ -245,7 +245,7 @@ class PageQueue extends node_events_1.EventEmitter {
|
|
245
245
|
}
|
246
246
|
const client = new stormClient_1.StormClient(this.handle, this.systemId);
|
247
247
|
this.images.set(prompt.url, prompt.description);
|
248
|
-
const result = await client.createImage(`Create an image for the url "${prompt.url}" with this description: ${prompt.description}`.trim());
|
248
|
+
const result = await client.createImage(`Create an image for the url "${prompt.url}" with this description: ${prompt.description}`.trim(), conversationId);
|
249
249
|
let imageEvent = null;
|
250
250
|
result.on('data', (event) => {
|
251
251
|
if (event.type === 'IMAGE') {
|
package/package.json
CHANGED
@@ -163,10 +163,13 @@ export class PageQueue extends EventEmitter {
|
|
163
163
|
|
164
164
|
switch (reference.type) {
|
165
165
|
case 'image':
|
166
|
-
await this.addImagePrompt(
|
167
|
-
|
168
|
-
|
169
|
-
|
166
|
+
await this.addImagePrompt(
|
167
|
+
{
|
168
|
+
...reference,
|
169
|
+
content: event.payload.content,
|
170
|
+
},
|
171
|
+
event.payload.conversationId
|
172
|
+
).catch((err) => {
|
170
173
|
console.error('Failed to generate image for reference', reference.name, err);
|
171
174
|
this.emit('error', err);
|
172
175
|
});
|
@@ -259,7 +262,7 @@ export class PageQueue extends EventEmitter {
|
|
259
262
|
}
|
260
263
|
}
|
261
264
|
|
262
|
-
private async addImagePrompt(prompt: ImagePrompt) {
|
265
|
+
private async addImagePrompt(prompt: ImagePrompt, conversationId: string) {
|
263
266
|
if (this.images.has(prompt.url)) {
|
264
267
|
//console.log('Ignoring duplicate image prompt', prompt);
|
265
268
|
return;
|
@@ -276,7 +279,8 @@ export class PageQueue extends EventEmitter {
|
|
276
279
|
const client = new StormClient(this.handle, this.systemId);
|
277
280
|
this.images.set(prompt.url, prompt.description);
|
278
281
|
const result = await client.createImage(
|
279
|
-
`Create an image for the url "${prompt.url}" with this description: ${prompt.description}`.trim()
|
282
|
+
`Create an image for the url "${prompt.url}" with this description: ${prompt.description}`.trim(),
|
283
|
+
conversationId
|
280
284
|
);
|
281
285
|
|
282
286
|
let imageEvent: StormImage | null = null;
|