### Required

[\[1\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/main.ts#L79-L79)[\[2\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/main.ts#L98-L98)[\[3\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/main.ts#L117-L117)[\[4\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/main.ts#L136-L136)[\[5\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/main.ts#L155-L155)[\[6\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/advanced-features-modal.ts#L100-L100)[\[7\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/advanced-features-modal.ts#L141-L141)[\[8\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/advanced-features-modal.ts#L176-L176)[\[9\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/advanced-features-modal.ts#L208-L208)[\[10\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/advanced-features-modal.ts#L258-L258)[\[11\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/file-manager.ts#L136-L136)[\[12\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/file-manager.ts#L161-L163)[\[13\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/search-modal.ts#L109-L109)[\[14\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/search-modal.ts#L431-L431)[\[15\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/search-modal.ts#L480-L482)[\[16\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/search-modal.ts#L491-L491)[\[17\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/settings.ts#L68-L68)[\[18\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/settings.ts#L370-L370)
Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator.

[\[1\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/main.ts#L251-L251)
This assertion is unnecessary since it does not change the type of the expression.

[\[1\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/advanced-ai-features.ts#L361-L361)
Avoid casting to 'TFile'. Use an 'instanceof TFile' check to safely narrow the type.

[\[1\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/advanced-features-modal.ts#L236-L236)[\[2\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/googleai-service.ts#L104-L104)[\[3\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/googleai-service.ts#L168-L168)[\[4\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/search-modal.ts#L383-L383)[\[5\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/utils.ts#L140-L140)[\[6\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/utils.ts#L235-L235)
Unexpected any. Specify a different type.

[\[1\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/advanced-features-modal.ts#L272-L272)
Promise returned in function argument where a void return was expected.

[\[1\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/advanced-features-modal.ts#L379-L379)
`execCommand` is deprecated. [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/execCommand)

[\[1\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/googleai-service.ts#L40-L40)
Async method 'listModels' has no 'await' expression.

[\[1\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/search-modal.ts#L39-L39)[\[2\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/search-modal.ts#L52-L52)[\[3\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/settings.ts#L323-L323)
Unexpected use of 'localStorage'. Prefer `App#saveLocalStorage` / `App#loadLocalStorage` functions to write / read localStorage data that's unique to a vault.

[\[1\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/search-modal.ts#L431-L431)
Avoid using the main plugin instance as a component. Its lifecycle is too long, which can cause memory leaks.

[\[1\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/search-modal.ts#L496-L496)
Unnecessary escape character: \/.

[\[1\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/settings.ts#L21-L21)[\[2\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/settings.ts#L109-L109)[\[3\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/settings.ts#L136-L136)[\[4\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/settings.ts#L191-L191)[\[5\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/settings.ts#L223-L223)[\[6\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/settings.ts#L258-L258)[\[7\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/settings.ts#L291-L291)[\[8\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/settings.ts#L328-L328)
Use `new Setting(containerEl).setName(...).setHeading()` instead of creating HTML heading elements directly.

[\[1\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/settings.ts#L240-L240)[\[2\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/settings.ts#L367-L367)[\[3\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/settings.ts#L368-L368)
Use sentence case for UI text.

[\[1\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/settings.ts#L405-L405)
Async method 'refreshModelList' has no 'await' expression.



---

### Optional

[\[1\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/main.ts#L67-L67)
'locale' is assigned a value but never used.

[\[1\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/advanced-ai-features.ts#L1-L1)
'Notice' is defined but never used.

[\[1\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/googleai-service.ts#L327-L327)[\[2\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/smart-search.ts#L36-L36)[\[3\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/smart-search.ts#L57-L57)
'prompts' is assigned a value but never used.

[\[1\]](https://github.com/Rerowros/obsidian-smart-ai-assistant/blob/3586eea640f64e00e7885cf51e4b1419e2d4ca8a/src/search-modal.ts#L440-L440)
'linkEl' is assigned a value but never used.

