Thank you for your submission, an automated scan of your plugin code's revealed the following issues:

### Required

[[1](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/components/settings/AgentClientSettingTab.ts#L103)][[2](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/components/chat/MarkdownTextRenderer.tsx#L21)]:Using `innerHTML`, `outerHTML` or similar API's is a security risk. Instead, use the DOM API or the Obsidian helper functions: <https://docs.obsidian.md/Plugins/User+interface/HTML+elements>

[[1](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L102)]:Do not detach leaves with your custom view in `onunload`, this is an antipattern, see: <https://docs.obsidian.md/Plugins/Releasing/Plugin+guidelines#Don't+detach+leaves+in+%60onunload%60>

[[1](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/ChatView.tsx#L370)][[2](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/ChatView.tsx#L373)][[3](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/ChatView.tsx#L745)][[4](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/ChatView.tsx#L749)][[5](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/components/chat/MessageContentRenderer.tsx#L287)][[6](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/components/chat/MessageContentRenderer.tsx#L293)][[7](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/components/ui/HeaderButton.tsx#L23)][[8](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/components/ui/HeaderButton.tsx#L53)][[9](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/components/ui/HeaderButton.tsx#L57)][[10](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/components/ui/HeaderButton.tsx#L61)][[11](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/components/ui/HeaderButton.tsx#L64)]:You should avoid assigning styles via JavaScript or in HTML and instead move all these styles into CSS so that they are more easily adaptable by themes and snippets.


[[1](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/ChatView.tsx#L484)][[2](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/ChatView.tsx#L499)]:This is only available on desktop, use the [Platform](https://docs.obsidian.md/Reference/TypeScript+API/Platform) interface from the Obsidian API instead.



---

### Optional

[[1](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/utils/settings-utils.ts#L28)][[2](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/utils/settings-utils.ts#L29)][[3](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L131)][[4](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L132)][[5](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L138)][[6](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L140)][[7](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L152)][[8](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L153)][[9](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L179)][[10](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L180)][[11](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L181)][[12](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L204)][[13](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L206)][[14](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L208)][[15](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L216)][[16](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L217)][[17](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L220)][[18](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L221)][[19](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L224)][[20](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/main.ts#L225)][[21](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/terminal-manager.ts#L56-L60)][[22](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/services/acp-client.ts#L111)][[23](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/services/acp-client.ts#L112)][[24](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/ChatView.tsx#L247)][[25](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/ChatView.tsx#L248)][[26](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/ChatView.tsx#L290-L292)][[27](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/ChatView.tsx#L327)][[28](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/ChatView.tsx#L336)][[29](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/ChatView.tsx#L339)][[30](https://github.com/RAIT-09/obsidian-agent-client/blob/8e96fbca5061fb436c20a61d5034bc0f685df8cf/src/ChatView.tsx#L340)] and more :Casting to `any` should be avoided as much as possible.



---



Do <b>NOT</b> open a new PR for re-validation.
Once you have pushed all of the required changes to your repo, the bot will update the labels on this PR within 6 hours.
If you think some of the required changes are incorrect, please comment with `/skip` and the reason why you think the results are incorrect.