Skip to content

优化代码块插入功能:支持选中部分代码插入 #425

@yangbobo2021

Description

@yangbobo2021

Is your feature request related to a problem? Please describe.
当前在AI问答结果中使用代码块插入功能时,只能插入整个代码块,无法插入用户选中的部分代码片段,这降低了使用的灵活性。

Describe the solution you'd like
希望改进代码块插入功能:

  1. 当用户没有选中代码时,保持现有行为,插入整个代码块
  2. 当用户选中了代码块中的部分内容时,点击插入按钮只插入选中的部分

Describe alternatives you've considered

  1. 在代码块旁增加两个按钮,分别用于插入全部和插入选中内容
  2. 右键菜单增加选中插入选项

Additional context
这个改进可以提升用户在复用代码片段时的效率,避免插入后还需要手动删除不需要的部分。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions