From 1772e732415f66fe008849faeecf8ceb4de12a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BC=A8=E7=BC=A8?= Date: Wed, 16 Oct 2024 11:40:58 +0800 Subject: [PATCH] fix: solve the issue of task tigger (#440) * fix: solve the issue of task tigger * fix: fix ci --- client/app/factory/edit/components/Knowledge.tsx | 9 ++++++--- client/app/factory/edit/page.tsx | 1 - petercat_utils/rag_helper/git_doc_task.py | 2 +- pyproject.toml | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/client/app/factory/edit/components/Knowledge.tsx b/client/app/factory/edit/components/Knowledge.tsx index 668eafdc..71c5e79b 100644 --- a/client/app/factory/edit/components/Knowledge.tsx +++ b/client/app/factory/edit/components/Knowledge.tsx @@ -20,7 +20,6 @@ import { convertToLocalTime } from '@/app/utils/time'; import { useBotTask } from './TaskContext'; type IProps = { - botId: string; repoName: string; goBack: () => void; }; @@ -79,7 +78,7 @@ const ChunkList = ({ data }: { data: RAGDoc[] }) => { ); }; -export default function Knowledge({ botId, repoName, goBack }: IProps) { +export default function Knowledge({ repoName, goBack }: IProps) { const { botProfile } = useBot(); const [pageSize, setPageSize] = React.useState(12); const [pageNumber, setPageNumber] = React.useState(1); @@ -116,7 +115,11 @@ export default function Knowledge({ botId, repoName, goBack }: IProps) { {I18N.components.Knowledge.zhiShiKuFenDuan}
- {}} mode={'pageHeader'} /> + {}} + mode={'pageHeader'} + />
diff --git a/client/app/factory/edit/page.tsx b/client/app/factory/edit/page.tsx index 2da30b8b..fa873421 100644 --- a/client/app/factory/edit/page.tsx +++ b/client/app/factory/edit/page.tsx @@ -489,7 +489,6 @@ export default function Edit() { {visibleType === VisibleTypeEnum.KNOWLEDGE_DETAIL ? ( { setVisibleType(VisibleTypeEnum.BOT_CONFIG); diff --git a/petercat_utils/rag_helper/git_doc_task.py b/petercat_utils/rag_helper/git_doc_task.py index 7088f378..9e6caa18 100644 --- a/petercat_utils/rag_helper/git_doc_task.py +++ b/petercat_utils/rag_helper/git_doc_task.py @@ -43,7 +43,6 @@ def add_rag_git_doc_task(config: RAGGitDocConfig, extra=None): extra["node_type"] = GitDocTaskNodeType.BLOB.value sha = get_path_sha(repo, commit_id, config.file_path) - doc_task = GitDocTask( commit_id=commit_id, sha=sha, @@ -128,6 +127,7 @@ def handle_tree_node(self): repo_name=record["repo_name"], node_type=record["node_type"], path=record["path"], + bot_id=self.bot_id, ) doc_task.send() diff --git a/pyproject.toml b/pyproject.toml index 527cfd21..51413e33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "petercat_utils" -version = "0.1.37" +version = "0.1.38" description = "" authors = ["raoha.rh "] readme = "README.md"