Skip to content

Commit

Permalink
fix: solve the issue of task tigger (#440)
Browse files Browse the repository at this point in the history
* fix: solve the issue of task tigger

* fix: fix ci
  • Loading branch information
xingwanying authored Oct 16, 2024
1 parent 3176e81 commit 1772e73
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
9 changes: 6 additions & 3 deletions client/app/factory/edit/components/Knowledge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { convertToLocalTime } from '@/app/utils/time';
import { useBotTask } from './TaskContext';

type IProps = {
botId: string;
repoName: string;
goBack: () => void;
};
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -116,7 +115,11 @@ export default function Knowledge({ botId, repoName, goBack }: IProps) {
<span>{I18N.components.Knowledge.zhiShiKuFenDuan}</span>
</div>
<div className="flex items-center gap-2">
<KnowledgeBtn botId={botId} onClick={() => {}} mode={'pageHeader'} />
<KnowledgeBtn
repoName={repoName}
onClick={() => {}}
mode={'pageHeader'}
/>
</div>
</div>
<div className="pt-[40px] py-[40px] overflow-y-auto">
Expand Down
1 change: 0 additions & 1 deletion client/app/factory/edit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,6 @@ export default function Edit() {

{visibleType === VisibleTypeEnum.KNOWLEDGE_DETAIL ? (
<Knowledge
botId={botProfile.id}
repoName={botProfile.repoName!}
goBack={() => {
setVisibleType(VisibleTypeEnum.BOT_CONFIG);
Expand Down
2 changes: 1 addition & 1 deletion petercat_utils/rag_helper/git_doc_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "petercat_utils"
version = "0.1.37"
version = "0.1.38"
description = ""
authors = ["raoha.rh <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 1772e73

Please sign in to comment.