Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
0dd43a63
Commit
0dd43a63
authored
Jul 04, 2023
by
Joel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/embedding' into deploy/dev
parents
45647d5a
836a3eab
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
4 deletions
+20
-4
index.tsx
web/app/components/app/chat/index.tsx
+1
-1
index.tsx
web/app/components/share/chat/index.tsx
+3
-0
index.tsx
web/app/components/share/chatbot/index.tsx
+6
-3
app-debug.en.ts
web/i18n/lang/app-debug.en.ts
+5
-0
app-debug.zh.ts
web/i18n/lang/app-debug.zh.ts
+5
-0
No files found.
web/app/components/app/chat/index.tsx
View file @
0dd43a63
...
@@ -204,7 +204,7 @@ const Answer: FC<IAnswerProps> = ({ item, feedbackDisabled = false, isHideFeedba
...
@@ -204,7 +204,7 @@ const Answer: FC<IAnswerProps> = ({ item, feedbackDisabled = false, isHideFeedba
return
(
return
(
<
Tooltip
<
Tooltip
selector=
{
`user-feedback-${randomString(16)}`
}
selector=
{
`user-feedback-${randomString(16)}`
}
content=
{
(
isWebScene
||
(
!
isUserFeedback
&&
!
isWebScene
))
?
isLike
?
'取消赞同'
:
'取消反对'
:
(
!
isWebScene
&&
isUserFeedback
)
?
`用户表示${isLike ? '赞同' : '反对'}`
:
''
}
content=
{
(
(
isWebScene
||
(
!
isUserFeedback
&&
!
isWebScene
))
?
isLike
?
t
(
'appDebug.operation.cancelAgree'
)
:
t
(
'appDebug.operation.cancelDisagree'
)
:
(
!
isWebScene
&&
isUserFeedback
)
?
`${t('appDebug.operation.userAction')}${isLike ? t('appDebug.operation.agree') : t('appDebug.operation.disagree')}`
:
''
)
as
string
}
>
>
<
div
<
div
className=
{
`relative box-border flex items-center justify-center h-7 w-7 p-0.5 rounded-lg bg-white cursor-pointer text-gray-500 hover:text-gray-800 ${(!isWebScene && isUserFeedback) ? '!cursor-default' : ''}`
}
className=
{
`relative box-border flex items-center justify-center h-7 w-7 p-0.5 rounded-lg bg-white cursor-pointer text-gray-500 hover:text-gray-800 ${(!isWebScene && isUserFeedback) ? '!cursor-default' : ''}`
}
...
...
web/app/components/share/chat/index.tsx
View file @
0dd43a63
...
@@ -369,6 +369,9 @@ const Main: FC<IMainProps> = ({
...
@@ -369,6 +369,9 @@ const Main: FC<IMainProps> = ({
}
}
const
checkCanSend
=
()
=>
{
const
checkCanSend
=
()
=>
{
if
(
currConversationId
!==
'-1'
)
return
true
const
prompt_variables
=
promptConfig
?.
prompt_variables
const
prompt_variables
=
promptConfig
?.
prompt_variables
const
inputs
=
currInputs
const
inputs
=
currInputs
if
(
!
inputs
||
!
prompt_variables
||
prompt_variables
?.
length
===
0
)
if
(
!
inputs
||
!
prompt_variables
||
prompt_variables
?.
length
===
0
)
...
...
web/app/components/share/chatbot/index.tsx
View file @
0dd43a63
...
@@ -376,6 +376,9 @@ const Main: FC<IMainProps> = ({
...
@@ -376,6 +376,9 @@ const Main: FC<IMainProps> = ({
}
}
const
checkCanSend
=
()
=>
{
const
checkCanSend
=
()
=>
{
if
(
currConversationId
!==
'-1'
)
return
true
const
prompt_variables
=
promptConfig
?.
prompt_variables
const
prompt_variables
=
promptConfig
?.
prompt_variables
const
inputs
=
currInputs
const
inputs
=
currInputs
if
(
!
inputs
||
!
prompt_variables
||
prompt_variables
?.
length
===
0
)
if
(
!
inputs
||
!
prompt_variables
||
prompt_variables
?.
length
===
0
)
...
@@ -556,9 +559,9 @@ const Main: FC<IMainProps> = ({
...
@@ -556,9 +559,9 @@ const Main: FC<IMainProps> = ({
icon=
{
siteInfo
.
icon
||
''
}
icon=
{
siteInfo
.
icon
||
''
}
icon_background=
{
siteInfo
.
icon_background
}
icon_background=
{
siteInfo
.
icon_background
}
isEmbedScene=
{
true
}
isEmbedScene=
{
true
}
// isMobile={isMobile}
// isMobile={isMobile}
// onShowSideBar={showSidebar}
// onShowSideBar={showSidebar}
// onCreateNewChat={() => handleConversationIdChange('-1')}
// onCreateNewChat={() => handleConversationIdChange('-1')}
/>
/>
<
div
className=
{
'flex bg-white overflow-hidden'
}
>
<
div
className=
{
'flex bg-white overflow-hidden'
}
>
...
...
web/i18n/lang/app-debug.en.ts
View file @
0dd43a63
...
@@ -6,6 +6,11 @@ const translation = {
...
@@ -6,6 +6,11 @@ const translation = {
addFeature
:
'Add Feature'
,
addFeature
:
'Add Feature'
,
automatic
:
'Automatic'
,
automatic
:
'Automatic'
,
stopResponding
:
'Stop responding'
,
stopResponding
:
'Stop responding'
,
agree
:
'like'
,
disagree
:
'dislike'
,
cancelAgree
:
'Cancel like'
,
cancelDisagree
:
'Cancel dislike'
,
userAction
:
'User '
,
},
},
notSetAPIKey
:
{
notSetAPIKey
:
{
title
:
'LLM provider key has not been set'
,
title
:
'LLM provider key has not been set'
,
...
...
web/i18n/lang/app-debug.zh.ts
View file @
0dd43a63
...
@@ -6,6 +6,11 @@ const translation = {
...
@@ -6,6 +6,11 @@ const translation = {
addFeature
:
'添加功能'
,
addFeature
:
'添加功能'
,
automatic
:
'自动编排'
,
automatic
:
'自动编排'
,
stopResponding
:
'停止响应'
,
stopResponding
:
'停止响应'
,
agree
:
'赞同'
,
disagree
:
'反对'
,
cancelAgree
:
'取消赞同'
,
cancelDisagree
:
'取消反对'
,
userAction
:
'用户表示'
,
},
},
notSetAPIKey
:
{
notSetAPIKey
:
{
title
:
'LLM 提供者的密钥未设置'
,
title
:
'LLM 提供者的密钥未设置'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment