@mutagent/cli 0.1.4 → 0.1.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/dist/index.js CHANGED
@@ -13431,19 +13431,21 @@ class SDKClientWrapper {
13431
13431
  }
13432
13432
  async updatePrompt(id, data) {
13433
13433
  try {
13434
- const response = await this.sdk.prompt.updatePrompt({
13435
- id: parseInt(id, 10),
13436
- body: {
13437
- description: data.description ?? undefined,
13438
- isLatest: data.isLatest ?? undefined,
13439
- systemPrompt: data.systemPrompt ?? undefined,
13440
- humanPrompt: data.humanPrompt ?? undefined,
13441
- rawPrompt: data.rawPrompt ?? undefined,
13442
- outputSchema: data.outputSchema,
13443
- metadata: data.metadata,
13444
- tags: data.tags ?? undefined
13445
- }
13446
- });
13434
+ const body = {
13435
+ description: data.description ?? undefined,
13436
+ isLatest: data.isLatest ?? undefined,
13437
+ systemPrompt: data.systemPrompt ?? undefined,
13438
+ humanPrompt: data.humanPrompt ?? undefined,
13439
+ rawPrompt: data.rawPrompt ?? undefined,
13440
+ outputSchema: data.outputSchema,
13441
+ metadata: data.metadata,
13442
+ tags: data.tags ?? undefined
13443
+ };
13444
+ if (data.name !== undefined) {
13445
+ body.name = data.name;
13446
+ }
13447
+ const updateArgs = { id: parseInt(id, 10), body };
13448
+ const response = await this.sdk.prompt.updatePrompt(updateArgs);
13447
13449
  return response;
13448
13450
  } catch (error) {
13449
13451
  this.handleError(error);
@@ -13969,5 +13971,5 @@ export {
13969
13971
  ApiError
13970
13972
  };
13971
13973
 
13972
- //# debugId=D9DBD2ED1B8C7B3864756E2164756E21
13974
+ //# debugId=551F24DFEBB2827E64756E2164756E21
13973
13975
  //# sourceMappingURL=index.js.map