Skip to content

SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.

fix: initialize memoryName with the predefined value to detect changes for auto-save.

Muhammad Hamza Khan0dbf1d929bd3
diff --git a/packages/app/src/builder-ui/components/MemoryDeleteKeyVal.class.ts b/packages/app/src/builder-ui/components/MemoryDeleteKeyVal.class.ts
index 02857da3..2d228bfe 100644
--- a/packages/app/src/builder-ui/components/MemoryDeleteKeyVal.class.ts
+++ b/packages/app/src/builder-ui/components/MemoryDeleteKeyVal.class.ts
@@ -7,7 +7,7 @@ export class MemoryDeleteKeyVal extends Component {
memoryName: {
type: 'input',
label: 'name',
- value: 'default',
+ value: '',
validate: `required maxlength=100`,
validateMessage: 'Enter a non-empty name, not more than 100 characters.',
attributes: { 'data-template-vars': 'true' },
@@ -22,7 +22,7 @@ export class MemoryDeleteKeyVal extends Component {
},
};
- const dataEntries = ['key'];
+ const dataEntries = ['memoryName', 'key'];
for (let item of dataEntries) {
if (typeof this.data[item] === 'undefined') this.data[item] = this.settings[item].value;
}
diff --git a/packages/app/src/builder-ui/components/MemoryReadKeyVal.class.ts b/packages/app/src/builder-ui/components/MemoryReadKeyVal.class.ts
index 012a160a..ae740d34 100644
--- a/packages/app/src/builder-ui/components/MemoryReadKeyVal.class.ts
+++ b/packages/app/src/builder-ui/components/MemoryReadKeyVal.class.ts
@@ -7,7 +7,7 @@ export class MemoryReadKeyVal extends Component {
memoryName: {
type: 'input',
label: 'name',
- value: 'default',
+ value: '',
validate: `required maxlength=100`,
validateMessage: 'Enter a non-empty name, not more than 100 characters.',
attributes: { 'data-template-vars': 'true' },
@@ -33,7 +33,7 @@ export class MemoryReadKeyVal extends Component {
// },
};
- const dataEntries = ['key'];
+ const dataEntries = ['memoryName', 'key'];
for (let item of dataEntries) {
if (typeof this.data[item] === 'undefined') this.data[item] = this.settings[item].value;
}
diff --git a/packages/app/src/builder-ui/components/MemoryWriteKeyVal.class.ts b/packages/app/src/builder-ui/components/MemoryWriteKeyVal.class.ts
index a10b0232..b6943323 100644
--- a/packages/app/src/builder-ui/components/MemoryWriteKeyVal.class.ts
+++ b/packages/app/src/builder-ui/components/MemoryWriteKeyVal.class.ts
@@ -7,7 +7,7 @@ export class MemoryWriteKeyVal extends Component {
memoryName: {
type: 'input',
label: 'Memory Name',
- value: 'default',
+ value: '',
validate: `required maxlength=100`,
validateMessage: 'Enter a non-empty name, not more than 100 characters.',
attributes: { 'data-template-vars': 'true' },
@@ -69,7 +69,7 @@ export class MemoryWriteKeyVal extends Component {
},
};
- const dataEntries = ['key', 'value'];
+ const dataEntries = ['memoryName', 'key', 'value'];
for (let item of dataEntries) {
if (typeof this.data[item] === 'undefined') this.data[item] = this.settings[item].value;
}
diff --git a/packages/app/src/builder-ui/components/MemoryWriteObject.class.ts b/packages/app/src/builder-ui/components/MemoryWriteObject.class.ts
index 9bf3776c..d6bf2548 100644
--- a/packages/app/src/builder-ui/components/MemoryWriteObject.class.ts
+++ b/packages/app/src/builder-ui/components/MemoryWriteObject.class.ts
@@ -55,10 +55,10 @@ export class MemoryWriteObject extends Component {
},
};
- // const dataEntries = ['key', 'value'];
- // for (let item of dataEntries) {
- // if (typeof this.data[item] === 'undefined') this.data[item] = this.settings[item].value;
- // }
+ const dataEntries = ['memoryName'];
+ for (let item of dataEntries) {
+ if (typeof this.data[item] === 'undefined') this.data[item] = this.settings[item].value;
+ }
// #endregion