-
-
Notifications
You must be signed in to change notification settings - Fork 552
feat: AI block UI #980
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
Open
matthewlipski
wants to merge
187
commits into
main
Choose a base branch
from
ai-block
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: AI block UI #980
Changes from 1 commit
Commits
Show all changes
187 commits
Select commit
Hold shift + click to select a range
3e1983b
Added AI block
matthewlipski 0da498e
Added inline and slash menu AI
matthewlipski d48d91e
Small fix
matthewlipski 82a56a9
UX improvements & refactor
matthewlipski 5c66cfe
Extracted AI to separate package & changed AI block toolbar UX
matthewlipski 22db2b4
Finished initial package split
matthewlipski e0f60a8
Moved last AI references to AI package
matthewlipski a2bab5d
Reverted minor unneeded changes
matthewlipski bcf9d31
refactor architecture
YousefED b814336
add extensions
YousefED cfc1bed
Refactored AI dictionary
matthewlipski ec36733
clean dictionary
YousefED 78ac784
fix
YousefED 2970e9d
fix
YousefED 78924bb
Made AI button use suggestion menu components
matthewlipski 4083cd9
Added keyboard navigation to AI button
matthewlipski d0d82a4
Refactored AI button
matthewlipski 2df84f5
Changed AI from suggestion menu to propriety menu
matthewlipski 644aa15
Minor changes
matthewlipski 0fcb46a
Prevented focus swapping on suggestion menu items
matthewlipski 251e82b
- AI Menu input spans full block width
matthewlipski 736a8ff
Fixed AI Menu position for empty blocks
matthewlipski ffa466d
Made AI block react instead of vanilla
matthewlipski 2c20238
fix build
YousefED f474949
schema
YousefED 6ddf7b0
improve json schema methods
YousefED 34abf80
Merge remote-tracking branch 'origin/main' into ai-block
YousefED b3926fe
merge
YousefED a9d25c9
improve json schema methods
YousefED 2021ce7
fix build
YousefED 10c6f5e
WIP: schemas and selections
YousefED a554ff1
selections wip
YousefED 6833d9d
update selections
YousefED 39642ce
wip selectionmarkers
YousefED 7693b10
drop core / react structure
YousefED a8752e1
ai menu
YousefED 979b917
add comment
YousefED f88a986
misc
YousefED 3b7a80b
Added `size` field to React suggestion menu items
matthewlipski 5f20d34
Merge branch 'ai-block' of github.com:TypeCellOS/BlockNote into ai-block
YousefED bb02ee6
basis for accept / reject menu
YousefED da2f06d
selection commands
YousefED f7bbf0e
Added `.env` file for API key and AI menu buttons for after an AI com…
matthewlipski 6952a2e
Merge remote-tracking branch 'origin/ai-block' into ai-block
matthewlipski 3ae2152
Added loader to AI menu
matthewlipski 08d31a9
Updated styles
matthewlipski b0993e2
wip
YousefED 5367284
gitignore
YousefED 8d32b78
Merge remote-tracking branch 'origin/main' into ai-block
YousefED a271b22
move to xl-ai and add server
YousefED b8ac4db
fix test
YousefED 0262670
small merge fixes
YousefED 2934697
Merge remote-tracking branch 'origin/main' into ai-block
YousefED faa52f7
update lock
YousefED 0b8c728
update ai sdk
YousefED 908a3db
improve tests
YousefED 4f8a337
model selector
YousefED 075c025
add markdowndiff
YousefED fb0a2e1
wip
YousefED 2829adc
split and update tests
YousefED f533c91
add list support
YousefED f7e0e81
wip
YousefED 449d0b6
Merge remote-tracking branch 'origin/main' into ai-block
YousefED 1b54e27
merge
YousefED 0a376f1
Merge remote-tracking branch 'origin/main' into ai-block
YousefED cec0390
refactor
YousefED c7259bd
improve tests
YousefED b0ff91a
update tests
YousefED cfa26c4
wip
YousefED 6fcf9ed
fixes
YousefED 062deec
wip
YousefED 6235cd7
fix tests
YousefED 235c9f4
fix, before removing commented code
YousefED c0ce50b
fix
YousefED cd8b8dc
fix tests
YousefED 36b9440
fix lint
YousefED 9b13f4b
add comments
YousefED 3625034
update tests
YousefED 947a73a
fix
YousefED 286b114
fix build
YousefED e6e18e0
fix lock
YousefED d30e060
wip
YousefED aaa08aa
misc
YousefED d1365c6
remove unused files, fix basic toolbar ux
YousefED d64d79f
fix build
YousefED c97af9a
fix lint
YousefED ff61213
fix build
YousefED 947d24e
fix build
YousefED 4691ee3
fix start command
YousefED 11d6452
fix start
YousefED 259c811
port
YousefED d15818a
fix deploy
YousefED 02be4b4
fix build
YousefED 19e2dae
ai client env variables
YousefED 9b5d8d7
add + fix test
YousefED d446bc4
add prepare scripts
YousefED 75e0275
test
YousefED e6d9435
albert
YousefED daac02d
fix build
YousefED 9024e7a
Made editor non-editable until user finishes LLM generation
matthewlipski a11db32
Merge remote-tracking branch 'origin/ai-block' into ai-block
matthewlipski 5d70d15
Implemented TODO LLM commands
matthewlipski d65ff5d
disable fix
YousefED 78b8f98
support selections
YousefED a72d491
fix
YousefED 47d7d49
fix
YousefED cc5f198
fix blank line processing with markdown
YousefED 9cd4c38
improve prompt
YousefED 4de0e4e
Merge remote-tracking branch 'origin/main' into ai-block
YousefED 4cdf8a7
merge / undo button separation
YousefED 11c4921
revert some changes
YousefED c212ba2
Merge branch 'main' of github.com:TypeCellOS/BlockNote into ai-block
YousefED f1ff110
lockfile
YousefED 707a33a
remove unneeded files
YousefED 3ee1a6e
Merge branch 'main' into ai-block
YousefED ffd374f
remove file
YousefED b6db78b
better streaming
YousefED d97bec6
refactor streams
YousefED 40bd7ad
update position
YousefED 59c5a5f
small ux fixes
YousefED 30022ca
remove file
YousefED 2625175
fix build
YousefED 8d271ee
fix some tests
YousefED 7ec3b9a
fix some tests
YousefED 4b9be50
fix tests
YousefED 9a3858f
fix types, add test for errors
YousefED dbef5e8
albert
YousefED d0c34a2
wip
YousefED 05d5277
wip
YousefED e509857
add tests
YousefED f758cc5
misc
YousefED 38bae08
dontReplaceContentAtEnd
YousefED 06b69a8
change snap paths
YousefED 107667f
rewrite snapshot / test system
YousefED a38625a
refactor
YousefED f671a58
test improvements
YousefED 59096c3
markdownblocks :D
YousefED ec9e043
wip
YousefED 7dc4226
upgrade ai package and add snapshot check
YousefED 9af24f6
update json snaps
YousefED 664e9fd
update msw snapshots
YousefED 0253df6
fix so me tests
YousefED f2c3a50
update msw snaps
YousefED 5677af6
wip
YousefED ab472e7
wip html
YousefED e0121fb
wip
YousefED e4b9552
remove debug test
YousefED 3c7dfab
fix
YousefED 8191c86
Merge branch 'main' into ai-block
YousefED f30f6c7
Merge remote-tracking branch 'origin/main' into ai-block
YousefED 22f989c
merge
YousefED a0bc870
html blocks fixes
YousefED b2e45a7
fix build
YousefED 0fb2f1f
revert tsconfig
YousefED 0d8743a
Merge remote-tracking branch 'origin/main' into ai-block
YousefED 35f79ae
update selections with new table logic
YousefED 3b54350
simplify some code re. selections
YousefED 65fa438
clean
YousefED 84e5a5c
wip
YousefED 8c18edb
wip
YousefED 704e613
wip
YousefED b5897c7
WIP: Zustand instead of context
YousefED 5a529cb
better type safety (zustand)
YousefED d4abe05
wip
YousefED 3b72003
wip
YousefED ac72b00
misc
YousefED 2661e6d
fix
YousefED cf3deb3
fix deps
YousefED 24697bf
fix build and slow stream
YousefED b4f954d
cleanup
YousefED b24bc17
wip
YousefED 05da6dc
Merge remote-tracking branch 'origin/main' into ai-block
YousefED 7166957
merge + fullslug for examples
YousefED 6757c06
cleanup
YousefED 8f46bfb
wip
YousefED 14ed829
improve tests + changeset
YousefED f42f019
wip agent improvements
YousefED c5a09a8
fix snaps
YousefED f47b411
wip: support block type / attr changes, better table handling
YousefED a8ecff7
updte tests
YousefED dd08294
update prosemirror-transform
YousefED f5d9879
Merge remote-tracking branch 'origin/main' into ai-block
YousefED bbf25e4
fix tests
YousefED f2e778a
tests async
YousefED b5e7571
clean tests
YousefED 3dd2b8c
switch to mapper
YousefED cdc3f50
refactor
YousefED File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Plugin } from "prosemirror-state"; | ||
|
||
export abstract class BlockNoteExtension { | ||
public static name(): string { | ||
throw new Error("You must implement the name method in your extension"); | ||
} | ||
|
||
public plugin?: Plugin; | ||
|
||
constructor(...args: any[]) { | ||
// Allow subclasses to have constructors with parameters | ||
// without this, we can't easily implement BlockNoteEditor.extension(MyExtension) pattern | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just gonna skip over any of the extension bit. I think there are better ways to do it, but not pertinent right now to discuss & should be separately discussed & written up