Skip to content

feat: widget data flow refactor & ui state migrate from hook to mobx #370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 281 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
281 commits
Select commit Hold shift + click to select a range
08b862d
fix
myshell-joe Dec 25, 2024
f3c8757
lint
myshell-joe Dec 25, 2024
64d2269
code format
myshell-joe Dec 26, 2024
28c405d
bugfix & add test case
myshell-joe Dec 26, 2024
3173843
optimize block delete & focus
myshell-joe Dec 26, 2024
8b25478
fix: varibale block display bug
myshell-joe Dec 27, 2024
0ef8266
variable block optimize
myshell-joe Dec 27, 2024
bfe613c
Merge branch 'beta' of github.com:myshell-ai/ShellAgent into dev-code…
myshell-joe Dec 27, 2024
40899ef
Dev code mode editor (#222)
myshell-joe Dec 27, 2024
97c523b
Dev fix encoding (#223)
wl-zhao Dec 29, 2024
58d9586
Dev comfyui v2 (#224)
wl-zhao Dec 30, 2024
d043354
Dev feedback (#225)
ikun97 Dec 30, 2024
f3f1475
update bundled chat (#226)
shanexi Dec 30, 2024
9323446
feat: template (#227)
ikun97 Dec 30, 2024
1431d43
feat: template (#228)
ikun97 Dec 30, 2024
2025af5
Test images
tiancheng-myshell Dec 30, 2024
6cd3c61
Dev optimize auto update (#230)
Cherwayway Dec 30, 2024
07c3c6d
feat: random transition (#231)
ikun97 Dec 31, 2024
ccf872e
Fix code mode editor merge (#232)
myshell-joe Dec 31, 2024
8cd31f6
recover code #212 #203 #218 #226 (#234)
shanexi Jan 2, 2025
3ae669b
IM input supports image (#219)
shanexi Jan 2, 2025
7e1a075
ignore product.release for auto update (#235)
Cherwayway Jan 2, 2025
df8161e
fix create temp file on windows (#237)
wl-zhao Jan 3, 2025
96aa4aa
Merge branch 'beta' of github.com:myshell-ai/ShellAgent into dev-code…
myshell-joe Jan 6, 2025
e7e9cc3
online bug fix (#239)
myshell-joe Jan 7, 2025
384741f
Merge branch 'beta' of github.com:myshell-ai/ShellAgent into dev-code…
myshell-joe Jan 7, 2025
37d880a
Dev temp (#240)
ikun97 Jan 7, 2025
1b89558
fix: optimize code mode editor
myshell-joe Jan 8, 2025
1a66d12
fix: variable delete
myshell-joe Jan 8, 2025
a2f389a
221 image choices 3 (#236)
shanexi Jan 9, 2025
b18f3fe
WIP 重写variable-value-block
myshell-joe Jan 9, 2025
85dee5d
Dev automata validate (#238)
myshell-joe Jan 9, 2025
ca7a0ce
Fix ComfyUI dependencies check (#243)
shanexi Jan 9, 2025
914fe8a
Fix revert code mode (#245)
myshell-joe Jan 9, 2025
d14003c
Dev comfyui v2 (#246)
wl-zhao Jan 10, 2025
9902280
fix: button content maxLength (#247)
myshell-joe Jan 10, 2025
5a9f115
add llm knowledge base (#252)
Cherwayway Jan 15, 2025
e8f3f09
[feat] auto update run in threadpool and add fastapi workers (#253)
Cherwayway Jan 15, 2025
8787664
255 edit value pre submit validate (#256)
shanexi Jan 20, 2025
2497e37
feat: button maxlength 19 characters (#257)
myshell-joe Jan 21, 2025
44a3d24
fix: edit dialog (#259)
shanexi Jan 22, 2025
9a2fe1b
feat: sync chat (#260)
shanexi Jan 22, 2025
4e41722
Revert "feat: sync chat" (#262)
shanexi Jan 22, 2025
77f722a
Support X bot and Shellagent for Web (#264)
tiancheng-myshell Jan 22, 2025
4566321
feat: api proxy (#265)
ikun97 Jan 23, 2025
c0f1f46
[feat] add deepseek api (#270)
Cherwayway Jan 27, 2025
eac12a2
Add deepseek (#271)
Cherwayway Jan 27, 2025
891c0c1
update dev-x-bot (#266)
wl-zhao Jan 27, 2025
4043dad
update new widgets for web3 (#273)
wl-zhao Jan 27, 2025
e178729
fix memory recursive quotes (#274)
wl-zhao Jan 28, 2025
64503e0
Hotfix experience issues (#275)
myshell-joe Jan 28, 2025
688be2c
Hotfix experience issues (#276)
myshell-joe Jan 28, 2025
9f7efe9
fix CHAT bug (#277)
wl-zhao Jan 28, 2025
067f731
fix myshell widget caller bug (#278)
wl-zhao Jan 28, 2025
0a912ad
add hide think (#279)
wl-zhao Jan 28, 2025
9782429
feat: 下线assistant (#280)
ikun97 Jan 28, 2025
fcef0a9
Dev bot (#281)
ikun97 Jan 28, 2025
69fda66
Dev user login (#283)
wl-zhao Jan 28, 2025
a943a30
Hotfix experience issues (#284)
myshell-joe Jan 28, 2025
4781539
fix: button color (#285)
shanexi Jan 28, 2025
3ea6527
Dev user login (#286)
wl-zhao Jan 28, 2025
53af0ba
Dev user login (#287)
wl-zhao Jan 28, 2025
1f8950d
Dev user login (#288)
wl-zhao Jan 28, 2025
6348b60
feat: child template (#289)
ikun97 Jan 28, 2025
3ea62f6
feat: build (#290)
ikun97 Jan 28, 2025
d6abeeb
Dev build (#291)
ikun97 Jan 28, 2025
ee22709
Dev user login (#292)
wl-zhao Feb 6, 2025
12d20e0
Dev user login (#293)
wl-zhao Feb 6, 2025
7e141cc
Myshell bots support condition node (#294)
myshell-joe Feb 8, 2025
c44e486
feat: ui design
ikun97 Feb 10, 2025
e5c3d1e
feat: ui design
ikun97 Feb 10, 2025
8e82c8d
feat: ui design
ikun97 Feb 10, 2025
172f3e7
feat: ui design
ikun97 Feb 10, 2025
371e24c
feat: ui design
ikun97 Feb 10, 2025
81fb015
feat: ui design
ikun97 Feb 10, 2025
dd2d543
feat: ui design
ikun97 Feb 10, 2025
86ab21b
feat: ui design
ikun97 Feb 10, 2025
f87f236
Dev button validate (#295)
myshell-joe Feb 11, 2025
5328166
Revert "fix: delete empty test case"
myshell-joe Feb 11, 2025
1473f2e
Revert "fix: test case"
myshell-joe Feb 11, 2025
be06923
Revert "fix error"
myshell-joe Feb 11, 2025
7e1d311
Revert "revert code mode"
myshell-joe Feb 11, 2025
0f5fc26
Revert "revert code mode"
myshell-joe Feb 11, 2025
9859e13
update
myshell-joe Feb 11, 2025
1cc5e42
feat: ui design
ikun97 Feb 11, 2025
d2056bc
feat: ui design
ikun97 Feb 11, 2025
878abaa
feat: ui design
ikun97 Feb 11, 2025
1095ecb
feat: ui design
ikun97 Feb 11, 2025
9d51f1b
Merge branch 'alpha' of github.com:myshell-ai/ShellAgent into dev-design
ikun97 Feb 11, 2025
3dfa66d
feat: ui design
ikun97 Feb 12, 2025
f590817
feat: ui design
ikun97 Feb 12, 2025
c2f52b4
feat: ui design
ikun97 Feb 12, 2025
b94aa9c
fix: button color (#282)
shanexi Feb 13, 2025
b068179
feat: choices label max length 14 (#269)
shanexi Feb 13, 2025
637d27d
fix: image choice item can ref (#297)
shanexi Feb 13, 2025
c225b0b
fix: image choice item can ref (#296)
shanexi Feb 13, 2025
bb41856
fix: 修复已知问题
myshell-joe Feb 13, 2025
bafe315
fix: lint
myshell-joe Feb 13, 2025
57b6d05
Merge branch 'beta' of github.com:myshell-ai/ShellAgent into revert-f…
myshell-joe Feb 13, 2025
7d217e1
feat: ui design
ikun97 Feb 13, 2025
b20afd7
feat: ui design
ikun97 Feb 13, 2025
dc9328c
feat: ui design
ikun97 Feb 13, 2025
61c7f03
feat: ui design
ikun97 Feb 14, 2025
f4b1a92
feat: ui design
ikun97 Feb 14, 2025
d4e3882
feat: ui design
ikun97 Feb 14, 2025
b9efaa0
fix: ip check warning & state copy issuse (#298)
myshell-joe Feb 14, 2025
4078ffe
feat: ui design
ikun97 Feb 14, 2025
80831c5
feat: ui design
ikun97 Feb 14, 2025
e56111a
feat: ui design
ikun97 Feb 14, 2025
37117b0
Merge branch 'beta' of github.com:myshell-ai/ShellAgent into revert-f…
myshell-joe Feb 14, 2025
da6e97f
chore: Upgrade some Git workflow actions to v4 (#299)
tiancheng-myshell Feb 14, 2025
2e7901e
feat: ui design
ikun97 Feb 14, 2025
6561e84
feat: source (#300)
ikun97 Feb 14, 2025
a859992
feat: ui design
ikun97 Feb 14, 2025
4f56f26
Merge branch 'alpha' of github.com:myshell-ai/ShellAgent into revert-…
myshell-joe Feb 16, 2025
46e9427
fix: style issue
myshell-joe Feb 16, 2025
2ed26ea
feat: ui design
ikun97 Feb 17, 2025
680c9c9
feat: ui design
ikun97 Feb 17, 2025
fbd8a27
fix: bug
myshell-joe Feb 17, 2025
7cd6ae0
fix: context replace
myshell-joe Feb 17, 2025
1f7eaf9
change placeholder
myshell-joe Feb 17, 2025
fb765cd
change placeholder
myshell-joe Feb 17, 2025
f6338b6
feat: timeout (#302)
ikun97 Feb 17, 2025
72a231b
WIP: style
myshell-joe Feb 17, 2025
ab33863
feat: timeout (#301)
ikun97 Feb 17, 2025
ddc55a7
Feat: Web3 button wallet (#303)
myshell-joe Feb 17, 2025
7faf1d8
Revert "Feat: Web3 button wallet (#303)"
myshell-joe Feb 17, 2025
d71f0cb
Revert "Feat: Web3 button wallet" (#304)
myshell-joe Feb 17, 2025
f416c49
Revert "Revert "Feat: Web3 button wallet"" (#307)
myshell-joe Feb 17, 2025
01a5320
docs: link README to MyShell docs (#308)
tiancheng-myshell Feb 17, 2025
23595e8
docs: link README to MyShell docs (#310)
tiancheng-myshell Feb 17, 2025
951ede4
update ECS_SERVICE (#311)
zhongxiao-myshell Feb 17, 2025
d8a345f
fix: export timeout loading (#306)
myshell-joe Feb 17, 2025
4714541
Fix: export timeout loading (#305)
myshell-joe Feb 17, 2025
8195ed4
feat: 401 (#312)
ikun97 Feb 17, 2025
2f7bd7c
Fix: x-call-from header (#313)
myshell-joe Feb 17, 2025
01e6168
Dev user login (#314)
zhongxiao-myshell Feb 17, 2025
d0d9d2d
Dev user login (#315)
zhongxiao-myshell Feb 17, 2025
df47abd
update automata from dev_user_login (#316)
zhongxiao-myshell Feb 17, 2025
9367d42
Merge branch 'alpha' of github.com:myshell-ai/ShellAgent into dev-cod…
myshell-joe Feb 17, 2025
55a3318
Revert "update automata from dev_user_login" (#318)
myshell-joe Feb 17, 2025
674f6dc
Merge branch 'revert-303-dev-button-wallet' into alpha
zhongxiao-myshell Feb 17, 2025
68dd763
Dev button wallet (#320)
zhongxiao-myshell Feb 17, 2025
bf44b17
feat: help (#321)
ikun97 Feb 17, 2025
403d876
fix: revert server code
myshell-joe Feb 17, 2025
0eac744
Merge branch 'dev-revert-button-wallet' into alpha
myshell-joe Feb 17, 2025
449e536
Revert "Dev button wallet" (#323)
myshell-joe Feb 17, 2025
fd2635e
Revert "Revert "Feat: Web3 button wallet"" (#324)
myshell-joe Feb 17, 2025
60e4c16
Merge branch 'alpha' of github.com:myshell-ai/ShellAgent into alpha
myshell-joe Feb 17, 2025
7d14fa7
fix: revert server code (#325)
myshell-joe Feb 17, 2025
d7f41aa
Merge branches 'dev-code-editor' and 'alpha' of github.com:myshell-ai…
myshell-joe Feb 17, 2025
d65a53d
Optimize workflow task concurrency and queuing mechanism (#326)
zhongxiao-myshell Feb 17, 2025
1b13e7e
[Fix] create template fail (#327)
Cherwayway Feb 18, 2025
d41e566
update
zhongxiao-myshell Feb 18, 2025
39bb6f5
merge conflict
zhongxiao-myshell Feb 18, 2025
4c8910e
Dev target state (#328)
myshell-joe Feb 18, 2025
f8b0a7b
feat: template (#329)
ikun97 Feb 18, 2025
9e804b9
fix: remove edge displayname & fix edge data (#330)
myshell-joe Feb 18, 2025
3235f8b
fix: ip check warning & button copy fix (#332)
myshell-joe Feb 18, 2025
9a34900
Optimize/run workflow parallel (#334)
zhongxiao-myshell Feb 18, 2025
727e1d2
refactor: Optimize Dockerfile for multi-stage build and dependency ma…
zhongxiao-myshell Feb 18, 2025
0edd315
refactor: Optimize Dockerfile for multi-stage build and dependency ma…
zhongxiao-myshell Feb 18, 2025
7f89a89
feat: save template (#337)
ikun97 Feb 18, 2025
6416814
Fix/playwright dependency (#338)
zhongxiao-myshell Feb 18, 2025
0cc8547
feat: ui design
ikun97 Feb 18, 2025
c477a02
Fix/playwright dependency (#339)
zhongxiao-myshell Feb 18, 2025
1f72750
update myshell widget
Cherwayway Feb 19, 2025
b127e68
Merge branch 'alpha' of github.com:myshell-ai/ShellAgent into alpha
Cherwayway Feb 19, 2025
99a050d
hotfix: 不支持 web3 钱包提示 (#341)
shanexi Feb 19, 2025
230609f
Optimize/run stateless parallel (#344)
zhongxiao-myshell Feb 19, 2025
9140514
Revert "Optimize/run stateless parallel" (#345)
zhongxiao-myshell Feb 19, 2025
ccac7c5
Optimize/run stateless parallel (#346)
zhongxiao-myshell Feb 19, 2025
30e4255
add retry on 502 error (#340)
RyanMyshell Feb 20, 2025
9eda4cf
feat: ui design
ikun97 Feb 20, 2025
7791ae4
feat: ui design
ikun97 Feb 20, 2025
0ca8dd3
feat: ui design
ikun97 Feb 20, 2025
55bca1b
feat: ui design
ikun97 Feb 20, 2025
26e9f52
feat: ui design
ikun97 Feb 20, 2025
2e62f34
feat: height (#348)
ikun97 Feb 20, 2025
2768864
feat: ui design
ikun97 Feb 20, 2025
fa83f44
feat: ui design
ikun97 Feb 21, 2025
26c5406
Merge branch 'dev-design' of github.com:myshell-ai/ShellAgent into de…
ikun97 Feb 21, 2025
e76f430
feat: ui design
ikun97 Feb 21, 2025
f42d238
feat: ui design
ikun97 Feb 21, 2025
f779858
Change message type from TEXT to REPLY in server parsing (#347)
zhongxiao-myshell Feb 21, 2025
668dc87
Merge branch 'alpha' of github.com:myshell-ai/ShellAgent into dev-design
ikun97 Feb 21, 2025
88794b2
feat: ui design
ikun97 Feb 21, 2025
9bfa4df
fix: open settings in detail return wrong channel (#342)
shanexi Feb 21, 2025
9afc4ed
fix: upload preview (#343)
shanexi Feb 21, 2025
a81f93f
Sync chat 0221 (#349)
shanexi Feb 21, 2025
c37b2a3
feat: ui design
ikun97 Feb 21, 2025
37c0d5e
feat: ui design
ikun97 Feb 21, 2025
82f7c1c
revert file mode change (#351)
myshell-joe Feb 21, 2025
de6c955
Merge branch 'alpha' of github.com:myshell-ai/ShellAgent into dev-design
myshell-joe Feb 21, 2025
9516bb2
Merge branch 'alpha' of github.com:myshell-ai/ShellAgent into dev-cod…
myshell-joe Feb 21, 2025
0354425
feat: ui design
ikun97 Feb 21, 2025
1e16b3f
Merge branch 'dev-design' of github.com:myshell-ai/ShellAgent into de…
ikun97 Feb 21, 2025
a40ca39
feat: 修改样式
myshell-joe Feb 21, 2025
717fb33
fix: 修复已知问题
myshell-joe Feb 23, 2025
c361127
fix: condition fullfilled fixed
myshell-joe Feb 24, 2025
d46d78f
Merge branch 'dev-design' of github.com:myshell-ai/ShellAgent into de…
myshell-joe Feb 24, 2025
ab04c50
fix: remove condition inline
myshell-joe Feb 24, 2025
0ce5d25
feat: ui design
ikun97 Feb 24, 2025
77e0886
feat: ui design
ikun97 Feb 24, 2025
a2c455f
fix: text block min height
myshell-joe Feb 24, 2025
1332f45
feat: refactor highlight block render
myshell-joe Feb 24, 2025
87a5b74
fix: test case
myshell-joe Feb 24, 2025
2d1c390
Merge branch 'dev-design' of github.com:myshell-ai/ShellAgent into de…
myshell-joe Feb 24, 2025
e1c2023
fix: test case
myshell-joe Feb 24, 2025
d766484
fix: remove text space
myshell-joe Feb 24, 2025
b405a0f
fix: remove text space
myshell-joe Feb 24, 2025
47f0115
[Fix] fix expression rce (#353)
Cherwayway Feb 25, 2025
6fa9591
feat: optimize block focus
myshell-joe Feb 25, 2025
3abff2d
wip
myshell-joe Feb 25, 2025
4687999
Fix rce (#354)
Cherwayway Feb 25, 2025
daf94b5
Fix rce (#355)
Cherwayway Feb 25, 2025
6f6f1d7
Enhance Dockerfile and add .dockerignore for improved build process (…
zhongxiao-myshell Feb 25, 2025
6df2b5e
Optimize/run docker (#357)
zhongxiao-myshell Feb 25, 2025
c794521
[Feat] add used widgets respone for stateless interface (#358)
Cherwayway Feb 26, 2025
b0012a8
Merge branch 'alpha' of github.com:myshell-ai/ShellAgent into dev-wid…
myshell-joe Feb 26, 2025
165cfc5
Update stateless (#359)
Cherwayway Feb 26, 2025
44453fc
update metadata uploader widget (#360)
Cherwayway Feb 26, 2025
699086d
Dev design (#350)
ikun97 Feb 26, 2025
50f72a9
Merge branch 'alpha' of github.com:myshell-ai/ShellAgent into dev-wid…
myshell-joe Feb 26, 2025
796442b
wip
myshell-joe Feb 26, 2025
00af8bf
feat: ui design (#361)
ikun97 Feb 26, 2025
4f32025
Optimize/docker env (#362)
zhongxiao-myshell Feb 26, 2025
e5cc93d
Optimize/docker env (#363)
zhongxiao-myshell Feb 26, 2025
a6055cb
Optimize/docker env (#364)
zhongxiao-myshell Feb 26, 2025
0c53b5c
Hotfix UI (#365)
ikun97 Feb 27, 2025
849bffd
Fix rce (#366)
Cherwayway Feb 27, 2025
626420c
Dev color (#367)
ikun97 Feb 28, 2025
53bdc3c
Enhance safe_eval security with SafeRandomModule and pre-expression c…
zhongxiao-myshell Feb 28, 2025
7224ed9
WIP: widget schema fetch
myshell-joe Mar 2, 2025
b41f330
feat: remove app state hook
myshell-joe Mar 2, 2025
1f17397
feat: refactor button config
myshell-joe Mar 2, 2025
1f87046
feat: done
myshell-joe Mar 3, 2025
66e2e05
Merge branch 'alpha' of github.com:myshell-ai/ShellAgent into dev-wid…
myshell-joe Mar 3, 2025
85d2993
lint
myshell-joe Mar 3, 2025
c71fb70
Increase automata stateless run timeout to 15 minutes (#369)
zhongxiao-myshell Mar 3, 2025
f1f0811
fix bug
myshell-joe Mar 3, 2025
f8a148d
Merge branch 'alpha' of github.com:myshell-ai/ShellAgent into dev-wid…
myshell-joe Mar 3, 2025
380e6b1
Merge branch 'alpha' of github.com:myshell-ai/ShellAgent into dev-cod…
myshell-joe Mar 3, 2025
e37f4b9
Merge branch 'dev-code-editor' into dev-widget-refactor
myshell-joe Mar 3, 2025
d284cde
fix add loading
myshell-joe Mar 3, 2025
0297efe
fix: button bug
myshell-joe Mar 4, 2025
06f12ad
fix: task recorder reference bug
myshell-joe Mar 4, 2025
fb1bbc4
lint
myshell-joe Mar 4, 2025
dba81f4
bugfix
myshell-joe Mar 4, 2025
65a85da
fix: test case
myshell-joe Mar 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
65 changes: 65 additions & 0 deletions .aws/task-definition-shellagent-prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"containerDefinitions": [
{
"name": "shellagent_myshell_python_engine",
"image": "813449244180.dkr.ecr.us-west-2.amazonaws.com/shellagent:1.0.0",
"cpu": 0,
"portMappings": [
{
"name": "shellagent_myshell_python_engine_prod_tcp_8089",
"containerPort": 8089,
"hostPort": 8089,
"protocol": "tcp",
"appProtocol": "http"
}
],
"essential": true,
"environment": [
{
"name": "MYSHELL_DEPLOY",
"value": "1"
},
{
"name": "MYSHELL_API_DEPLOY_KEY",
"value": ""
}
],
"command": null,
"environmentFiles": [],
"mountPoints": [],
"volumesFrom": [],
"ulimits": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/shellagent_myshell_python_engine_prod",
"mode": "non-blocking",
"awslogs-create-group": "true",
"max-buffer-size": "25m",
"awslogs-region": "us-west-2",
"awslogs-stream-prefix": "ecs"
},
"secretOptions": []
},
"systemControls": []
}
],
"family": "shellagent_myshell_python_engine_prod",
"taskRoleArn": "arn:aws:iam::813449244180:role/ecsTaskRole",
"executionRoleArn": "arn:aws:iam::813449244180:role/ecsTaskExecutionRole",
"networkMode": "awsvpc",
"volumes": [],
"placementConstraints": [],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "4096",
"memory": "8192",
"runtimePlatform": {
"cpuArchitecture": "X86_64",
"operatingSystemFamily": "LINUX"
},
"enableFaultInjection": false,
"tags": [],
"enableExecuteCommand": true
}
45 changes: 27 additions & 18 deletions .ci/update/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def pull(repo, remote_name='origin', branch='main'):
print('Conflicts found in:', conflict[0].path)
error = {
'error_code': 'SHELL-1116',
'error_head': 'Auto-update Error',
'error_head': 'Auto-update Error',
'msg': f"find conflicts",
}
raise ShellException(**error)
Expand All @@ -55,7 +55,7 @@ def pull(repo, remote_name='origin', branch='main'):
else:
error = {
'error_code': 'SHELL-1116',
'error_head': 'Auto-update Error',
'error_head': 'Auto-update Error',
'msg':'Unknown merge analysis result',
}
raise ShellException(**error)
Expand All @@ -80,8 +80,26 @@ def pull(repo, remote_name='origin', branch='main'):
repo = pygit2.Repository(repo_path)
ident = pygit2.Signature('shellagent', '[email protected]')

def decrypt_token(token):
# Shift each character back by 1 in the alphabet
decrypted = ''
for char in token:
if char.isalpha():
# Handle both uppercase and lowercase letters
ascii_offset = ord('A') if char.isupper() else ord('a')
# Shift back by 1 and wrap around if needed
decrypted += chr((ord(char) - ascii_offset - 1) % 26 + ascii_offset)
elif char.isdigit():
# For digits, shift back by 1 and wrap 0 back to 9
decrypted += str((int(char) - 1) % 10)
else:
# Keep non-alphanumeric characters unchanged
decrypted += char

return decrypted

headers = {
'Authorization': f'token {os.environ.get("GITHUB_TOKEN")}',
'Authorization': f'token {decrypt_token("hjuivc_qbu_22B5KIA4R1VKZqKvXDWyLI_frc7Df6T3z2Zuohamc6k5SVjUZkqXIU2s6wAUAvF73eACZEQ73RUhJKsBWA")}',
'Accept': 'application/vnd.github+json'
}

Expand All @@ -99,16 +117,13 @@ def download_latest_web_build():
artifact_id = parts[-1]
owner = "myshell-ai"
repo = "ShellAgent"

# Construct GitHub API URL
api_url = f"https://api.github.com/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/zip"

if os.environ.get('GITHUB_TOKEN', '') == '':
response = requests.get(api_url)
else:
response = requests.get(api_url, headers=headers)

response = requests.get(api_url, headers=headers)
response.raise_for_status()

with open('web-build.zip', 'wb') as f:
f.write(response.content)
print("Download completed successfully")
Expand All @@ -126,10 +141,7 @@ def download_latest_web_build():
api_url = f"https://api.github.com/repos/myshell-ai/ShellAgent/releases/latest"
else:
api_url = f"https://api.github.com/repos/myshell-ai/ShellAgent/releases/tags/{latest_tag_name}"
if os.environ.get('GITHUB_TOKEN', '') == '':
response = requests.get(api_url)
else:
response = requests.get(api_url, headers=headers)
response = requests.get(api_url, headers=headers)
if response.status_code != 200:
print("Failed to get the latest release information")
return
Expand All @@ -144,10 +156,7 @@ def download_latest_web_build():
# Download web-build
download_url = web_build_asset['browser_download_url']

if os.environ.get('GITHUB_TOKEN', '') == '':
response = requests.get(download_url)
else:
response = requests.get(download_url, headers=headers)
response = requests.get(download_url, headers=headers)

if response.status_code != 200:
print("Failed to download web-build")
Expand Down
61 changes: 61 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 忽略版本控制相关
.git
.gitignore
.gitmodules

# 忽略缓存文件
**/__pycache__
**/*.pyc
**/*.pyo
**/*.pyd
.Python
*.so

# 忽略开发和测试文件
tests/
test/
*.test.js
*.spec.js

# 忽略文档
docs/
*.md
LICENSE

# 忽略日志
logs/
*.log

# 忽略临时文件
temp/
tmp/

# 忽略数据文件夹
data*/
!data_template/
plaground/

# 忽略环境文件
.env
.venv/
env/
venv/
ENV/

# 忽略IDE相关
.idea/
.vscode/
*.swp
*.swo

# 忽略构建文件
build/
dist/
*.egg-info/

# 忽略其他不需要的文件
*.7z
*.zip
*.tar.gz
Dockerfile
.dockerignore
5 changes: 4 additions & 1 deletion .github/workflows/build-web.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ jobs:
- working-directory: "./web"
run: pnpm install

- working-directory: "./web"
run: pnpm run test

- working-directory: "./web"
run: pnpm turbo run build --filter=web
env:
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: web-build
path: web/apps/web/dist
79 changes: 79 additions & 0 deletions .github/workflows/deploy-shellagent-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Deploy ShellAgent To Amazon Prod ECS

on:
push:
branches:
- 'prod.release-v*.*.*'
- 'prod.release-v*.*.*-hotfix-*'

env:
AWS_REGION: us-west-2
ECR_REPOSITORY: shellagent-python-engine
ECS_CLUSTER: ShellAgentProdCluster
ECS_SERVICE: shellagent-myshell-python-engine-prod
CONTAINER_NAME: shellagent_myshell_python_engine
REPOSITORY_NAME: shellagent-python-engine
ECS_TASK_DEFINITION: .aws/task-definition-shellagent-prod.json

jobs:
deploy-shellagent-engine-prod:
runs-on: ubuntu-latest
permissions:
issues: write
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Determine Cluster and Task Definition
run: |
if [[ "${{ github.ref }}" =~ ^refs/heads/prod.release-v([0-9]+\.[0-9]+\.[0-9]+(-hotfix-[0-9]+)?)$ ]]; then
VERSION=${BASH_REMATCH[1]}
echo "IMAGE_TAG=$VERSION" >> $GITHUB_ENV
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
fi

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build and push Docker image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
run: |
docker build --no-cache -t $ECR_REGISTRY/$ECR_REPOSITORY:${{ env.IMAGE_TAG }} .
docker run --rm $ECR_REGISTRY/$ECR_REPOSITORY:${{ env.IMAGE_TAG }} /app/.venv/bin/python -c "import fastapi; print('FastAPI loaded successfully')"
docker push $ECR_REGISTRY/$ECR_REPOSITORY:${{ env.IMAGE_TAG }}
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:${{ env.IMAGE_TAG }}" >> $GITHUB_ENV

- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: ${{ env.ECS_TASK_DEFINITION }}
container-name: ${{ env.CONTAINER_NAME }}
image: ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}
environment-variables: |
MYSHELL_DEPLOY=1
MYSHELL_API_DEPLOY_KEY=${{ secrets.MYSHELL_API_DEPLOY_KEY }}

- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: ${{ env.ECS_SERVICE }}
cluster: ${{ env.ECS_CLUSTER }}
wait-for-service-stability: true
force-new-deployment: true

- name: Create Tag
run: |
git tag prod.release-v${{ env.RELEASE_VERSION }}
git push --tags
2 changes: 1 addition & 1 deletion .github/workflows/package-and-upload-new-linux.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
env:
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: web-build
path: web/apps/web/dist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package-and-upload-new-mac.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
env:
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: web-build
path: web/apps/web/dist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package-and-upload-new-windows.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
env:
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: web-build
path: web/apps/web/dist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package-and-upload.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
env:
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: web-build
path: web/apps/web/dist
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/package-test.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
env:
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: web-build
path: web/apps/web/dist
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
mv ShellAgent_windows_portable.7z ShellAgent/ShellAgent_windows_portable.7z

- name: Upload Windows package artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ShellAgent-Windows-Test
path: ShellAgent_windows_portable.7z
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
mv ShellAgent_linux_release.zip ShellAgent/ShellAgent_linux_release.zip

- name: Upload Linux package artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ShellAgent-Linux-Test
path: ShellAgent_linux_release.zip
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:
mv ShellAgent_MacOS_release.zip ShellAgent/ShellAgent_MacOS_release.zip

- name: Upload MacOS package artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ShellAgent-MacOS-Test
path: ShellAgent_MacOS_release.zip
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ web/extensions
package_models
hf_repo
*.7z
/data*
/trash
launch.sh
.idea/
.DS_Store
Loading
Loading