Repository navigation
Remove the Tiptap AI path that was never switched on - #1166
Merged
Merged
Conversation
Third chunk of the dead-code plan. useBlockEditor only registered the Ai, AiWriter and AiImage extensions when it was handed an aiToken, and no caller ever passed one; the AI dropdown was commented out of the text menu and the AI entries out of the slash command groups. So the whole path was unreachable: - the Ai, AiImage and AiWriter extensions with their node views, the AIDropdown, the nine ai* text-menu commands, the aiToken/userId/userName plumbing in useBlockEditor, the AiWriter/AiImage names in isCustomNodeSelected and the extensions barrel, and the commented-out slash command group; - the language/tone tables and the collab demo names and colours in Editor/lib/constants (themeColors stays for the colour picker), the BlockEditor/types file that only typed them, and the editor's own Loader, Textarea and PanelHeadline that only the AI views rendered; - app/notebook/api/ai (minted the AI token nothing fetched) and app/notebook/api/collaboration (same, for a collab token; the editor has no collaboration provider), with TIPTAP_AI_SECRET, the Collab Cloud variables and the AI base URL dropped from .env.example; - @tiptap-pro/extension-ai from package.json. jsonwebtoken, TIPTAP_CONVERT_SECRET and NEXT_PUBLIC_TIPTAP_APP_ID stay: the document import route still signs with them. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Third chunk of the dead-code removal plan (
docs/dead-code-report.md, kept local), following #1165.useBlockEditoronly registered theAi,AiWriterandAiImageextensions when it was handed anaiToken, and no caller ever passed one. The AI dropdown was commented out of the text menu and the AI entries out of the slash-command groups. The whole path was unreachable, so it goes:What goes
components/Editor/extensions/Ai,AiImage,AiWriter(with their node views),AIDropdown, the nineai*commands inuseTextmenuCommands, theaiToken/userId/userNameplumbing inuseBlockEditor, theAiWriter/AiImagenames inisCustomNodeSelectedand the extensions barrel, and the commented-out AI slash-command group.Editor/lib/constants.tsx(themeColorsstays for the colour picker),BlockEditor/types.tsx(typed only those), and the editor's ownLoader,TextareaandPanelHeadline, which only the AI views rendered.app/notebook/api/aiminted an AI token nothing fetched;app/notebook/api/collaborationdid the same for a collab token and the editor has no collaboration provider.TIPTAP_AI_SECRET,NEXT_PUBLIC_TIPTAP_AI_BASE_URLand the Collab Cloud variables leave.env.example.@tiptap-pro/extension-ai(one fewer private-registry package).Kept on purpose:
jsonwebtoken,TIPTAP_CONVERT_SECRETandNEXT_PUBLIC_TIPTAP_APP_ID, which the document-import route still signs with.29 files changed, 1,179 lines removed, 7 added (comment rewording). No behaviour change intended.
Checks
npm run lint: 0 errors (2 pre-existing warnings in untouched files)npm run type-check: cleanNext
Chunk 4 (
cleanup/4-flags-and-barrels) follows once this is merged.🤖 Generated with Claude Code