Skip to content

Conversation

@russell7
Copy link

  • Map the delete chat shortcut to modifier + Backspace
  • Provide an option to delete chats directly

feat(shortcut): 添加删除聊天的快捷键和设置选项

  • 将删除聊天快捷键映射到 modifier + Backspace
  • 提供选项直接删除聊天

- 将删除聊天快捷键映射到 modifier + Backspace
- 提供选项直接删除聊天
@gemini-code-assist
Copy link

Summary of Changes

Hello @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 modifier + Backspace. Additionally, it provides a new user setting that allows users to bypass the confirmation prompt when deleting chats, streamlining the deletion process for those who prefer it. This enhances user experience by offering more efficient chat management options.

Highlights

  • New Keyboard Shortcut: A new keyboard shortcut (modifier + Backspace) has been added to quickly delete chats.
  • Configurable Delete Confirmation: Users can now find a new setting to skip the confirmation prompt when deleting chats, allowing for direct deletion.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

这个 PR 增加了一个删除聊天的快捷键(modifier + Backspace),并提供了一个在设置中跳过删除确认的选项。代码实现得很好,功能清晰。我只发现了一个关于代码格式和可读性的小问题,并提供了一个改进建议。总体来说,这是一个不错的改进!

Comment on lines +68 to +71
const confirm = store.state.general.isSkipDeleteChatConfirm ||
await confirmModal.value.showModal(
i18n.global.t("modal.confirmHideChat"),
);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

这段代码的缩进有些不一致,影响了可读性。建议统一缩进。另外,虽然使用 || 短路操作符和 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"),
    );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant