Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: solve the issue of task tigger #440

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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