feat(shortcut): Add shortcut for delete chat and settings for deleting chats without confirm#1048
feat(shortcut): Add shortcut for delete chat and settings for deleting chats without confirm#1048russell7 wants to merge 1 commit into
Conversation
- 将删除聊天快捷键映射到 modifier + Backspace - 提供选项直接删除聊天
Summary of ChangesHello @russell7, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new keyboard shortcut for deleting chats, mapped to Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| const confirm = store.state.general.isSkipDeleteChatConfirm || | ||
| await confirmModal.value.showModal( | ||
| i18n.global.t("modal.confirmHideChat"), | ||
| ); |
There was a problem hiding this comment.
这段代码的缩进有些不一致,影响了可读性。建议统一缩进。另外,虽然使用 || 短路操作符和 await 的组合是有效的,但对于一些开发者来说可能不够直观。可以考虑使用 if 语句来更清晰地表达逻辑,例如:
let confirm = store.state.general.isSkipDeleteChatConfirm;
if (!confirm) {
confirm = await confirmModal.value.showModal(
i18n.global.t("modal.confirmHideChat"),
);
}这里提供一个仅修正格式的建议。
const confirm = store.state.general.isSkipDeleteChatConfirm ||
await confirmModal.value.showModal(
i18n.global.t("modal.confirmHideChat"),
);
feat(shortcut): 添加删除聊天的快捷键和设置选项