feat: Introduce Wiki Fixer agent and related functionalities
- Added a new built-in agent, "Wiki Fixer," designed to repair and optimize Wiki pages based on linter issues, with multilingual support for enhanced accessibility. - Implemented a corresponding system prompt detailing the agent's role, mission, and workflow for effective issue resolution. - Introduced new API functions for listing and updating wiki issues, allowing for better management of content conflicts and errors. - Enhanced the frontend with new UI elements to display pending issues and facilitate auto-fixing, improving user interaction with the Wiki content. These changes significantly enhance the agent's capabilities for maintaining the accuracy and quality of Wiki pages, fostering a more reliable knowledge base.
This commit is contained in:
@@ -41,9 +41,24 @@ export interface WikiStats {
|
||||
orphan_count: number;
|
||||
recent_updates: WikiPage[];
|
||||
pending_tasks: number;
|
||||
pending_issues: number;
|
||||
is_active: boolean;
|
||||
}
|
||||
|
||||
export interface WikiPageIssue {
|
||||
id: string;
|
||||
tenant_id: number;
|
||||
knowledge_base_id: string;
|
||||
slug: string;
|
||||
issue_type: string;
|
||||
description: string;
|
||||
suspected_knowledge_ids: string[];
|
||||
status: string;
|
||||
reported_by: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
// Wiki API Functions
|
||||
export function listWikiPages(kbId: string, params?: {
|
||||
page_type?: string;
|
||||
@@ -104,6 +119,17 @@ export function searchWikiPages(kbId: string, q: string, limit?: number) {
|
||||
return get(`/api/v1/knowledgebase/${kbId}/wiki/search?${params.toString()}`);
|
||||
}
|
||||
|
||||
export function listWikiIssues(kbId: string, slug?: string, status?: string) {
|
||||
const params = new URLSearchParams();
|
||||
if (slug) params.set('slug', slug);
|
||||
if (status) params.set('status', status);
|
||||
return get(`/api/v1/knowledgebase/${kbId}/wiki/issues?${params.toString()}`);
|
||||
}
|
||||
|
||||
export function updateWikiIssueStatus(kbId: string, issueId: string, status: string) {
|
||||
return put(`/api/v1/knowledgebase/${kbId}/wiki/issues/${issueId}/status`, { status });
|
||||
}
|
||||
|
||||
export function rebuildWikiLinks(kbId: string) {
|
||||
return post(`/api/v1/knowledgebase/${kbId}/wiki/rebuild-links`, {});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user