@kapeta/local-cluster-service 0.77.3 → 0.77.5

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,17 @@
1
+ ## [0.77.5](https://github.com/kapetacom/local-cluster-service/compare/v0.77.4...v0.77.5) (2024-10-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * bump to web-microfrontend w/o pendo ([#274](https://github.com/kapetacom/local-cluster-service/issues/274)) ([93095de](https://github.com/kapetacom/local-cluster-service/commit/93095def1012aed8c3f967332fe82fc11938844c))
7
+
8
+ ## [0.77.4](https://github.com/kapetacom/local-cluster-service/compare/v0.77.3...v0.77.4) (2024-10-08)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add missing conversationId to image prompt ([6046767](https://github.com/kapetacom/local-cluster-service/commit/6046767a6612f8f44921c0063bde60788b4b5aad))
14
+
1
15
  ## [0.77.3](https://github.com/kapetacom/local-cluster-service/compare/v0.77.2...v0.77.3) (2024-10-04)
2
16
 
3
17
 
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kapeta/local-cluster-service",
3
- "version": "0.77.3",
3
+ "version": "0.77.5",
4
4
  "description": "Manages configuration, ports and service discovery for locally running Kapeta systems",
5
5
  "type": "commonjs",
6
6
  "exports": {
@@ -60,7 +60,7 @@
60
60
  "@kapeta/nodejs-utils": "<2",
61
61
  "@kapeta/schemas": "^3.6.1",
62
62
  "@kapeta/sdk-config": "^2.2.0",
63
- "@kapeta/web-microfrontend": "^1.2.11",
63
+ "@kapeta/web-microfrontend": "^2.0.0",
64
64
  "@sentry/node": "^7.114.0",
65
65
  "@types/dockerode": "^3.3.19",
66
66
  "@types/stream-json": "^1.7.3",
@@ -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
- ...reference,
168
- content: event.payload.content,
169
- }).catch((err) => {
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;