-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0a0d82
commit 824519b
Showing
56 changed files
with
1,276 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ms/D_Personas/ObjectMethods/btnDelete.4dm → ...D_AI_Personas/ObjectMethods/btnDelete.4dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
Project/Sources/Forms/D_AI_Personas/ObjectMethods/btnSave.4dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Form:C1466.personaWizard.save(Form:C1466.editPersona; Form:C1466.saveDestination.index) //index = 0…3 | ||
|
||
//*** reload list | ||
|
||
UI_Personas("init") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Project/Sources/Forms/D_Personas/method.4dm → ...ct/Sources/Forms/D_AI_Personas/method.4dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
20 changes: 20 additions & 0 deletions
20
Project/Sources/Forms/D_AI_Prompt/ObjectMethods/Button1.4dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
var $aiParameters : Object | ||
|
||
$aiParameters:=New object:C1471 | ||
|
||
$aiParameters.apiKey:=Form:C1466.apiKey | ||
$aiParameters.windowID:=Form:C1466.windowID | ||
|
||
// $aiParameters.function:=Form.local.tabs.values[Form.local.tabs.index] // chat or picture | ||
|
||
$aiParameters.function:="Text" | ||
$aiParameters.callbackAction:="Text" | ||
$aiParameters.prompt:=Form:C1466.prompt | ||
|
||
//$aiParameters.size:="1024x1024" // for pictures only | ||
|
||
Form:C1466.answer:="" | ||
OBJECT SET VISIBLE:C603(*; "waitGears"; True:C214) | ||
AI Call($aiParameters) | ||
|
||
|
12 changes: 12 additions & 0 deletions
12
Project/Sources/Forms/D_AI_Prompt/ObjectMethods/Button2.4dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//var $file : 4D.File | ||
|
||
//$file:=File("/RESOURCES/4DWP_AI/templateAI.4wp") | ||
//Form.WPai:=WP Import document($file) | ||
//WP SET ATTRIBUTES(Form.WPai; wk background color; wk transparent) | ||
|
||
|
||
//Form.bookmarks:=[] | ||
|
||
|
||
Form:C1466.reset:=True:C214 | ||
SET TIMER:C645(-1) |
65 changes: 65 additions & 0 deletions
65
Project/Sources/Forms/D_AI_Prompt/ObjectMethods/Button3.4dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
var $text; $size : Text | ||
var $wp; $range : Object | ||
var $paragraphs; $replaced : Collection | ||
var $paragraph : Object | ||
var $remove; $p1; $p2 : Integer | ||
|
||
$text:=WP Get text:C1575(Form:C1466.WPai) | ||
|
||
$wp:=WP New:C1317() | ||
WP SET TEXT:C1574($wp; $text; wk replace:K81:177) | ||
WP SET ATTRIBUTES:C1342($wp; wk font size:K81:66; "18pt") | ||
|
||
$paragraphs:=WP Get elements:C1550($wp; wk type paragraph:K81:191) | ||
|
||
For each ($paragraph; $paragraphs) | ||
|
||
|
||
$text:=WP Get text:C1575($paragraph; wk expressions as value:K81:255) | ||
|
||
Case of | ||
: ($text="####@") | ||
$remove:=6 | ||
$size:="24pt" | ||
|
||
: ($text="###@") | ||
$remove:=5 | ||
$size:="28pt" | ||
|
||
: ($text="##@") | ||
$remove:=4 | ||
$size:="32pt" | ||
|
||
: ($text="#@") | ||
$remove:=3 | ||
$size:="36pt" | ||
|
||
Else | ||
$remove:=0 | ||
End case | ||
|
||
If ($remove#0) | ||
$text:=Substring:C12($text; $remove) | ||
WP SET TEXT:C1574($paragraph; $text; wk replace:K81:177) | ||
WP SET ATTRIBUTES:C1342($paragraph; wk font size:K81:66; $size) | ||
End if | ||
|
||
$p1:=Position:C15("**"; $text; 0) | ||
If ($p1>0) | ||
$p2:=Position:C15("**"; $text; $p1+1) | ||
If ($p2>0) | ||
$range:=WP Paragraph range:C1346($paragraph) | ||
$range:=WP Text range:C1341($range; $range.start+$p1+1; $range.start+$p2-1) | ||
|
||
WP SET ATTRIBUTES:C1342($range; wk font bold:K81:68; wk true:K81:174) | ||
|
||
End if | ||
End if | ||
|
||
End for each | ||
|
||
$replaced:=WP Find all:C1755($wp; "**"; wk all insensitive:K81:334; "") | ||
|
||
|
||
Form:C1466.WPai:=WP New:C1317($wp) | ||
|
11 changes: 11 additions & 0 deletions
11
Project/Sources/Forms/D_AI_Prompt/ObjectMethods/Button4.4dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
var $text : Text | ||
var $range : Object | ||
|
||
If (Form:C1466.selectedRow#Null:C1517) | ||
|
||
$range:=Form:C1466.selectedRow.answerRange | ||
$text:=WP Get text:C1575($range; wk expressions as value:K81:255) | ||
WP SET TEXT:C1574(Form:C1466.wpSelection; $text; wk replace:K81:177) | ||
End if | ||
|
||
|
18 changes: 18 additions & 0 deletions
18
Project/Sources/Forms/D_AI_Prompt/ObjectMethods/LB_Bookmarks.4dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
var $range : Object | ||
|
||
If (Form:C1466.bookmarks.length>0) | ||
|
||
If (Form:C1466.selectedRow=Null:C1517) | ||
|
||
Form:C1466.selectedRowID:=1 | ||
LISTBOX SELECT ROW:C912(*; "LB_Bookmarks"; 1; lk replace selection:K53:1) | ||
|
||
Form:C1466.selectedRow:=Form:C1466.bookmarks[0] | ||
|
||
End if | ||
|
||
|
||
$range:=Form:C1466.selectedRow.answerRange | ||
WP SELECT:C1348(*; "WParea"; $range.start; $range.start) | ||
|
||
End if |
File renamed without changes.
Oops, something went wrong.