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.

Add default TTL value and initialize missing data entries in FileStore class

Muhammad Hamza Khan9e702ceab172
diff --git a/packages/app/src/builder-ui/components/FileStore.class.ts b/packages/app/src/builder-ui/components/FileStore.class.ts
index 6c114aaa..e82b83f7 100644
--- a/packages/app/src/builder-ui/components/FileStore.class.ts
+++ b/packages/app/src/builder-ui/components/FileStore.class.ts
@@ -16,6 +16,7 @@ export class FileStore extends Component {
type: 'select',
label: 'TTL',
help: 'Time to live',
+ value: '86400', // Default to 1 day
tooltipClasses: 'w-28',
arrowClasses: '-ml-11',
options: [
@@ -43,6 +44,11 @@ export class FileStore extends Component {
},
};
+ const dataEntries = ['name', 'ttl'];
+ for (let item of dataEntries) {
+ if (typeof this.data[item] === 'undefined') this.data[item] = this.settings[item].value;
+ }
+
this.properties.defaultOutputs = ['Url'];
this.properties.defaultInputs = ['Data'];