From 932bfce1d978cf702b6fa4d533891585765c8d50 Mon Sep 17 00:00:00 2001 From: claude code agent 227 Date: Mon, 29 Jun 2026 01:43:08 +0300 Subject: [PATCH] refactor(editor-ext): remove unused setImageCaption command (F7) The setImageCaption command and its Commands<> declaration were dead: captions are written via the generic updateAttributes in useImageTextFieldControl, and a repo-wide grep finds zero callers. Remove the speculative implementation (image.ts) and its type declaration. Co-Authored-By: Claude Opus 4.8 (1M context) --- packages/editor-ext/src/lib/image/image.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/editor-ext/src/lib/image/image.ts b/packages/editor-ext/src/lib/image/image.ts index a21a7b28..9fd597d7 100644 --- a/packages/editor-ext/src/lib/image/image.ts +++ b/packages/editor-ext/src/lib/image/image.ts @@ -55,7 +55,6 @@ declare module "@tiptap/core" { setImageAlign: ( align: "left" | "center" | "right" | "floatLeft" | "floatRight", ) => ReturnType; - setImageCaption: (caption: string | undefined) => ReturnType; setImageWidth: (width: number) => ReturnType; setImageSize: (width: number, height: number) => ReturnType; }; @@ -194,11 +193,6 @@ export const TiptapImage = Image.extend({ ({ commands }) => commands.updateAttributes("image", { align }), - setImageCaption: - (caption) => - ({ commands }) => - commands.updateAttributes("image", { caption }), - setImageWidth: (width) => ({ commands }) =>