Compare commits

...

1049 Commits

Author SHA1 Message Date
Joel 8cd97eba32 fix: not show straegy type 1 year ago
Joel ab66f30e1d feat: add parallel test case 1 year ago
AkaraChen 566dc9b4a8 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 641395b3ec feat: agent strategy form support required mark 1 year ago
Joel db60150f30 chore: change use new log struct generator 1 year ago
AkaraChen b964c713bd chore: add tooltip props to agent strategy select 1 year ago
AkaraChen 7b4d49a79c Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 0ad08f523b chore: add tooltip props to agent strategy select 1 year ago
Yi f4ca5938ec Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Yi 38437efec0 fix: change "upgrade" to "install" for generality in plugin version switch 1 year ago
JzoNg 52553a66ba fix style of agent strategy 1 year ago
AkaraChen a87c2d7e20 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 08cff0045d feat: form not installed indicator 1 year ago
JzoNg 195a507b40 dark mode of api 1 year ago
JzoNg d7ec013665 modals of app overview 1 year ago
Joel dc9675d2d8 fix: plugin tool width in agent app 1 year ago
Joel 06fe17c93e chore: enchance fold into anim 1 year ago
AkaraChen 5ec4695e4a feat: tool icon check plugin status 1 year ago
AkaraChen bb60db7078 feat: tool selector get icon from marketplace 1 year ago
AkaraChen e3e8eafd32 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen eff6a55960 fix: install button 1 year ago
Yi a7f0933e55 chore: add checks in the url fetch step of the installFromGitHub 1 year ago
JzoNg eaf1177cd4 dark mode of overview card view 1 year ago
JzoNg 297b5280f0 tracing modal & config 1 year ago
Joel 4aac48ed61 feat: github install add anim 1 year ago
Joel 192af8df9f feat: local and bundle support hide anim 1 year ago
Joel 9822445c1e chore: all hide logic to hooks 1 year ago
Joel 018e32e355 fix: installed not clear countdown 1 year ago
zxhlyh 41b720502f merge main 1 year ago
zxhlyh a157af724f fix: marketplace submit button 1 year ago
AkaraChen cc0d864599 fix: agent node tool list header width 1 year ago
JzoNg 4a6a1b9855 chore: fix request form data 1 year ago
Joel 7ccc268ced fix: stop anim 1 year ago
Joel 6483d20f56 feat: install countdown 1 year ago
Yi 61237e8037 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Yi aae601f233 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 701520ffd0 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 596e3409b7 fix: agent prompt 1 year ago
Yi 38dd285656 fix: long model name display issue 1 year ago
zxhlyh 0248c8cb8c fix: agent key 1 year ago
AkaraChen 88b3c0b7a6 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 3ae7787011 fix: number not supported 1 year ago
Yi c357ec0f7c chore: add loading to the model selector trigger 1 year ago
Yi 763f91fcea Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Yi 62d53399ae fix: add bg color to the top section in plugins page 1 year ago
Joel c3215a8f94 feat: fold into animation 1 year ago
AkaraChen d65c1218ae Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 83723212af fix: agent node getNodeUsedVars 1 year ago
Yi 84c2a9dc3b Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Yi 87d7df3ed4 fix: make the status indicator component compatible with the switch plugin version component 1 year ago
zxhlyh 586f9d8d89 fix: agent log 1 year ago
WTW0313 b656b7a0dd Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
WTW0313 0fdf7b23c6 feat: add 'agent' tag to plugin constants and translations 1 year ago
Yi 369e3eb97f feat: add version switch in model selector 1 year ago
AkaraChen f58eef74b3 feat: switch plugin version changelog 1 year ago
AkaraChen 2fd083629d feat: new switch plugin version 1 year ago
Yi 755685a89a Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Yi 23b29b1d21 fix: check-dependencies typo and fetch model list typo 1 year ago
zxhlyh 4b01ef2b48 fix: chat log 1 year ago
JzoNg 05d273d643 fix tracing dropdown 1 year ago
JzoNg 5481b42257 dark mode for tracing dropdown 1 year ago
AkaraChen fa83f2e2fa fix: switch version plugin 1 year ago
AkaraChen 5e4d2f9501 Revert "chore: remove switch version component in strategy select"
This reverts commit f63cc9e069.
1 year ago
Yi fdfe724438 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Yi b0b373d2fb fix: revert the modelInList check in the model icon component 1 year ago
AkaraChen f63cc9e069 chore: remove switch version component in strategy select 1 year ago
Yi 8c9c336b64 fix: isInModelList default value 1 year ago
Yi 2dac103463 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Yi 17dfb3654f feat: add version incompatible case 1 year ago
zxhlyh 98ad18ba81 fix: agent log 1 year ago
AkaraChen 53bb1bb937 fix: agent node cannot output var 1 year ago
AkaraChen 93806148cd chore: plugin mutation modal component 1 year ago
JzoNg adf0d94a9a unsupported actions 1 year ago
zxhlyh d17932d723 fix: install task icon 1 year ago
Yi 3cbb288a25 feat: add version check i18n 1 year ago
AkaraChen 99e2eaa6ee fix: switch plugin version 1 year ago
Joel 6006380723 fix: tool select ui problem in workflow 1 year ago
Joel 55ad1fe1f0 chore: tool selelct use the same tools data 1 year ago
Yi 0383fce821 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Yi 85610651c0 node ui fix 1 year ago
AkaraChen 768e1b9da3 fix: wrong tooltip content for switch plugin version 1 year ago
Joel a6d172f111 feat: github refresh plugin list 1 year ago
Joel 5817c07db6 feat: local install refresh 1 year ago
Yi 2f5da1f6aa fix: update model icon 1 year ago
AkaraChen 130cfaf2a4 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen f840b7db0c fix: type for tool list 1 year ago
JzoNg aac2184069 chore: use install button in tool item 1 year ago
AkaraChen f03631ff9e feat: init agent strategy install from marketplace 1 year ago
Yi e207894d7e Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Yi 8512a7d3ad chore: update the onOpenModel function to a hook 1 year ago
JzoNg 46614cc6f5 fix badge & refresh state of tool install state 1 year ago
AkaraChen b39acd0bad Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 48b88b90f5 feat: i18n text in agent strategy selector 1 year ago
zxhlyh 851fe246a7 fix: installing info in plugin nav 1 year ago
Yi ff61c22f36 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Yi e6eae8568f chore: update the model install button 1 year ago
JzoNg 6d5c34564b fix qrcode z-index 1 year ago
AkaraChen 4c5fa00c50 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 910e6d17d3 feat: adjust strategy selector height 1 year ago
JzoNg 275696edba fix system model selector 1 year ago
JzoNg 1348e32015 fix balance model z-index 1 year ago
JzoNg f5b2735dd5 theme default light 1 year ago
JzoNg 8d39ec1da5 chart drak mode 1 year ago
Yi 0f6cbf25d3 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Joel 0e98794d49 feat: use all refresh plugin tools to hooks 1 year ago
AkaraChen 1419430015 chore: upd 1 year ago
Yi 5d25643f54 fix: group icon style 1 year ago
AkaraChen e24b04b30f refactor: switch plugin version component to not accept version 1 year ago
AkaraChen a8c4870349 refactor: switch plugin version component to not accept version 1 year ago
AkaraChen bdb9d676b1 chore: update switch plugin i18n 1 year ago
AkaraChen 0beebab605 fix: workflow store agent strategy not up to date 1 year ago
AkaraChen 15f3e46c49 refactor: some field name in strategy status 1 year ago
Joel 61d2f70927 feat: add transform node to node data 1 year ago
Joel 228cd1cdbe feat: add iteration id 1 year ago
Joel e0ed17a2e6 chore: can generator middle struct 1 year ago
zxhlyh 07aa2ca9cf fix: single run log 1 year ago
Joel 5fdfba6b00 feat: make iteration 1 year ago
AkaraChen fbf9984d85 refactor: strategy status 1 year ago
AkaraChen 2296bb162b Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 06f0c3c886 refactor: strategy status 1 year ago
JzoNg 483890b207 fix install in tool item 1 year ago
AkaraChen 390107f97e Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 5ba0b85738 feat: install plugin button 1 year ago
JzoNg 39335b8038 refactor I18n render in plugin detail 1 year ago
twwu 5fb356fd33 refactor: rename renderI18nObject to getValueFromI18nObject for clarity 1 year ago
twwu c458c28c62 feat: enhance plugin item localization with i18n support 1 year ago
AkaraChen 055fb22b9b Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen f2eb095960 feat: strategy install status 1 year ago
Joel d5cfb26db6 feat: support make retry data 1 year ago
zxhlyh a514bde428 fix: marketplace page size 1 year ago
AkaraChen 87ce813175 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 336b26569b feat: agent form string type support var 1 year ago
zxhlyh a432fcfd5e agent node single run 1 year ago
AkaraChen 0ed4ec5cd0 fix: agent strategy selector show workflow 1 year ago
AkaraChen add6dff789 feat: agent node check install strategy 1 year ago
Joel c469da2020 fix: handle install title and descript may caused i18n problem 1 year ago
Joel 55aad3718d fix: multi loop nodes remove children error 1 year ago
AkaraChen c6c388fbda feat: agent checklist i18n 1 year ago
AkaraChen d3d606799d Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen c1ae681b6c feat: agent checklist i18n 1 year ago
Joel f11ea5ae97 fix: title not show all if space is enough 1 year ago
Joel e112357e91 chore: temp 1 year ago
AkaraChen 1b8ec6710a feat: agent node checklist 1 year ago
JzoNg 4663af8a60 tool setting schema 1 year ago
AkaraChen 91ac660f81 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 3c829a1c28 fix: some style 1 year ago
Yi f9ce6b6a6e Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Yi afe8c85b99 model feature icons 1 year ago
zxhlyh bc5cd4405b agent node single run 1 year ago
Yi be36aedac1 agent node: fix installed model ui 1 year ago
AkaraChen 9e6f3e9161 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 52537c9e6b fix: model deprecated in model list 1 year ago
Joel 8d229f26d0 fix: card name too long 1 year ago
Yi 504c794e8a add icons and fix ui typos 1 year ago
Joel cab8c6c5a7 feat: support scroll into letter 1 year ago
Yi 5bba422c0b fix model icon size in llm node 1 year ago
AkaraChen 870779534f Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen f956c2edcd chore: update style 1 year ago
Joel 2a29dd3534 fix: letter list not right 1 year ago
Yi b1831bc582 fix the model icon ui 1 year ago
Yi 3e979a5ded fix: model selector's trigger ui 1 year ago
zxhlyh 7011a5029e merge main 1 year ago
zxhlyh d7cbbbca8e fix: tool single run 1 year ago
zxhlyh 21d082f3da feat: tool single run 1 year ago
Yi 2cdf2b2e05 fix the model icon size in the agent node 1 year ago
Yi ec2dd750f1 fix: set a fixed height to the model selection in agent node 1 year ago
AkaraChen 066595f3aa chore: remove unused code 1 year ago
AkaraChen f81bbee6b6 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 4855e87876 fix: editor 1 year ago
JzoNg e47aaad396 remove test codes 1 year ago
JzoNg df421796bb add model info in model selector 1 year ago
AkaraChen fe5702784e Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen eba4042a62 wip: instruction field 1 year ago
Joel 3bed0346d7 fix: choose tools 1 year ago
Yi 3a09f43f70 feat: update the install logic 1 year ago
Yi 232fb66edd ui fixes in model selector 1 year ago
Joel a3f736f6e5 feat: multi steps circle 1 year ago
Joel d9d42b2d8c feat: multi step circle 1 year ago
Joel 0a30018330 chore: one step circle check 1 year ago
Joel 128410902c temp 1 year ago
Yi 9b6f580365 add model install in model configuration for the agent node 1 year ago
AkaraChen afb3548e45 refactor: agent parameters 1 year ago
JzoNg e1cb85cee1 fix label of tool picker 1 year ago
JzoNg 2007828404 installation state of tool 1 year ago
AkaraChen f5b4366bd8 fix: agent node 1 year ago
AkaraChen cd7e6ca010 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 2ac6f00efb fix: agent node toolbox 1 year ago
Yi f461f56886 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Yi ba16cbccf0 feat: add install options for model configuration 1 year ago
AkaraChen 08a1f241ca Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen a5509fbe5a feat: agent node toolbox 1 year ago
zxhlyh 98a03b0593 fix: agent log structure 1 year ago
zxhlyh f72818bed5 fix: agent log structure 1 year ago
JzoNg 0c5101fb3c fix default value for multiple tool selector 1 year ago
zxhlyh 84febd5e94 fix: agent log structure 1 year ago
JzoNg b5ad9a58f7 default value for multiple tool selector 1 year ago
Joel 8a90a9bd5d fix: in steam mode trigger the error in change list 1 year ago
zxhlyh 6f8e217580 refact workflow run log 1 year ago
JzoNg 891a76f2fa enabled count 1 year ago
JzoNg 3c85363392 multiple tool selector 1 year ago
zxhlyh a863e9f674 refact workflow run log 1 year ago
Joel 6a2a7aca9b chore: tool node support agent logs 1 year ago
AkaraChen 18393d2e27 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen de48a1c7e9 fix: type error 1 year ago
Joel 3d5620dfb3 fix: parallel start node not insert into the right place 1 year ago
AkaraChen da2982ba98 feat: model list on agent node 1 year ago
AkaraChen 0108b28305 feat: model list on agent node 1 year ago
JzoNg 573c8f909c add multiple tool selector 1 year ago
Joel 3a5170716b fix: pararllel title 1 year ago
zxhlyh e4cc8f7010 refact workflow run log 1 year ago
AkaraChen 23913b8640 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 0d0a4cfaa1 fix: select var 1 year ago
Joel 04d8d16d8a chore: fix retry not work in iteration 1 year ago
AkaraChen 0d2a74b8cb feat: output var 1 year ago
JzoNg ae42edb8d7 remove test code 1 year ago
AkaraChen e903cd8073 fix: llm node 1 year ago
Joel 31cca291b7 chore: remove test page 1 year ago
JzoNg ed6c9625e8 fix scope features 1 year ago
Joel 08c517dd99 feat: iteration support parallel 1 year ago
JzoNg 69a6556f52 tool item 1 year ago
Yi e34eebfb0b Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Yi ef3e904839 feat: model-selector in Agent node (case: installed models) 1 year ago
AkaraChen df5fb6dca9 feat: agent strategy max iter slider 1 year ago
Joel 2f65d0439c fix: not parall not group by branch 1 year ago
zxhlyh 5cdca9cafe fix: marketplace i18n 1 year ago
Yi 67019d128b Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 697ee496b7 chore: upd mock form for dev 1 year ago
AkaraChen 7f5e27d001 chore: extend form component for override 1 year ago
Joel 1f128729f4 fix: sub iteration would crash page 1 year ago
Yi a562e6db89 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Joel c23fe3b67f chore: format 1 year ago
JzoNg 95da3a4cf1 tool credential panel 1 year ago
JzoNg bfecc73de9 support extra for tool selector 1 year ago
Yi b4e9dddbca Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
JzoNg 10218cfe8d add tool selector in agent node 1 year ago
JzoNg e00da7a1d8 tool setting form 1 year ago
JzoNg 469ce0f23d add tool description 1 year ago
JzoNg 23bf0a6812 tool selector support scope 1 year ago
AkaraChen 605085bddf chore: remove max_iterations for agent node 1 year ago
Yi dbc45f0d74 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
zxhlyh 6175f8c16f merge main 1 year ago
zxhlyh 7e94056507 refact workflow run log 1 year ago
AkaraChen 1429b30e84 chore: upd 1 year ago
AkaraChen 5ef9156242 feat: custom credential form 1 year ago
zxhlyh 6f865b96a2 refact workflow run log 1 year ago
AkaraChen b7e56a23a0 feat: custom credential form 1 year ago
Yi 5b8ad3ac4b Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen e0b7f48b6b chore: add i18n str 1 year ago
Yi ff70e14de2 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 244517e6e7 fix: no icon in tool select 1 year ago
AkaraChen cd08f98bff chore: upd app icon 1 year ago
Yi b752c0654e Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen e07d7ee4fc chore: remove console 1 year ago
Yi c476f06388 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 5f13402c6e Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 8dcd82290c feat: select strategy 1 year ago
zxhlyh 86eb618b84 refact workflow run log 1 year ago
Joel e1ea82475d feat: format agent 1 year ago
zxhlyh 08515957f1 refact workflow run log 1 year ago
Joel 8503099d65 feat: integration 1 year ago
Yi c04a89d5b1 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Joel 8d225264fa feat: retry 1 year ago
zxhlyh 26901b2c87 refact workflow run log 1 year ago
JzoNg b56acb825f fix org info in tool detail panel 1 year ago
Yi f1e17ad134 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen b8e4580074 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
JzoNg 935c126abd strategy detail panel 1 year ago
JzoNg b4105fcc9c strategy list 1 year ago
AkaraChen 5f65fb1b62 chore: add model select mock 1 year ago
Yi 986d6eed36 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen e0f83d06d8 chore: add model select mock 1 year ago
Yi f42cfe8075 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen a7b2f9aef0 chore: add i18n 1 year ago
AkaraChen c867584049 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen ac2c8344f2 chore: add i18n 1 year ago
Joel 8c662e04e0 feat: add iteration error 1 year ago
AkaraChen e1d0c29711 chore: add icon for agent 1 year ago
Yi 50c77ad405 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Joel 880496db0b chore: add more tests 1 year ago
AkaraChen 057da6c31b chore: gen agent icon 1 year ago
AkaraChen c0a8b89e93 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen a8a956b5f1 chore: add i18n 1 year ago
Joel ff02e1cb8f chore: enchance test output struct 1 year ago
Yi d78719a6f8 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
JzoNg da6d65b072 fix style of account setting 1 year ago
JzoNg 8d1a8eac51 add use-strategy 1 year ago
Joel e34fe3d10a feat: support iteration handle 1 year ago
Yi 8d79b24883 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 03520a5a81 feat: strategy form init 1 year ago
Yi d43b2c62f5 Merge branch 'main' into feat/plugins 1 year ago
JzoNg 07d7965e3b support custom output schema in tool node 1 year ago
Joel e4d72f3442 chore: hide log 1 year ago
Joel c93c264c5a feat: format to tracing 1 year ago
AkaraChen 77017522b8 chore: init tool select component 1 year ago
AkaraChen aa309964e5 chore: init tool select component 1 year ago
zxhlyh 754baf8d02 refact workflow run 1 year ago
zxhlyh b98dd22491 refact workflow run 1 year ago
AkaraChen 7c460eb6e7 chore: add warning ui for agentic stragey 1 year ago
JzoNg e2e2090e0c support model params change 1 year ago
JzoNg c8fc1deca6 support & operator of model-selector scope 1 year ago
Yi 6dd14ca2be chore: add agent strategy option apart from bundle 1 year ago
zxhlyh ec6f4ee9df Merge branch 'main' into feat/plugins 1 year ago
JzoNg 9d117fa2f9 param rules panel 1 year ago
Joel e8319f01e0 fix: crash 1 year ago
Joel c3f3b79b79 merge main 1 year ago
JzoNg 327eac09e7 fix: scope value 1 year ago
JzoNg cf75e2f053 model selector support scope 1 year ago
JzoNg 12c47d80af support llm tool_parameters 1 year ago
JzoNg 5c6916354e app selector support scope 1 year ago
JzoNg 6d2b2d7810 fix number of tool actions 1 year ago
JzoNg 1fa5b1755f dark mode for model provider 1 year ago
twwu 5dad4793e6 fix: Fix context selector usage in plugin page components 1 year ago
zxhlyh 04054954c5 Merge branch 'main' into feat/plugins 1 year ago
zxhlyh 672843dcab feat: marketplace list more link 1 year ago
JzoNg 4f8cdabef0 dark mode of model provider 1 year ago
zxhlyh e792e91777 fix: model page 1 year ago
JzoNg d5cb9f0193 add help doc link of endpoint 1 year ago
JzoNg 171cc88a0d merge main 1 year ago
AkaraChen 031c2ad899 chore: update pnpm lock 1 year ago
JzoNg 463f5a34c6 dark mode for plugins 1 year ago
JzoNg 5c98f1a5aa dark mode for tools 1 year ago
zxhlyh a0e999e438 feat: plugin add agent-strategy type 1 year ago
JzoNg e0cc990fa5 fix: tool parameter form change 1 year ago
zxhlyh 5b3112a137 fix: model page empty 1 year ago
zxhlyh 35fb9099e3 fix: model page 1 year ago
zxhlyh c51c032334 fix: dsl check 1 year ago
zxhlyh 5825c101c9 fix: marketplace exclude 1 year ago
Joel 4c1bf96b14 fix: node build out of memory 1 year ago
StyleZhang 69daf4a027 merge main 1 year ago
JzoNg 3bc9ddb006 fix mutation of model credentials update 1 year ago
JzoNg ea2862e435 fix style of boolean form of model parameters 1 year ago
StyleZhang ca3d96e5f4 fix: tool list 1 year ago
Yi d6dea67947 apply the skeleton component to the Plugin loading card 1 year ago
Yi b8f9747849 Merge branch "main" into feat/plugins 1 year ago
StyleZhang 0e70e72594 fix: marketplace list 1 year ago
Yi 0e419a7a16 feat: move linear gradient bg to common config 1 year ago
twwu 0ac5e53c2e fix: refactor GitHub releases fetching to improve error handling and format response 1 year ago
Joel 44b0039e8b fix: install plugin type show error 1 year ago
twwu becdca24df fix: enhance GitHub releases fetching with optional authentication 1 year ago
Joel f634a4488f merge main 1 year ago
Yi fc2656b4b7 fix: workspace selector UI 1 year ago
StyleZhang d6a4cbc6cc fix: marketplace list 1 year ago
Yi 1e2ee61f6a feat: add version check before Plugin install from GitHub 1 year ago
StyleZhang ab9a177c90 fix: marketplace list 1 year ago
nite-knite 8b28ed589c feat: update translation for bundle 1 year ago
nite-knite 3b1211d6bc chore: bump cross-spawn from 7.0.3 to 7.0.6 1 year ago
nite-knite 7bd3f2b932 feat: update description for API endpoints configuration 1 year ago
Joel b78ab0bd69 fix: other install error 1 year ago
Joel 84cad5969e fix: not handleinstall error 1 year ago
Joel 35ef874867 fix: detect is same packege use uniqid 1 year ago
Joel 47579c86e6 fix: from marketplace install and update bundle 1 year ago
Joel 32619bd05e fix: install bunlde support update 1 year ago
JzoNg 6a500edf4d fix: loading of credential form 1 year ago
JzoNg be7fa93ffc fix: modify tip of default embedding model 1 year ago
JzoNg 3bcd470ec6 fix: authorization in debugging plugin 1 year ago
JzoNg 73825c59e4 fix: crash of tool authorization in agent 1 year ago
JzoNg 5f76975e12 fix: icon of tool provider in agent 1 year ago
JzoNg 3ddb3d2bff fix: deleted tools in agent 1 year ago
JzoNg a70eda6c45 add loading for auth modal 1 year ago
NFish 42cdc55db1 fix: do not show error tooltip if http status code is 401 1 year ago
NFish a76d0a09b6 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Joel 51f0f21a47 chore: not load updateInfo can not install 1 year ago
Joel 073e847524 fix: installed 1 year ago
Joel 3e601c4ef5 feat: local support upgrade 1 year ago
Joel fba468e8ad fix: handle install the same version 1 year ago
Joel f40b212b04 feat: support update if installed from marketplace 1 year ago
StyleZhang 37eee7be24 fix: model provider page marketplace 1 year ago
Joel 99942b26e6 chore: support install hide button 1 year ago
StyleZhang d4cda69b0e feat: marketplace add exclude 1 year ago
StyleZhang e145dba487 fix: dsl check 1 year ago
Joel e908ecab8f fix: add ui 1 year ago
Joel b8af4aead1 fix: update version show problem 1 year ago
Joel d40f0e645c fix: install marketplace bundle title 1 year ago
Joel 4b77ced4ad fix: not show from market bundle package icon 1 year ago
StyleZhang b84b0c8ba8 merge main 1 year ago
StyleZhang f47b32b26d fix: dsl 1 year ago
StyleZhang 102a42d24c Merge branch 'main' into feat/plugins 1 year ago
StyleZhang 00eb47384a merge main 1 year ago
StyleZhang 2041650cca merge main 1 year ago
StyleZhang a0873a956f merge main 1 year ago
Joel df049564e8 feat: support install bundle from marketplace 1 year ago
Joel b93be49530 chore: support update show version 1 year ago
StyleZhang 57756b18e4 fix: plugin task 1 year ago
StyleZhang 8ad9ab40df fix: plugin task 1 year ago
StyleZhang 4f54ac6ed6 fix: marketplace collection condition 1 year ago
StyleZhang 3263a6a5f5 fix: marketplace plugin tags i18n 1 year ago
JzoNg 506e5e0bc8 fix: plugin type 1 year ago
JzoNg c768f8fdd1 fix: path of tool provider 1 year ago
twwu d45ce48932 fix: update theme imports in globals.css 1 year ago
Joel 3e3ae989f0 chore: in tool file and files all support file and files 1 year ago
Joel 786f2d9bf6 chore: fix categoriesMap[category] undefined 1 year ago
twwu 85377d13fc Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu 51e04b45ec fix: update error icon z-index and upgrade react-query dependencies 1 year ago
JzoNg bd6c2e519c fix: corner mark 1 year ago
Joel 3f0b35d72e feat: install bundle from marketplace code 1 year ago
JzoNg 78c867b9a3 use plugin detail for builtin tool 1 year ago
JzoNg f213c8f393 fix: version switch 1 year ago
Joel 1b3f4f1f2a feat: support icon size 1 year ago
Joel c59c696df2 chore: add version type in marketplace return 1 year ago
Joel 8993a91f12 fix: upgrade sussces auto hide 1 year ago
JzoNg 02c5989612 recover api tool create card 1 year ago
JzoNg ac42ba880a fix: install handle of list refresh 1 year ago
JzoNg 56f573ecfb fix: update plugin handle 1 year ago
Joel 2560d3edae fix: bundle install title 1 year ago
Joel 351615fb98 fix: not the first time upload bundle error 1 year ago
Joel 11ed86f2a8 feat: download package 1 year ago
JzoNg b01c18ae7f fix: version badge 1 year ago
StyleZhang 84a3fe85c8 fix: marketplace card link 1 year ago
JzoNg 3efc6c5050 fix: github link 1 year ago
JzoNg 42a0534299 fix: locale of model provider 1 year ago
JzoNg eec193488d fix: detail link of plugin 1 year ago
JzoNg 021bc57cd4 empty of tool list 1 year ago
StyleZhang 022eda9e8b fix: tool providers 1 year ago
Joel 2067092f52 feat: detail link in tools 1 year ago
Joel 000db07d29 feat: in tool install plugin 1 year ago
Joel 98ae34acd5 chore: support tags filter 1 year ago
StyleZhang 698e94856e fix: plugin task zindex 1 year ago
Joel 99ffe43e91 merge main 1 year ago
Joel 498222371c chore: parse marketplace bundle new api 1 year ago
Joel 26288e71d3 fix: local bundle install 1 year ago
JzoNg 19fb466074 fix: tool icon in app configure 1 year ago
JzoNg cd4eb9c3f1 fix: icon in model list 1 year ago
Joel 4ef0a3818f feat: can install bundle from local 1 year ago
twwu 77d6dbb3d0 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu e3b8926aef fix: correct fetched releases variable in version check and update dev script for debugging 1 year ago
Joel efb84ff03d fix: github install fix 1 year ago
Joel 1846a7de73 fix: handle github item from data struct diffe 1 year ago
Joel 40d025052d fix: load package dsl error 1 year ago
Joel bb2914652a feat: finsh loading error comp 1 year ago
Joel e6a03f7a58 feat: loading error struct 1 year ago
JzoNg 386ee7b07b update model provider list after plugin installed 1 year ago
JzoNg 788f9de843 update model provider list after deleting plugin 1 year ago
Joel 5947e38ea0 feat: install by local bundle change 1 year ago
Joel e151c2ee8c fix: when error can not install 1 year ago
Joel a093a48675 feat: show package item in bundle 1 year ago
StyleZhang 27b1a51572 fix: marketplace collection label description 1 year ago
JzoNg a867040b88 fix icon of model provider 1 year ago
Joel 2e3442f74c feat: support local installed package 1 year ago
StyleZhang 43d7a538dc feat: marketplace list url support search & tags 1 year ago
Joel c5c06c18f1 feat: can upload and parse bundle 1 year ago
twwu 972eaa5948 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu 87b23a1fac feat: refactor GitHub releases fetching and update handling with improved error notifications 1 year ago
AkaraChen 07174cf52c Revert "fix: dataset details"
This reverts commit 812fbab57b.
1 year ago
twwu d3fe6fd303 fix: display version from GitHub metadata if available 1 year ago
twwu 87ca20c047 feat: add version checking for GitHub releases and improve error handling 1 year ago
AkaraChen 07494459cc Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen 812fbab57b fix: dataset details 1 year ago
JzoNg afdfc8c609 chore: enabled for useQuery 1 year ago
JzoNg 66f0e1209a switch version 1 year ago
JzoNg f0e4885926 tooltip of endpoints 1 year ago
Joel 1dc2d7f4a2 chore: fix jump url 1 year ago
StyleZhang 9193bc3143 fix: marketplace link 1 year ago
Joel 3b032f086d fix: market icon not show 1 year ago
StyleZhang 746838e276 fix: marketplace link 1 year ago
Yi 5ea306850e fix: copy tooltip shows in wrong place 1 year ago
Yi a6be3fdcd0 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi a7a5c6f4cb fix: update the upgrade button text content in the header 1 year ago
twwu f53b658964 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu 70bf321fd7 fix: add plugin type to card payload and integrate categories hook 1 year ago
StyleZhang 35eafd239d fix: plugin task 1 year ago
StyleZhang 3f2baf0131 fix: plugin task 1 year ago
StyleZhang a5a6969db3 fix 1 year ago
StyleZhang c176494405 fix: search box style 1 year ago
Joel 6fbff78b9c merge 1 year ago
Joel 0738c2ef54 fix: can not get url 1 year ago
StyleZhang 984e4564f8 fix: dsl check plugin 1 year ago
StyleZhang bc927868f4 fix: plugin task 1 year ago
Joel a0758dc2fc feat: finish github install 1 year ago
Joel 6b759795d5 feat: can install github 1 year ago
Joel bba80f465b just add 1 year ago
Yi 735e47f5e5 chore: update the styling in the "members setting" 1 year ago
twwu d354c69493 chore: update translations to include 'Marketplace' terminology in Chinese localization 1 year ago
JzoNg 8f14881aff app parameters 1 year ago
JzoNg e53c4fc0ad empty inputs form of app selector 1 year ago
JzoNg f9f2e68bd8 app selector in form 1 year ago
JzoNg 7b4d67d72f app list filter 1 year ago
JzoNg 7446244147 app picker 1 year ago
JzoNg c723bd2c96 app selector trigger 1 year ago
Joel 73ce8a17a5 feat: add loading 1 year ago
Joel 6f5e010db5 chore: handle uploaded selected 1 year ago
Yi 495d86fd96 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 42ba4e4f0e chore: update the plugins tab button 1 year ago
StyleZhang 6af51701de fix: card link 1 year ago
Joel 76104d811c feat: can show install plugins 1 year ago
StyleZhang 1877433f20 fix: marketplace 1 year ago
Yi a403fb565d chore: update the plan tags 1 year ago
twwu f58b88f319 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu cd2860deb4 feat: add i18n support for plugin installation and empty states 1 year ago
AkaraChen 070968a048 style: add lint rule for tailwind 1 year ago
StyleZhang ceb18d160f fix: marketplace i18n 1 year ago
StyleZhang 6a63a03cb2 feat: tool list use query 1 year ago
twwu a0a62db6ad refactor: Split linear-gradient and color 1 year ago
StyleZhang 253abaf1a3 fix: marketplace empty page 1 year ago
AkaraChen 44cc6157f1 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Yi 028fc00be6 chore: update i18n & setting window 1 year ago
AkaraChen 1aed0fe5d6 chore: use mitt hook 1 year ago
JzoNg 300cd675c6 update tool list after tool selector 1 year ago
JzoNg ff1d42bd66 add tool selector in endpoint modal 1 year ago
JzoNg 194a99220b authorization of tool selector 1 year ago
JzoNg 926f85ce4f tool selector trigger 1 year ago
Yi 6c6e1e90cd Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
twwu 2fbc0c2261 revert: revert category label handling in plugin card component 1 year ago
Yi bac1e99557 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 93e3077f77 chore: update the esc button and the upgrade button 1 year ago
twwu fa6858090b refactor: remove version prop from plugin item components and update version comparison logic 1 year ago
twwu 61eb655823 feat: update plugin category labels and improve internationalization support 1 year ago
twwu 6298332950 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu a1719c49b7 feat: add internationalization support for plugin categories and update translations 1 year ago
Yi b10a1cd325 chore: update the theme selector setting in globals.css 1 year ago
StyleZhang aa88028564 fix: marketplace list 1 year ago
Joel 3e314843db chore: add missing file 1 year ago
Joel 0d607a8c90 feat: add update workflow to update use query 1 year ago
StyleZhang 577a948f42 feat: dsl check plugin 1 year ago
Joel edbfe27eb1 chore: add invalid all built in tools 1 year ago
Joel 5c98d80fdf chore: more filter text content 1 year ago
Joel 89b470d0d5 fix: toggle tool 1 year ago
Joel 19dc983d30 feat: support toggle set tool when the texts changes 1 year ago
twwu e842a46fe2 fix: resolve issue with dark mode 1 year ago
Joel 1573f6f6aa feat: add tag and q filter 1 year ago
AkaraChen 910d5df513 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu fa01360498 fix: Fix theme initialization issue 1 year ago
AkaraChen 1fe5be532d fix: new workflow init draft failed 1 year ago
Joel d67eb907dd fix: show index letter problem 1 year ago
Joel 83dae7e5bc fix: can not select action in workflow and tools 1 year ago
StyleZhang c6d1b7869d fix: plugin task 1 year ago
Yi 601d267b7a Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 327940a120 chore: update the update plugin from GitHub 1 year ago
StyleZhang 582c7ce348 fix: plugin task 1 year ago
StyleZhang 13d3f67746 feat: plugin task use query 1 year ago
Joel 9c6aafd415 feat: install bundle ui 1 year ago
nite-knite 3716ea46b5 chore: bump elliptic from 6.5.7 to 6.6.0 1 year ago
JzoNg 3c89b8a698 confirm model selector schema in agent and workflow 1 year ago
JzoNg b188800f16 model selector in endpoint modal 1 year ago
JzoNg 75a037bc2a update style of model & parameter selector 1 year ago
JzoNg 5efcdd6fa7 model parameters 1 year ago
JzoNg 06c4627abb tool selecting in configure 1 year ago
JzoNg f5267d317e fix quota of model provider 1 year ago
twwu 2573950f88 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu 2ba38c6c45 feat: add marketplace-divider-bg color variable for dark and light themes 1 year ago
Joel 07edda8a85 feat: add new marketplace env 1 year ago
twwu 7791d290c7 refactor: update AudioPlayer styles with CSS variables and improve VideoGallery rendering 1 year ago
Joel 8203b23df2 feat: install bundle struct 1 year ago
Joel d4c9c76454 chore: mask the debug key 1 year ago
AkaraChen a059660ed8 fix: sse post no token 1 year ago
Yi 20357beda4 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Joel 7e39565fd2 feat: handle on update show update modal 1 year ago
StyleZhang 27f794e197 feat: plugin task 1 year ago
Yi a8e8e36756 chore: update the upgrade button 1 year ago
Yi dbc10425c8 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 810443c511 chore: update the upgrade button and add premium badge component 1 year ago
Joel f47b5ce63a chore: install plugin by local use use query 1 year ago
StyleZhang 822c18cb76 fix: credentials: 1 year ago
StyleZhang 66b08e653e fix: credentials: 1 year ago
JzoNg 5e81150b22 useQuery for endpoints 1 year ago
JzoNg 1e62768eed useQuery in action list 1 year ago
JzoNg 59a9235041 useQuery for model list 1 year ago
JzoNg f2bf2e4470 fix style of provider added card 1 year ago
Joel c77b38b97d chore: install from marketplace 1 year ago
StyleZhang 33349191e9 marketplace usemutation 1 year ago
AkaraChen d4f7ebfd2e feat: refactor http client 1 year ago
JzoNg ebdf72fffc check update 1 year ago
JzoNg 1f1c61541e install from settings 1 year ago
JzoNg f70c23dd7a endpoints api 1 year ago
JzoNg f498686c3a model list style fix 1 year ago
StyleZhang d13169934d fix: marketplace i18n 1 year ago
Joel 324437b3f1 feat: mutation permersions 1 year ago
twwu c6a6c53084 chore: update theme var define 1 year ago
Joel edc2fe050a chore: debug info use query 1 year ago
Joel 6fcebf3ecd chore: remove log 1 year ago
Joel b754bf80ae fix: custom tools not show 1 year ago
Joel a9de7f24a2 merge main 1 year ago
twwu 6759c6d5e6 Revert "feat: add gray label color variables for dark and light themes"
This reverts commit a75cef2c3b.
1 year ago
JzoNg 920d6d6882 fix credentials of action list 1 year ago
JzoNg 2511968cb4 fix action list 1 year ago
JzoNg f684e1c12e provider compatible in logs 1 year ago
JzoNg be75a1e432 provider compatible in moderation 1 year ago
JzoNg 5a679ed396 provider compatible in model_config 1 year ago
JzoNg 0cfd676fd6 provider compatible 1 year ago
twwu d997499ecf Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu 4d3ffbb6f0 fix: update repository URL format in plugin action component 1 year ago
twwu a710858d09 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu a75cef2c3b feat: add gray label color variables for dark and light themes 1 year ago
Yi 392db19ea2 chore: update the update plugin steps 1 year ago
Yi 7cb6039833 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi e041a9e418 chore: upgrade button styling 1 year ago
Joel 281c6dc337 merge 1 year ago
-LAN- 7d7ade26ce fix(remote-files): fallback to get when remote server not support head method (#10370) 1 year ago
-LAN- 6aa2af215b refactor(iteration): introduce specific exceptions for iteration errors (#10366) 1 year ago
-LAN- 598d307afd refactor(knowledge-retrieval): improve error handling with custom exceptions (#10385) 1 year ago
-LAN- 39fdcfd7e9 refactor(tool-node): introduce specific exceptions for tool node errors (#10357) 1 year ago
-LAN- 47f638e5aa refactor(question_classifier): improve error handling with custom exceptions (#10365) 1 year ago
luckylhb90 03b57d1f0a fixed: web api remote urls error (#10383)
Co-authored-by: hobo.l <hobo.l@binance.com>
1 year ago
powerfool 99c84c423e Adjusted docker manifests and environment variables for OceanBase vector database (#10395) 1 year ago
omr cc2cc56f25 fix typo: mMaximum -> Maximum (#10389) 1 year ago
非法操作 393885ee16 fix: remove duplicated category “recommended” (#10375) 1 year ago
Matsuda 9143d460fa fix(model_runtime): remove vision from features for Claude 3.5 Haiku (#10360) 1 year ago
Infinitnet c0ff0cf7cf fix: remove unsupported vision in OpenRouter Haiku 3.5 (#10364) 1 year ago
Bowen Liang 9c90d98027 chore(ci): bring back poetry cache to speed up CI jobs (#10347) 1 year ago
Bowen Liang 0d74466f45 chore: lazy import sagemaker (#10342) 1 year ago
comfuture d2e293b9be chore: update translation for 'account' from '계좌' to '계정' (#10350) 1 year ago
-LAN- 8fae321b6a chore(ci): separate vector store tests into new workflow (#10354) 1 year ago
-LAN- a2b42c9431 fix(api): remove fixed source attribute from FileApi (#10353) 1 year ago
Nam Vu 0a4b256b5a feat: support png, gif, webp (#7947)
Co-authored-by: xuanson9699 <84961581+xuanson9699@users.noreply.github.com>
1 year ago
Chenhe Gu 9f7124a79d Update README.md (#10332) 1 year ago
方程 7a217534d1 Gitee AI tools (#10314) 1 year ago
Summer-Gu a9ed0f0b42 feat: The SSRF request timeout configuration item is added (#10292) 1 year ago
Infinitnet 545d2b2622 feat: add support for anthropic/claude-3-5-haiku through OpenRouter (#10331) 1 year ago
Benjamin f114da4e81 feat(vannaai): add base_url configuration (#10294) 1 year ago
-LAN- f4e3e3fc19 docs: remove the TOC part (#10324) 1 year ago
非法操作 1277941821 fix: special prompt not work for comfyUI tool (#10307) 1 year ago
-LAN- f500e6cf5b chore: update version to 0.11.0 across all relevant files (#10278) 1 year ago
Novice a3b71830d0 fix: iteration none output error (#10295) 1 year ago
-LAN- 13b7e18a50 fix(http_request): improve parameter initialization and reorganize tests (#10297) 1 year ago
Matsuda 5f4bb12a1a fix typo: writeOpner to writeOpener (#10290) 1 year ago
pinsily 781e8e1a4a fix: handle KeyError when accessing rules in CleanProcessor.clean (#10258) 1 year ago
eux c721617e19 fix: borken faq url in CONTRIBUTING.md (#10275) 1 year ago
非法操作 6b51e81de1 feat: add xAI model provider (#10272) 1 year ago
Matsuda 736719745c feat(model_runtime): add new model 'claude-3-5-haiku-20241022' (#10285) 1 year ago
Matsuda e0e4a6f819 fix(model_runtime): fix wrong max_tokens for Claude 3.5 Haiku on Amazon Bedrock (#10286) 1 year ago
-LAN- 6ab6b9cc40 feat(model): add validation for custom disclaimer length (#10287) 1 year ago
-LAN- 52eb18937e fix(node): correct file property name in function switch (#10284) 1 year ago
NFish aab1ab692a refactor the logic of refreshing access_token (#10068) 1 year ago
github-actions[bot] 3e7f38d904 chore: translate i18n files (#10273)
Co-authored-by: laipz8200 <16485841+laipz8200@users.noreply.github.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
1 year ago
Benjamin 94c5e36334 Updates: Add mplfonts library for customizing matplotlib fonts and Va… (#9903) 1 year ago
Novice baaa3ae02c feat: Iteration node support parallel mode (#9493) 1 year ago
GeorgeCaoJ 623b27583b fix(workflow): handle else condition branch addition error in if-else node (#10257) 1 year ago
-LAN- 93e9aeb4e9 feat(document_extractor): support tool file in document extractor (#10217) 1 year ago
Matsuda 391ad7734e feat: support Claude 3.5 Haiku on Amazon Bedrock (#10265) 1 year ago
-LAN- c5422af400 refactor(parameter_extractor): implement custom error classes (#10260) 1 year ago
guogeer 65a04ee0be fix: buitin tool aippt (#10234)
Co-authored-by: jinqi.guo <jinqi.guo@ubtrobot.com>
1 year ago
-LAN- 84c35aef6c fix(validation): allow to use 0 in the inputs form (#10255) 1 year ago
-LAN- c2b4845719 chore(Dockerfile): upgrade zlib arm64 (#10244) 1 year ago
方程 cd0f10567f Using a dedicated interface to obtain the token credential for the gitee.ai provider (#10243) 1 year ago
-LAN- 454b755c6b feat(workflow): add configurable workflow file upload limit (#10176)
Co-authored-by: JzoNg <jzongcode@gmail.com>
1 year ago
shisaru292 352c1fc370 fix: missing working directory parameter in script (#10226) 1 year ago
-LAN- 181eb6038f refactor(list_operator): replace ValueError with InvalidKeyError (#10222) 1 year ago
-LAN- c32cbeb29a refactor(workflow): introduce specific error handling for LLM nodes (#10221) 1 year ago
-LAN- 62f8c875c8 refactor(http_request): add custom exception handling for HTTP request nodes (#10219) 1 year ago
-LAN- baed53bbfa refactor(workflow): introduce specific exceptions for code validation (#10218) 1 year ago
-LAN- 565a0d992a chore(llm_node): remove unnecessary type ignore for context assignment (#10216) 1 year ago
Jyong e90a06a7b7 fix the ssrf of docx file extractor external images (#10237) 1 year ago
Hanqing Zhao 5a0b22dbd4 Modify translation (#10213) 1 year ago
Jiang 31445c3782 Add Lindorm as a VDB choice (#10202)
Co-authored-by: jiangzhijie <jiangzhijie.jzj@alibaba-inc.com>
1 year ago
crazywoola 8e6f5f4bb0 Fix/10199 application error a client side exception has occurred see the browser console for more information (#10211) 1 year ago
-LAN- e259b360c2 refactor(validation): improve input validation logic (#10175) 1 year ago
-LAN- 762dec2dc4 chore(list_operator): refine exception handling for error specificity (#10206) 1 year ago
-LAN- ada7f5c30f fix(document_extractor): update base exception class (#10208) 1 year ago
Kota-Yamaguchi 6b965eaea3 Feat : add LLM model indicator in prompt generator (#10187) 1 year ago
Xiao Ley ea67bc1166 chore: enable vision support for models in OpenRouter that should have supported vision (#10191) 1 year ago
Kota-Yamaguchi 01e8f6066a chore : code generator preview hint (#10188) 1 year ago
zxhlyh 39effd350e fix: webapp upload file (#10195) 1 year ago
-LAN- 00bfb35759 fix(api): replace current_user with end_user in file upload (#10194) 1 year ago
-LAN- 101d9798f0 feat(document_extractor): integrate unstructured API for PPTX extraction (#10180) 1 year ago
-LAN- ba48754be6 fix(tools): suppress RuntimeWarnings in podcast audio generator (#10182) 1 year ago
Cling_o3 d963df32b9 [fix] fix the bug that modify document name not effective (#10154) 1 year ago
-LAN- 67ce763377 fix(workflow model): ensure consistent timestamp updating (#10172) 1 year ago
jiangbo721 a32c0ef43c fix: Cannot find declaration to go to CLEAN_DAY_SETTING (#10157)
Co-authored-by: 刘江波 <liujiangbo1@xiaomi.com>
1 year ago
Lawrence Li 6e03c10285 feat: add gpustack model provider (#10158) 1 year ago
-LAN- 8f14c422a7 refactor(tools): Avoid warnings. (#10161) 1 year ago
-LAN- 07787366cd refactor(migration/model): update column types for workflow schema (#10160) 1 year ago
-LAN- 8f2d3b6743 Feat/add-remote-file-upload-api (#9906) 1 year ago
zxhlyh e7bc863f26 fix: upload remote image preview (#9952) 1 year ago
Jyong 1d411e195a clean un-allowed special charters when doing indexing estimate (#10153) 1 year ago
-LAN- 2a7ae6b0df refactor(service): handle unsupported DSL version with warning (#10151) 1 year ago
larcane97 8f8a3f4318 Add VESSL AI OpenAI API-compatible model provider and LLM model (#9474)
Co-authored-by: moon <moon@vessl.ai>
1 year ago
Kota-Yamaguchi 4b89dba3a5 feat: synchronize input/output variables in the panel with generated code by the code generator (#10150) 1 year ago
Zixuan Cheng 19c0d1fbf8 Refined README for better reading experience. (#10143) 1 year ago
Coal Pigeon 94cd4912e1 add llm: ernie-4.0-turbo-128k of wenxin (#10135)
Co-authored-by: Pigeon姚宏锋 <pigeon.yhf@galaxyoversea.com>
1 year ago
Shili Cao 602f75bb30 fix: avoid unexpected error when create knowledge base with baidu vector database and wenxin embedding model (#10130) 1 year ago
llinvokerl c2810de952 fix: bar chart issue with duplicate x-axis labels being incorrectly ignored (#10134)
Co-authored-by: liusurong.lsr <liusurong.lsr@alibaba-inc.com>
1 year ago
Jyong 1b645c1cc9 fix issue: query is none when doing retrieval (#10129) 1 year ago
zxhlyh ae3482e0b4 Fix/rerank validation issue (#10131)
Co-authored-by: Yi <yxiaoisme@gmail.com>
1 year ago
Jyong 76c265f781 Feat/update knowledge api url (#10102)
Co-authored-by: nite-knite <nkCoding@gmail.com>
1 year ago
omr b1946c60d8 fix: optimize unique document filtering with set (#10082) 1 year ago
-LAN- c1c13cf828 fix(Dockerfile): conditionally install zlib1g based on architecture (#10118) 1 year ago
Hash Brown e4a48e28e5 fix: log detail panel not showing any message when total count greate… (#10119) 1 year ago
Jyong 67efcbd6bb fix issue: update document segment setting failed (#10107) 1 year ago
Nam Vu 7466061e5a fix: Version '1:1.3.dfsg+really1.3.1-1' for 'zlib1g' was not found (#10096) 1 year ago
-LAN- b7534b764d feat(app_dsl_service): enhance error handling and DSL version management (#10108) 1 year ago
非法操作 eb335ed464 chore: save uploaded file extension as lower case (#10111) 1 year ago
-LAN- 4d9e7c1884 refactor(version): simplify version comparison logic (#10109) 1 year ago
beginnerZhang 8f7cac6bde fix: view logs in prompt, no response when clicked (#10093)
Co-authored-by: zhanganguo <zhanganguo@lixiang.com>
1 year ago
非法操作 d4608f0571 chore: remove an unnecessary link (#10088) 1 year ago
非法操作 9f27b5bb12 feat: enhance comfyui workflow (#10085) 1 year ago
AkaraChen fb9c54e35f build: update docker login action (#10050) 1 year ago
Kota-Yamaguchi dea45682bc chore: update type definition to resolve lint error in Base usage at text-editor.tsx (#10083) 1 year ago
Bowen Liang a0abd5d077 improve: significantly speed up the server launching time by async preloading tool providers (#9146) 1 year ago
Charlie.Wei 924dbc128d fix azure chatgpt o1 parameter error (#10067) 1 year ago
crazywoola b76aa11919 Revert "chore: improve validation and handler of logging timezone with TimezoneName" (#10077) 1 year ago
sacryu 7971efd23e fix the typos in the hit testing template (#10072) 1 year ago
JasonVV b8c2e5359b Fixed the issue where recall the knowledge base in the iteration of the workflow and report errors when executing (#10060) 1 year ago
Hiroshi Fujita 952847ed29 chore: Set file size limits for video and audio uploads from docker env (#10063) 1 year ago
Fog3211 4e4a8a327b fix: prevent onChange during IME composition (#10059) 1 year ago
22mSqRi 8d1591e5d5 fix: fix poetry install command in devcontainer (#9507) 1 year ago
-LAN- 4b8896e034 fix(workflow): refine variable type checks in LLMNode (#10051) 1 year ago
非法操作 c2d3464a17 chore: mount config file of sandbox (#8576) 1 year ago
zhuhao 0886c6f224 fix: resolve the incorrect model name of hunyuan-standard-256k (#10052) 1 year ago
zhuhao 1ee4c13758 chore: use dify_config.TIDB_SPEND_LIMIT instead of constant value (#10038) 1 year ago
郭伟伟 c293aceec1 feat: /conversations api response add 'update_at' field,and update api docs add sort_by parameter (#10043) 1 year ago
zhuhao 4d5752fc94 feat: add YAML type in document extractor node (#9997) 1 year ago
Xiao Ley c615ed57b9 add PROMPT_GENERATION_MAX_TOKENS and CODE_GENERATION_MAX_TOKENS in docker enviromment (#10040) 1 year ago
twwu 020d4baf92 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu 3f8a10613d refactor: remove unused fetchInstalledPluginList function and integrate useInstalledPluginList hook 1 year ago
AkaraChen 53fa13f007 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
AkaraChen d00e1067bf fix: develop page docs style 1 year ago
Joel 2dd9c64d34 chore: use query 1 year ago
AkaraChen b7c40579b2 build: update tailwind 1 year ago
twwu c7f8a0fc7b Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu de24d9c145 fix: handle empty fetched releases and update locale usage in plugin item 1 year ago
AkaraChen 6357e1516e build: update `react-hook-form` 1 year ago
StyleZhang b83dc5ab99 fix: marketplace 1 year ago
Yi 65285965b6 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 035c9eb147 fix: propagation from closing tag in filters 1 year ago
Joel 91b3aec292 feat: add use tools 1 year ago
AkaraChen d3a9747bbd build: update `@floating-ui/react` 1 year ago
StyleZhang 6a99fab92f fix: marketplace 1 year ago
Yi 2a590f6d2b Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 117b0f20dd chore: update the plugin install dropdown styling 1 year ago
StyleZhang c445f747b7 fix: prompt editor 1 year ago
AkaraChen 8ed0963c6b Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Yi 6c47e0b5d1 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi e99e87269e chore: update the selectPackage component 1 year ago
AkaraChen 0a1319548a build: update react markdown
build: update react markdown

build: update react markdown
1 year ago
AkaraChen b1242ba1ac build: init `@tanstack/react-query` 1 year ago
twwu fde0e6c7f9 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu 92153328ea feat: add loading state for installed plugin list in context and update PluginsPanel to display loading indicator 1 year ago
Joel e66ba6ffdd chore: fill repo url 1 year ago
twwu a7e320dc25 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu 5008d9f4a0 feat: add onSuccess callback to InstallFromGitHub and update plugin list on install actions 1 year ago
Yi 912f84777b Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 4c0e4e490a chore: update the 'Update plugin from GitHub' 1 year ago
Joel 306843fe6a chore: plugin info 1 year ago
twwu b6a4af4041 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu cce39b85e9 feat: enhance plugin filtering with tags support 1 year ago
Joel 057d380119 feat: add install model plugin 1 year ago
Joel 4cf9ff6132 chore: remove log 1 year ago
Joel 4cfbcd9c79 feat: add install 1 year ago
StyleZhang fcde5b5c9e fix: detail 1 year ago
StyleZhang 21b3703bd8 fix: i18n 1 year ago
StyleZhang 9025e85ca5 locale 1 year ago
StyleZhang bc43e3a9fe card locale 1 year ago
StyleZhang 319a54aa2f i18n 1 year ago
StyleZhang 7c2ab21c9c i18n 1 year ago
twwu 0d08b6cf51 fix: enhance plugin installation and update handling 1 year ago
Yi 61a70e7a71 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi bde1261b8c chore: update installFromGitHub component 1 year ago
StyleZhang 08bb6bf858 fix: tags 1 year ago
twwu 1003190dc0 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu 4c516a50b8 fix: update type from InstalledPlugin to PluginDetail in detail-header component 1 year ago
Joel 8058a1dbe4 feat: handle update 1 year ago
Yi 8533ded335 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
twwu 1a547b0db9 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu 0b90625e57 feat: integrate GitHub API for plugin version check and add access token support 1 year ago
Joel e989c1f3aa feat: fill update install payload 1 year ago
Joel da15a25cf5 feat: add update from github modal content 1 year ago
Joel 43254ceeb0 chore: temp types 1 year ago
Yi faf550164d Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 1a4234347a chore: update the installFromGitHub logic 1 year ago
Joel 85947efcfa temp: change payload types 1 year ago
Joel 474ea97fc7 feat: add update to modal context 1 year ago
StyleZhang a3becde6d8 feat: plugin tags 1 year ago
Yi c40544a134 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 4028bb4f58 chore: update installPluginFromGitHub component 1 year ago
twwu 52268460a1 fix: update dependency in Empty component to improve rendering logic 1 year ago
twwu b64298c458 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu 16dee11589 feat: add Empty component to installed plugin list 1 year ago
Yi 691dbf9d17 chore: update plugin from GitHub 1 year ago
JzoNg ebebbb684b endpoints list 1 year ago
JzoNg cee51ac084 need author judgement 1 year ago
JzoNg ef00ad0417 action list 1 year ago
JzoNg c37615cd33 plugin detail delete handler 1 year ago
JzoNg a387cfbc9a model list in plugin detail 1 year ago
JzoNg 04fdb4af0f plugin header operation 1 year ago
JzoNg 57f9a41e7f plugin detail selecting 1 year ago
JzoNg eb8b827906 verified tag 1 year ago
Joel 99a9bf6d56 feat: support search from marketplace list 1 year ago
Yi ceae69b773 chore: update the workspace selector 1 year ago
Joel 3c8548c562 feat: create tool model 1 year ago
StyleZhang 8874837dc3 feat: plugin tasks 1 year ago
Yi 40e171c2c6 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 824ed7d6c2 chore: plugin button 1 year ago
JzoNg 4caa8f38bc hide plugin detail 1 year ago
Joel 5d5db7c6c1 fix: key too long breaks ui 1 year ago
Joel ca50522f80 feat: set tool params 1 year ago
Yi 2fd4b6e6d2 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi c503e8ebc9 chore: install package from GitHub 1 year ago
Joel 245bb02c88 chore: add on start to install 1 year ago
Joel 9f08206503 feat: can choose tool in agent page 1 year ago
Joel 66be03f622 fix: search tools ui and some ui problem 1 year ago
JzoNg 1a92064260 remove unused components 1 year ago
JzoNg 7752f374e5 Revert "update model provider api responses"
This reverts commit c8dc5e4849.
1 year ago
JzoNg e7dcc53b55 Revert "load balance"
This reverts commit 378a9dd850.
1 year ago
JzoNg 22766c27c7 Revert "model list of provider"
This reverts commit 766ac3e255.
1 year ago
JzoNg c82b641357 Revert "get credentials of provider"
This reverts commit 72ef04d3e4.
1 year ago
JzoNg 1d871dae0d Revert "credentials of models"
This reverts commit 2ed73b763d.
1 year ago
JzoNg c39be7852f Revert "parameters and rules"
This reverts commit 22696fa75b.
1 year ago
JzoNg f2a5da918b Revert "other providers"
This reverts commit 339dfe5e02.
1 year ago
JzoNg 930425b896 Revert "annotation config"
This reverts commit 633768cd2a.
1 year ago
JzoNg 32e4efb524 Revert "logs"
This reverts commit 06729f6d9d.
1 year ago
JzoNg 96c3ec91af click handle of provider card 1 year ago
JzoNg f257184b00 provider card & link 1 year ago
JzoNg 581d09895e search model in provider settings 1 year ago
StyleZhang 197f1b3957 feat: search box 1 year ago
Joel 207b589458 chore: toolpicker add trigger 1 year ago
StyleZhang b5be6bacef fix: marketplace list 1 year ago
Joel bca99cf4f8 feat: tool picker 1 year ago
twwu 0e873223d7 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu 133b487566 feat: Enhance plugin item links and increase value display width 1 year ago
StyleZhang a9e8eb1c7e fix: marketplace list 1 year ago
twwu bf2b9bb898 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu 837990cb80 feat: Add loading to delete confirmation dialog 1 year ago
StyleZhang 4be2edd934 feat: plugin list tasks 1 year ago
twwu 7d4f8e0082 Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
twwu 36ab121b87 feat: plugin uninstall & plugin list filtering 1 year ago
Joel 7f2980fbc0 chore: fix index show 1 year ago
Joel ae21d48132 feat: list flat view 1 year ago
StyleZhang 8af8a0f46d fix: tool list 1 year ago
twwu 4adb61d6c7 refactor: Update marketplace API prefix in layout.tsx 1 year ago
Joel 7dd7f06f7d chore: handle icon toggle fold 1 year ago
Joel 074e660a67 feat: can add tree view 1 year ago
JzoNg 06729f6d9d logs 1 year ago
JzoNg 633768cd2a annotation config 1 year ago
JzoNg 339dfe5e02 other providers 1 year ago
JzoNg 22696fa75b parameters and rules 1 year ago
JzoNg 2ed73b763d credentials of models 1 year ago
JzoNg 72ef04d3e4 get credentials of provider 1 year ago
JzoNg 766ac3e255 model list of provider 1 year ago
JzoNg 378a9dd850 load balance 1 year ago
JzoNg c8dc5e4849 update model provider api responses 1 year ago
JzoNg 1387c6bd1c update style of agent tool list 1 year ago
JzoNg fda21f6b05 fix size of icon 1 year ago
JzoNg 8c25915d2b action panel tabs 1 year ago
JzoNg aba48749da action panel header 1 year ago
JzoNg 35a66ffe9f tool actions 1 year ago
StyleZhang 3db9174f55 fix: marketplace list 1 year ago
StyleZhang 02854b273f fix: marketplace 1 year ago
StyleZhang fd0a830816 feat: marketplace list 1 year ago
StyleZhang e7fb92e169 feat: marketplace list 1 year ago
Joel 9c4e809799 chore: tiny css and i18n 1 year ago
Joel 169eb32662 chore: toolpicker ui 1 year ago
StyleZhang 0f4291bd36 merge main 1 year ago
StyleZhang 14b641557a feat: marketplace sort 1 year ago
AkaraChen 9c963d6f69 build: echarts update 1 year ago
AkaraChen 96abeda2e7 build: echarts update 1 year ago
StyleZhang 62fa90e30e feat: marketplace sort 1 year ago
Joel 7e378e219c chore: add missing i18n 1 year ago
Joel 34652010f5 feat: add market url prefix 1 year ago
AkaraChen 082f6f6a5f build: update deps 1 year ago
Joel 6f52edb157 feat: plugin permission 1 year ago
Joel 0dcbb34cab feat: handle from market install 1 year ago
StyleZhang 0886d7bb8b feat: marketplace list 1 year ago
StyleZhang e65a47cff7 feat: marketplace list 1 year ago
Joel 36c01d89c9 fix: cros promblem 1 year ago
Joel 6726ca102e feat: add get marketpalce get 1 year ago
Joel e135707f88 chore: plugin icon not show 1 year ago
Joel f2765b9d31 feat: fetch plugin icon 1 year ago
StyleZhang 1e0877dcbf feat: marketplace list 1 year ago
StyleZhang 9a65c3391b feat: marketplace list 1 year ago
Joel ca9e23d6ea fix: check status 1 year ago
AkaraChen c4d6f9e179 build: update react-easy-crop 1 year ago
Joel 0cec6195a3 test 1 year ago
Joel 966d42a4db Merge branch 'main' into feat/plugins 1 year ago
AkaraChen 15c33ba7f3 build: update lexical deps 1 year ago
AkaraChen ed7f74c99c build: update i18n pkg 1 year ago
AkaraChen 1db4139b5a build: update deps
build: update classnames

build: update types

build: update uuid

build: update emoji-mart

build: update use-context-selector

build: update ui component deps
1 year ago
StyleZhang 0d85d44de5 feat: marketplace list 1 year ago
AkaraChen f0f1bfa5d9 build: fix eslint 1 year ago
Joel 9161ce481e Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins 1 year ago
Joel c760902e72 chore: remove useless rule 1 year ago
Joel 7c8c15ef1a test no use rule 1 year ago
Joel 765eb282f3 merge main 1 year ago
AkaraChen 0e2b38dddc build: update qrcode.react 1 year ago
AkaraChen 92e4b3304c build: update deps
build: update sass

build: update lodash-es

build: update qs & js-cookie
1 year ago
Joel c777d55a1c feat: marketplace install 1 year ago
AkaraChen cd27ae4319 build: update testing-library 1 year ago
AkaraChen bd82c7edac build: update storybook 1 year ago
AkaraChen d5043c6628 build: update husky & lint-staged 1 year ago
AkaraChen d9a0584052 build: update eslint & fix some case 1 year ago
Joel 3e011109ad merge main 1 year ago
Joel bdb990eb90 merge main 1 year ago
StyleZhang ae00211691 feat: marketplace types 1 year ago
StyleZhang 0ef35a0ee0 fix: enable_marketplace 1 year ago
Joel 9a9d90ad7f feat: can install 1 year ago
Joel 606fc7be0c feat: support upload pkg 1 year ago
Joel d7def41acc feat: fetch debug key api 1 year ago
AkaraChen b6a560ce86 style: lint 1 year ago
StyleZhang 25f34f6703 fix: marketplace plugin type icon 1 year ago
Joel 7daa365564 chore: to common install comp 1 year ago
Joel 13ccd294cb fix: install error title not update 1 year ago
Joel d357f359ab feat: support install failed 1 year ago
Joel 474cedf653 feat: debug info api 1 year ago
nite-knite 5d3c88a0b3 chore: bump mermaid from 10.4.0 to 10.9.3 1 year ago
Joel ae2c76bda2 feat: install from marketplace 1 year ago
Joel c46b5f2fd0 feat: handle install search params and hide 1 year ago
Joel 2cb7b73ee7 feat: handle import from marketplace 1 year ago
Joel 8d8d5b5235 chore: handle verified 1 year ago
Joel 15acfffd60 chore: some ui and mock data 1 year ago
Yi 18a266eac2 chore: i18n for install from GitHub section 1 year ago
Joel 7751070da8 chore: install from local i18n 1 year ago
Yi fa8c3d0d7b Resolved merge conflicts by removing conflicting files 1 year ago
Yi a567cff809 chore: update the install from GitHub component 1 year ago
Joel 583b0e9f97 chore: remove replicated types 1 year ago
Joel 5fddb23516 feat: install progress 1 year ago
Yi 0e52971997 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 1387f406a3 fix: log format 1 year ago
AkaraChen ff31f0540a style: lint 1 year ago
AkaraChen 4873e6e2a1 build: fix eslint stylistic 1 year ago
nite-knite 510ce057f7 chore: add package manager setting to vscode setting example 1 year ago
AkaraChen 0e53cc0e8c fix: eslint indent 1 year ago
Yi 0b8c896481 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 15fe635465 chore: install package from GitHub 1 year ago
AkaraChen f8c3189f4d build: fix eslint undef 1 year ago
AkaraChen f215db87e3 build: fix eslint undef 1 year ago
Joel 67d02212b4 chore: pnpm 1 year ago
Joel cff9adaf8e chore: tools ts problems 1 year ago
AkaraChen cdd2a40086 style: minimium codemod 1 year ago
AkaraChen 024028bc52 build: sync eslint rule 1 year ago
AkaraChen 0ae085b48a build: add eslint common rule 1 year ago
AkaraChen 2094c54951 build: update eslint config antfu 1 year ago
AkaraChen f4f11135d3 build: using eslint flat config 1 year ago
Joel 8e9d7a229d feat: scroll to view and fix action hidden 1 year ago
Joel 8f49572f85 chore: from marketplace tilte ui 1 year ago
JzoNg 5aa7696cc3 update style of action list 1 year ago
JzoNg 15dd79e822 provider detail data binding 1 year ago
JzoNg 4651ab4195 new style of provider detail 1 year ago
JzoNg 5e3160e6f6 fix title & description of tool provider 1 year ago
JzoNg 973cd126bb create & update endpoint 1 year ago
JzoNg ebaf8766ef endpoint form 1 year ago
JzoNg d2190e9c3a remove endpoint 1 year ago
JzoNg 37f55098fe switch endpoint service state 1 year ago
JzoNg b1771194cc servise of endpoints 1 year ago
JzoNg 0279bd8c75 endpoint card databing 1 year ago
JzoNg 5e077e4ce8 endpoints data binding 1 year ago
JzoNg 64067e1f20 plugin detail header operations 1 year ago
JzoNg 5295c72ca1 endpoints mock data 1 year ago
JzoNg 1ecea62052 add verified tag 1 year ago
JzoNg 307af29b65 add plugin description 1 year ago
JzoNg 10190a9aa5 plugin detail header data binding 1 year ago
JzoNg 7c5c35600c plugin detail type 1 year ago
JzoNg 63b333cdb1 modify plugin detail panel 1 year ago
JzoNg a6776190bd chore: update remix icon 1 year ago
AkaraChen 9577cbac27 build: docker use pnpm 1 year ago
AkaraChen f6ae13abad ci: migrate to pnpm 1 year ago
AkaraChen f3d501e7d5 fix: gen-icon script phantom deps 1 year ago
AkaraChen 2eab8fcc33 build: switch to pnpm 1 year ago
Joel bdb81fe20d feat: choose tool sticky 1 year ago
Yi 0f60fe7f2a chore: update workspace name (truncated for long name) 1 year ago
Yi 425f624de5 chore: add plugin panel 1 year ago
Yi b1919745e2 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
twwu 9a242bcac9 Merge branch 'main' into feat/plugins 1 year ago
Yi a6109a60b8 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 28f7bbf83a chore: installation progress bar 1 year ago
Joel cac04c5f3c refactor: chagne card to client component 1 year ago
Joel 18f5f9cc37 feat: plugin upgrade 1 year ago
Joel 1787c5c93f chore: handle tag name too long 1 year ago
Joel f981494613 feat: plugin support emoji icon 1 year ago
Joel fbc853af92 feat: remove config 1 year ago
StyleZhang 1a64c660ba enable marketplace 1 year ago
Joel 846555af1b fix: action buttion ui 1 year ago
Joel bca94854f7 feat: plugin info 1 year ago
Joel 1bd70bd8bf chore: copy button 1 year ago
Joel d1dcd39191 feat: add debug info i18n and extract common to components 1 year ago
Joel 35384bda41 chore: refactor card loading 1 year ago
Joel 89fb6eb648 chore: set hideCornerMark to optional 1 year ago
Joel aa61a890b2 chore: change downloadCount to optional 1 year ago
Joel 31ece363c3 chore: chagne mangament attr name 1 year ago
Joel 70a5d78cc5 chore: priviege i18n 1 year ago
Joel 57f4dfdb6f feat: add permission data logic 1 year ago
Yi aa9028a607 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi d83f94c55c fix: set constrain for uploading packages only works in the Plugins tab 1 year ago
StyleZhang a8c5e0b0b0 tool list item click 1 year ago
Yi 177e8cbf73 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 23828fd15a Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
StyleZhang 2cc37ac8e5 tool list 1 year ago
Yi c9ee1e9ff2 feat: install difypkg ui 1 year ago
Joel 4f10f5d5f4 chore: hover show action 1 year ago
Yi c48c84674e Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 1e9fbbf41b fix: dynamic sub header color 1 year ago
StyleZhang 4dd144ce43 tools list 1 year ago
Yi a387ff1c38 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi a9e367e6de feat: use-uploader hook 1 year ago
Joel e2fec587f8 feat: from marketplace 1 year ago
StyleZhang 39a6f0943d marketplace 1 year ago
JzoNg 684896d100 merge main 1 year ago
JzoNg 54f911f6cd endpoints 1 year ago
Joel 0e5c16d0c2 feat: view to ui and fix some ui promblem 1 year ago
Joel b8cd6ea478 feat: support view choose 1 year ago
JzoNg fc61fd0f50 action list 1 year ago
JzoNg 2fbfc988c4 plugin panel detail 1 year ago
JzoNg 99f5fea001 plugin detail panel header 1 year ago
StyleZhang ecd2a1be9f marketplace 1 year ago
Joel 49ee9ca5f1 feat: tool item support action 1 year ago
Joel 6d0eef12b1 feat: split tools data to out and add demo 1 year ago
StyleZhang c1e0a939b0 marketplace 1 year ago
JzoNg 060a894bd1 interaction of plugin detail panel 1 year ago
JzoNg c75e02b5b2 update provider card 1 year ago
StyleZhang fcf43ee845 plugin page context 1 year ago
StyleZhang 466f61d044 relocate file 1 year ago
StyleZhang 27ae74af50 hook 1 year ago
Joel 8dd941e3d2 chore: instal plug add tag 1 year ago
Joel dec4bf6b98 fix: install modal item server 1 year ago
Joel e2c33fc40f fix: plugin item i18n 1 year ago
Yi c74e59d1f4 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 1fcb902715 feat: add cards to "install from marketplace" 1 year ago
JzoNg c08f98218c hide search in other pages 1 year ago
Yi c6377f6e38 fix: naming styles 1 year ago
Yi 3cb0a5bd68 Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 95777d23e0 fix: naming styles 1 year ago
JzoNg e7dc16fd08 provider card 1 year ago
JzoNg 495dec143c unconfigured provider 1 year ago
JzoNg 4cc6dfa232 new style of provider card 1 year ago
JzoNg d1452d4af4 no provider installed 1 year ago
JzoNg d68ca56b3a system default model 1 year ago
JzoNg 49856d8d17 setting content header & close button 1 year ago
JzoNg 902de72cc0 new style of settings 1 year ago
StyleZhang 76f6b8d104 marketplace 1 year ago
StyleZhang f111e605c4 marketplace 1 year ago
Joel b358ed3a5b fix: init workflow image crash 1 year ago
Joel 88dbf639e0 chore: enchance locale props 1 year ago
Joel aa8b525b48 fix: icon tsx to router problem 1 year ago
Yi c990bc61db feat: install plugins (partial) 1 year ago
Joel 6d7588f236 chore: fix ui 1 year ago
Joel 8257c7bf02 chore: remove useless data 1 year ago
Joel 946068967b feat: finish card components 1 year ago
Joel 19f5684960 feat: add label and fix some ui problem 1 year ago
Joel 6d62840aff chore: split card component 1 year ago
Joel ab868ac979 fix: error igm 1 year ago
Joel 1d74e693ea chore: fix imge name 1 year ago
Joel fa43d4202f feat: plugin item 1 year ago
Joel 6b29860788 feat: add installed 1 year ago
Joel 36800eeaba feat: base card component 1 year ago
Yi 67acd174ac add different styles to plugins and discover 1 year ago
StyleZhang b5edc64b2a plugin type switch 1 year ago
Yi d00b2724cc Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins 1 year ago
Yi 43f87c0b86 make the drop plugin only appears when the user selects "plugins" 1 year ago
Joel 7a43f48c95 chore: add test page 1 year ago
StyleZhang 58a913b09d marketplace 1 year ago
Joel cd03795f2c chore: add endpoint types 1 year ago
Joel 36f8b5711d feat: plugin types 2 years ago
Joel f9c48e9ea9 fix: eslint to find top dir 2 years ago
JzoNg 3b48f8c98e Merge branch 'main' into tp 2 years ago
JzoNg cef1010cb5 style update 2 years ago
Joel cb4875a3a7 chore: split the common tailwind config 2 years ago
StyleZhang bbca708832 add marketplace card 2 years ago
JzoNg 05aec43ee3 Merge branch 'main' into tp 2 years ago
Yi e8127756e0 Merge branch 'main' of github.com:langgenius/dify into feat/plugins 2 years ago
Yi 792595a46f update page header 2 years ago
Yi d7d7281c93 feat: plugin homepage 2 years ago
Yi 21193c2fbf update the plugins page 2 years ago

@ -1,11 +1,12 @@
#!/bin/bash
cd web && npm install
npm add -g pnpm@9.12.2
cd web && pnpm install
pipx install poetry
echo 'alias start-api="cd /workspaces/dify/api && poetry run python -m flask run --host 0.0.0.0 --port=5001 --debug"' >> ~/.bashrc
echo 'alias start-worker="cd /workspaces/dify/api && poetry run python -m celery -A app.celery worker -P gevent -c 1 --loglevel INFO -Q dataset,generation,mail,ops_trace,app_deletion"' >> ~/.bashrc
echo 'alias start-web="cd /workspaces/dify/web && npm run dev"' >> ~/.bashrc
echo 'alias start-web="cd /workspaces/dify/web && pnpm dev"' >> ~/.bashrc
echo 'alias start-containers="cd /workspaces/dify/docker && docker-compose -f docker-compose.middleware.yaml -p dify up -d"' >> ~/.bashrc
echo 'alias stop-containers="cd /workspaces/dify/docker && docker-compose -f docker-compose.middleware.yaml -p dify down"' >> ~/.bashrc

@ -71,16 +71,16 @@ jobs:
if: steps.changed-files.outputs.any_changed == 'true'
with:
node-version: 20
cache: yarn
cache: pnpm
cache-dependency-path: ./web/package.json
- name: Web dependencies
if: steps.changed-files.outputs.any_changed == 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Web style check
if: steps.changed-files.outputs.any_changed == 'true'
run: yarn run lint
run: pnpm run lint
docker-compose-template:
name: Docker Compose Template

@ -32,10 +32,10 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: ''
cache-dependency-path: 'yarn.lock'
cache-dependency-path: 'pnpm-lock.yaml'
- name: Install Dependencies
run: yarn install
run: pnpm install
- name: Test
run: yarn test
run: pnpm test

@ -38,11 +38,11 @@ jobs:
- name: Install dependencies
if: env.FILES_CHANGED == 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Run npm script
if: env.FILES_CHANGED == 'true'
run: npm run auto-gen-i18n
run: pnpm run auto-gen-i18n
- name: Create Pull Request
if: env.FILES_CHANGED == 'true'

@ -34,13 +34,13 @@ jobs:
if: steps.changed-files.outputs.any_changed == 'true'
with:
node-version: 20
cache: yarn
cache: pnpm
cache-dependency-path: ./web/package.json
- name: Install dependencies
if: steps.changed-files.outputs.any_changed == 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Run tests
if: steps.changed-files.outputs.any_changed == 'true'
run: yarn test
run: pnpm test

3
.gitignore vendored

@ -193,3 +193,6 @@ api/.vscode
.idea/
.vscode
# pnpm
/.pnpm-store

@ -61,17 +61,20 @@ def make_request(method, url, max_retries=SSRF_DEFAULT_MAX_RETRIES, **kwargs):
if response.status_code not in STATUS_FORCELIST:
return response
else:
logging.warning(f"Received status code {response.status_code} for URL {url} which is in the force list")
logging.warning(
f"Received status code {response.status_code} for URL {url} which is in the force list")
except httpx.RequestError as e:
logging.warning(f"Request to URL {url} failed on attempt {retries + 1}: {e}")
logging.warning(f"Request to URL {url} failed on attempt {
retries + 1}: {e}")
if max_retries == 0:
raise
retries += 1
if retries <= max_retries:
time.sleep(BACKOFF_FACTOR * (2 ** (retries - 1)))
raise MaxRetriesExceededError(f"Reached maximum retries ({max_retries}) for URL {url}")
raise MaxRetriesExceededError(
f"Reached maximum retries ({max_retries}) for URL {url}")
def get(url, max_retries=SSRF_DEFAULT_MAX_RETRIES, **kwargs):

@ -17,7 +17,8 @@ from extensions.ext_redis import redis_client
from models.dataset import Dataset
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
logging.basicConfig(level=logging.INFO,
format="%(asctime)s - %(levelname)s - %(message)s")
logging.getLogger("lindorm").setLevel(logging.WARN)
ROUTING_FIELD = "routing_field"
@ -134,7 +135,8 @@ class LindormVectorStore(BaseVector):
self._client.delete(index=self._collection_name, id=id, params=params)
self.refresh()
else:
logger.warning(f"DELETE BY ID: ID {id} does not exist in the index.")
logger.warning(
f"DELETE BY ID: ID {id} does not exist in the index.")
def delete(self) -> None:
if self._using_ugc:
@ -145,7 +147,8 @@ class LindormVectorStore(BaseVector):
self.refresh()
else:
if self._client.indices.exists(index=self._collection_name):
self._client.indices.delete(index=self._collection_name, params={"timeout": 60})
self._client.indices.delete(
index=self._collection_name, params={"timeout": 60})
logger.info("Delete index success")
else:
logger.warning(f"Index '{self._collection_name}' does not exist. No deletion performed.")
@ -168,7 +171,8 @@ class LindormVectorStore(BaseVector):
raise ValueError("All elements in query_vector should be floats")
top_k = kwargs.get("top_k", 10)
query = default_vector_search_query(query_vector=query_vector, k=top_k, **kwargs)
query = default_vector_search_query(
query_vector=query_vector, k=top_k, **kwargs)
try:
params = {}
if self._using_ugc:
@ -220,7 +224,8 @@ class LindormVectorStore(BaseVector):
routing=routing,
routing_field=self._routing_field,
)
response = self._client.search(index=self._collection_name, body=full_text_query)
response = self._client.search(
index=self._collection_name, body=full_text_query)
docs = []
for hit in response["hits"]["hits"]:
docs.append(
@ -238,7 +243,8 @@ class LindormVectorStore(BaseVector):
with redis_client.lock(lock_name, timeout=20):
collection_exist_cache_key = f"vector_indexing_{self._collection_name}"
if redis_client.get(collection_exist_cache_key):
logger.info(f"Collection {self._collection_name} already exists.")
logger.info(
f"Collection {self._collection_name} already exists.")
return
if self._client.indices.exists(index=self._collection_name):
logger.info(f"{self._collection_name.lower()} already exists.")
@ -258,10 +264,13 @@ class LindormVectorStore(BaseVector):
hnsw_ef_construction = kwargs.pop("hnsw_ef_construction", 500)
ivfpq_m = kwargs.pop("ivfpq_m", dimension)
nlist = kwargs.pop("nlist", 1000)
centroids_use_hnsw = kwargs.pop("centroids_use_hnsw", True if nlist >= 5000 else False)
centroids_use_hnsw = kwargs.pop(
"centroids_use_hnsw", True if nlist >= 5000 else False)
centroids_hnsw_m = kwargs.pop("centroids_hnsw_m", 24)
centroids_hnsw_ef_construct = kwargs.pop("centroids_hnsw_ef_construct", 500)
centroids_hnsw_ef_search = kwargs.pop("centroids_hnsw_ef_search", 100)
centroids_hnsw_ef_construct = kwargs.pop(
"centroids_hnsw_ef_construct", 500)
centroids_hnsw_ef_search = kwargs.pop(
"centroids_hnsw_ef_search", 100)
mapping = default_text_mapping(
dimension,
method_name,
@ -281,7 +290,8 @@ class LindormVectorStore(BaseVector):
using_ugc=self._using_ugc,
**kwargs,
)
self._client.indices.create(index=self._collection_name.lower(), body=mapping)
self._client.indices.create(
index=self._collection_name.lower(), body=mapping)
redis_client.set(collection_exist_cache_key, 1, ex=3600)
# logger.info(f"create index success: {self._collection_name}")
@ -347,7 +357,8 @@ def default_text_mapping(dimension: int, method_name: str, **kwargs: Any) -> dic
}
if excludes_from_source:
mapping["mappings"]["_source"] = {"excludes": excludes_from_source} # e.g. {"excludes": ["vector_field"]}
# e.g. {"excludes": ["vector_field"]}
mapping["mappings"]["_source"] = {"excludes": excludes_from_source}
if using_ugc and method_name == "ivfpq":
mapping["settings"]["index"]["knn_routing"] = True
@ -385,7 +396,8 @@ def default_text_search_query(
# build complex search_query when either of must/must_not/should/filter is specified
if must:
if not isinstance(must, list):
raise RuntimeError(f"unexpected [must] clause with {type(filters)}")
raise RuntimeError(
f"unexpected [must] clause with {type(filters)}")
if query_clause not in must:
must.append(query_clause)
else:
@ -395,19 +407,22 @@ def default_text_search_query(
if must_not:
if not isinstance(must_not, list):
raise RuntimeError(f"unexpected [must_not] clause with {type(filters)}")
raise RuntimeError(
f"unexpected [must_not] clause with {type(filters)}")
boolean_query["must_not"] = must_not
if should:
if not isinstance(should, list):
raise RuntimeError(f"unexpected [should] clause with {type(filters)}")
raise RuntimeError(
f"unexpected [should] clause with {type(filters)}")
boolean_query["should"] = should
if minimum_should_match != 0:
boolean_query["minimum_should_match"] = minimum_should_match
if filters:
if not isinstance(filters, list):
raise RuntimeError(f"unexpected [filter] clause with {type(filters)}")
raise RuntimeError(
f"unexpected [filter] clause with {type(filters)}")
boolean_query["filter"] = filters
search_query = {"size": k, "query": {"bool": boolean_query}}

@ -50,7 +50,7 @@ class WordExtractor(BaseExtractor):
self.web_path = self.file_path
# TODO: use a better way to handle the file
self.temp_file = tempfile.NamedTemporaryFile() # noqa: SIM115
self.temp_file = tempfile.NamedTemporaryFile()
self.temp_file.write(r.content)
self.file_path = self.temp_file.name
elif not os.path.isfile(self.file_path):

@ -38,7 +38,6 @@ class AliYuqueDescribeDocumentContentTool(AliYuqueTool, BuiltinTool):
book_id = index_page.get("data", {}).get("book", {}).get("id")
if not book_id:
raise Exception(f"can not parse book_id from {index_page}")
new_params["book_id"] = book_id
new_params["id"] = doc_id
data = self.request("GET", token, new_params, "/api/v2/repos/{book_id}/docs/{id}")

@ -44,11 +44,13 @@ class QuestionClassifierNode(LLMNode):
variable_pool = self.graph_runtime_state.variable_pool
# extract variables
variable = variable_pool.get(node_data.query_variable_selector) if node_data.query_variable_selector else None
variable = variable_pool.get(
node_data.query_variable_selector) if node_data.query_variable_selector else None
query = variable.value if variable else None
variables = {"query": query}
# fetch model config
model_instance, model_config = self._fetch_model_config(node_data.model)
model_instance, model_config = self._fetch_model_config(
node_data.model)
# fetch memory
memory = self._fetch_memory(
node_data_memory=node_data.memory,
@ -56,7 +58,8 @@ class QuestionClassifierNode(LLMNode):
)
# fetch instruction
node_data.instruction = node_data.instruction or ""
node_data.instruction = variable_pool.convert_template(node_data.instruction).text
node_data.instruction = variable_pool.convert_template(
node_data.instruction).text
files = (
self._fetch_files(
@ -178,12 +181,15 @@ class QuestionClassifierNode(LLMNode):
variable_mapping = {"query": node_data.query_variable_selector}
variable_selectors = []
if node_data.instruction:
variable_template_parser = VariableTemplateParser(template=node_data.instruction)
variable_selectors.extend(variable_template_parser.extract_variable_selectors())
variable_template_parser = VariableTemplateParser(
template=node_data.instruction)
variable_selectors.extend(
variable_template_parser.extract_variable_selectors())
for variable_selector in variable_selectors:
variable_mapping[variable_selector.variable] = variable_selector.value_selector
variable_mapping = {node_id + "." + key: value for key, value in variable_mapping.items()}
variable_mapping = {node_id + "." + key: value for key,
value in variable_mapping.items()}
return variable_mapping
@ -204,7 +210,8 @@ class QuestionClassifierNode(LLMNode):
context: Optional[str],
) -> int:
prompt_transform = AdvancedPromptTransform(with_variable_tmpl=True)
prompt_template = self._get_prompt_template(node_data, query, None, 2000)
prompt_template = self._get_prompt_template(
node_data, query, None, 2000)
prompt_messages = prompt_transform.get_prompt(
prompt_template=prompt_template,
inputs={},
@ -217,13 +224,15 @@ class QuestionClassifierNode(LLMNode):
)
rest_tokens = 2000
model_context_tokens = model_config.model_schema.model_properties.get(ModelPropertyKey.CONTEXT_SIZE)
model_context_tokens = model_config.model_schema.model_properties.get(
ModelPropertyKey.CONTEXT_SIZE)
if model_context_tokens:
model_instance = ModelInstance(
provider_model_bundle=model_config.provider_model_bundle, model=model_config.model
)
curr_message_tokens = model_instance.get_llm_num_tokens(prompt_messages)
curr_message_tokens = model_instance.get_llm_num_tokens(
prompt_messages)
max_tokens = 0
for parameter_rule in model_config.model_schema.parameter_rules:
@ -264,7 +273,8 @@ class QuestionClassifierNode(LLMNode):
prompt_messages: list[LLMNodeChatModelMessage] = []
if model_mode == ModelMode.CHAT:
system_prompt_messages = LLMNodeChatModelMessage(
role=PromptMessageRole.SYSTEM, text=QUESTION_CLASSIFIER_SYSTEM_PROMPT.format(histories=memory_str)
role=PromptMessageRole.SYSTEM, text=QUESTION_CLASSIFIER_SYSTEM_PROMPT.format(
histories=memory_str)
)
prompt_messages.append(system_prompt_messages)
user_prompt_message_1 = LLMNodeChatModelMessage(
@ -305,4 +315,5 @@ class QuestionClassifierNode(LLMNode):
)
else:
raise InvalidModelTypeError(f"Model mode {model_mode} not support.")
raise InvalidModelTypeError(
f"Model mode {model_mode} not support.")

@ -10,7 +10,6 @@ from collections.abc import Generator, Mapping
from datetime import datetime
from hashlib import sha256
from typing import Any, Optional, Union, cast
from zoneinfo import available_timezones
from flask import Response, stream_with_context
from flask_restful import fields # type: ignore

@ -68,7 +68,8 @@ def test_executor_with_json_body_and_object_variable():
system_variables={},
user_inputs={},
)
variable_pool.add(["pre_node_id", "object"], {"name": "John Doe", "age": 30, "email": "john@example.com"})
variable_pool.add(["pre_node_id", "object"], {
"name": "John Doe", "age": 30, "email": "john@example.com"})
# Prepare the node data
node_data = HttpRequestNodeData(
@ -123,7 +124,8 @@ def test_executor_with_json_body_and_nested_object_variable():
system_variables={},
user_inputs={},
)
variable_pool.add(["pre_node_id", "object"], {"name": "John Doe", "age": 30, "email": "john@example.com"})
variable_pool.add(["pre_node_id", "object"], {
"name": "John Doe", "age": 30, "email": "john@example.com"})
# Prepare the node data
node_data = HttpRequestNodeData(

@ -18,6 +18,14 @@ from models.enums import UserFrom
from models.workflow import WorkflowNodeExecutionStatus, WorkflowType
def test_plain_text_to_dict():
assert _plain_text_to_dict("aa\n cc:") == {"aa": "", "cc": ""}
assert _plain_text_to_dict("aa:bb\n cc:dd") == {"aa": "bb", "cc": "dd"}
assert _plain_text_to_dict("aa:bb\n cc:dd\n") == {"aa": "bb", "cc": "dd"}
assert _plain_text_to_dict("aa:bb\n\n cc : dd\n\n") == {
"aa": "bb", "cc": "dd"}
def test_http_request_node_binary_file(monkeypatch):
data = HttpRequestNodeData(
title="test",
@ -183,7 +191,8 @@ def test_http_request_node_form_with_file(monkeypatch):
def attr_checker(*args, **kwargs):
assert kwargs["data"] == {"name": "test"}
assert kwargs["files"] == {"file": (None, b"test", "application/octet-stream")}
assert kwargs["files"] == {
"file": (None, b"test", "application/octet-stream")}
return httpx.Response(200, content=b"")
monkeypatch.setattr(

@ -443,6 +443,8 @@ services:
environment:
CONSOLE_API_URL: ${CONSOLE_API_URL:-}
APP_API_URL: ${APP_API_URL:-}
MARKETPLACE_API_URL: ${MARKETPLACE_API_URL:-}
MARKETPLACE_URL: ${MARKETPLACE_URL:-}
SENTRY_DSN: ${WEB_SENTRY_DSN:-}
NEXT_TELEMETRY_DISABLED: ${NEXT_TELEMETRY_DISABLED:-0}
TEXT_GENERATION_TIMEOUT_MS: ${TEXT_GENERATION_TIMEOUT_MS:-60000}

@ -1,5 +0,0 @@
{
"presets": [
"@babel/preset-env"
]
}

@ -10,6 +10,10 @@ NEXT_PUBLIC_API_PREFIX=http://localhost:5001/console/api
# console or api domain.
# example: http://udify.app/api
NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api
# The APIFREX for MARKETPLACE
NEXT_PUBLIC_MARKETPLACE_API_PREFIX=http://localhost:5002/api
# The URL for MARKETPLACE
NEXT_PUBLIC_MARKETPLACE_URL_PREFIX=
# SENTRY
NEXT_PUBLIC_SENTRY_DSN=
@ -26,5 +30,7 @@ NEXT_PUBLIC_TEXT_GENERATION_TIMEOUT_MS=60000
# CSP https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
NEXT_PUBLIC_CSP_WHITELIST=
# Github Access Token, used for invoking Github API
NEXT_PUBLIC_GITHUB_ACCESS_TOKEN=
# The maximum number of top-k value for RAG.
NEXT_PUBLIC_TOP_K_MAX_VALUE=10

@ -1,7 +0,0 @@
/**/node_modules/*
node_modules/
dist/
build/
out/
.next/

@ -1,31 +0,0 @@
{
"extends": [
"next",
"@antfu",
"plugin:storybook/recommended"
],
"rules": {
"@typescript-eslint/consistent-type-definitions": [
"error",
"type"
],
"@typescript-eslint/no-var-requires": "off",
"no-console": "off",
"indent": "off",
"@typescript-eslint/indent": [
"error",
2,
{
"SwitchCase": 1,
"flatTernaryExpressions": false,
"ignoredNodes": [
"PropertyDefinition[decorators]",
"TSUnionType",
"FunctionExpression[params]:has(Identifier[decorators])"
]
}
],
"react-hooks/exhaustive-deps": "warn",
"react/display-name": "warn"
}
}

7
web/.gitignore vendored

@ -44,12 +44,11 @@ package-lock.json
.pnp.cjs
.pnp.loader.mjs
.yarn/
.yarnrc.yml
# pmpm
pnpm-lock.yaml
.favorites.json
# storybook
/storybook-static
*storybook.log
# mise

@ -1,6 +1,3 @@
#!/usr/bin/env bash
. "$(dirname -- "$0")/_/husky.sh"
# get the list of modified files
files=$(git diff --cached --name-only)
@ -50,7 +47,7 @@ fi
if $web_modified; then
echo "Running ESLint on web module"
cd ./web || exit 1
npx lint-staged
lint-staged
echo "Running unit tests check"
modified_files=$(git diff --cached --name-only -- utils | grep -v '\.spec\.ts$' || true)
@ -63,7 +60,7 @@ if $web_modified; then
# check if the test file exists
if [ -f "../$test_file" ]; then
echo "Detected changes in $file, running corresponding unit tests..."
npm run test "../$test_file"
pnpm run test "../$test_file"
if [ $? -ne 0 ]; then
echo "Unit tests failed. Please fix the errors before committing."

@ -1,19 +1,19 @@
import type { StorybookConfig } from '@storybook/nextjs'
const config: StorybookConfig = {
// stories: ['../stories/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
stories: ['../app/components/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-onboarding',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/nextjs',
options: {},
},
staticDirs: ['../public'],
// stories: ['../stories/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
stories: ['../app/components/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-onboarding',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/nextjs',
options: {},
},
staticDirs: ['../public'],
}
export default config

@ -1,6 +1,6 @@
import React from 'react'
import type { Preview } from '@storybook/react'
import { withThemeByDataAttribute } from '@storybook/addon-themes';
import { withThemeByDataAttribute } from '@storybook/addon-themes'
import I18nServer from '../app/components/i18n-server'
import '../app/styles/globals.css'
@ -8,30 +8,30 @@ import '../app/styles/markdown.scss'
import './storybook.css'
export const decorators = [
withThemeByDataAttribute({
themes: {
light: 'light',
dark: 'dark',
},
defaultTheme: 'light',
attributeName: 'data-theme',
}),
Story => {
return <I18nServer>
<Story />
</I18nServer>
}
];
withThemeByDataAttribute({
themes: {
light: 'light',
dark: 'dark',
},
defaultTheme: 'light',
attributeName: 'data-theme',
}),
(Story) => {
return <I18nServer>
<Story />
</I18nServer>
},
]
const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
}
export default preview

@ -21,5 +21,6 @@
"editor.defaultFormatter": "vscode.json-language-features"
},
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
"typescript.enablePromptUseWorkspaceTsdk": true,
"npm.packageManager": "pnpm"
}

@ -6,6 +6,9 @@ LABEL maintainer="takatost@gmail.com"
# RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk add --no-cache tzdata
RUN npm install -g pnpm@9.12.2
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
# install packages
@ -14,12 +17,12 @@ FROM base AS packages
WORKDIR /app/web
COPY package.json .
COPY yarn.lock .
COPY pnpm-lock.yaml .
# if you located in China, you can use taobao registry to speed up
# RUN yarn install --frozen-lockfile --registry https://registry.npmmirror.com/
# RUN pnpm install --frozen-lockfile --registry https://registry.npmmirror.com/
RUN yarn install --frozen-lockfile
RUN pnpm install --frozen-lockfile
# build resources
FROM base AS builder
@ -27,7 +30,8 @@ WORKDIR /app/web
COPY --from=packages /app/web/ .
COPY . .
RUN yarn build
ENV NODE_OPTIONS="--max-old-space-size=4096"
RUN pnpm build
# production stage
@ -38,6 +42,8 @@ ENV EDITION=SELF_HOSTED
ENV DEPLOY_ENV=PRODUCTION
ENV CONSOLE_API_URL=http://127.0.0.1:5001
ENV APP_API_URL=http://127.0.0.1:5001
ENV MARKETPLACE_API_URL=http://127.0.0.1:5001
ENV MARKETPLACE_URL=http://127.0.0.1:5001
ENV PORT=3000
ENV NEXT_TELEMETRY_DISABLED=1
@ -57,8 +63,7 @@ COPY docker/entrypoint.sh ./entrypoint.sh
# global runtime packages
RUN yarn global add pm2 \
&& yarn cache clean \
RUN pnpm add -g pm2 \
&& mkdir /.pm2 \
&& chown -R 1001:0 /.pm2 /app/web \
&& chmod -R g=u /.pm2 /app/web

@ -6,14 +6,12 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next
### Run by source code
To start the web frontend service, you will need [Node.js v18.x (LTS)](https://nodejs.org/en) and [NPM version 8.x.x](https://www.npmjs.com/) or [Yarn](https://yarnpkg.com/).
To start the web frontend service, you will need [Node.js v18.x (LTS)](https://nodejs.org/en) and [pnpm version 9.12.2](https://pnpm.io).
First, install the dependencies:
```bash
npm install
# or
yarn install --frozen-lockfile
pnpm install
```
Then, configure the environment variables. Create a file named `.env.local` in the current directory and copy the contents from `.env.example`. Modify the values of these environment variables according to your requirements:
@ -43,9 +41,7 @@ NEXT_PUBLIC_SENTRY_DSN=
Finally, run the development server:
```bash
npm run dev
# or
yarn dev
pnpm run dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
@ -59,19 +55,19 @@ You can start editing the file under folder `app`. The page auto-updates as you
First, build the app for production:
```bash
npm run build
pnpm run build
```
Then, start the server:
```bash
npm run start
pnpm run start
```
If you want to customize the host and port:
```bash
npm run start --port=3001 --host=0.0.0.0
pnpm run start --port=3001 --host=0.0.0.0
```
## Storybook
@ -81,7 +77,7 @@ This project uses [Storybook](https://storybook.js.org/) for UI component develo
To start the storybook server, run:
```bash
yarn storybook
pnpm storybook
```
Open [http://localhost:6006](http://localhost:6006) with your browser to see the result.
@ -99,7 +95,7 @@ You can create a test file with a suffix of `.spec` beside the file that to be t
Run test:
```bash
npm run test
pnpm run test
```
If you are not familiar with writing tests, here is some code to refer to:

@ -2,7 +2,7 @@ import React from 'react'
import Main from '@/app/components/app/log-annotation'
import { PageType } from '@/app/components/base/features/new-feature-panel/annotation-reply/type'
export type IProps = {
export interface IProps {
params: { appId: string }
}

@ -1,5 +1,5 @@
import React from 'react'
import { type Locale } from '@/i18n'
import type { Locale } from '@/i18n'
import DevelopMain from '@/app/components/develop'
export type IDevelopProps = {

@ -46,7 +46,7 @@ export default function ChartView({ appId }: IChartViewProps) {
return (
<div>
<div className='flex flex-row items-center mt-8 mb-4 text-gray-900 text-base'>
<div className='flex flex-row items-center mt-8 mb-4 system-xl-semibold text-text-primary'>
<span className='mr-3'>{t('appOverview.analysis.title')}</span>
<SimpleSelect
items={Object.entries(TIME_PERIOD_MAPPING).map(([k, v]) => ({ value: k, name: t(`appLog.filter.period.${v.name}`) }))}

@ -12,7 +12,7 @@ const Overview = async ({
params: { appId },
}: IDevelopProps) => {
return (
<div className="h-full px-4 sm:px-16 py-6 overflow-scroll">
<div className="h-full px-4 sm:px-12 py-6 overflow-scroll bg-chatbot-bg">
<ApikeyInfoPanel />
<TracingPanel />
<CardView appId={appId} />

@ -1,20 +1,18 @@
'use client'
import type { FC } from 'react'
import React, { useCallback, useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import {
RiEqualizer2Line,
} from '@remixicon/react'
import type { PopupProps } from './config-popup'
import ConfigPopup from './config-popup'
import cn from '@/utils/classnames'
import Button from '@/app/components/base/button'
import { Settings04 } from '@/app/components/base/icons/src/vender/line/general'
import {
PortalToFollowElem,
PortalToFollowElemContent,
PortalToFollowElemTrigger,
} from '@/app/components/base/portal-to-follow-elem'
const I18N_PREFIX = 'app.tracing'
type Props = {
readOnly: boolean
className?: string
@ -28,7 +26,6 @@ const ConfigBtn: FC<Props> = ({
controlShowPopup,
...popupProps
}) => {
const { t } = useTranslation()
const [open, doSetOpen] = useState(false)
const openRef = useRef(open)
const setOpen = useCallback((v: boolean) => {
@ -50,21 +47,6 @@ const ConfigBtn: FC<Props> = ({
if (popupProps.readOnly && !hasConfigured)
return null
const triggerContent = hasConfigured
? (
<div className={cn(className, 'p-1 rounded-md hover:bg-black/5 cursor-pointer')}>
<Settings04 className='w-4 h-4 text-gray-500' />
</div>
)
: (
<Button variant='primary'
className={cn(className, '!h-8 !px-3 select-none')}
>
<Settings04 className='mr-1 w-4 h-4' />
<span className='text-[13px]'>{t(`${I18N_PREFIX}.config`)}</span>
</Button>
)
return (
<PortalToFollowElem
open={open}
@ -72,11 +54,13 @@ const ConfigBtn: FC<Props> = ({
placement='bottom-end'
offset={{
mainAxis: 12,
crossAxis: hasConfigured ? 8 : 0,
crossAxis: hasConfigured ? 8 : 49,
}}
>
<PortalToFollowElemTrigger onClick={handleTrigger}>
{triggerContent}
<div className={cn(className, 'p-1 rounded-md')}>
<RiEqualizer2Line className='w-4 h-4 text-text-tertiary' />
</div>
</PortalToFollowElemTrigger>
<PortalToFollowElemContent className='z-[11]'>
<ConfigPopup {...popupProps} />

@ -11,6 +11,8 @@ import ProviderConfigModal from './provider-config-modal'
import Indicator from '@/app/components/header/indicator'
import Switch from '@/app/components/base/switch'
import Tooltip from '@/app/components/base/tooltip'
import Divider from '@/app/components/base/divider'
import cn from '@/utils/classnames'
const I18N_PREFIX = 'app.tracing'
@ -77,7 +79,6 @@ const ConfigPopup: FC<PopupProps> = ({
className='ml-3'
defaultValue={enabled}
onChange={onStatusChange}
size='l'
disabled={providerAllNotConfigured}
/>
)
@ -106,15 +107,15 @@ const ConfigPopup: FC<PopupProps> = ({
)
return (
<div className='w-[420px] p-4 rounded-2xl bg-white border-[0.5px] border-black/5 shadow-lg'>
<div className='w-[420px] p-4 rounded-2xl bg-components-panel-bg border-[0.5px] border-components-panel-border shadow-xl'>
<div className='flex justify-between items-center'>
<div className='flex items-center'>
<TracingIcon size='md' className='mr-2' />
<div className='leading-[120%] text-[18px] font-semibold text-gray-900'>{t(`${I18N_PREFIX}.tracing`)}</div>
<div className='text-text-primary title-2xl-semibold'>{t(`${I18N_PREFIX}.tracing`)}</div>
</div>
<div className='flex items-center'>
<Indicator color={enabled ? 'green' : 'gray'} />
<div className='ml-1.5 text-xs font-semibold text-gray-500 uppercase'>
<div className={cn('ml-1 system-xs-semibold-uppercase text-text-tertiary', enabled && 'text-util-colors-green-green-600')}>
{t(`${I18N_PREFIX}.${enabled ? 'enabled' : 'disabled'}`)}
</div>
{!readOnly && (
@ -130,19 +131,18 @@ const ConfigPopup: FC<PopupProps> = ({
: switchContent}
</>
)}
</div>
</div>
<div className='mt-2 leading-4 text-xs font-normal text-gray-500'>
<div className='mt-2 system-xs-regular text-text-tertiary'>
{t(`${I18N_PREFIX}.tracingDescription`)}
</div>
<div className='mt-3 h-px bg-gray-100'></div>
<div className='mt-3'>
<Divider className='my-3' />
<div className='relative'>
{(providerAllConfigured || providerAllNotConfigured)
? (
<>
<div className='leading-4 text-xs font-medium text-gray-500 uppercase'>{t(`${I18N_PREFIX}.configProviderTitle.${providerAllConfigured ? 'configured' : 'notConfigured'}`)}</div>
<div className='system-xs-medium-uppercase text-text-tertiary'>{t(`${I18N_PREFIX}.configProviderTitle.${providerAllConfigured ? 'configured' : 'notConfigured'}`)}</div>
<div className='mt-2 space-y-2'>
{langSmithPanel}
{langfusePanel}
@ -151,11 +151,11 @@ const ConfigPopup: FC<PopupProps> = ({
)
: (
<>
<div className='leading-4 text-xs font-medium text-gray-500 uppercase'>{t(`${I18N_PREFIX}.configProviderTitle.configured`)}</div>
<div className='system-xs-medium-uppercase text-text-tertiary'>{t(`${I18N_PREFIX}.configProviderTitle.configured`)}</div>
<div className='mt-2'>
{langSmithConfig ? langSmithPanel : langfusePanel}
</div>
<div className='mt-3 leading-4 text-xs font-medium text-gray-500 uppercase'>{t(`${I18N_PREFIX}.configProviderTitle.moreProvider`)}</div>
<div className='mt-3 system-xs-medium-uppercase text-text-tertiary'>{t(`${I18N_PREFIX}.configProviderTitle.moreProvider`)}</div>
<div className='mt-2'>
{!langSmithConfig ? langSmithPanel : langfusePanel}
</div>

@ -26,7 +26,7 @@ const Field: FC<Props> = ({
return (
<div className={cn(className)}>
<div className='flex py-[7px]'>
<div className={cn(labelClassName, 'flex items-center h-[18px] text-[13px] font-medium text-gray-900')}>{label} </div>
<div className={cn(labelClassName, 'flex items-center h-[18px] text-[13px] font-medium text-text-primary')}>{label} </div>
{isRequired && <span className='ml-0.5 text-xs font-semibold text-[#D92D20]'>*</span>}
</div>
<Input

@ -1,6 +1,9 @@
'use client'
import type { FC } from 'react'
import React, { useCallback, useEffect, useState } from 'react'
import {
RiArrowDownDoubleLine,
} from '@remixicon/react'
import { useTranslation } from 'react-i18next'
import { usePathname } from 'next/navigation'
import { useBoolean } from 'ahooks'
@ -8,7 +11,6 @@ import type { LangFuseConfig, LangSmithConfig } from './type'
import { TracingProvider } from './type'
import TracingIcon from './tracing-icon'
import ConfigButton from './config-button'
import cn from '@/utils/classnames'
import { LangfuseIcon, LangsmithIcon } from '@/app/components/base/icons/src/public/tracing'
import Indicator from '@/app/components/header/indicator'
import { fetchTracingConfig as doFetchTracingConfig, fetchTracingStatus, updateTracingStatus } from '@/service/apps'
@ -16,6 +18,8 @@ import type { TracingStatus } from '@/models/app'
import Toast from '@/app/components/base/toast'
import { useAppContext } from '@/context/app-context'
import Loading from '@/app/components/base/loading'
import Divider from '@/app/components/base/divider'
import cn from '@/utils/classnames'
const I18N_PREFIX = 'app.tracing'
@ -27,7 +31,7 @@ const Title = ({
const { t } = useTranslation()
return (
<div className={cn(className, 'flex items-center text-lg font-semibold text-gray-900')}>
<div className={cn('flex items-center system-xl-semibold text-text-primary', className)}>
{t('common.appMenus.overview')}
</div>
)
@ -135,43 +139,68 @@ const Panel: FC = () => {
return (
<div className={cn('mb-3 flex justify-between items-center')}>
<Title className='h-[41px]' />
<div className='flex items-center p-2 rounded-xl border-[0.5px] border-gray-200 shadow-xs cursor-pointer hover:bg-gray-100' onClick={showPopup}>
{!inUseTracingProvider
? <>
<TracingIcon size='md' className='mr-2' />
<div className='leading-5 text-sm font-semibold text-gray-700'>{t(`${I18N_PREFIX}.title`)}</div>
</>
: <InUseProviderIcon className='ml-1 h-4' />}
{hasConfiguredTracing && (
<div className='ml-4 mr-1 flex items-center'>
<Indicator color={enabled ? 'green' : 'gray'} />
<div className='ml-1.5 text-xs font-semibold text-gray-500 uppercase'>
{t(`${I18N_PREFIX}.${enabled ? 'enabled' : 'disabled'}`)}
<div
className={cn(
'flex items-center p-2 rounded-xl bg-background-default-dodge border-t border-l-[0.5px] border-effects-highlight shadow-xs cursor-pointer hover:bg-background-default-lighter hover:border-effects-highlight-lightmode-off',
controlShowPopup && 'bg-background-default-lighter border-effects-highlight-lightmode-off',
)}
onClick={showPopup}
>
{!inUseTracingProvider && (
<>
<TracingIcon size='md' />
<div className='mx-2 system-sm-semibold text-text-secondary'>{t(`${I18N_PREFIX}.title`)}</div>
<div className='flex items-center' onClick={e => e.stopPropagation()}>
<ConfigButton
appId={appId}
readOnly={readOnly}
hasConfigured={false}
enabled={enabled}
onStatusChange={handleTracingEnabledChange}
chosenProvider={inUseTracingProvider}
onChooseProvider={handleChooseProvider}
langSmithConfig={langSmithConfig}
langFuseConfig={langFuseConfig}
onConfigUpdated={handleTracingConfigUpdated}
onConfigRemoved={handleTracingConfigRemoved}
controlShowPopup={controlShowPopup}
/>
</div>
<Divider type='vertical' className='h-3.5' />
<div className='p-1 rounded-md'>
<RiArrowDownDoubleLine className='w-4 h-4 text-text-tertiary' />
</div>
</div>
</>
)}
{hasConfiguredTracing && (
<div className='ml-2 w-px h-3.5 bg-gray-200'></div>
<>
<div className='ml-4 mr-1 flex items-center'>
<Indicator color={enabled ? 'green' : 'gray'} />
<div className='ml-1.5 system-xs-semibold-uppercase text-text-tertiary'>
{t(`${I18N_PREFIX}.${enabled ? 'enabled' : 'disabled'}`)}
</div>
</div>
<InUseProviderIcon className='ml-1 h-4' />
<Divider type='vertical' className='h-3.5' />
<div className='flex items-center' onClick={e => e.stopPropagation()}>
<ConfigButton
appId={appId}
readOnly={readOnly}
hasConfigured
className='ml-2'
enabled={enabled}
onStatusChange={handleTracingEnabledChange}
chosenProvider={inUseTracingProvider}
onChooseProvider={handleChooseProvider}
langSmithConfig={langSmithConfig}
langFuseConfig={langFuseConfig}
onConfigUpdated={handleTracingConfigUpdated}
onConfigRemoved={handleTracingConfigRemoved}
controlShowPopup={controlShowPopup}
/>
</div>
</>
)}
<div className='flex items-center' onClick={e => e.stopPropagation()}>
<ConfigButton
appId={appId}
readOnly={readOnly}
hasConfigured
className='ml-2'
enabled={enabled}
onStatusChange={handleTracingEnabledChange}
chosenProvider={inUseTracingProvider}
onChooseProvider={handleChooseProvider}
langSmithConfig={langSmithConfig}
langFuseConfig={langFuseConfig}
onConfigUpdated={handleTracingConfigUpdated}
onConfigRemoved={handleTracingConfigRemoved}
controlShowPopup={controlShowPopup}
/>
</div>
</div>
</div>
)

@ -17,6 +17,7 @@ import { LinkExternal02 } from '@/app/components/base/icons/src/vender/line/gene
import Confirm from '@/app/components/base/confirm'
import { addTracingConfig, removeTracingConfig, updateTracingConfig } from '@/service/apps'
import Toast from '@/app/components/base/toast'
import Divider from '@/app/components/base/divider'
type Props = {
appId: string
@ -152,11 +153,11 @@ const ProviderConfigModal: FC<Props> = ({
? (
<PortalToFollowElem open>
<PortalToFollowElemContent className='w-full h-full z-[60]'>
<div className='fixed inset-0 flex items-center justify-center bg-black/[.25]'>
<div className='mx-2 w-[640px] max-h-[calc(100vh-120px)] bg-white shadow-xl rounded-2xl overflow-y-auto'>
<div className='fixed inset-0 flex items-center justify-center bg-background-overlay'>
<div className='mx-2 w-[640px] max-h-[calc(100vh-120px)] bg-components-panel-bg shadow-xl rounded-2xl overflow-y-auto'>
<div className='px-8 pt-8'>
<div className='flex justify-between items-center mb-4'>
<div className='text-xl font-semibold text-gray-900'>{t(`${I18N_PREFIX}.title`)}{t(`app.tracing.${type}.title`)}</div>
<div className='title-2xl-semibold text-text-primary'>{t(`${I18N_PREFIX}.title`)}{t(`app.tracing.${type}.title`)}</div>
</div>
<div className='space-y-4'>
@ -230,16 +231,16 @@ const ProviderConfigModal: FC<Props> = ({
{isEdit && (
<>
<Button
className='h-9 text-sm font-medium text-gray-700'
className='h-9 text-sm font-medium text-text-secondary'
onClick={showRemoveConfirm}
>
<span className='text-[#D92D20]'>{t('common.operation.remove')}</span>
</Button>
<div className='mx-3 w-px h-[18px] bg-gray-200'></div>
<Divider className='mx-3 h-[18px]'/>
</>
)}
<Button
className='mr-2 h-9 text-sm font-medium text-gray-700'
className='mr-2 h-9 text-sm font-medium text-text-secondary'
onClick={onCancel}
>
{t('common.operation.cancel')}
@ -256,9 +257,9 @@ const ProviderConfigModal: FC<Props> = ({
</div>
</div>
<div className='border-t-[0.5px] border-t-black/5'>
<div className='flex justify-center items-center py-3 bg-gray-50 text-xs text-gray-500'>
<Lock01 className='mr-1 w-3 h-3 text-gray-500' />
<div className='border-t-[0.5px] border-divider-regular'>
<div className='flex justify-center items-center py-3 bg-background-section-burn text-xs text-text-tertiary'>
<Lock01 className='mr-1 w-3 h-3 text-text-tertiary' />
{t('common.modelProvider.encrypted.front')}
<a
className='text-primary-600 mx-1'

@ -1,11 +1,13 @@
'use client'
import type { FC } from 'react'
import React, { useCallback } from 'react'
import {
RiEqualizer2Line,
} from '@remixicon/react'
import { useTranslation } from 'react-i18next'
import { TracingProvider } from './type'
import cn from '@/utils/classnames'
import { LangfuseIconBig, LangsmithIconBig } from '@/app/components/base/icons/src/public/tracing'
import { Settings04 } from '@/app/components/base/icons/src/vender/line/general'
import { Eye as View } from '@/app/components/base/icons/src/vender/solid/general'
const I18N_PREFIX = 'app.tracing'
@ -61,34 +63,37 @@ const ProviderPanel: FC<Props> = ({
}, [hasConfigured, isChosen, onChoose, readOnly])
return (
<div
className={cn(isChosen ? 'border-primary-400' : 'border-transparent', !isChosen && hasConfigured && !readOnly && 'cursor-pointer', 'px-4 py-3 rounded-xl border-[1.5px] bg-gray-100')}
className={cn(
'px-4 py-3 rounded-xl border-[1.5px] bg-background-section-burn',
isChosen ? 'bg-background-section border-components-option-card-option-selected-border' : 'border-transparent',
!isChosen && hasConfigured && !readOnly && 'cursor-pointer',
)}
onClick={handleChosen}
>
<div className={'flex justify-between items-center space-x-1'}>
<div className='flex items-center'>
<Icon className='h-6' />
{isChosen && <div className='ml-1 flex items-center h-4 px-1 rounded-[4px] border border-primary-500 leading-4 text-xs font-medium text-primary-500 uppercase '>{t(`${I18N_PREFIX}.inUse`)}</div>}
{isChosen && <div className='ml-1 flex items-center h-4 px-1 rounded-[4px] border border-text-accent-secondary system-2xs-medium-uppercase text-text-accent-secondary'>{t(`${I18N_PREFIX}.inUse`)}</div>}
</div>
{!readOnly && (
<div className={'flex justify-between items-center space-x-1'}>
{hasConfigured && (
<div className='flex px-2 items-center h-6 bg-white rounded-md border-[0.5px] border-gray-200 shadow-xs cursor-pointer text-gray-700 space-x-1' onClick={viewBtnClick} >
<div className='flex px-2 items-center h-6 bg-components-button-secondary-bg rounded-md border-[0.5px] border-components-button-secondary-border shadow-xs cursor-pointer text-text-secondary space-x-1' onClick={viewBtnClick} >
<View className='w-3 h-3'/>
<div className='text-xs font-medium'>{t(`${I18N_PREFIX}.view`)}</div>
</div>
)}
<div
className='flex px-2 items-center h-6 bg-white rounded-md border-[0.5px] border-gray-200 shadow-xs cursor-pointer text-gray-700 space-x-1'
className='flex px-2 items-center h-6 bg-components-button-secondary-bg rounded-md border-[0.5px] border-components-button-secondary-border shadow-xs cursor-pointer text-text-secondary space-x-1'
onClick={handleConfigBtnClick}
>
<Settings04 className='w-3 h-3' />
<RiEqualizer2Line className='w-3 h-3' />
<div className='text-xs font-medium'>{t(`${I18N_PREFIX}.config`)}</div>
</div>
</div>
)}
</div>
<div className='mt-2 leading-4 text-xs font-normal text-gray-500'>
<div className='mt-2 system-xs-regular text-text-tertiary'>
{t(`${I18N_PREFIX}.${type}.description`)}
</div>
</div>

@ -1,45 +0,0 @@
'use client'
import { ChevronDoubleDownIcon } from '@heroicons/react/20/solid'
import type { FC } from 'react'
import { useTranslation } from 'react-i18next'
import React, { useCallback } from 'react'
import Tooltip from '@/app/components/base/tooltip'
const I18N_PREFIX = 'app.tracing'
type Props = {
isFold: boolean
onFoldChange: (isFold: boolean) => void
}
const ToggleFoldBtn: FC<Props> = ({
isFold,
onFoldChange,
}) => {
const { t } = useTranslation()
const handleFoldChange = useCallback((e: React.MouseEvent<HTMLDivElement>) => {
e.stopPropagation()
onFoldChange(!isFold)
}, [isFold, onFoldChange])
return (
// text-[0px] to hide spacing between tooltip elements
<div className='shrink-0 cursor-pointer text-[0px]' onClick={handleFoldChange}>
<Tooltip
popupContent={t(`${I18N_PREFIX}.${isFold ? 'expand' : 'collapse'}`)}
>
{isFold && (
<div className='p-1 rounded-md text-gray-500 hover:text-gray-800 hover:bg-black/5'>
<ChevronDoubleDownIcon className='w-4 h-4' />
</div>
)}
{!isFold && (
<div className='p-2 rounded-lg text-gray-500 border-[0.5px] border-gray-200 hover:text-gray-800 hover:bg-black/5'>
<ChevronDoubleDownIcon className='w-4 h-4 transform rotate-180' />
</div>
)}
</Tooltip>
</div>
)
}
export default React.memo(ToggleFoldBtn)

@ -26,7 +26,7 @@ import { useTabSearchParams } from '@/hooks/use-tab-searchparams'
import { useStore as useTagStore } from '@/app/components/base/tag-management/store'
import { useAppContext } from '@/context/app-context'
import { useExternalApiPanel } from '@/context/external-api-panel-context'
// eslint-disable-next-line import/order
import { useQuery } from '@tanstack/react-query'
import Input from '@/app/components/base/input'

@ -0,0 +1,20 @@
import PluginPage from '@/app/components/plugins/plugin-page'
import PluginsPanel from '@/app/components/plugins/plugin-page/plugins-panel'
import Marketplace from '@/app/components/plugins/marketplace'
import { getLocaleOnServer } from '@/i18n/server'
const PluginList = async () => {
const locale = await getLocaleOnServer()
return (
<PluginPage
plugins={<PluginsPanel />}
marketplace={<Marketplace locale={locale} pluginTypeSwitchClassName='top-[60px]' searchBoxAutoAnimate={false} />}
/>
)
}
export const metadata = {
title: 'Plugins - Dify',
}
export default PluginList

@ -8,7 +8,7 @@ import { logout } from '@/service/common'
import { useAppContext } from '@/context/app-context'
import { LogOut01 } from '@/app/components/base/icons/src/vender/line/general'
export type IAppSelector = {
export interface IAppSelector {
isMobile: boolean
}

@ -60,18 +60,18 @@ export default function AppBasic({ icon, icon_background, name, isExternal, type
return (
<div className="flex items-start p-1">
{icon && icon_background && iconType === 'app' && (
<div className='flex-shrink-0 mr-3'>
<div className='shrink-0 mr-3'>
<AppIcon icon={icon} background={icon_background} />
</div>
)}
{iconType !== 'app'
&& <div className='flex-shrink-0 mr-3'>
&& <div className='shrink-0 mr-3'>
{ICON_MAP[iconType]}
</div>
}
{mode === 'expand' && <div className="group">
<div className={`flex flex-row items-center text-sm font-semibold text-gray-700 group-hover:text-gray-900 break-all ${textStyle?.main ?? ''}`}>
<div className={`flex flex-row items-center text-sm font-semibold text-text-secondary group-hover:text-text-primary break-all ${textStyle?.main ?? ''}`}>
{name}
{hoverTip
&& <Tooltip
@ -86,7 +86,7 @@ export default function AppBasic({ icon, icon_background, name, isExternal, type
/>
}
</div>
<div className={`text-xs font-normal text-gray-500 group-hover:text-gray-700 break-all ${textStyle?.extra ?? ''}`}>{type}</div>
<div className={`text-xs font-normal text-text-tertiary group-hover:text-text-secondary break-all ${textStyle?.extra ?? ''}`}>{type}</div>
<div className='text-text-tertiary system-2xs-medium-uppercase'>{isExternal ? t('dataset.externalTag') : ''}</div>
</div>}
</div>

@ -6,11 +6,11 @@ import useSWR from 'swr'
import Input from '@/app/components/base/input'
import { fetchAnnotationsCount } from '@/service/log'
export type QueryParam = {
export interface QueryParam {
keyword?: string
}
type IFilterProps = {
interface IFilterProps {
appId: string
queryParams: QueryParam
setQueryParams: (v: QueryParam) => void

@ -9,7 +9,7 @@ import ActionButton from '@/app/components/base/action-button'
import useTimestamp from '@/hooks/use-timestamp'
import cn from '@/utils/classnames'
type Props = {
interface Props {
list: AnnotationItem[]
onRemove: (id: string) => void
onView: (item: AnnotationItem) => void

@ -23,7 +23,7 @@ const FeaturePanel: FC<IFeaturePanelProps> = ({
children,
}) => {
return (
<div className={cn('rounded-xl border-t-[0.5px] border-l-[0.5px] bg-background-section-burn pb-3', noBodySpacing && '!pb-0', className)}>
<div className={cn('rounded-xl border-t-[0.5px] border-l-[0.5px] bg-background-section-burn pb-3', noBodySpacing && 'pb-0', className)}>
{/* Header */}
<div className={cn('px-3 pt-2', hasHeaderBottomBorder && 'border-b border-divider-subtle')}>
<div className='flex justify-between items-center h-8'>

@ -9,7 +9,7 @@ import { MessageClockCircle } from '@/app/components/base/icons/src/vender/solid
import I18n from '@/context/i18n'
import { LanguagesSupported } from '@/i18n/language'
type Props = {
interface Props {
showWarning: boolean
onShowEditModal: () => void
}

@ -9,7 +9,7 @@ import ConfirmAddVar from './confirm-add-var'
import s from './style.module.css'
import PromptEditorHeightResizeWrap from './prompt-editor-height-resize-wrap'
import cn from '@/utils/classnames'
import { type PromptVariable } from '@/models/debug'
import type { PromptVariable } from '@/models/debug'
import Tooltip from '@/app/components/base/tooltip'
import type { CompletionParams } from '@/types/app'
import { AppType } from '@/types/app'

@ -3,7 +3,7 @@ import type { FC } from 'react'
import React from 'react'
import cn from '@/utils/classnames'
type Props = {
interface Props {
className?: string
title: string
children: JSX.Element

@ -23,7 +23,7 @@ import { DEFAULT_VALUE_MAX_LEN } from '@/config'
const TEXT_MAX_LENGTH = 256
export type IConfigModalProps = {
export interface IConfigModalProps {
isCreate?: boolean
payload?: InputVar
isShow: boolean

@ -3,7 +3,7 @@ import type { FC } from 'react'
import React, { useEffect } from 'react'
import Input from '@/app/components/base/input'
export type IConfigStringProps = {
export interface IConfigStringProps {
value: number | undefined
maxLength: number
modelId: string
@ -28,7 +28,7 @@ const ConfigString: FC<IConfigStringProps> = ({
min={1}
value={value || ''}
onChange={(e) => {
let value = parseInt(e.target.value, 10)
let value = Number.parseInt(e.target.value, 10)
if (value > maxLength)
value = maxLength

@ -3,7 +3,6 @@ import type { FC } from 'react'
import React, { useState } from 'react'
import { useTranslation } from 'react-i18next'
import { useBoolean } from 'ahooks'
import type { Timeout } from 'ahooks/lib/useRequest/src/types'
import { useContext } from 'use-context-selector'
import produce from 'immer'
import {
@ -34,7 +33,7 @@ import { InputVarType } from '@/app/components/workflow/types'
export const ADD_EXTERNAL_DATA_TOOL = 'ADD_EXTERNAL_DATA_TOOL'
type ExternalDataToolParams = {
interface ExternalDataToolParams {
key: string
type: string
index: number
@ -44,13 +43,13 @@ type ExternalDataToolParams = {
icon_background?: string
}
export type IConfigVarProps = {
export interface IConfigVarProps {
promptVariables: PromptVariable[]
readonly?: boolean
onPromptVariablesChange?: (promptVariables: PromptVariable[]) => void
}
let conflictTimer: Timeout
let conflictTimer: number
const ConfigVar: FC<IConfigVarProps> = ({ promptVariables, readonly, onPromptVariablesChange }) => {
const { t } = useTranslation()
@ -107,7 +106,7 @@ const ConfigVar: FC<IConfigVarProps> = ({ promptVariables, readonly, onPromptVar
onPromptVariablesChange?.(newPromptVariables)
}
const updatePromptKey = (index: number, newKey: string) => {
clearTimeout(conflictTimer)
window.clearTimeout(conflictTimer)
const { isValid, errorKey, errorMessageKey } = checkKeys([newKey], true)
if (!isValid) {
Toast.notify({
@ -127,7 +126,7 @@ const ConfigVar: FC<IConfigVarProps> = ({ promptVariables, readonly, onPromptVar
return item
})
conflictTimer = setTimeout(() => {
conflictTimer = window.setTimeout(() => {
const isKeyExists = promptVariables.some(item => item.key?.trim() === newKey.trim())
if (isKeyExists) {
Toast.notify({

@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next'
import cn from '@/utils/classnames'
import type { InputVarType } from '@/app/components/workflow/types'
import InputVarTypeIcon from '@/app/components/workflow/nodes/_base/components/input-var-type-icon'
export type ISelectTypeItemProps = {
export interface ISelectTypeItemProps {
type: InputVarType
selected: boolean
onClick: () => void

@ -1,21 +1,25 @@
'use client'
import type { FC } from 'react'
import React, { useState } from 'react'
import React, { useMemo, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { useContext } from 'use-context-selector'
import copy from 'copy-to-clipboard'
import produce from 'immer'
import {
RiDeleteBinLine,
RiEqualizer2Line,
RiHammerFill,
RiInformation2Line,
} from '@remixicon/react'
import { useFormattingChangedDispatcher } from '../../../debug/hooks'
import SettingBuiltInTool from './setting-built-in-tool'
import cn from '@/utils/classnames'
import Panel from '@/app/components/app/configuration/base/feature-panel'
import { InfoCircle } from '@/app/components/base/icons/src/vender/line/general'
import OperationBtn from '@/app/components/app/configuration/base/operation-btn'
import AppIcon from '@/app/components/base/app-icon'
import Button from '@/app/components/base/button'
import Indicator from '@/app/components/header/indicator'
import Switch from '@/app/components/base/switch'
import Toast from '@/app/components/base/toast'
import ConfigContext from '@/context/debug-configuration'
import type { AgentTool } from '@/types/app'
import { type Collection, CollectionType } from '@/app/components/tools/types'
@ -23,7 +27,12 @@ import { MAX_TOOLS_NUM } from '@/config'
import { AlertTriangle } from '@/app/components/base/icons/src/vender/solid/alertsAndFeedback'
import Tooltip from '@/app/components/base/tooltip'
import { DefaultToolIcon } from '@/app/components/base/icons/src/public/other'
import AddToolModal from '@/app/components/tools/add-tool-modal'
// import AddToolModal from '@/app/components/tools/add-tool-modal'
import ConfigCredential from '@/app/components/tools/setting/build-in/config-credentials'
import { updateBuiltInToolCredential } from '@/service/tools'
import cn from '@/utils/classnames'
import ToolPicker from '@/app/components/workflow/block-selector/tool-picker'
import type { ToolDefaultValue } from '@/app/components/workflow/block-selector/types'
type AgentToolWithMoreInfo = AgentTool & { icon: any; collection?: Collection } | null
const AgentTools: FC = () => {
@ -33,9 +42,19 @@ const AgentTools: FC = () => {
const formattingChangedDispatcher = useFormattingChangedDispatcher()
const [currentTool, setCurrentTool] = useState<AgentToolWithMoreInfo>(null)
const currentCollection = useMemo(() => {
if (!currentTool) return null
const collection = collectionList.find(collection => collection.id.split('/').pop() === currentTool?.provider_id.split('/').pop() && collection.type === currentTool?.provider_type)
return collection
}, [currentTool, collectionList])
const [isShowSettingTool, setIsShowSettingTool] = useState(false)
const [isShowSettingAuth, setShowSettingAuth] = useState(false)
const tools = (modelConfig?.agentConfig?.tools as AgentTool[] || []).map((item) => {
const collection = collectionList.find(collection => collection.id === item.provider_id && collection.type === item.provider_type)
const collection = collectionList.find(
collection =>
collection.id.split('/').pop() === item.provider_id.split('/').pop()
&& collection.type === item.provider_type,
)
const icon = collection?.icon
return {
...item,
@ -55,10 +74,39 @@ const AgentTools: FC = () => {
formattingChangedDispatcher()
}
const handleToolAuthSetting = (value: any) => {
const newModelConfig = produce(modelConfig, (draft) => {
const tool = (draft.agentConfig.tools).find((item: any) => item.provider_id === value?.collection?.id && item.tool_name === value?.tool_name)
if (tool)
(tool as AgentTool).notAuthor = false
})
setModelConfig(newModelConfig)
setIsShowSettingTool(false)
formattingChangedDispatcher()
}
const [isDeleting, setIsDeleting] = useState<number>(-1)
const handleSelectTool = (tool: ToolDefaultValue) => {
const newModelConfig = produce(modelConfig, (draft) => {
draft.agentConfig.tools.push({
provider_id: tool.provider_id,
provider_type: tool.provider_type as CollectionType,
provider_name: tool.provider_name,
tool_name: tool.tool_name,
tool_label: tool.tool_label,
tool_parameters: tool.params,
notAuthor: !tool.is_team_authorization,
enabled: true,
})
})
setModelConfig(newModelConfig)
}
return (
<>
<Panel
className="mt-2"
className={cn('mt-2', tools.length === 0 && 'pb-2')}
noBodySpacing={tools.length === 0}
headerIcon={
<RiHammerFill className='w-4 h-4 text-primary-500' />
@ -81,7 +129,14 @@ const AgentTools: FC = () => {
{tools.length < MAX_TOOLS_NUM && (
<>
<div className='ml-3 mr-1 h-3.5 w-px bg-gray-200'></div>
<OperationBtn type="add" onClick={() => setIsShowChooseTool(true)} />
<ToolPicker
trigger={<OperationBtn type="add" />}
isShow={isShowChooseTool}
onShowChange={setIsShowChooseTool}
disabled={false}
supportAddCustomTool
onSelect={handleSelectTool}
/>
</>
)}
</div>
@ -90,72 +145,77 @@ const AgentTools: FC = () => {
<div className='grid gap-1 grid-cols-1 2xl:grid-cols-2 items-center flex-wrap justify-between'>
{tools.map((item: AgentTool & { icon: any; collection?: Collection }, index) => (
<div key={index}
className={cn((item.isDeleted || item.notAuthor) ? 'bg-white/50' : 'bg-white', (item.enabled && !item.isDeleted && !item.notAuthor) && 'shadow-xs', index > 1 && 'mt-1', 'group relative flex justify-between items-center last-of-type:mb-0 pl-2.5 py-2 pr-3 w-full rounded-lg border-[0.5px] border-gray-200 ')}
className={cn(
'group relative flex justify-between items-center last-of-type:mb-0 p-1.5 pr-2 w-full bg-components-panel-on-panel-item-bg rounded-lg border-[0.5px] border-components-panel-border-subtle shadow-xs hover:bg-components-panel-on-panel-item-bg-hover hover:shadow-sm cursor',
isDeleting === index && 'hover:bg-state-destructive-hover border-state-destructive-border',
)}
>
<div className='grow w-0 flex items-center'>
{(item.isDeleted || item.notAuthor)
? (
<DefaultToolIcon className='w-6 h-6' />
)
: (
typeof item.icon === 'string'
? (
<div
className='w-6 h-6 bg-cover bg-center rounded-md'
style={{
backgroundImage: `url(${item.icon})`,
}}
></div>
)
: (
<AppIcon
className='rounded-md'
size='tiny'
icon={item.icon?.content}
background={item.icon?.background}
/>
))}
{item.isDeleted && <DefaultToolIcon className='w-5 h-5' />}
{!item.isDeleted && (
<div className={cn((item.notAuthor || !item.enabled) && 'opacity-50')}>
{typeof item.icon === 'string' && <div className='w-5 h-5 bg-cover bg-center rounded-md' style={{ backgroundImage: `url(${item.icon})` }} />}
{typeof item.icon !== 'string' && <AppIcon className='rounded-md' size='xs' icon={item.icon?.content} background={item.icon?.background} />}
</div>
)}
<div
className={cn((item.isDeleted || item.notAuthor) ? 'line-through opacity-50' : '', 'grow w-0 ml-2 leading-[18px] text-[13px] font-medium text-gray-800 truncate')}
className={cn(
'grow w-0 ml-1.5 flex items-center system-xs-regular truncate',
(item.isDeleted || item.notAuthor || !item.enabled) ? 'opacity-50' : '',
)}
>
<span className='text-gray-800 pr-2'>{item.provider_type === CollectionType.builtIn ? item.provider_name : item.tool_label}</span>
<Tooltip
popupContent={t('tools.toolNameUsageTip')}
>
<span className='text-gray-500'>{item.tool_name}</span>
</Tooltip>
<span className='text-text-secondary system-xs-medium pr-1.5'>{item.provider_type === CollectionType.builtIn ? item.provider_name.split('/').pop() : item.tool_label}</span>
<span className='text-text-tertiary'>{item.tool_name}</span>
{!item.isDeleted && (
<Tooltip
needsDelay
popupContent={
<div className='w-[180px]'>
<div className='mb-1.5 text-text-secondary'>{item.tool_name}</div>
<div className='mb-1.5 text-text-tertiary'>{t('tools.toolNameUsageTip')}</div>
<div className='text-text-accent cursor-pointer' onClick={() => copy(item.tool_name)}>{t('tools.copyToolName')}</div>
</div>
}
>
<div className='w-4 h-4'>
<div className='hidden group-hover:inline-block ml-0.5'>
<RiInformation2Line className='w-4 h-4 text-text-tertiary' />
</div>
</div>
</Tooltip>
)}
</div>
</div>
<div className='shrink-0 ml-1 flex items-center'>
{(item.isDeleted || item.notAuthor)
? (
<div className='flex items-center'>
<Tooltip
popupContent={t(`tools.${item.isDeleted ? 'toolRemoved' : 'notAuthorized'}`)}
needsDelay
>
<div className='mr-1 p-1 rounded-md hover:bg-black/5 cursor-pointer' onClick={() => {
if (item.notAuthor)
setIsShowChooseTool(true)
}}>
<AlertTriangle className='w-4 h-4 text-[#F79009]' />
</div>
</Tooltip>
<div className='p-1 rounded-md hover:bg-black/5 cursor-pointer' onClick={() => {
{item.isDeleted && (
<div className='flex items-center mr-2'>
<Tooltip
popupContent={t('tools.toolRemoved')}
needsDelay
>
<div className='mr-1 p-1 rounded-md hover:bg-black/5 cursor-pointer'>
<AlertTriangle className='w-4 h-4 text-[#F79009]' />
</div>
</Tooltip>
<div
className='p-1 rounded-md text-text-tertiary cursor-pointer hover:text-text-destructive'
onClick={() => {
const newModelConfig = produce(modelConfig, (draft) => {
draft.agentConfig.tools.splice(index, 1)
})
setModelConfig(newModelConfig)
formattingChangedDispatcher()
}}>
<RiDeleteBinLine className='w-4 h-4 text-gray-500' />
</div>
<div className='ml-2 mr-3 w-px h-3.5 bg-gray-200'></div>
}}
onMouseOver={() => setIsDeleting(index)}
onMouseLeave={() => setIsDeleting(-1)}
>
<RiDeleteBinLine className='w-4 h-4' />
</div>
)
: (
<div className='hidden group-hover:flex items-center'>
</div>
)}
{!item.isDeleted && (
<div className='hidden group-hover:flex items-center gap-1 mr-2'>
{!item.notAuthor && (
<Tooltip
popupContent={t('tools.setBuiltInTools.infoAndSetting')}
needsDelay
@ -164,55 +224,81 @@ const AgentTools: FC = () => {
setCurrentTool(item)
setIsShowSettingTool(true)
}}>
<InfoCircle className='w-4 h-4 text-gray-500' />
<RiEqualizer2Line className='w-4 h-4 text-text-tertiary' />
</div>
</Tooltip>
<div className='p-1 rounded-md hover:bg-black/5 cursor-pointer' onClick={() => {
)}
<div
className='p-1 rounded-md text-text-tertiary cursor-pointer hover:text-text-destructive'
onClick={() => {
const newModelConfig = produce(modelConfig, (draft) => {
draft.agentConfig.tools.splice(index, 1)
})
setModelConfig(newModelConfig)
formattingChangedDispatcher()
}}>
<RiDeleteBinLine className='w-4 h-4 text-gray-500' />
</div>
<div className='ml-2 mr-3 w-px h-3.5 bg-gray-200'></div>
}}
onMouseOver={() => setIsDeleting(index)}
onMouseLeave={() => setIsDeleting(-1)}
>
<RiDeleteBinLine className='w-4 h-4' />
</div>
</div>
)}
<div className={cn(item.isDeleted && 'opacity-50')}>
{!item.notAuthor && (
<Switch
defaultValue={item.isDeleted ? false : item.enabled}
disabled={item.isDeleted}
size='md'
onChange={(enabled) => {
const newModelConfig = produce(modelConfig, (draft) => {
(draft.agentConfig.tools[index] as any).enabled = enabled
})
setModelConfig(newModelConfig)
formattingChangedDispatcher()
}} />
)}
{item.notAuthor && (
<Button variant='secondary' size='small' onClick={() => {
setCurrentTool(item)
setShowSettingAuth(true)
}}>
{t('tools.notAuthorized')}
<Indicator className='ml-2' color='orange' />
</Button>
)}
<div className={cn((item.isDeleted || item.notAuthor) && 'opacity-50')}>
<Switch
defaultValue={(item.isDeleted || item.notAuthor) ? false : item.enabled}
disabled={(item.isDeleted || item.notAuthor)}
size='md'
onChange={(enabled) => {
const newModelConfig = produce(modelConfig, (draft) => {
(draft.agentConfig.tools[index] as any).enabled = enabled
})
setModelConfig(newModelConfig)
formattingChangedDispatcher()
}} />
</div>
</div>
</div>
))}
</div >
</Panel >
{isShowChooseTool && (
<AddToolModal onHide={() => setIsShowChooseTool(false)} />
{isShowSettingTool && (
<SettingBuiltInTool
toolName={currentTool?.tool_name as string}
setting={currentTool?.tool_parameters as any}
collection={currentTool?.collection as Collection}
isBuiltIn={currentTool?.collection?.type === CollectionType.builtIn}
isModel={currentTool?.collection?.type === CollectionType.model}
onSave={handleToolSettingChange}
onHide={() => setIsShowSettingTool(false)}
/>
)}
{isShowSettingAuth && (
<ConfigCredential
collection={currentCollection as any}
onCancel={() => setShowSettingAuth(false)}
onSaved={async (value) => {
await updateBuiltInToolCredential((currentCollection as any).name, value)
Toast.notify({
type: 'success',
message: t('common.api.actionSuccess'),
})
handleToolAuthSetting(currentTool as any)
setShowSettingAuth(false)
}}
/>
)}
{
isShowSettingTool && (
<SettingBuiltInTool
toolName={currentTool?.tool_name as string}
setting={currentTool?.tool_parameters as any}
collection={currentTool?.collection as Collection}
isBuiltIn={currentTool?.collection?.type === CollectionType.builtIn}
isModel={currentTool?.collection?.type === CollectionType.model}
onSave={handleToolSettingChange}
onHide={() => setIsShowSettingTool(false)}
/>)
}
</>
)
}

@ -3,21 +3,30 @@ import type { FC } from 'react'
import React, { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { useContext } from 'use-context-selector'
import cn from '@/utils/classnames'
import Drawer from '@/app/components/base/drawer-plus'
import {
RiArrowLeftLine,
RiCloseLine,
} from '@remixicon/react'
import Drawer from '@/app/components/base/drawer'
import Loading from '@/app/components/base/loading'
import ActionButton from '@/app/components/base/action-button'
import Icon from '@/app/components/plugins/card/base/card-icon'
import OrgInfo from '@/app/components/plugins/card/base/org-info'
import Description from '@/app/components/plugins/card/base/description'
import TabSlider from '@/app/components/base/tab-slider-plain'
import Button from '@/app/components/base/button'
import Form from '@/app/components/header/account-setting/model-provider-page/model-modal/Form'
import { addDefaultValue, toolParametersToFormSchemas } from '@/app/components/tools/utils/to-form-schema'
import type { Collection, Tool } from '@/app/components/tools/types'
import { CollectionType } from '@/app/components/tools/types'
import { fetchBuiltInToolList, fetchCustomToolList, fetchModelToolList, fetchWorkflowToolList } from '@/service/tools'
import I18n from '@/context/i18n'
import Button from '@/app/components/base/button'
import Loading from '@/app/components/base/loading'
import { DiagonalDividingLine } from '@/app/components/base/icons/src/public/common'
import { getLanguage } from '@/i18n/language'
import AppIcon from '@/app/components/base/app-icon'
import cn from '@/utils/classnames'
type Props = {
showBackButton?: boolean
collection: Collection
isBuiltIn?: boolean
isModel?: boolean
@ -29,6 +38,7 @@ type Props = {
}
const SettingBuiltInTool: FC<Props> = ({
showBackButton = false,
collection,
isBuiltIn = true,
isModel = true,
@ -96,39 +106,38 @@ const SettingBuiltInTool: FC<Props> = ({
return valid
})()
const infoUI = (
<div className='pt-2'>
<div className='leading-5 text-sm font-medium text-gray-900'>
{t('tools.setBuiltInTools.toolDescription')}
</div>
<div className='mt-1 leading-[18px] text-xs font-normal text-gray-600'>
{currTool?.description[language]}
</div>
const getType = (type: string) => {
if (type === 'number-input')
return t('tools.setBuiltInTools.number')
if (type === 'text-input')
return t('tools.setBuiltInTools.string')
if (type === 'file')
return t('tools.setBuiltInTools.file')
return type
}
const infoUI = (
<div className=''>
{infoSchemas.length > 0 && (
<div className='mt-6'>
<div className='flex items-center mb-4 leading-[18px] text-xs font-semibold text-gray-500 uppercase'>
<div className='mr-3'>{t('tools.setBuiltInTools.parameters')}</div>
<div className='grow w-0 h-px bg-[#f3f4f6]'></div>
</div>
<div className='space-y-4'>
{infoSchemas.map((item: any, index) => (
<div key={index}>
<div className='flex items-center space-x-2 leading-[18px]'>
<div className='text-[13px] font-semibold text-gray-900'>{item.label[language]}</div>
<div className='text-xs font-medium text-gray-500'>{item.type === 'number-input' ? t('tools.setBuiltInTools.number') : t('tools.setBuiltInTools.string')}</div>
{item.required && (
<div className='text-xs font-medium text-[#EC4A0A]'>{t('tools.setBuiltInTools.required')}</div>
)}
<div className='py-2 space-y-1'>
{infoSchemas.map((item: any, index) => (
<div key={index} className='py-1'>
<div className='flex items-center gap-2'>
<div className='text-text-secondary code-sm-semibold'>{item.label[language]}</div>
<div className='text-text-tertiary system-xs-regular'>
{getType(item.type)}
</div>
{item.human_description && (
<div className='mt-1 leading-[18px] text-xs font-normal text-gray-600'>
{item.human_description?.[language]}
</div>
{item.required && (
<div className='text-text-warning-secondary system-xs-medium'>{t('tools.setBuiltInTools.required')}</div>
)}
</div>
))}
</div>
{item.human_description && (
<div className='mt-0.5 text-text-tertiary system-xs-regular'>
{item.human_description?.[language]}
</div>
)}
</div>
))}
</div>
)}
</div>
@ -149,75 +158,82 @@ const SettingBuiltInTool: FC<Props> = ({
return (
<Drawer
isShow
onHide={onHide}
title={(
<div className='flex items-center'>
{typeof collection.icon === 'string'
? (
<div
className='w-6 h-6 bg-cover bg-center rounded-md flex-shrink-0'
style={{
backgroundImage: `url(${collection.icon})`,
}}
></div>
)
: (
<AppIcon
className='rounded-md'
size='tiny'
icon={(collection.icon as any)?.content}
background={(collection.icon as any)?.background}
/>
)}
<div className='ml-2 leading-6 text-base font-semibold text-gray-900'>{currTool?.label[language]}</div>
{(hasSetting && !readonly) && (<>
<DiagonalDividingLine className='mx-4' />
<div className='flex space-x-6'>
<div
className={cn(isInfoActive ? 'text-gray-900 font-semibold' : 'font-normal text-gray-600 cursor-pointer', 'relative text-base')}
onClick={() => setCurrType('info')}
>
{t('tools.setBuiltInTools.info')}
{isInfoActive && <div className='absolute left-0 bottom-[-16px] w-full h-0.5 bg-primary-600'></div>}
isOpen
clickOutsideNotOpen={false}
onClose={onHide}
footer={null}
mask={false}
positionCenter={false}
panelClassname={cn('justify-start mt-[64px] mr-2 mb-2 !w-[420px] !max-w-[420px] !p-0 !bg-components-panel-bg rounded-2xl border-[0.5px] border-components-panel-border shadow-xl')}
>
<>
{isLoading && <Loading type='app' />}
{!isLoading && (
<>
{/* header */}
<div className='relative p-4 pb-3 border-b border-divider-subtle'>
<div className='absolute top-3 right-3'>
<ActionButton onClick={onHide}>
<RiCloseLine className='w-4 h-4' />
</ActionButton>
</div>
<div className={cn(!isInfoActive ? 'text-gray-900 font-semibold' : 'font-normal text-gray-600 cursor-pointer', 'relative text-base ')}
onClick={() => setCurrType('setting')}
>
{t('tools.setBuiltInTools.setting')}
{!isInfoActive && <div className='absolute left-0 bottom-[-16px] w-full h-0.5 bg-primary-600'></div>}
{showBackButton && (
<div
className='mb-2 flex items-center gap-1 text-text-accent-secondary system-xs-semibold-uppercase cursor-pointer'
onClick={onHide}
>
<RiArrowLeftLine className='w-4 h-4' />
BACK
</div>
)}
<div className='flex items-center gap-1'>
<Icon size='tiny' className='w-6 h-6' src={collection.icon} />
<OrgInfo
packageNameClassName='w-auto'
orgName={collection.author}
packageName={collection.name.split('/').pop() || ''}
/>
</div>
<div className='mt-1 text-text-primary system-md-semibold'>{currTool?.label[language]}</div>
{!!currTool?.description[language] && (
<Description className='mt-3' text={currTool.description[language]} descriptionLineRows={2}></Description>
)}
</div>
</>)}
</div>
)}
panelClassName='mt-[65px] !w-[405px]'
maxWidthClassName='!max-w-[405px]'
height='calc(100vh - 65px)'
headerClassName='!border-b-black/5'
body={
<div className='h-full pt-3'>
{isLoading
? <div className='flex h-full items-center'>
<Loading type='app' />
</div>
: (<div className='flex flex-col h-full'>
<div className='grow h-0 overflow-y-auto px-6'>
{isInfoActive ? infoUI : settingUI}
</div>
{!readonly && !isInfoActive && (
<div className='mt-2 shrink-0 flex justify-end py-4 px-6 space-x-2 rounded-b-[10px] bg-gray-50 border-t border-black/5'>
<Button className='flex items-center h-8 !px-3 !text-[13px] font-medium !text-gray-700' onClick={onHide}>{t('common.operation.cancel')}</Button>
<Button className='flex items-center h-8 !px-3 !text-[13px] font-medium' variant='primary' disabled={!isValid} onClick={() => onSave?.(addDefaultValue(tempSetting, formSchemas))}>{t('common.operation.save')}</Button>
{/* form */}
<div className='h-full'>
<div className='flex flex-col h-full'>
{(hasSetting && !readonly) ? (
<TabSlider
className='shrink-0 mt-1 px-4'
itemClassName='py-3'
noBorderBottom
value={currType}
onChange={(value) => {
setCurrType(value)
}}
options={[
{ value: 'info', text: t('tools.setBuiltInTools.parameters')! },
{ value: 'setting', text: t('tools.setBuiltInTools.setting')! },
]}
/>
) : (
<div className='p-4 pb-1 text-text-primary system-sm-semibold-uppercase'>{t('tools.setBuiltInTools.parameters')}</div>
)}
<div className='grow h-0 overflow-y-auto px-4'>
{isInfoActive ? infoUI : settingUI}
</div>
)}
</div>)}
</div>
}
isShowMask={false}
clickOutsideNotOpen={false}
/>
{!readonly && !isInfoActive && (
<div className='mt-2 shrink-0 flex justify-end py-4 px-6 space-x-2 rounded-b-[10px] bg-components-panel-bg border-t border-divider-regular'>
<Button className='flex items-center h-8 !px-3 !text-[13px] font-medium !text-gray-700' onClick={onHide}>{t('common.operation.cancel')}</Button>
<Button className='flex items-center h-8 !px-3 !text-[13px] font-medium' variant='primary' disabled={!isValid} onClick={() => onSave?.(addDefaultValue(tempSetting, formSchemas))}>{t('common.operation.save')}</Button>
</div>
)}
</div>
</div>
</>
)}
</>
</Drawer>
)
}
export default React.memo(SettingBuiltInTool)

@ -38,7 +38,7 @@ import ModelName from '@/app/components/header/account-setting/model-provider-pa
import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'
import { useModelListAndDefaultModelAndCurrentProviderAndModel } from '@/app/components/header/account-setting/model-provider-page/hooks'
export type IGetAutomaticResProps = {
export interface IGetAutomaticResProps {
mode: AppType
model: Model
isShow: boolean

@ -12,7 +12,7 @@ import AgentTools from './agent/agent-tools'
import ConfigContext from '@/context/debug-configuration'
import ConfigPrompt from '@/app/components/app/configuration/config-prompt'
import ConfigVar from '@/app/components/app/configuration/config-var'
import { type ModelConfig, type PromptVariable } from '@/models/debug'
import type { ModelConfig, PromptVariable } from '@/models/debug'
import type { AppType } from '@/types/app'
import { ModelModeType } from '@/types/app'

@ -140,11 +140,11 @@ const ParamsConfig = ({
/>
<div className='mt-6 flex justify-end'>
<Button className='mr-2 flex-shrink-0' onClick={() => {
<Button className='mr-2 shrink-0' onClick={() => {
setTempDataSetConfigs(datasetConfigs)
setRerankSettingModalOpen(false)
}}>{t('common.operation.cancel')}</Button>
<Button variant='primary' className='flex-shrink-0' onClick={handleSave} >{t('common.operation.save')}</Button>
<Button variant='primary' className='shrink-0' onClick={handleSave} >{t('common.operation.save')}</Button>
</div>
</Modal>
)

@ -33,7 +33,7 @@ import { ModelTypeEnum } from '@/app/components/header/account-setting/model-pro
import { fetchMembers } from '@/service/common'
import type { Member } from '@/models/common'
type SettingsModalProps = {
interface SettingsModalProps {
currentDataset: DataSet
onCancel: () => void
onSave: (newDataset: DataSet) => void

@ -31,7 +31,7 @@ import { useFeatures } from '@/app/components/base/features/hooks'
import type { InputForm } from '@/app/components/base/chat/chat/type'
import { getLastAnswer } from '@/app/components/base/chat/utils'
type ChatItemProps = {
interface ChatItemProps {
modelAndParameter: ModelAndParameter
}
const ChatItem: FC<ChatItemProps> = ({

@ -15,7 +15,7 @@ import { useEventEmitterContextContext } from '@/context/event-emitter'
import { useProviderContext } from '@/context/provider-context'
import { useFeatures } from '@/app/components/base/features/hooks'
type TextGenerationItemProps = {
interface TextGenerationItemProps {
modelAndParameter: ModelAndParameter
}
const TextGenerationItem: FC<TextGenerationItemProps> = ({

@ -27,10 +27,10 @@ import { useFeatures } from '@/app/components/base/features/hooks'
import { getLastAnswer } from '@/app/components/base/chat/utils'
import type { InputForm } from '@/app/components/base/chat/chat/type'
type DebugWithSingleModelProps = {
interface DebugWithSingleModelProps {
checkCanSend?: () => boolean
}
export type DebugWithSingleModelRefType = {
export interface DebugWithSingleModelRefType {
handleRestart: () => void
}
const DebugWithSingleModel = forwardRef<DebugWithSingleModelRefType, DebugWithSingleModelProps>(({

@ -48,7 +48,7 @@ import PromptLogModal from '@/app/components/base/prompt-log-modal'
import { useStore as useAppStore } from '@/app/components/app/store'
import { useFeatures, useFeaturesStore } from '@/app/components/base/features/hooks'
type IDebug = {
interface IDebug {
isAPIKeySet: boolean
onSetting: () => void
inputs: Inputs

@ -1,4 +1,3 @@
/* eslint-disable multiline-ternary */
'use client'
import type { FC } from 'react'
import React, { useEffect, useRef, useState } from 'react'

@ -59,7 +59,7 @@ import {
useTextGenerationCurrentProviderAndModelAndModelList,
} from '@/app/components/header/account-setting/model-provider-page/hooks'
import { fetchCollectionList } from '@/service/tools'
import { type Collection } from '@/app/components/tools/types'
import type { Collection } from '@/app/components/tools/types'
import { useStore as useAppStore } from '@/app/components/app/store'
import {
getMultipleRetrievalConfig,
@ -71,6 +71,8 @@ import { FILE_EXTS } from '@/app/components/base/prompt-editor/constants'
import { SupportUploadFileTypes } from '@/app/components/workflow/types'
import NewFeaturePanel from '@/app/components/base/features/new-feature-panel'
import { fetchFileUploadConfig } from '@/service/common'
import { correctProvider } from '@/utils'
import PluginDependency from '@/app/components/workflow/plugin-dependency'
type PublishConfig = {
modelConfig: ModelConfig
@ -156,7 +158,7 @@ const Configuration: FC = () => {
const setCompletionParams = (value: FormValue) => {
const params = { ...value }
// eslint-disable-next-line @typescript-eslint/no-use-before-define
// eslint-disable-next-line ts/no-use-before-define
if ((!params.stop || params.stop.length === 0) && (modeModeTypeRef.current === ModelModeType.completion)) {
params.stop = getTempStop()
setTempStop([])
@ -165,7 +167,7 @@ const Configuration: FC = () => {
}
const [modelConfig, doSetModelConfig] = useState<ModelConfig>({
provider: 'openai',
provider: 'langgenius/openai/openai',
model_id: 'gpt-3.5-turbo',
mode: ModelModeType.unset,
configs: {
@ -188,7 +190,7 @@ const Configuration: FC = () => {
const isAgent = mode === 'agent-chat'
const isOpenAI = modelConfig.provider === 'openai'
const isOpenAI = modelConfig.provider === 'langgenius/openai/openai'
const [collectionList, setCollectionList] = useState<Collection[]>([])
useEffect(() => {
@ -361,7 +363,7 @@ const Configuration: FC = () => {
const [canReturnToSimpleMode, setCanReturnToSimpleMode] = useState(true)
const setPromptMode = async (mode: PromptMode) => {
if (mode === PromptMode.advanced) {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
// eslint-disable-next-line ts/no-use-before-define
await migrateToDefaultPrompt()
setCanReturnToSimpleMode(true)
}
@ -547,8 +549,19 @@ const Configuration: FC = () => {
if (modelConfig.retriever_resource)
setCitationConfig(modelConfig.retriever_resource)
if (modelConfig.annotation_reply)
setAnnotationConfig(modelConfig.annotation_reply, true)
if (modelConfig.annotation_reply) {
let annotationConfig = modelConfig.annotation_reply
if (modelConfig.annotation_reply.enabled) {
annotationConfig = {
...modelConfig.annotation_reply,
embedding_model: {
...modelConfig.annotation_reply.embedding_model,
embedding_provider_name: correctProvider(modelConfig.annotation_reply.embedding_model.embedding_provider_name),
},
}
}
setAnnotationConfig(annotationConfig, true)
}
if (modelConfig.sensitive_word_avoidance)
setModerationConfig(modelConfig.sensitive_word_avoidance)
@ -558,7 +571,7 @@ const Configuration: FC = () => {
const config = {
modelConfig: {
provider: model.provider,
provider: correctProvider(model.provider),
model_id: model.name,
mode: model.mode,
configs: {
@ -600,7 +613,6 @@ const Configuration: FC = () => {
annotation_reply: modelConfig.annotation_reply,
external_data_tools: modelConfig.external_data_tools,
dataSets: datasets || [],
// eslint-disable-next-line multiline-ternary
agentConfig: res.mode === 'agent-chat' ? {
max_iteration: DEFAULT_AGENT_SETTING.max_iteration,
...modelConfig.agent_mode,
@ -611,8 +623,12 @@ const Configuration: FC = () => {
}).map((tool: any) => {
return {
...tool,
isDeleted: res.deleted_tools?.includes(tool.tool_name),
isDeleted: res.deleted_tools?.some((deletedTool: any) => deletedTool.id === tool.id && deletedTool.tool_name === tool.tool_name),
notAuthor: collectionList.find(c => tool.provider_id === c.id)?.is_team_authorization === false,
...(tool.provider_type === 'builtin' ? {
provider_id: correctProvider(tool.provider_name),
provider_name: correctProvider(tool.provider_name),
} : {}),
}
}),
} : DEFAULT_AGENT_SETTING,
@ -633,6 +649,12 @@ const Configuration: FC = () => {
retrieval_model: RETRIEVE_TYPE.multiWay,
...modelConfig.dataset_configs,
...retrievalConfig,
...(retrievalConfig.reranking_model ? {
reranking_model: {
...retrievalConfig.reranking_model,
reranking_provider_name: correctProvider(modelConfig.dataset_configs.reranking_model.reranking_provider_name),
},
} : {}),
})
setHasFetchedDetail(true)
})
@ -1020,6 +1042,7 @@ const Configuration: FC = () => {
onAutoAddPromptVariable={handleAddPromptVariable}
/>
)}
<PluginDependency />
</>
</FeaturesProvider>
</ConfigContext.Provider>

@ -23,7 +23,7 @@ import { DEFAULT_VALUE_MAX_LEN } from '@/config'
import { useStore as useAppStore } from '@/app/components/app/store'
import cn from '@/utils/classnames'
export type IPromptValuePanelProps = {
export interface IPromptValuePanelProps {
appType: AppType
onSend?: () => void
inputs: Inputs

@ -1,124 +0,0 @@
'use client'
import type { FC } from 'react'
import React from 'react'
import { useTranslation } from 'react-i18next'
import { useContext } from 'use-context-selector'
import { usePathname, useRouter } from 'next/navigation'
import ConfigParamModal from './config-param-modal'
import Panel from '@/app/components/app/configuration/base/feature-panel'
import { MessageFast } from '@/app/components/base/icons/src/vender/solid/communication'
import Tooltip from '@/app/components/base/tooltip'
import { LinkExternal02, Settings04 } from '@/app/components/base/icons/src/vender/line/general'
import ConfigContext from '@/context/debug-configuration'
import type { EmbeddingModelConfig } from '@/app/components/app/annotation/type'
import { fetchAnnotationConfig, updateAnnotationScore } from '@/service/annotation'
import type { AnnotationReplyConfig as AnnotationReplyConfigType } from '@/models/debug'
type Props = {
onEmbeddingChange: (embeddingModel: EmbeddingModelConfig) => void
onScoreChange: (score: number, embeddingModel?: EmbeddingModelConfig) => void
}
export const Item: FC<{ title: string; tooltip: string; children: JSX.Element }> = ({
title,
tooltip,
children,
}) => {
return (
<div>
<div className='flex items-center space-x-1'>
<div>{title}</div>
<Tooltip
popupContent={
<div className='max-w-[200px] leading-[18px] text-[13px] font-medium text-gray-800'>{tooltip}</div>
}
/>
</div>
<div>{children}</div>
</div>
)
}
const AnnotationReplyConfig: FC<Props> = ({
onEmbeddingChange,
onScoreChange,
}) => {
const { t } = useTranslation()
const router = useRouter()
const pathname = usePathname()
const matched = pathname.match(/\/app\/([^/]+)/)
const appId = (matched?.length && matched[1]) ? matched[1] : ''
const {
annotationConfig,
} = useContext(ConfigContext)
const [isShowEdit, setIsShowEdit] = React.useState(false)
return (
<>
<Panel
className="mt-4"
headerIcon={
<MessageFast className='w-4 h-4 text-[#444CE7]' />
}
title={t('appDebug.feature.annotation.title')}
headerRight={
<div className='flex items-center'>
<div
className='flex items-center rounded-md h-7 px-3 space-x-1 text-gray-700 cursor-pointer hover:bg-gray-200'
onClick={() => { setIsShowEdit(true) }}
>
<Settings04 className="w-[14px] h-[14px]" />
<div className='text-xs font-medium'>
{t('common.operation.params')}
</div>
</div>
<div
className='ml-1 flex items-center h-7 px-3 space-x-1 leading-[18px] text-xs font-medium text-gray-700 rounded-md cursor-pointer hover:bg-gray-200'
onClick={() => {
router.push(`/app/${appId}/annotations`)
}}>
<div>{t('appDebug.feature.annotation.cacheManagement')}</div>
<LinkExternal02 className='w-3.5 h-3.5' />
</div>
</div>
}
noBodySpacing
/>
{isShowEdit && (
<ConfigParamModal
appId={appId}
isShow
onHide={() => {
setIsShowEdit(false)
}}
onSave={async (embeddingModel, score) => {
const annotationConfig = await fetchAnnotationConfig(appId) as AnnotationReplyConfigType
let isEmbeddingModelChanged = false
if (
embeddingModel.embedding_model_name !== annotationConfig.embedding_model.embedding_model_name
|| embeddingModel.embedding_provider_name !== annotationConfig.embedding_model.embedding_provider_name
) {
await onEmbeddingChange(embeddingModel)
isEmbeddingModelChanged = true
}
if (score !== annotationConfig.score_threshold) {
await updateAnnotationScore(appId, annotationConfig.id, score)
if (isEmbeddingModelChanged)
onScoreChange(score, embeddingModel)
else
onScoreChange(score)
}
setIsShowEdit(false)
}}
annotationConfig={annotationConfig}
/>
)}
</>
)
}
export default React.memo(AnnotationReplyConfig)

@ -1,45 +0,0 @@
'use client'
import type { FC } from 'react'
import React from 'react'
import { useTranslation } from 'react-i18next'
import GroupName from '../base/group-name'
import Moderation from './moderation'
import Annotation from './annotation/config-param'
import type { EmbeddingModelConfig } from '@/app/components/app/annotation/type'
export type ToolboxProps = {
showModerationSettings: boolean
showAnnotation: boolean
onEmbeddingChange: (embeddingModel: EmbeddingModelConfig) => void
onScoreChange: (score: number, embeddingModel?: EmbeddingModelConfig) => void
}
const Toolbox: FC<ToolboxProps> = ({
showModerationSettings,
showAnnotation,
onEmbeddingChange,
onScoreChange,
}) => {
const { t } = useTranslation()
return (
<div className='mt-7'>
<GroupName name={t('appDebug.feature.toolbox.title')} />
{
showModerationSettings && (
<Moderation />
)
}
{
showAnnotation && (
<Annotation
onEmbeddingChange={onEmbeddingChange}
onScoreChange={onScoreChange}
/>
)
}
</div>
)
}
export default React.memo(Toolbox)

@ -21,13 +21,13 @@ import { useToastContext } from '@/app/components/base/toast'
import AppIcon from '@/app/components/base/app-icon'
const systemTypes = ['api']
type ExternalDataToolModalProps = {
interface ExternalDataToolModalProps {
data: ExternalDataTool
onCancel: () => void
onSave: (externalDataTool: ExternalDataTool) => void
onValidateBeforeSave?: (externalDataTool: ExternalDataTool) => boolean
}
type Provider = {
interface Provider {
key: string
name: string
form_schema?: CodeBasedExtensionItem['form_schema']

@ -25,6 +25,7 @@ import AppsFull from '@/app/components/billing/apps-full-in-dialog'
import { NEED_REFRESH_APP_LIST_KEY } from '@/config'
import { getRedirection } from '@/utils/app-redirection'
import cn from '@/utils/classnames'
import { usePluginDependencies } from '@/app/components/workflow/plugin-dependency/hooks'
type CreateFromDSLModalProps = {
show: boolean
@ -50,6 +51,7 @@ const CreateFromDSLModal = ({ show, onSuccess, onClose, activeTab = CreateFromDS
const [showErrorModal, setShowErrorModal] = useState(false)
const [versions, setVersions] = useState<{ importedVersion: string; systemVersion: string }>()
const [importId, setImportId] = useState<string>()
const { handleCheckPluginDependencies } = usePluginDependencies()
const readFile = (file: File) => {
const reader = new FileReader()
@ -114,6 +116,8 @@ const CreateFromDSLModal = ({ show, onSuccess, onClose, activeTab = CreateFromDS
children: status === DSLImportStatus.COMPLETED_WITH_WARNINGS && t('app.newApp.appCreateDSLWarning'),
})
localStorage.setItem(NEED_REFRESH_APP_LIST_KEY, '1')
if (app_id)
await handleCheckPluginDependencies(app_id)
getRedirection(isCurrentWorkspaceEditor, { id: app_id }, push)
}
else if (status === DSLImportStatus.PENDING) {
@ -132,6 +136,7 @@ const CreateFromDSLModal = ({ show, onSuccess, onClose, activeTab = CreateFromDS
notify({ type: 'error', message: t('app.newApp.appCreateFailed') })
}
}
// eslint-disable-next-line unused-imports/no-unused-vars
catch (e) {
notify({ type: 'error', message: t('app.newApp.appCreateFailed') })
}
@ -158,6 +163,8 @@ const CreateFromDSLModal = ({ show, onSuccess, onClose, activeTab = CreateFromDS
type: 'success',
message: t('app.newApp.appCreated'),
})
if (app_id)
await handleCheckPluginDependencies(app_id)
localStorage.setItem(NEED_REFRESH_APP_LIST_KEY, '1')
getRedirection(isCurrentWorkspaceEditor, { id: app_id }, push)
}
@ -165,6 +172,7 @@ const CreateFromDSLModal = ({ show, onSuccess, onClose, activeTab = CreateFromDS
notify({ type: 'error', message: t('app.newApp.appCreateFailed') })
}
}
// eslint-disable-next-line unused-imports/no-unused-vars
catch (e) {
notify({ type: 'error', message: t('app.newApp.appCreateFailed') })
}
@ -268,7 +276,7 @@ const CreateFromDSLModal = ({ show, onSuccess, onClose, activeTab = CreateFromDS
>
<div className='flex pb-4 flex-col items-start gap-2 self-stretch'>
<div className='text-text-primary title-2xl-semi-bold'>{t('app.newApp.appCreateDSLErrorTitle')}</div>
<div className='flex flex-grow flex-col text-text-secondary system-md-regular'>
<div className='flex grow flex-col text-text-secondary system-md-regular'>
<div>{t('app.newApp.appCreateDSLErrorPart1')}</div>
<div>{t('app.newApp.appCreateDSLErrorPart2')}</div>
<br />

@ -13,7 +13,7 @@ import { useProviderContext } from '@/context/provider-context'
import AppsFull from '@/app/components/billing/apps-full-in-dialog'
import type { AppIconType } from '@/types/app'
export type DuplicateAppModalProps = {
export interface DuplicateAppModalProps {
appName: string
icon_type: AppIconType | null
icon: string

@ -79,6 +79,9 @@ const HandThumbIconWithCount: FC<{ count: number; iconType: 'up' | 'down' }> = (
}
const statusTdRender = (statusCount: StatusCount) => {
if (!statusCount)
return null
if (statusCount.partial_success + statusCount.failed === 0) {
return (
<div className='inline-flex items-center gap-1 system-xs-semibold-uppercase'>

@ -27,8 +27,8 @@ const APIKeyInfoPanel: FC = () => {
return null
return (
<div className={cn('bg-[#EFF4FF] border-[#D1E0FF]', 'mb-6 relative rounded-2xl shadow-md border p-8 ')}>
<div className={cn('text-[24px] text-gray-800 font-semibold', isCloud ? 'flex items-center h-8 space-x-1' : 'leading-8 mb-6')}>
<div className={cn('bg-components-panel-bg border-components-panel-border', 'mb-6 relative rounded-2xl shadow-md border p-8 ')}>
<div className={cn('text-[24px] text-text-primary font-semibold', isCloud ? 'flex items-center h-8 space-x-1' : 'leading-8 mb-6')}>
{isCloud && <em-emoji id={'😀'} />}
{isCloud
? (
@ -42,11 +42,11 @@ const APIKeyInfoPanel: FC = () => {
)}
</div>
{isCloud && (
<div className='mt-1 text-sm text-gray-600 font-normal'>{t(`appOverview.apiKeyInfo.cloud.${'trial'}.description`)}</div>
<div className='mt-1 text-sm text-text-tertiary font-normal'>{t(`appOverview.apiKeyInfo.cloud.${'trial'}.description`)}</div>
)}
<Button
variant='primary'
className='space-x-2'
className='mt-2 space-x-2'
onClick={() => setShowAccountSettingModal({ payload: 'provider' })}
>
<div className='text-sm font-medium'>{t('appOverview.apiKeyInfo.setAPIBtn')}</div>
@ -65,7 +65,7 @@ const APIKeyInfoPanel: FC = () => {
<div
onClick={() => setIsShow(false)}
className='absolute right-4 top-4 flex items-center justify-center w-8 h-8 cursor-pointer '>
<RiCloseLine className='w-4 h-4 text-gray-500' />
<RiCloseLine className='w-4 h-4 text-text-tertiary' />
</div>
</div>
)

@ -1,29 +0,0 @@
'use client'
import type { FC } from 'react'
import React from 'react'
import s from './style.module.css'
import cn from '@/utils/classnames'
export type IProgressProps = {
className?: string
value: number // percent
}
const Progress: FC<IProgressProps> = ({
className,
value,
}) => {
const exhausted = value === 100
return (
<div className={cn(className, 'relative grow h-2 flex bg-gray-200 rounded-md overflow-hidden')}>
<div
className={cn(s.bar, exhausted && s['bar-error'], 'absolute top-0 left-0 right-0 bottom-0')}
style={{ width: `${value}%` }}
/>
{Array(10).fill(0).map((i, k) => (
<div key={k} className={s['bar-item']} />
))}
</div>
)
}
export default React.memo(Progress)

@ -1,16 +0,0 @@
.bar {
background: linear-gradient(90deg, rgba(41, 112, 255, 0.9) 0%, rgba(21, 94, 239, 0.9) 100%);
}
.bar-error {
background: linear-gradient(90deg, rgba(240, 68, 56, 0.72) 0%, rgba(217, 45, 32, 0.9) 100%);
}
.bar-item {
width: 10%;
border-right: 1px solid rgba(255, 255, 255, 0.5);
}
.bar-item:last-of-type {
border-right: 0;
}

@ -1,6 +1,9 @@
'use client'
import type { HTMLProps } from 'react'
import React, { useMemo, useState } from 'react'
import {
RiLoopLeftLine,
} from '@remixicon/react'
import {
Cog8ToothIcon,
DocumentTextIcon,
@ -16,24 +19,25 @@ import style from './style.module.css'
import type { ConfigParams } from './settings'
import Tooltip from '@/app/components/base/tooltip'
import AppBasic from '@/app/components/app-sidebar/basic'
import { asyncRunSafe, randomString } from '@/utils'
import { asyncRunSafe } from '@/utils'
import Button from '@/app/components/base/button'
import Tag from '@/app/components/base/tag'
import Switch from '@/app/components/base/switch'
import Divider from '@/app/components/base/divider'
import CopyFeedback from '@/app/components/base/copy-feedback'
import ActionButton from '@/app/components/base/action-button'
import Confirm from '@/app/components/base/confirm'
import ShareQRCode from '@/app/components/base/qrcode'
import SecretKeyButton from '@/app/components/develop/secret-key/secret-key-button'
import type { AppDetailResponse } from '@/models/app'
import { useAppContext } from '@/context/app-context'
import type { AppSSO } from '@/types/app'
import cn from '@/utils/classnames'
export type IAppCardProps = {
className?: string
appInfo: AppDetailResponse & Partial<AppSSO>
cardType?: 'api' | 'webapp'
customBgColor?: string
onChangeStatus: (val: boolean) => Promise<void>
onSaveSiteConfig?: (params: ConfigParams) => Promise<void>
onGenerateCode?: () => Promise<void>
@ -46,7 +50,6 @@ const EmbedIcon = ({ className = '' }: HTMLProps<HTMLDivElement>) => {
function AppCard({
appInfo,
cardType = 'webapp',
customBgColor,
onChangeStatus,
onSaveSiteConfig,
onGenerateCode,
@ -92,10 +95,6 @@ function AppCard({
const appUrl = `${app_base_url}/${appMode}/${access_token}`
const apiUrl = appInfo?.api_base_url
let bgColor = 'bg-primary-50 bg-opacity-40'
if (cardType === 'api')
bgColor = 'bg-purple-50'
const genClickFuncByName = (opName: string) => {
switch (opName) {
case t('appOverview.overview.appInfo.preview'):
@ -133,11 +132,8 @@ function AppCard({
}
return (
<div
className={
`shadow-xs border-[0.5px] rounded-lg border-gray-200 ${className ?? ''}`}
>
<div className={`px-6 py-5 ${customBgColor ?? bgColor} rounded-lg`}>
<div className={cn('rounded-xl border-effects-highlight border-t border-l-[0.5px] bg-background-default', className)}>
<div className={cn('px-6 py-5')}>
<div className="mb-2.5 flex flex-row items-start justify-between">
<AppBasic
iconType={cardType}
@ -161,23 +157,20 @@ function AppCard({
</div>
<div className="flex flex-col justify-center py-2">
<div className="py-1">
<div className="pb-1 text-xs text-gray-500">
<div className="pb-1 text-xs text-text-tertiary">
{isApp
? t('appOverview.overview.appInfo.accessibleAddress')
: t('appOverview.overview.apiInfo.accessibleAddress')}
</div>
<div className="w-full h-9 pl-2 pr-0.5 py-0.5 bg-black bg-opacity-2 rounded-lg border border-black border-opacity-5 justify-start items-center inline-flex">
<div className="w-full h-9 px-2 py-0.5 bg-components-input-bg-normal rounded-lg justify-start items-center inline-flex">
<div className="h-4 px-2 justify-start items-start gap-2 flex flex-1 min-w-0">
<div className="text-gray-700 text-xs font-medium text-ellipsis overflow-hidden whitespace-nowrap">
<div className="text-text-secondary system-xs-medium truncate">
{isApp ? appUrl : apiUrl}
</div>
</div>
<Divider type="vertical" className="!h-3.5 shrink-0 !mx-0.5" />
{isApp && <ShareQRCode content={isApp ? appUrl : apiUrl} selectorId={randomString(8)} className={'hover:bg-gray-200'} />}
<CopyFeedback
content={isApp ? appUrl : apiUrl}
className={'hover:bg-gray-200'}
/>
<Divider type="vertical" className="!h-3.5 shrink-0" />
{isApp && <ShareQRCode content={isApp ? appUrl : apiUrl} />}
<CopyFeedback content={isApp ? appUrl : apiUrl}/>
{/* button copy link/ button regenerate */}
{showConfirmDelete && (
<Confirm
@ -196,22 +189,16 @@ function AppCard({
<Tooltip
popupContent={t('appOverview.overview.appInfo.regenerate') || ''}
>
<div
className="w-8 h-8 ml-0.5 cursor-pointer hover:bg-gray-200 rounded-lg"
onClick={() => setShowConfirmDelete(true)}
>
<div
className={
`w-full h-full ${style.refreshIcon} ${genLoading ? style.generateLogo : ''}`}
></div>
</div>
<ActionButton onClick={() => setShowConfirmDelete(true)}>
<RiLoopLeftLine className={cn('w-4 h-4', genLoading && 'animate-spin')} />
</ActionButton>
</Tooltip>
)}
</div>
</div>
</div>
<div className={'pt-2 flex flex-row items-center flex-wrap gap-y-2'}>
{!isApp && <SecretKeyButton className='flex-shrink-0 !h-8 bg-white mr-2' textCls='!text-gray-700 font-medium' iconCls='stroke-[1.2px]' appId={appInfo.id} />}
{!isApp && <SecretKeyButton className='shrink-0 !h-8 mr-2' textCls='!text-text-secondary font-medium' iconCls='stroke-[1.2px]' appId={appInfo.id} />}
{OPERATIONS_MAP[cardType].map((op) => {
const disabled
= op.opName === t('appOverview.overview.appInfo.settings.entry')

@ -216,8 +216,8 @@ const Chart: React.FC<IChartProps> = ({
return `<div style='color:#6B7280;font-size:12px'>${params.name}</div>
<div style='font-size:14px;color:#1F2A37'>${valueFormatter((params.data as any)[yField])}
${!CHART_TYPE_CONFIG[chartType].showTokens
? ''
: `<span style='font-size:12px'>
? ''
: `<span style='font-size:12px'>
<span style='margin-left:4px;color:#6B7280'>(</span>
<span style='color:#FF8A4C'>~$${get(params.data, 'total_price', 0)}</span>
<span style='color:#6B7280'>)</span>
@ -231,7 +231,7 @@ const Chart: React.FC<IChartProps> = ({
const sumData = isAvg ? (sum(yData) / yData.length) : sum(yData)
return (
<div className={`flex flex-col w-full px-6 py-4 border-[0.5px] rounded-lg border-gray-200 shadow-xs ${className ?? ''}`}>
<div className={`flex flex-col w-full px-6 py-4 rounded-xl bg-components-chart-bg shadow-xs ${className ?? ''}`}>
<div className='mb-3'>
<Basic name={title} type={timePeriod} hoverTip={explanation} />
</div>
@ -242,11 +242,11 @@ const Chart: React.FC<IChartProps> = ({
type={!CHART_TYPE_CONFIG[chartType].showTokens
? ''
: <span>{t('appOverview.analysis.tokenUsage.consumed')} Tokens<span className='text-sm'>
<span className='ml-1 text-gray-500'>(</span>
<span className='text-orange-400'>~{sum(statistics.map(item => parseFloat(get(item, 'total_price', '0')))).toLocaleString('en-US', { style: 'currency', currency: 'USD', minimumFractionDigits: 4 })}</span>
<span className='text-gray-500'>)</span>
<span className='ml-1 text-text-tertiary'>(</span>
<span className='text-orange-400'>~{sum(statistics.map(item => Number.parseFloat(get(item, 'total_price', '0')))).toLocaleString('en-US', { style: 'currency', currency: 'USD', minimumFractionDigits: 4 })}</span>
<span className='text-text-tertiary'>)</span>
</span></span>}
textStyle={{ main: `!text-3xl !font-normal ${sumData === 0 ? '!text-gray-300' : ''}` }} />
textStyle={{ main: `!text-3xl !font-normal ${sumData === 0 ? '!text-text-quaternary' : ''}` }} />
</div>
<ReactECharts option={options} style={{ height: 160 }} />
</div>

@ -21,7 +21,7 @@ type IShareLinkProps = {
}
const StepNum: FC<{ children: React.ReactNode }> = ({ children }) =>
<div className='h-7 w-7 flex justify-center items-center flex-shrink-0 mr-3 text-primary-600 bg-primary-50 rounded-2xl'>
<div className='h-7 w-7 flex justify-center items-center shrink-0 mr-3 text-text-accent bg-util-colors-blue-blue-50 rounded-2xl'>
{children}
</div>
@ -54,27 +54,27 @@ const CustomizeModal: FC<IShareLinkProps> = ({
className='!max-w-2xl w-[640px]'
closable={true}
>
<div className='w-full mt-4 px-6 py-5 border-gray-200 rounded-lg border-[0.5px]'>
<Tag bordered={true} hideBg={true} className='text-primary-600 border-primary-600 uppercase'>{t(`${prefixCustomize}.way`)} 1</Tag>
<p className='my-2 text-base font-medium text-gray-800'>{t(`${prefixCustomize}.way1.name`)}</p>
<div className='w-full mt-4 px-6 py-5 border-components-panel-border rounded-lg border-[0.5px]'>
<Tag bordered={true} hideBg={true} className='text-text-accent-secondary border-text-accent-secondary uppercase'>{t(`${prefixCustomize}.way`)} 1</Tag>
<p className='my-2 system-sm-medium text-text-secondary'>{t(`${prefixCustomize}.way1.name`)}</p>
<div className='flex py-4'>
<StepNum>1</StepNum>
<div className='flex flex-col'>
<div className='text-gray-900'>{t(`${prefixCustomize}.way1.step1`)}</div>
<div className='text-gray-500 text-xs mt-1 mb-2'>{t(`${prefixCustomize}.way1.step1Tip`)}</div>
<div className='text-text-primary'>{t(`${prefixCustomize}.way1.step1`)}</div>
<div className='text-text-tertiary text-xs mt-1 mb-2'>{t(`${prefixCustomize}.way1.step1Tip`)}</div>
<a href={`https://github.com/langgenius/${isChatApp ? 'webapp-conversation' : 'webapp-text-generator'}`} target='_blank' rel='noopener noreferrer'>
<Button><GithubIcon className='text-gray-800 mr-2' />{t(`${prefixCustomize}.way1.step1Operation`)}</Button>
<Button><GithubIcon className='text-text-secondary mr-2' />{t(`${prefixCustomize}.way1.step1Operation`)}</Button>
</a>
</div>
</div>
<div className='flex pt-4'>
<StepNum>2</StepNum>
<div className='flex flex-col'>
<div className='text-gray-900'>{t(`${prefixCustomize}.way1.step3`)}</div>
<div className='text-gray-500 text-xs mt-1 mb-2'>{t(`${prefixCustomize}.way1.step2Tip`)}</div>
<div className='text-text-primary'>{t(`${prefixCustomize}.way1.step3`)}</div>
<div className='text-text-tertiary text-xs mt-1 mb-2'>{t(`${prefixCustomize}.way1.step2Tip`)}</div>
<a href="https://vercel.com/docs/concepts/deployments/git/vercel-for-github" target='_blank' rel='noopener noreferrer'>
<Button>
<div className='mr-1.5 border-solid border-t-0 border-r-[7px] border-l-[7px] border-b-[12px] border-r-transparent border-b-black border-l-transparent border-t-transparent'></div>
<div className='mr-1.5 border-solid border-t-0 border-r-[7px] border-l-[7px] border-b-[12px] border-r-transparent border-text-primary border-l-transparent border-t-transparent'></div>
<span>{t(`${prefixCustomize}.way1.step2Operation`)}</span>
</Button>
</a>
@ -83,9 +83,9 @@ const CustomizeModal: FC<IShareLinkProps> = ({
<div className='flex py-4'>
<StepNum>3</StepNum>
<div className='flex flex-col w-full overflow-hidden'>
<div className='text-gray-900'>{t(`${prefixCustomize}.way1.step3`)}</div>
<div className='text-gray-500 text-xs mt-1 mb-2'>{t(`${prefixCustomize}.way1.step3Tip`)}</div>
<pre className='overflow-x-scroll box-border py-3 px-4 bg-gray-100 text-xs font-medium rounded-lg select-text'>
<div className='text-text-primary'>{t(`${prefixCustomize}.way1.step3`)}</div>
<div className='text-text-tertiary text-xs mt-1 mb-2'>{t(`${prefixCustomize}.way1.step3Tip`)}</div>
<pre className='overflow-x-scroll box-border py-3 px-4 bg-background-section text-xs font-medium rounded-lg select-text text-text-secondary border-[0.5px] border-components-panel-border'>
NEXT_PUBLIC_APP_ID={`'${appId}'`} <br />
NEXT_PUBLIC_APP_KEY={'\'<Web API Key From Dify>\''} <br />
NEXT_PUBLIC_API_URL={`'${api_base_url}'`}
@ -94,9 +94,9 @@ const CustomizeModal: FC<IShareLinkProps> = ({
</div>
</div>
<div className='w-full mt-4 px-6 py-5 border-gray-200 rounded-lg border-[0.5px]'>
<Tag bordered={true} hideBg={true} className='text-primary-600 border-primary-600 uppercase'>{t(`${prefixCustomize}.way`)} 2</Tag>
<p className='mt-2 text-base font-medium text-gray-800'>{t(`${prefixCustomize}.way2.name`)}</p>
<div className='w-full mt-4 px-6 py-5 border-components-panel-border rounded-lg border-[0.5px]'>
<Tag bordered={true} hideBg={true} className='text-text-accent-secondary border-text-accent-secondary uppercase'>{t(`${prefixCustomize}.way`)} 2</Tag>
<p className='my-2 system-sm-medium text-text-secondary'>{t(`${prefixCustomize}.way2.name`)}</p>
<Button
className='mt-2'
onClick={() =>
@ -109,8 +109,8 @@ const CustomizeModal: FC<IShareLinkProps> = ({
)
}
>
<span className='text-sm text-gray-800'>{t(`${prefixCustomize}.way2.operation`)}</span>
<ArrowTopRightOnSquareIcon className='w-4 h-4 ml-1 text-gray-800 shrink-0' />
<span className='text-sm text-text-secondary'>{t(`${prefixCustomize}.way2.operation`)}</span>
<ArrowTopRightOnSquareIcon className='w-4 h-4 ml-1 text-text-secondary shrink-0' />
</Button>
</div>
</Modal>

@ -1,15 +1,19 @@
import React, { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import {
RiClipboardFill,
RiClipboardLine,
} from '@remixicon/react'
import copy from 'copy-to-clipboard'
import style from './style.module.css'
import cn from '@/utils/classnames'
import Modal from '@/app/components/base/modal'
import copyStyle from '@/app/components/base/copy-btn/style.module.css'
import Tooltip from '@/app/components/base/tooltip'
import { useAppContext } from '@/context/app-context'
import { IS_CE_EDITION } from '@/config'
import type { SiteInfo } from '@/models/share'
import { useThemeContext } from '@/app/components/base/chat/embedded-chatbot/theme/theme-context'
import ActionButton from '@/app/components/base/action-button'
import cn from '@/utils/classnames'
type Props = {
siteInfo?: SiteInfo
@ -35,12 +39,12 @@ const OPTION_MAP = {
`<script>
window.difyChatbotConfig = {
token: '${token}'${isTestEnv
? `,
? `,
isDev: true`
: ''}${IS_CE_EDITION
? `,
: ''}${IS_CE_EDITION
? `,
baseUrl: '${url}'`
: ''}
: ''}
}
</script>
<script
@ -119,7 +123,7 @@ const Embedded = ({ siteInfo, isShow, onClose, appBaseUrl, accessToken, classNam
wrapperClassName={className}
closable={true}
>
<div className="mb-4 mt-8 text-gray-900 text-[14px] font-medium leading-tight">
<div className="mb-4 mt-8 text-text-primary system-sm-medium">
{t(`${prefixEmbedded}.explanation`)}
</div>
<div className="flex flex-wrap items-center justify-between gap-y-2">
@ -143,30 +147,37 @@ const Embedded = ({ siteInfo, isShow, onClose, appBaseUrl, accessToken, classNam
{option === 'chromePlugin' && (
<div className="w-full mt-6">
<div className={cn('gap-2 py-3 justify-center items-center inline-flex w-full rounded-lg',
'bg-primary-600 hover:bg-primary-600/75 hover:shadow-md cursor-pointer text-white hover:shadow-sm flex-shrink-0')}>
'bg-primary-600 hover:bg-primary-600/75 cursor-pointer text-white hover:shadow-sm flex-shrink-0')}>
<div className={`w-4 h-4 relative ${style.pluginInstallIcon}`}></div>
<div className="text-white text-sm font-medium font-['Inter'] leading-tight" onClick={navigateToChromeUrl}>{t(`${prefixEmbedded}.chromePlugin`)}</div>
</div>
</div>
)}
<div className={cn('w-full bg-gray-100 rounded-lg flex-col justify-start items-start inline-flex',
<div className={cn('w-full bg-background-section border-[0.5px] border-components-panel-border rounded-lg flex-col justify-start items-start inline-flex',
'mt-6')}>
<div className="inline-flex items-center self-stretch justify-start gap-2 py-1 pl-3 pr-1 border border-black rounded-tl-lg rounded-tr-lg bg-gray-50 border-opacity-5">
<div className="grow shrink basis-0 text-slate-700 text-[13px] font-medium leading-none">
<div className="inline-flex items-center self-stretch justify-start gap-2 py-1 pl-3 pr-1 rounded-t-lg bg-background-section-burn">
<div className="grow shrink-0 text-text-secondary system-sm-medium">
{t(`${prefixEmbedded}.${option}`)}
</div>
<div className="flex items-center justify-center gap-1 p-2 rounded-lg">
<Tooltip
popupContent={(isCopied[option] ? t(`${prefixEmbedded}.copied`) : t(`${prefixEmbedded}.copy`)) || ''}
>
<div className="w-8 h-8 rounded-lg cursor-pointer hover:bg-gray-100">
<div onClick={onClickCopy} className={`w-full h-full ${copyStyle.copyIcon} ${isCopied[option] ? copyStyle.copied : ''}`}></div>
<Tooltip
popupContent={
(isCopied[option]
? t(`${prefixEmbedded}.copied`)
: t(`${prefixEmbedded}.copy`)) || ''
}
>
<ActionButton>
<div
onClick={onClickCopy}
>
{isCopied[option] && <RiClipboardFill className='w-4 h-4' />}
{!isCopied[option] && <RiClipboardLine className='w-4 h-4' />}
</div>
</Tooltip>
</div>
</ActionButton>
</Tooltip>
</div>
<div className="flex items-start justify-start w-full gap-2 p-3 overflow-x-auto">
<div className="grow shrink basis-0 text-slate-700 text-[13px] leading-tight font-mono">
<div className="grow shrink basis-0 text-text-secondary text-[13px] leading-tight font-mono">
<pre className='select-text'>{OPTION_MAP[option].getContent(appBaseUrl, accessToken, themeBuilder.theme?.primaryColor ?? '#1C64F2', isTestEnv)}</pre>
</div>
</div>

@ -5,7 +5,6 @@ import { ChevronRightIcon } from '@heroicons/react/20/solid'
import Link from 'next/link'
import { Trans, useTranslation } from 'react-i18next'
import { useContextSelector } from 'use-context-selector'
import s from './style.module.css'
import Modal from '@/app/components/base/modal'
import Button from '@/app/components/base/button'
import Input from '@/app/components/base/input'
@ -21,6 +20,8 @@ import Tooltip from '@/app/components/base/tooltip'
import AppContext, { useAppContext } from '@/context/app-context'
import type { AppIconSelection } from '@/app/components/base/app-icon-picker'
import AppIconPicker from '@/app/components/base/app-icon-picker'
import Divider from '@/app/components/base/divider'
import cn from '@/utils/classnames'
export type ISettingsModalProps = {
isChat: boolean
@ -195,9 +196,9 @@ const SettingsModal: FC<ISettingsModalProps> = ({
title={t(`${prefixSettings}.title`)}
isShow={isShow}
onClose={onHide}
className={`${s.settingsModal}`}
className='max-w-[520px]'
>
<div className={`mt-6 font-medium ${s.settingTitle} text-gray-900`}>{t(`${prefixSettings}.webName`)}</div>
<div className={cn('mt-6 system-sm-semibold text-text-secondary')}>{t(`${prefixSettings}.webName`)}</div>
<div className='flex mt-2'>
<AppIcon size='large'
onClick={() => { setShowAppIconPicker(true) }}
@ -214,8 +215,8 @@ const SettingsModal: FC<ISettingsModalProps> = ({
placeholder={t('app.appNamePlaceholder') || ''}
/>
</div>
<div className={`mt-6 font-medium ${s.settingTitle} text-gray-900 `}>{t(`${prefixSettings}.webDesc`)}</div>
<p className={`mt-1 ${s.settingsTip} text-gray-500`}>{t(`${prefixSettings}.webDescTip`)}</p>
<div className={cn('mt-6 system-sm-semibold text-text-secondary')}>{t(`${prefixSettings}.webDesc`)}</div>
<p className={cn('mt-1 body-xs-regular text-text-tertiary')}>{t(`${prefixSettings}.webDescTip`)}</p>
<Textarea
className='mt-2'
value={inputInfo.desc}
@ -225,36 +226,36 @@ const SettingsModal: FC<ISettingsModalProps> = ({
{isChatBot && (
<div className='w-full mt-4'>
<div className='flex justify-between items-center'>
<div className={`font-medium ${s.settingTitle} text-gray-900 `}>{t('app.answerIcon.title')}</div>
<div className={cn('system-sm-semibold text-text-secondary')}>{t('app.answerIcon.title')}</div>
<Switch
defaultValue={inputInfo.use_icon_as_answer_icon}
onChange={v => setInputInfo({ ...inputInfo, use_icon_as_answer_icon: v })}
/>
</div>
<p className='body-xs-regular text-gray-500'>{t('app.answerIcon.description')}</p>
<p className='body-xs-regular text-text-tertiary'>{t('app.answerIcon.description')}</p>
</div>
)}
<div className={`mt-6 mb-2 font-medium ${s.settingTitle} text-gray-900 `}>{t(`${prefixSettings}.language`)}</div>
<div className={cn('mt-6 mb-2 system-sm-semibold text-text-secondary')}>{t(`${prefixSettings}.language`)}</div>
<SimpleSelect
items={languages.filter(item => item.supported)}
defaultValue={language}
onSelect={item => setLanguage(item.value as Language)}
/>
<div className='w-full mt-8'>
<p className='system-xs-medium text-gray-500'>{t(`${prefixSettings}.workflow.title`)}</p>
<p className='system-xs-medium text-text-tertiary'>{t(`${prefixSettings}.workflow.title`)}</p>
<div className='flex justify-between items-center'>
<div className='font-medium system-sm-semibold flex-grow text-gray-900'>{t(`${prefixSettings}.workflow.subTitle`)}</div>
<div className='font-medium system-sm-semibold grow text-text-primary'>{t(`${prefixSettings}.workflow.subTitle`)}</div>
<Switch
disabled={!(appInfo.mode === 'workflow' || appInfo.mode === 'advanced-chat')}
defaultValue={inputInfo.show_workflow_steps}
onChange={v => setInputInfo({ ...inputInfo, show_workflow_steps: v })}
/>
</div>
<p className='body-xs-regular text-gray-500'>{t(`${prefixSettings}.workflow.showDesc`)}</p>
<p className='body-xs-regular text-text-tertiary'>{t(`${prefixSettings}.workflow.showDesc`)}</p>
</div>
{isChat && <> <div className={`mt-8 font-medium ${s.settingTitle} text-gray-900`}>{t(`${prefixSettings}.chatColorTheme`)}</div>
<p className={`mt-1 ${s.settingsTip} text-gray-500`}>{t(`${prefixSettings}.chatColorThemeDesc`)}</p>
{isChat && <> <div className={cn('mt-8 system-sm-semibold text-text-secondary')}>{t(`${prefixSettings}.chatColorTheme`)}</div>
<p className='mt-1 body-xs-regular text-text-tertiary'>{t(`${prefixSettings}.chatColorThemeDesc`)}</p>
<Input
className='mt-2 h-10'
value={inputInfo.chatColorTheme ?? ''}
@ -262,14 +263,14 @@ const SettingsModal: FC<ISettingsModalProps> = ({
placeholder='E.g #A020F0'
/>
<div className="mt-1 flex justify-between items-center">
<p className={`ml-2 ${s.settingsTip} text-gray-500`}>{t(`${prefixSettings}.chatColorThemeInverted`)}</p>
<p className='ml-2 body-xs-regular text-text-tertiary'>{t(`${prefixSettings}.chatColorThemeInverted`)}</p>
<Switch defaultValue={inputInfo.chatColorThemeInverted} onChange={v => setInputInfo({ ...inputInfo, chatColorThemeInverted: v })}></Switch>
</div>
</>}
{systemFeatures.enable_web_sso_switch_component && <div className='w-full mt-8'>
<p className='system-xs-medium text-gray-500'>{t(`${prefixSettings}.sso.label`)}</p>
<p className='system-xs-medium text-text-tertiary'>{t(`${prefixSettings}.sso.label`)}</p>
<div className='flex justify-between items-center'>
<div className='font-medium system-sm-semibold flex-grow text-gray-900'>{t(`${prefixSettings}.sso.title`)}</div>
<div className='system-sm-semibold grow text-text-secondary'>{t(`${prefixSettings}.sso.title`)}</div>
<Tooltip
disabled={systemFeatures.sso_enforced_for_web}
popupContent={
@ -280,31 +281,31 @@ const SettingsModal: FC<ISettingsModalProps> = ({
<Switch disabled={!systemFeatures.sso_enforced_for_web || !isCurrentWorkspaceEditor} defaultValue={systemFeatures.sso_enforced_for_web && inputInfo.enable_sso} onChange={v => setInputInfo({ ...inputInfo, enable_sso: v })}></Switch>
</Tooltip>
</div>
<p className='body-xs-regular text-gray-500'>{t(`${prefixSettings}.sso.description`)}</p>
<p className='body-xs-regular text-text-tertiary'>{t(`${prefixSettings}.sso.description`)}</p>
</div>}
{!isShowMore && <div className='w-full cursor-pointer mt-8' onClick={() => setIsShowMore(true)}>
<div className='flex justify-between'>
<div className={`font-medium ${s.settingTitle} flex-grow text-gray-900`}>{t(`${prefixSettings}.more.entry`)}</div>
<div className='flex-shrink-0 w-4 h-4 text-gray-500'>
<div className='system-sm-semibold text-text-secondary'>{t(`${prefixSettings}.more.entry`)}</div>
<div className='shrink-0 w-4 h-4 text-text-tertiary'>
<ChevronRightIcon />
</div>
</div>
<p className={`mt-1 ${s.policy} text-gray-500`}>{t(`${prefixSettings}.more.copyright`)} & {t(`${prefixSettings}.more.privacyPolicy`)}</p>
<p className='mt-1 body-xs-regular text-text-tertiary'>{t(`${prefixSettings}.more.copyright`)} & {t(`${prefixSettings}.more.privacyPolicy`)}</p>
</div>}
{isShowMore && <>
<hr className='w-full mt-6' />
<div className={`mt-6 font-medium ${s.settingTitle} text-gray-900`}>{t(`${prefixSettings}.more.copyright`)}</div>
<Divider className='my-6' />
<div className='system-sm-semibold text-text-secondary'>{t(`${prefixSettings}.more.copyright`)}</div>
<Input
className='mt-2 h-10'
value={inputInfo.copyright}
onChange={onChange('copyright')}
placeholder={t(`${prefixSettings}.more.copyRightPlaceholder`) as string}
/>
<div className={`mt-8 font-medium ${s.settingTitle} text-gray-900`}>{t(`${prefixSettings}.more.privacyPolicy`)}</div>
<p className={`mt-1 ${s.settingsTip} text-gray-500`}>
<div className='mt-8 system-sm-semibold text-text-secondary'>{t(`${prefixSettings}.more.privacyPolicy`)}</div>
<p className='mt-1 body-xs-regular text-text-tertiary'>
<Trans
i18nKey={`${prefixSettings}.more.privacyPolicyTip`}
components={{ privacyPolicyLink: <Link href={'https://docs.dify.ai/user-agreement/privacy-policy'} target='_blank' rel='noopener noreferrer' className='text-primary-600' /> }}
components={{ privacyPolicyLink: <Link href={'https://docs.dify.ai/user-agreement/privacy-policy'} target='_blank' rel='noopener noreferrer' className='text-text-accent' /> }}
/>
</p>
<Input
@ -313,8 +314,8 @@ const SettingsModal: FC<ISettingsModalProps> = ({
onChange={onChange('privacyPolicy')}
placeholder={t(`${prefixSettings}.more.privacyPolicyPlaceholder`) as string}
/>
<div className={`mt-8 font-medium ${s.settingTitle} text-gray-900`}>{t(`${prefixSettings}.more.customDisclaimer`)}</div>
<p className={`mt-1 ${s.settingsTip} text-gray-500`}>{t(`${prefixSettings}.more.customDisclaimerTip`)}</p>
<div className='mt-8 system-sm-semibold text-text-secondary'>{t(`${prefixSettings}.more.customDisclaimer`)}</div>
<p className='mt-1 body-xs-regular text-text-tertiary'>{t(`${prefixSettings}.more.customDisclaimerTip`)}</p>
<Input
className='mt-2 h-10'
value={inputInfo.customDisclaimer}

@ -1,18 +0,0 @@
.settingsModal {
max-width: 32.5rem !important;
}
.settingTitle {
line-height: 21px;
font-size: 0.875rem;
}
.settingsTip {
line-height: 1.125rem;
font-size: 0.75rem;
}
.policy {
font-size: 0.75rem;
line-height: 1.125rem;
}

@ -2,7 +2,7 @@ import { create } from 'zustand'
import type { App, AppSSO } from '@/types/app'
import type { IChatItem } from '@/app/components/base/chat/chat/type'
type State = {
interface State {
appDetail?: App & Partial<AppSSO>
appSidebarExpand: string
currentLogItem?: IChatItem
@ -13,7 +13,7 @@ type State = {
showAppConfigureFeaturesModal: boolean
}
type Action = {
interface Action {
setAppDetail: (appDetail?: App & Partial<AppSSO>) => void
setAppSiderbarExpand: (state: string) => void
setCurrentLogItem: (item?: IChatItem) => void

@ -25,7 +25,7 @@ import { AlertTriangle } from '@/app/components/base/icons/src/vender/solid/aler
import AppIcon from '@/app/components/base/app-icon'
import { useStore as useAppStore } from '@/app/components/app/store'
type SwitchAppModalProps = {
interface SwitchAppModalProps {
show: boolean
appDetail: App
onSuccess?: () => void

@ -33,7 +33,7 @@ import { useChatContext } from '@/app/components/base/chat/chat/context'
const MAX_DEPTH = 3
export type IGenerationItemProps = {
export interface IGenerationItemProps {
isWorkflow?: boolean
workflowProcessData?: WorkflowProcess
className?: string

@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'
import { RiCloseLine } from '@remixicon/react'
import Run from '@/app/components/workflow/run'
type ILogDetail = {
interface ILogDetail {
runID: string
onClose: () => void
}

@ -6,7 +6,7 @@ import type { QueryParam } from './index'
import Chip from '@/app/components/base/chip'
import Input from '@/app/components/base/input'
type IFilterProps = {
interface IFilterProps {
queryParams: QueryParam
setQueryParams: (v: QueryParam) => void
}

@ -2,9 +2,7 @@
@layer components {
.action-btn {
@apply inline-flex justify-center items-center cursor-pointer text-text-tertiary
hover:text-text-secondary
hover:bg-state-base-hover
@apply inline-flex justify-center items-center cursor-pointer text-text-tertiary hover:text-text-secondary hover:bg-state-base-hover
}
.action-btn-disabled {
@ -29,21 +27,15 @@
}
.action-btn.action-btn-active {
@apply
text-text-accent
bg-state-accent-active
hover:bg-state-accent-active-alt
@apply text-text-accent bg-state-accent-active hover:bg-state-accent-active-alt
}
.action-btn.action-btn-disabled {
@apply
text-text-disabled
@apply text-text-disabled
}
.action-btn.action-btn-destructive {
@apply
text-text-destructive
bg-state-destructive-hover
@apply text-text-destructive bg-state-destructive-hover
}
}

@ -28,7 +28,7 @@ const actionButtonVariants = cva(
)
export type ActionButtonProps = {
size?: 'xs' | 'm' | 'l' | 'xl'
size?: 'xs' | 's' | 'm' | 'l' | 'xl'
state?: ActionButtonState
styleCss?: CSSProperties
} & React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof actionButtonVariants>

@ -0,0 +1,23 @@
.appIcon {
@apply flex items-center justify-center relative w-9 h-9 text-lg rounded-lg grow-0 shrink-0;
}
.appIcon.large {
@apply w-10 h-10;
}
.appIcon.small {
@apply w-8 h-8;
}
.appIcon.tiny {
@apply w-6 h-6 text-base;
}
.appIcon.xs {
@apply w-5 h-5 text-base;
}
.appIcon.rounded {
@apply rounded-full;
}

@ -1,6 +1,6 @@
import AudioPlayer from '@/app/components/base/audio-btn/audio'
declare global {
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
// eslint-disable-next-line ts/consistent-type-definitions
interface AudioPlayerManager {
instance: AudioPlayerManager
}
@ -12,6 +12,7 @@ export class AudioPlayerManager {
private audioPlayers: AudioPlayer | null = null
private msgId: string | undefined
// eslint-disable-next-line
private constructor() {
}

@ -2,7 +2,7 @@ import Toast from '@/app/components/base/toast'
import { textToAudioStream } from '@/service/share'
declare global {
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
// eslint-disable-next-line ts/consistent-type-definitions
interface Window {
ManagedMediaSource: any
}

@ -7,7 +7,7 @@ import Tooltip from '@/app/components/base/tooltip'
import Loading from '@/app/components/base/loading'
import { AudioPlayerManager } from '@/app/components/base/audio-btn/audio.player.manager'
type AudioBtnProps = {
interface AudioBtnProps {
id?: string
voice?: string
value?: string

@ -2,15 +2,15 @@
display: flex;
flex-direction: row;
align-items: center;
background-color: #ffffff;
background-color: var(--color-components-chat-input-audio-bg-alt);
border-radius: 10px;
padding: 8px;
min-width: 240px;
max-width: 420px;
max-height: 40px;
backdrop-filter: blur(5px);
border: 1px solid rgba(16, 24, 40, 0.08);
box-shadow: 0 1px 2px rgba(9, 9, 11, 0.05);
border: 1px solid var(--color-components-panel-border-subtle);
box-shadow: 0 1px 2px var(--color-shadow-shadow-3);
gap: 8px;
}
@ -19,8 +19,8 @@
width: 16px;
height: 16px;
border-radius: 50%;
background-color: #296DFF;
color: white;
background-color: var(--color-components-button-primary-bg);
color: var(--color-components-chat-input-audio-bg-alt);
border: none;
cursor: pointer;
align-items: center;
@ -30,16 +30,15 @@
}
.playButton:hover {
background-color: #3367d6;
background-color: var(--color-components-button-primary-bg-hover);
}
.playButton:disabled {
background-color: #bdbdbf;
background-color: var(--color-components-button-primary-bg-disabled);
}
.audioControls {
flex-grow: 1;
}
.progressBarContainer {
@ -76,8 +75,8 @@
.timeDisplay {
/* position: absolute; */
color: #296DFF;
border-radius: 2px;
color: var(--color-text-accent-secondary);
font-size: 12px;
order: 0;
height: 100%;
width: 50px;
@ -97,7 +96,6 @@
} */
.duration {
background-color: rgba(255, 255, 255, 0.8);
padding: 2px 4px;
border-radius: 10px;
}
@ -114,6 +112,6 @@
}
.playButton svg path,
.playButton svg rect{
fill:currentColor;
}
.playButton svg rect {
fill: currentColor;
}

@ -55,7 +55,7 @@ const AudioPlayer: React.FC<AudioPlayerProps> = ({ src }) => {
audio.load()
// Delayed generation of waveform data
// eslint-disable-next-line @typescript-eslint/no-use-before-define
// eslint-disable-next-line ts/no-use-before-define
const timer = setTimeout(() => generateWaveformData(src), 1000)
return () => {

@ -1,11 +1,13 @@
import type { ReactNode } from 'react'
import { memo } from 'react'
import cn from '@/utils/classnames'
type BadgeProps = {
className?: string
text?: string
children?: React.ReactNode
text?: ReactNode
children?: ReactNode
uppercase?: boolean
hasRedCornerMark?: boolean
}
const Badge = ({
@ -13,15 +15,20 @@ const Badge = ({
text,
children,
uppercase = true,
hasRedCornerMark,
}: BadgeProps) => {
return (
<div
className={cn(
'inline-flex items-center px-[5px] h-5 rounded-[5px] border border-divider-deep leading-3 text-text-tertiary',
'relative inline-flex items-center px-[5px] h-5 rounded-[5px] border border-divider-deep leading-3 text-text-tertiary',
uppercase ? 'system-2xs-medium-uppercase' : 'system-xs-medium',
className,
)}
>
{hasRedCornerMark && (
<div className='absolute top-[-2px] right-[-2px] w-1.5 h-1.5 border border-components-badge-status-light-error-border-inner bg-components-badge-status-light-error-bg rounded-[2px] shadow-sm'>
</div>
)}
{children || text}
</div>
)

@ -0,0 +1,28 @@
@tailwind components;
@layer components {
.badge {
@apply inline-flex justify-center items-center text-text-tertiary border border-divider-deep
}
.badge-l {
@apply rounded-md gap-1 min-w-6
}
/* m is for the regular button */
.badge-m {
@apply rounded-md gap-[3px] min-w-5
}
.badge-s {
@apply rounded-[5px] gap-0.5 min-w-[18px]
}
.badge.badge-warning {
@apply text-text-warning border border-text-warning
}
.badge.badge-accent {
@apply text-text-accent-secondary border border-text-accent-secondary
}
}

@ -0,0 +1,81 @@
import type { CSSProperties, ReactNode } from 'react'
import React from 'react'
import { type VariantProps, cva } from 'class-variance-authority'
import classNames from '@/utils/classnames'
import './index.css'
enum BadgeState {
Warning = 'warning',
Accent = 'accent',
Default = '',
}
const BadgeVariants = cva(
'badge',
{
variants: {
size: {
s: 'badge-s',
m: 'badge-m',
l: 'badge-l',
},
},
defaultVariants: {
size: 'm',
},
},
)
type BadgeProps = {
size?: 's' | 'm' | 'l'
iconOnly?: boolean
uppercase?: boolean
state?: BadgeState
styleCss?: CSSProperties
children?: ReactNode
} & React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof BadgeVariants>
function getBadgeState(state: BadgeState) {
switch (state) {
case BadgeState.Warning:
return 'badge-warning'
case BadgeState.Accent:
return 'badge-accent'
default:
return ''
}
}
const Badge: React.FC<BadgeProps> = ({
className,
size,
state = BadgeState.Default,
iconOnly = false,
uppercase = false,
styleCss,
children,
...props
}) => {
return (
<div
className={classNames(
BadgeVariants({ size, className }),
getBadgeState(state),
size === 's'
? (iconOnly ? 'p-[3px]' : 'px-[5px] py-[3px]')
: size === 'l'
? (iconOnly ? 'p-1.5' : 'px-2 py-1')
: (iconOnly ? 'p-1' : 'px-[5px] py-[2px]'),
uppercase ? 'system-2xs-medium-uppercase' : 'system-2xs-medium',
)}
style={styleCss}
{...props}
>
{children}
</div>
)
}
Badge.displayName = 'Badge'
export default Badge
export { Badge, BadgeState, BadgeVariants }

@ -4,7 +4,7 @@ import React from 'react'
import { RiAddLine } from '@remixicon/react'
import cn from '@/utils/classnames'
type Props = {
interface Props {
className?: string
onClick: () => void
}

@ -263,7 +263,7 @@ describe('build chat item tree and get thread messages', () => {
expect(tree7).toMatchSnapshot()
})
const partialMessages2 = (partialMessages as ChatItemInTree[])
const partialMessages2 = partialMessages as ChatItemInTree[]
const tree8 = buildChatItemTree(partialMessages2)
it('should work with partial messages 2', () => {
expect(tree8).toMatchSnapshot()

@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next'
import { memo } from 'react'
import Textarea from '@/app/components/base/textarea'
type InputProps = {
interface InputProps {
form: any
value: string
onChange: (variable: string, value: string) => void

@ -16,7 +16,7 @@ import type {
ConversationItem,
} from '@/models/share'
export type ChatWithHistoryContextValue = {
export interface ChatWithHistoryContextValue {
appInfoError?: any
appInfoLoading?: boolean
appMeta?: AppMeta

@ -20,7 +20,7 @@ import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'
import { checkOrSetAccessToken } from '@/app/components/share/utils'
import AppUnavailable from '@/app/components/base/app-unavailable'
type ChatWithHistoryProps = {
interface ChatWithHistoryProps {
className?: string
}
const ChatWithHistory: FC<ChatWithHistoryProps> = ({
@ -99,7 +99,7 @@ const ChatWithHistory: FC<ChatWithHistoryProps> = ({
)
}
export type ChatWithHistoryWrapProps = {
export interface ChatWithHistoryWrapProps {
installedAppInfo?: InstalledApp
className?: string
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save