Refactor workflowTip component to exclude message
This commit is contained in:
parent
9ebd041102
commit
4b75f3d85e
@ -11,14 +11,14 @@ interface IProps {
|
|||||||
const showTipArray = ["/unit_tests", "/pr", "/ask-code"];
|
const showTipArray = ["/unit_tests", "/pr", "/ask-code"];
|
||||||
|
|
||||||
const WorkflowTip = ({ messageIndex }: IProps) => {
|
const WorkflowTip = ({ messageIndex }: IProps) => {
|
||||||
// 单元测试、PR和Ask-code
|
|
||||||
const { chat } = useMst();
|
const { chat } = useMst();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
if (
|
if (
|
||||||
messageIndex &&
|
messageIndex &&
|
||||||
chat.messages[messageIndex - 1] &&
|
chat.messages[messageIndex - 1] &&
|
||||||
chat.messages[messageIndex - 1]?.message?.startsWith("/") &&
|
chat.messages[messageIndex - 1]?.message?.startsWith("/") &&
|
||||||
showTipArray.includes(chat.messages[messageIndex - 1]?.message)
|
showTipArray.includes(chat.messages[messageIndex - 1]?.message) &&
|
||||||
|
!chat.messages[messageIndex]?.message?.includes("操作指南")
|
||||||
) {
|
) {
|
||||||
const name = t(chat.messages[messageIndex - 1]?.message);
|
const name = t(chat.messages[messageIndex - 1]?.message);
|
||||||
return (
|
return (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user