Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(edgeless): copilot selection widget #6497

Merged
merged 15 commits into from
Mar 22, 2024
Merged

feat(edgeless): copilot selection widget #6497

merged 15 commits into from
Mar 22, 2024

Conversation

doouding
Copy link
Member

@doouding doouding commented Mar 18, 2024

Press ctrl or command (mac) when dragging to activate AI.

Copy link

vercel bot commented Mar 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blocksuite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 22, 2024 7:30am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
blocksuite-docs ⬜️ Ignored (Inspect) Visit Preview Mar 22, 2024 7:30am

Copy link
Member

@doodlewind doodlewind left a comment

Choose a reason for hiding this comment

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

I think we should land all edgeless AI features in different PRs, can we make drag selection into a feature flag and land this PR earlier?

@doouding
Copy link
Member Author

doouding commented Mar 19, 2024

I was thinking of using stacked PR. Different features would be in different PRs but they all base on this PR and this PR will get merged once all its sub-PRs is ready.

@doouding doouding marked this pull request as ready for review March 22, 2024 06:51
@doouding doouding changed the title feat: edgeless ai support feat(edgeless): ai selection Mar 22, 2024
Copy link
Member

@doodlewind doodlewind left a comment

Choose a reason for hiding this comment

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

Screen.Recording.2024-03-22.at.2.53.47.PM.mov

After releasing the ai selection box, it will unexpectedly select an element on the canvas.

export const AFFINE_EDGELESS_AI_WIDGET = 'affine-edgeless-ai-widget';

@customElement('affine-edgeless-ai-widget')
export class EdgeelssAIWidget extends WidgetElement<EdgelessRootBlockComponent> {
Copy link
Member

Choose a reason for hiding this comment

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

typo

Copy link
Member

Choose a reason for hiding this comment

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

The ai-tool.ts sounds too broad. Making it CopilotSelectionTool and 'affine-copilot-selection-widget' here should fit better with current tools naming.

(Let's avoid the concept of "ai" in naming since we are using unified "copilot" concept)

@@ -239,7 +243,8 @@ export type EdgelessTool =
| ConnectorTool
| EraserTool
| FrameTool
| FrameNavigatorTool;
| FrameNavigatorTool
| AITool;
Copy link
Member

Choose a reason for hiding this comment

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

CopilotSelectionTool

@doodlewind doodlewind changed the title feat(edgeless): ai selection feat(edgeless): copilot selection widget Mar 22, 2024
Copy link
Member

@doodlewind doodlewind left a comment

Choose a reason for hiding this comment

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

Thanks for the feat! Should land this after some naming updates.

@doodlewind doodlewind merged commit 1288de1 into master Mar 22, 2024
19 checks passed
@doodlewind doodlewind deleted the feat/edgeless-ai branch March 22, 2024 07:36
Brooooooklyn pushed a commit to toeverything/AFFiNE that referenced this pull request Mar 25, 2024
## Features
- toeverything/blocksuite#6544 @golok727
- toeverything/blocksuite#6543 @golok727
- toeverything/blocksuite#6536 @donteatfriedrice
- toeverything/blocksuite#6497 @doouding
- toeverything/blocksuite#6514 @regischen
- toeverything/blocksuite#6523 @donteatfriedrice
- toeverything/blocksuite#6530 @zzj3720
- toeverything/blocksuite#6526 @fourdim
- toeverything/blocksuite#6532 @donteatfriedrice
- toeverything/blocksuite#6493 @golok727
- toeverything/blocksuite#6529 @zzj3720
- toeverything/blocksuite#6528 @zzj3720
- toeverything/blocksuite#6509 @zzj3720
- toeverything/blocksuite#6525 @doodlewind
- toeverything/blocksuite#6502 @donteatfriedrice
- toeverything/blocksuite#6489 @Flrande

## Bugfix
- toeverything/blocksuite#6558 @fourdim
- toeverything/blocksuite#6556 @fourdim
- toeverything/blocksuite#6547 @fundon
- toeverything/blocksuite#6537 @golok727
- toeverything/blocksuite#6531 @donteatfriedrice
- toeverything/blocksuite#6524 @doodlewind
- toeverything/blocksuite#6519 @regischen
- toeverything/blocksuite#6517 @doodlewind
- toeverything/blocksuite#6516 @doodlewind
- toeverything/blocksuite#6510 @donteatfriedrice
- toeverything/blocksuite#6511 @congzhou09
- toeverything/blocksuite#6507 @doouding
- toeverything/blocksuite#6500 @fourdim
- toeverything/blocksuite#6486 @congzhou09
- toeverything/blocksuite#6495 @donteatfriedrice
- toeverything/blocksuite#6488 @Saul-Mirone
- toeverything/blocksuite#6482 @Flrande
- toeverything/blocksuite#6558 @fourdim

## Refactor
- toeverything/blocksuite#6548 @doodlewind
- toeverything/blocksuite#6522 @doodlewind
- toeverything/blocksuite#6518 @regischen
- toeverything/blocksuite#6521 @Saul-Mirone

## Misc
- toeverything/blocksuite#6557 @fourdim
- toeverything/blocksuite#6546 @Flrande
- docs: update package desc
- toeverything/blocksuite#6527 @fourdim
- toeverything/blocksuite#6505 @Brooooooklyn
- toeverything/blocksuite#6503 @fourdim
- v0.13.0
- toeverything/blocksuite#6496 @doodlewind
- toeverything/blocksuite#6562 @donteatfriedrice
) {
const isRightButton = isRightButtonPressed(pointEvt);
const targetTool = (
isRightButton || metaKeyPressed
Copy link
Contributor

Choose a reason for hiding this comment

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

@doouding
Here may should be "isRightButton && metaKeyPressed" if you meant rightbutton-dragging with ctrl or command (mac) pressed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actuallly not, here I mean right button dragging OR meta key pressed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Actuallly not, here I mean right button dragging OR meta key pressed.

Oh I thought right button dragging could pan too. I take back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notable Major improvement worth emphasizing
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants