WeKnora/internal/agent/tools
wizardchen e147209e77 feat: Implement comprehensive wiki feature for knowledge bases
This commit introduces the complete wiki feature for WeKnora, enabling AI-powered wiki page generation and management. The implementation includes:

**Backend Changes:**
- Wiki data model: WikiPage type with support for multiple page types (Summary, Entity, Concept, Index, Log)
- Database schema: wiki_pages table with full migration support
- WikiPageService: CRUD operations and page management
- WikiPageRepository: GORM-based persistence layer
- Wiki ingest pipeline: Automated generation of wiki pages from knowledge documents
  * Summary page generation using LLM
  * Entity and concept extraction in a single LLM call
  * Synthesis opportunity detection
  * Index page rebuilding
  * Log page maintenance
- Wiki boost feature: Enhance chat retrieval with wiki context
- Wiki linting: Maintenance and validation utilities
- Agent wiki tools: Enable agents to query and interact with wiki pages
- Wiki prompts: Comprehensive LLM prompt templates for all wiki generation tasks
- Language support: Reuse existing middleware language infrastructure for LLM prompts

**Frontend Changes:**
- Wiki browser UI: View all wiki pages with filtering and search
- Wiki API client: Knowledge base wiki management endpoints
- Knowledge base editor: Configure wiki settings (language, auto-ingest, synthesis model)
- i18n updates: Support for English, Korean, Russian, and Chinese interfaces

**Configuration:**
- Container DI: Wire up all wiki services
- Router: Register wiki API endpoints
- Task handling: Support async wiki ingest tasks

**Testing:**
- Unit tests for wiki page types
- Service layer tests
- Endpoint tests for wiki operations
- Integration tests with LLM mocking

**Documentation:**
- Language refactoring analysis and guides
- Implementation completion reports
- Quick reference guides for developers

**Key Features:**
✅ LLM-powered wiki page generation from documents
✅ Multi-language support (9+ languages)
✅ Automatic extraction of entities and concepts
✅ Synthesis opportunity detection
✅ Index and log page maintenance
✅ Progressive wiki building across multiple documents
✅ Agent-based wiki interaction
✅ Chat retrieval enhancement with wiki context
✅ Full frontend UI for wiki browsing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 21:17:18 +08:00
..
data_analysis.go feat: use language-neutral English prompts for multilingual LLM responses 2026-03-06 21:08:12 +08:00
data_schema.go feat: add organization management features 2026-02-09 11:40:25 +08:00
database_query.go feat(database): enhance DatabaseQueryTool with search scope filtering 2026-03-31 10:52:01 +08:00
definitions.go feat: Implement comprehensive wiki feature for knowledge bases 2026-04-22 21:17:18 +08:00
final_answer.go feat: implement final_answer tool and enhance agent duration tracking 2026-03-09 11:46:56 +08:00
get_document_info.go refactor(agent): streamline document info retrieval and enhance chunk search logic 2026-03-19 18:20:09 +08:00
grep_chunks.go feat(output): enhance output formatting to XML for various tools 2026-04-17 12:11:03 +08:00
json_repair.go feat(agent): enhance tool execution and message sanitization 2026-03-25 22:08:29 +08:00
json_repair_test.go feat(agent): enhance tool execution and message sanitization 2026-03-25 22:08:29 +08:00
knowledge_search.go feat(output): enhance output formatting to XML for various tools 2026-04-17 12:11:03 +08:00
list_knowledge_chunks.go fix: remove limit/offset from required in list_knowledge_chunks JSON Schema 2026-04-21 23:27:14 +08:00
mcp_tool.go feat(mcp): implement reconnection logic for MCP tool calls and tool listing 2026-03-31 11:57:15 +08:00
mcp_tool_image_test.go feat: auto-describe MCP tool result images via VLM 2026-03-25 21:38:15 +08:00
mcp_tool_test.go feat(tests): add comprehensive tests for MCPTool functionality 2026-03-25 22:08:29 +08:00
normalize_id.go feat(agent): enhance tool execution and message sanitization 2026-03-25 22:08:29 +08:00
normalize_id_test.go feat(agent): enhance tool execution and message sanitization 2026-03-25 22:08:29 +08:00
param_cast.go refactor(prompt): streamline context handling in templates 2026-03-25 22:08:29 +08:00
param_cast_test.go refactor(prompt): streamline context handling in templates 2026-03-25 22:08:29 +08:00
param_validate.go feat(agent): implement memory consolidation and context management 2026-03-25 22:08:29 +08:00
param_validate_test.go feat(agent): implement memory consolidation and context management 2026-03-25 22:08:29 +08:00
query_knowledge_graph.go feat: use language-neutral English prompts for multilingual LLM responses 2026-03-06 21:08:12 +08:00
registry.go feat(agent): implement memory consolidation and context management 2026-03-25 22:08:29 +08:00
sanitize_messages.go feat(agent): enhance tool execution and message sanitization 2026-03-25 22:08:29 +08:00
sanitize_messages_test.go feat(agent): enhance tool execution and message sanitization 2026-03-25 22:08:29 +08:00
sequentialthinking.go refactor(prompt): streamline context handling in templates 2026-03-25 22:08:29 +08:00
skill_execute.go feat: optimize security and deployment of agent skills 2026-02-04 20:08:49 +08:00
skill_read.go feat: support agent skills 2026-02-04 20:08:49 +08:00
strip_think.go refactor(agent): remove query display from DatabaseQuery component and update tool result structure 2026-03-25 22:08:29 +08:00
strip_think_test.go refactor(agent): remove query display from DatabaseQuery component and update tool result structure 2026-03-25 22:08:29 +08:00
todo_write.go feat: use language-neutral English prompts for multilingual LLM responses 2026-03-06 21:08:12 +08:00
tool.go feat: use language-neutral English prompts for multilingual LLM responses 2026-03-06 21:08:12 +08:00
truncate.go feat(agent): implement memory consolidation and context management 2026-03-25 22:08:29 +08:00
truncate_test.go feat(agent): implement memory consolidation and context management 2026-03-25 22:08:29 +08:00
web_fetch.go fix(security): support IPv6 in SSRF validation via whitelist mechanism 2026-03-31 20:45:15 +08:00
web_search.go feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00
wiki_tools.go feat: Implement comprehensive wiki feature for knowledge bases 2026-04-22 21:17:18 +08:00
wiki_tools_test.go feat: Implement comprehensive wiki feature for knowledge bases 2026-04-22 21:17:18 +08:00