Skip to content

Commit 824519b

Browse files
update for (future) AI integration
1 parent a0a0d82 commit 824519b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1276
-54
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,4 @@ DEV/
7979
# Added by user
8080
#--------------------------------
8181
Project/Sources/dependencies.json
82+
Resources/4DWP_AI/aiPref.json
Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Class constructor($formName : Text)
88

99
Function getPersonas()->$personas : Collection
1010

11-
1211
var $folder : 4D:C1709.Folder
1312
var $file : 4D:C1709.File
1413
var $lang; $DBname : Text
@@ -46,10 +45,11 @@ Function getPersonas()->$personas : Collection
4645
//$validated:=This.JSONvalidate("persona"; $file.getText())
4746
$validated:=True:C214
4847
If ($validated)
49-
$persona:=JSON Parse:C1218($file.getText())
48+
$persona:=JSON Parse:C1218($file.getText()) // .name and .prompt and .temperature
5049
$persona._fileName:=$file.fullName
5150
$persona._origin:=$i // 0: "Default" 1:"Resources" 2:"User")
5251
$persona._originIcon:=This:C1470._originIcons[$i]
52+
5353
$personas.push($persona)
5454
End if
5555
End for each
@@ -66,6 +66,11 @@ Function getPersonas()->$personas : Collection
6666
$personas.combine($dataPersonas)
6767

6868

69+
Function getValues()->$values : Collection
70+
71+
$values:=This:C1470.personas.extract("name")
72+
73+
6974
Function getIcons()->$icons : Collection
7075

7176
var $fileNames : Collection
@@ -80,11 +85,11 @@ Function getIcons()->$icons : Collection
8085
$icons.push($picture)
8186
End for each
8287

83-
Function getPersona($id : Integer)->$persona : Object
88+
//Function getPersona($id : Integer)->$persona : Object
8489

85-
If ($id<=This:C1470.personas.length)
86-
$persona:=This:C1470.personas[$id]
87-
End if
90+
//If ($id<=This.personas.length)
91+
//$persona:=This.personas[$id]
92+
//End if
8893

8994
Function save($persona : Object; $saveWhere : Integer)
9095

Project/Sources/Forms/D_AI/method.4dm

Lines changed: 0 additions & 9 deletions
This file was deleted.

Project/Sources/Forms/D_Personas/ObjectMethods/LB_Personas.4dm renamed to Project/Sources/Forms/D_AI_Personas/ObjectMethods/LB_Personas.4dm

File renamed without changes.

Project/Sources/Forms/D_Personas/ObjectMethods/Popup Dropdown List1.4dm renamed to Project/Sources/Forms/D_AI_Personas/ObjectMethods/Popup Dropdown List1.4dm

File renamed without changes.

Project/Sources/Forms/D_Personas/ObjectMethods/btnDelete.4dm renamed to Project/Sources/Forms/D_AI_Personas/ObjectMethods/btnDelete.4dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CONFIRM:C162(".Are you sure?.")
22
If (ok=1)
3-
Form:C1466.ai.delete(Form:C1466.persona)
3+
Form:C1466.personaWizard.delete(Form:C1466.persona)
44

55

66
//*** reload list
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Form:C1466.personaWizard.save(Form:C1466.editPersona; Form:C1466.saveDestination.index) //index = 0…3
2+
3+
//*** reload list
4+
5+
UI_Personas("init")
6+

Project/Sources/Forms/D_Personas/form.4DForm renamed to Project/Sources/Forms/D_AI_Personas/form.4DForm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"onLoad",
1414
"onTimer"
1515
],
16-
"windowTitle": "window title",
16+
"windowTitle": ".Personas editor",
1717
"destination": "detailScreen",
1818
"pages": [
1919
{
@@ -122,7 +122,7 @@
122122
"events": [
123123
"onSelectionChange"
124124
],
125-
"dataSource": "Form:C1466.ai.personas",
125+
"dataSource": "Form:C1466.personaWizard.personas",
126126
"listboxType": "collection",
127127
"currentItemSource": "Form:C1466.persona",
128128
"showHeaders": false,

Project/Sources/Forms/D_Personas/method.4dm renamed to Project/Sources/Forms/D_AI_Personas/method.4dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Case of
22
: (Form event code:C388=On Load:K2:1)
33

4-
Form:C1466.ai:=cs:C1710.AiWizard.new()
4+
Form:C1466.personaWizard:=cs:C1710.PersonaWizard.new()
55
LISTBOX SELECT ROW:C912(*; "LB_Personas"; 1; lk replace selection:K53:1)
66

77
Form:C1466.saveDestination:={values: [".Default"; ".Resources"; ".Single user"; ".All users"]; index: 0}

Project/Sources/Forms/D_AI/ObjectMethods/Button.4dm renamed to Project/Sources/Forms/D_AI_Prompt/ObjectMethods/Button.4dm

File renamed without changes.

0 commit comments

Comments
 (0)