AppFlowy-IO / AppFlowy-IO/AppFlowy
[FR] Show 'AI' buttons for selection that includes a 'code snippet' block
- Dominant language
- Dart
- Stars
- 76.6k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
I'd like to see the 'Ask AI anything...' button when my selection includes code snippet blocks.
At the moment if I have any code snippet it only shows this:

And if my selection does not include a code snippet I get the 'Ask AI...' button

### Impact
This would be great where you can select a part of the document that has code snippets or even Ctrl + A and ask AI to summarize the whole thing, make it more coherent, improve formatting, etc. Now this is not possible unless your selection doesn't include a code snippet.
### Additional Context
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
No file or test is named in the issue. Start by locating the editor selection controls and the entry point that decides which AI actions are shown when a selection contains a code snippet. Done means the AI action is available for mixed selections, including selections consisting of the whole document, with coverage for the relevant selection cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- ai, frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100