新增文件上传限制配置,支持导出Markdown文件为ZIP格式;更新相关文档和API处理逻辑#58
Merged
Conversation
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces functionality to export warehouse documents as a Markdown ZIP file and sets a configurable maximum file upload size. The changes span backend, frontend, and documentation updates to support these features.
Backend Changes:
Added Markdown Export Logic:
ExportMarkdownZipmethod inWarehouseServiceto generate and return a ZIP file containing Markdown files for all documents in a warehouse. This includes recursive handling of document catalogs. (src/KoalaWiki/Services/WarehouseService.cs, src/KoalaWiki/Services/WarehouseService.csR391-R495)Introduced
MaxFileLimitConfiguration:MaxFileLimitproperty toOpenAIOptionsand updated theInitConfigmethod to read its value from configuration. (src/KoalaWiki/Options/OpenAIOptions.cs, [1] [2]Program.csusing theMaxFileLimitvalue. (src/KoalaWiki/Program.cs, src/KoalaWiki/Program.csR28-R37)Frontend Changes:
Export Markdown Button:
layout.client.tsx) to trigger the Markdown export feature. The button uses a modal for confirmation and downloads the ZIP file upon success. (web/app/[owner]/[name]/layout.client.tsx, web/app/[owner]/[name]/layout.client.tsxL532-R624, web/app/[owner]/[name]/layout.client.tsxL762-R831)Client API Updates:
clientFetchApito handle ZIP file responses and added a newExportMarkdownZipservice for triggering the export API. (web/app/services/api.ts, [1];web/app/services/warehouseService.ts, [2]Documentation Updates:
Configurable Options:
MAX_FILE_LIMITconfiguration in both English (README.md) and Chinese (README.zh-CN.md). [1] [2]Graph Representation:
graph TDsections in both documentation files to includeMAX_FILE_LIMIT. [1] [2]