Skip to content

Commit 66e6309

Browse files
Integration AI - github:12926
1 parent 0e42cd4 commit 66e6309

File tree

109 files changed

+2196
-187
lines changed

Some content is hidden

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

109 files changed

+2196
-187
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ jobs:
3030
fetch-depth: 0
3131
lfs: true
3232

33+
- name: Check out 4D-AIKit
34+
uses: actions/checkout@v4
35+
with:
36+
repository: 4d/4D-AIKit
37+
path: Components/4D-AIKit.4dbase
38+
ref : ${{ env.DEPENDENCIES_BRANCH }}
39+
token: ${{ secrets.PAT_TOKEN }}
40+
fetch-depth: 0
41+
lfs: true
42+
3343
- name: Build
3444
uses: 4d/build4d-action@main
3545
with:
@@ -61,4 +71,4 @@ jobs:
6171
with:
6272
target-url: ${{ secrets.TARGET_URL }}
6373
target-username: ${{ secrets.TARGET_USERNAME }}
64-
target-token: ${{ secrets.TARGET_TOKEN }}
74+
target-token: ${{ secrets.TARGET_TOKEN }}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
var $winLeft; $winTop; $winRight; $WinBottom : Integer
2+
var $x1; $y1; $x2; $y2 : Integer
3+
4+
5+
6+
GET WINDOW RECT:C443($winLeft; $winTop; $winRight; $WinBottom; Form:C1466.windowID)
7+
8+
OBJECT GET COORDINATES:C663(*; "Rect_Frame"; $x1; $y1; $x2; $y2)
9+
10+
If (Form:C1466._extra.expanded)
11+
//FORM SET SIZE($x1; $y2)
12+
SET WINDOW RECT:C444($winLeft; $winTop; $winLeft+$x1-1; $winTop+$y2; Form:C1466.windowID)
13+
Else
14+
//FORM SET SIZE($x2; $y2)
15+
SET WINDOW RECT:C444($winLeft; $winTop; $winLeft+$x2; $winTop+$y2; Form:C1466.windowID)
16+
End if
17+
18+
Form:C1466._extra.expanded:=Not:C34(Form:C1466._extra.expanded)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
var $range : Object
2+
3+
$range:=WP Selection range:C1340(*; "WParea")
4+
$range:=WP Paragraph range:C1346($range)
5+
WP SET ATTRIBUTES:C1342($range; wk background color:K81:20; wk transparent:K81:134)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Form:C1466.reset:=True:C214
2+
SET TIMER:C645(-1)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Case of
2+
: (Form event code:C388=On After Edit:K2:43)
3+
4+
If (Get edited text:C655="")
5+
Form:C1466._extra.state:=-1
6+
Else
7+
Form:C1466._extra.state:=0
8+
End if
9+
10+
Form:C1466.radio.opt1:=True:C214
11+
Form:C1466.radio.opt2:=False:C215
12+
Form:C1466.radio.opt3:=False:C215
13+
14+
SET TIMER:C645(-1)
15+
16+
End case
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
var $range : Object
2+
3+
If (Form:C1466.bookmarks.length>0)
4+
5+
If (Form:C1466.selectedRow=Null:C1517)
6+
7+
Form:C1466.selectedRowID:=1
8+
LISTBOX SELECT ROW:C912(*; "LB_Bookmarks"; 1; lk replace selection:K53:1)
9+
10+
Form:C1466.selectedRow:=Form:C1466.bookmarks[0]
11+
12+
End if
13+
14+
//$range:=Form.selectedRow.promptRange
15+
$range:=Form:C1466.selectedRow.answerRange
16+
WP SELECT:C1348(*; "WParea"; $range) //$range.start; $range.start)
17+
18+
GOTO OBJECT:C206(*; "WParea")
19+
//SET TIMER(-1)
20+
21+
//Form.WPai:=Form.WPai
22+
23+
End if
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Case of
2+
: (Form event code:C388=On Selection Change:K2:29)
3+
SET TIMER:C645(10)
4+
5+
End case
6+
7+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
CONFIRM:C162(Localized string:C991("ClearHistory"))
2+
If (ok=1)
3+
4+
5+
6+
7+
var $aiParameters : Object
8+
9+
$aiParameters:=New object:C1471
10+
11+
$aiParameters.apiKey:=Form:C1466.apiKey
12+
$aiParameters.windowID:=Form:C1466.windowID
13+
14+
$aiParameters.function:="Reset Context"
15+
$aiParameters.callbackAction:="Reset Context"
16+
17+
Form:C1466._extra.state:=1 // running
18+
AI Call($aiParameters)
19+
20+
SET TIMER:C645(-1)
21+
22+
End if
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
GOTO OBJECT:C206(*; "WParea")
3+
Form:C1466._extra.timer:="copy"
4+
SET TIMER:C645(-1)
5+
6+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
var $text : Text
2+
$text:=WP Get text:C1575(WP Selection range:C1340(*; "WParea"); wk expressions as value:K81:255)
3+
4+
CLEAR PASTEBOARD:C402
5+
SET TEXT TO PASTEBOARD:C523($text)

0 commit comments

Comments
 (0)