feat: Initialize Workspace with metadata fields
- Initialize `children`, `created`, `updated`, `is_saved` - Add `time` import for timestamp fields - Remove unused `ui.console` import - Update package version constant to `1.0.0`
This commit is contained in:
@@ -2,8 +2,8 @@ module heroprompt
|
||||
|
||||
import freeflowuniverse.herolib.core.base
|
||||
import freeflowuniverse.herolib.core.playbook { PlayBook }
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import json
|
||||
import time
|
||||
|
||||
__global (
|
||||
heroprompt_global map[string]&Workspace
|
||||
@@ -23,8 +23,13 @@ pub mut:
|
||||
|
||||
pub fn new(args ArgsGet) !&Workspace {
|
||||
mut obj := Workspace{
|
||||
name: args.name
|
||||
name: args.name
|
||||
children: []
|
||||
created: time.now()
|
||||
updated: time.now()
|
||||
is_saved: true
|
||||
}
|
||||
|
||||
set(obj)!
|
||||
return get(name: args.name)!
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ module heroprompt
|
||||
import time
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
|
||||
pub const version = '0.0.0'
|
||||
pub const version = '1.0.0'
|
||||
const singleton = false
|
||||
const default = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user