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
8c4ae98f
Unverified
Commit
8c4ae98f
authored
Oct 19, 2023
by
Joel
Committed by
GitHub
Oct 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add advanced prompt doc link (#1363)
parent
08aa3678
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
history-panel.tsx
...tion/config-prompt/conversation-histroy/history-panel.tsx
+4
-2
advanced-mode-waring.tsx
...ts/app/configuration/prompt-mode/advanced-mode-waring.tsx
+6
-4
No files found.
web/app/components/app/configuration/config-prompt/conversation-histroy/history-panel.tsx
View file @
8c4ae98f
'use client'
'use client'
import
type
{
FC
}
from
'react'
import
type
{
FC
}
from
'react'
import
React
from
'react'
import
React
from
'react'
import
{
useContext
}
from
'use-context-selector'
import
{
useTranslation
}
from
'react-i18next'
import
{
useTranslation
}
from
'react-i18next'
import
OperationBtn
from
'@/app/components/app/configuration/base/operation-btn'
import
OperationBtn
from
'@/app/components/app/configuration/base/operation-btn'
import
Panel
from
'@/app/components/app/configuration/base/feature-panel'
import
Panel
from
'@/app/components/app/configuration/base/feature-panel'
import
{
MessageClockCircle
}
from
'@/app/components/base/icons/src/vender/solid/general'
import
{
MessageClockCircle
}
from
'@/app/components/base/icons/src/vender/solid/general'
import
I18n
from
'@/context/i18n'
type
Props
=
{
type
Props
=
{
showWarning
:
boolean
showWarning
:
boolean
...
@@ -16,6 +18,7 @@ const HistoryPanel: FC<Props> = ({
...
@@ -16,6 +18,7 @@ const HistoryPanel: FC<Props> = ({
onShowEditModal
,
onShowEditModal
,
})
=>
{
})
=>
{
const
{
t
}
=
useTranslation
()
const
{
t
}
=
useTranslation
()
const
{
locale
}
=
useContext
(
I18n
)
return
(
return
(
<
Panel
<
Panel
...
@@ -40,8 +43,7 @@ const HistoryPanel: FC<Props> = ({
...
@@ -40,8 +43,7 @@ const HistoryPanel: FC<Props> = ({
>
>
{
showWarning
&&
(
{
showWarning
&&
(
<
div
className=
'flex justify-between py-2 px-3 rounded-b-xl bg-[#FFFAEB] text-xs text-gray-700'
>
<
div
className=
'flex justify-between py-2 px-3 rounded-b-xl bg-[#FFFAEB] text-xs text-gray-700'
>
{
/* <div>{t('appDebug.feature.conversationHistory.tip')} <a href="https://docs.dify.ai/getting-started/readme" target='_blank' className='text-[#155EEF]'>{t('appDebug.feature.conversationHistory.learnMore')}</a></div> */
}
<
div
>
{
t
(
'appDebug.feature.conversationHistory.tip'
)
}
<
a
href=
{
`https://docs.dify.ai/${locale === 'zh-Hans' ? 'v/zh-hans/' : ''}advanced/prompt-engineering`
}
target=
'_blank'
className=
'text-[#155EEF]'
>
{
t
(
'appDebug.feature.conversationHistory.learnMore'
)
}
</
a
></
div
>
<
div
>
{
t
(
'appDebug.feature.conversationHistory.tip'
)
}
</
div
>
</
div
>
</
div
>
)
}
)
}
</
Panel
>
</
Panel
>
...
...
web/app/components/app/configuration/prompt-mode/advanced-mode-waring.tsx
View file @
8c4ae98f
...
@@ -2,9 +2,12 @@
...
@@ -2,9 +2,12 @@
import
type
{
FC
}
from
'react'
import
type
{
FC
}
from
'react'
import
React
from
'react'
import
React
from
'react'
import
{
useTranslation
}
from
'react-i18next'
import
{
useTranslation
}
from
'react-i18next'
import
{
useContext
}
from
'use-context-selector'
import
I18n
from
'@/context/i18n'
const
AdvancedModeWarning
:
FC
=
()
=>
{
const
AdvancedModeWarning
:
FC
=
()
=>
{
const
{
t
}
=
useTranslation
()
const
{
t
}
=
useTranslation
()
const
{
locale
}
=
useContext
(
I18n
)
const
[
show
,
setShow
]
=
React
.
useState
(
true
)
const
[
show
,
setShow
]
=
React
.
useState
(
true
)
if
(
!
show
)
if
(
!
show
)
return
null
return
null
...
@@ -14,14 +17,13 @@ const AdvancedModeWarning: FC = () => {
...
@@ -14,14 +17,13 @@ const AdvancedModeWarning: FC = () => {
<
div
className=
'flex justify-between items-center'
>
<
div
className=
'flex justify-between items-center'
>
<
div
className=
'text-xs leading-[18px] '
>
<
div
className=
'text-xs leading-[18px] '
>
<
span
className=
'text-gray-700'
>
{
t
(
'appDebug.promptMode.advancedWarning.description'
)
}
</
span
>
<
span
className=
'text-gray-700'
>
{
t
(
'appDebug.promptMode.advancedWarning.description'
)
}
</
span
>
{
/* TODO: Doc link */
}
<
a
{
/* <a
className=
'font-medium text-[#155EEF]'
className=
'font-medium text-[#155EEF]'
href=
'https://docs.dify.ai/getting-started/readme'
href=
{
`https://docs.dify.ai/${locale === 'zh-Hans' ? 'v/zh-hans/' : ''}advanced/prompt-engineering`
}
target=
'_blank'
target=
'_blank'
>
>
{
t
(
'appDebug.promptMode.advancedWarning.learnMore'
)
}
{
t
(
'appDebug.promptMode.advancedWarning.learnMore'
)
}
</a>
*/
}
</
a
>
</
div
>
</
div
>
<
div
<
div
...
...
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