From e980db9a04c7d319245b9c9398baefb5db55b894 Mon Sep 17 00:00:00 2001 From: AliceJump <2630923991@qq.com> Date: Tue, 6 Oct 2026 22:36:45 +0800 Subject: [PATCH 1/6] feat: cycle unified annotation modes with one shortcut --- media/annotationPanel/index.html | 61 ++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/media/annotationPanel/index.html b/media/annotationPanel/index.html index 691ea8c..546dda7 100644 --- a/media/annotationPanel/index.html +++ b/media/annotationPanel/index.html @@ -85,6 +85,67 @@

Bounding Box

window.acquireVsCodeApi = () => sharedApi || (sharedApi = nativeAcquire()); })(); + From 2e6501e40c56216f3b79021f3b244f041ec816e1 Mon Sep 17 00:00:00 2001 From: AliceJump <2630923991@qq.com> Date: Tue, 6 Oct 2026 22:38:12 +0800 Subject: [PATCH 2/6] feat: expose one annotation mode cycle binding --- package.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 166d42e..4554e94 100644 --- a/package.json +++ b/package.json @@ -325,9 +325,7 @@ "deleteSelected": "Delete", "prevImage": "ArrowLeft", "nextImage": "ArrowRight", - "modeTemplate": "1", - "modeRect": "2", - "modePoint": "3" + "cycleMode": "m" }, "additionalProperties": { "type": "string" @@ -350,7 +348,7 @@ "verify:version": "node scripts/release/verify-version.js", "verify:l10n": "node scripts/release/verify-l10n.js", "release": "sh scripts/release.sh", - "test": "npm run verify:version && npm run verify:l10n && npm run compile && npm run test:webview-html && npm run test:design-system && npm run test:thumbnail-actions && npm run test:task-launcher && npm run test:console-accountseg && npm run test:task-launcher-executor && npm run test:task-reconcile && npm run test:temp-screenshots && npm run test:annotation-coords && npm run test:annotation-clipboard && npm run test:annotation-swap && npm run test:annotation-merge && npm run test:annotation-history && npm run test:position-resource && npm run test:point-resource && npm run test:asset-swap-picker && npm run test:thumb-content-hash && npm run test:list-editor && npm run test:project-config && npm run test:project-config-schema && npm run test:convention-sources && npm run test:label-enum-guard && npm run test:save-to-assets-flow && npm run test:save-to-assets && npm run test:asset-pack-worker && npm run test:coco-feature-path && npm run test:box-resource && npm run test:probe-schemas && npm run test:probe-gui-group-names && npm run test:probe-qt-layer && npm run test:probe-multi-account-path && npm run test:probe-window-config && npm run test:run-sandbox && npm run test:startup-patches && npm run test:executor-runtime && npm run test:executor-project-config && npm run test:executor-gconfig && npm run test:project-store && npm run test:project-runtime", + "test": "npm run verify:version && npm run verify:l10n && npm run compile && npm run test:webview-html && npm run test:design-system && npm run test:thumbnail-actions && npm run test:task-launcher && npm run test:console-accountseg && npm run test:task-launcher-executor && npm run test:task-reconcile && npm run test:temp-screenshots && npm run test:annotation-coords && npm run test:annotation-clipboard && npm run test:annotation-swap && npm run test:annotation-merge && npm run test:annotation-history && npm run test:annotation-mode-cycle && npm run test:position-resource && npm run test:point-resource && npm run test:asset-swap-picker && npm run test:thumb-content-hash && npm run test:list-editor && npm run test:project-config && npm run test:project-config-schema && npm run test:convention-sources && npm run test:label-enum-guard && npm run test:save-to-assets-flow && npm run test:save-to-assets && npm run test:asset-pack-worker && npm run test:coco-feature-path && npm run test:box-resource && npm run test:probe-schemas && npm run test:probe-gui-group-names && npm run test:probe-qt-layer && npm run test:probe-multi-account-path && npm run test:probe-window-config && npm run test:run-sandbox && npm run test:startup-patches && npm run test:executor-runtime && npm run test:executor-project-config && npm run test:executor-gconfig && npm run test:project-store && npm run test:project-runtime", "test:webview-html": "node scripts/test_webview_html.js", "test:design-system": "node scripts/test_design_system.js", "test:thumbnail-actions": "node scripts/test_thumbnail_actions.js", @@ -364,6 +362,7 @@ "test:annotation-swap": "node scripts/test_annotation_swap.js", "test:annotation-merge": "node scripts/test_annotation_merge.js", "test:annotation-history": "node scripts/test_annotation_history.js", + "test:annotation-mode-cycle": "node scripts/test_annotation_mode_cycle.js", "test:position-resource": "node scripts/test_position_resource.js", "test:point-resource": "node scripts/test_point_resource.js", "test:asset-swap-picker": "node scripts/test_asset_swap_picker.js", From e12551d7c8aa492e925045f153d2f4b4143bb5d4 Mon Sep 17 00:00:00 2001 From: AliceJump <2630923991@qq.com> Date: Tue, 6 Oct 2026 22:38:59 +0800 Subject: [PATCH 3/6] test: cover annotation mode cycling shortcut --- scripts/test_annotation_mode_cycle.js | 91 +++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 scripts/test_annotation_mode_cycle.js diff --git a/scripts/test_annotation_mode_cycle.js b/scripts/test_annotation_mode_cycle.js new file mode 100644 index 0000000..c353552 --- /dev/null +++ b/scripts/test_annotation_mode_cycle.js @@ -0,0 +1,91 @@ +const fs = require('fs'); +const path = require('path'); +const assert = require('assert'); +const { JSDOM } = require('jsdom'); + +const root = path.join(__dirname, '..'); +const indexPath = path.join(root, 'media', 'annotationPanel', 'index.html'); +const indexHtml = fs.readFileSync(indexPath, 'utf8'); +const inlineScripts = [...indexHtml.matchAll(/