feat: Implement wiki editing functionalities and UI components

- Added new tools for wiki page editing, including writing, replacing text, renaming, and deleting pages, with corresponding data structures for each action.
- Enhanced the frontend with a new `WikiEditResult` component to display results of wiki edits, supporting multiple languages for improved accessibility.
- Updated localization files for English and Chinese to include new strings related to wiki actions.
- Modified existing tools to return structured data for wiki actions, improving the clarity and usability of the output messages.

These changes significantly enhance the wiki editing capabilities, providing users with a more robust and user-friendly experience when managing wiki content.
This commit is contained in:
wizardchen
2026-04-10 21:35:28 +08:00
parent 995e2157cd
commit 84edfa5439
10 changed files with 483 additions and 11 deletions
+8
View File
@@ -404,3 +404,11 @@ func extractSnippet(content string, query string) string {
return "... " + strings.TrimSpace(snippet) + " ..."
}
func truncateRunes(s string, maxRunes int) string {
runes := []rune(s)
if len(runes) <= maxRunes {
return s
}
return string(runes[:maxRunes]) + "..."
}