# Description This is an agent for proofreading comments in Rust source code files. It is slightly more optimized for the Rust version compared to the `proof-comments.devai` version. # Data ```lua -- Notes: -- - input: This is the FileMeta (with .path, .name, .stem, .ext) for each file matching the -f glob. -- - file::load(input.path) will return a FileRecord, adding .content for the content of the file. -- - In LUA, to return a dictionary/object, use the notation `{ name = value, … }`. return { file = utils.file.load(input.path) }; ``` # Instruction For the following Rust file: {{data.file.path}} ```{{data.file.ext}} {{data.file.content}} ``` - Correct the English of all comments if it is a code base (do not correct the code). - Correct the English of all content if it is a Markdown file. - Only correct comments if necessary. - Preserve the whitespace (do not change tabs into spaces and vice versa). - If English spelling and grammar are correct, do not change. - Return the corrected content without any explanation. # Output ```lua -- Note: See `proof-comments.devai` for an explanation. local content = utils.md.outer_block_content_or_raw(ai_response.content) -- Note: See `proof-comments.devai` for an explanation. local content = utils.text.ensure_single_ending_newline(content) -- Example of how to save to the same file utils.file.save(data.file.path, content) -- This will be printed by devai if it is a string return "File processed: " .. data.file.path ```