android-midscene-automation 1.1.9 → 1.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { computed } from 'vue';
3
+ import { QuestionFilled } from '@element-plus/icons-vue';
3
4
  import { resolveAiDeduplication, type AiDeduplicationConfig } from '../../appium-recorder/ai-deduplication';
4
5
 
5
6
  const props = defineProps<{ modelValue?: AiDeduplicationConfig; disabled?: boolean }>();
@@ -14,6 +15,21 @@ function patch(value: Partial<AiDeduplicationConfig>) {
14
15
  <section class="ai-dedup-settings" aria-label="持续观察截图去重">
15
16
  <p class="ai-dedup-description">相似截图在本地过滤后再提交模型,减少重复图片和识别开销。</p>
16
17
  <el-form-item label="去重方式">
18
+ <template #label>
19
+ <span class="ai-dedup-label">去重方式
20
+ <el-tooltip placement="top" :show-after="200">
21
+ <template #content>
22
+ <div class="ai-dedup-explanation">
23
+ <p><strong>不去重:</strong>全部采样截图交给模型,保留信息最多,图片输入消耗也最高。</p>
24
+ <p><strong>pixelmatch:</strong>比较原图的像素颜色和变化面积,适合同设备的静态画面,对细节变化敏感。</p>
25
+ <p><strong>OpenCV(SSIM):</strong>缩小图片后比较彩色画面的局部亮度、对比度和结构,更侧重整体相似性;可能忽略小文字,不能识别语义,也不自动对齐位移。</p>
26
+ <p>仅对持续观察生效。首帧始终保留,后续与上一张保留的截图比较;两种去重均在本地完成,不调用模型。切换方式会保留各自参数,用于后续回放和识别测试。</p>
27
+ </div>
28
+ </template>
29
+ <el-button class="ai-dedup-help-button" text :icon="QuestionFilled" aria-label="去重方式说明" @click.prevent />
30
+ </el-tooltip>
31
+ </span>
32
+ </template>
17
33
  <el-radio-group :model-value="settings.method" :disabled="disabled" @update:model-value="patch({ method: $event as AiDeduplicationConfig['method'] })">
18
34
  <el-radio-button value="none">不去重</el-radio-button>
19
35
  <el-radio-button value="pixelmatch">pixelmatch(默认)</el-radio-button>
@@ -40,20 +56,15 @@ function patch(value: Partial<AiDeduplicationConfig>) {
40
56
  <p class="ai-dedup-help">默认 512。仅缩小本地比较图像;越大越能保留细节,也更耗本地计算资源,不改变提交模型的图片尺寸。</p>
41
57
  </el-form-item>
42
58
  </template>
43
- <div class="ai-dedup-explanation">
44
- <h4>去重方式说明</h4>
45
- <p><strong>不去重:</strong>全部采样截图交给模型,保留信息最多,图片输入消耗也最高。</p>
46
- <p><strong>pixelmatch:</strong>比较原图的像素颜色和变化面积,适合同设备的静态画面,对细节变化敏感。</p>
47
- <p><strong>OpenCV(SSIM):</strong>缩小图片后比较彩色画面的局部亮度、对比度和结构,更侧重整体相似性;可能忽略小文字,不能识别语义,也不自动对齐位移。</p>
48
- <p>仅对持续观察生效。首帧始终保留,后续与上一张保留的截图比较;两种去重均在本地完成,不调用模型。切换方式会保留各自参数,用于后续回放和识别测试。</p>
49
- </div>
50
59
  </section>
51
60
  </template>
52
61
 
53
62
  <style scoped>
54
63
  .ai-dedup-description { margin: 0 0 18px; color: var(--el-text-color-secondary); font-size: 12px; line-height: 1.6; }
55
64
  .ai-dedup-help { width: 100%; margin: 6px 0 0; color: var(--el-text-color-secondary); font-size: 12px; line-height: 1.6; }
56
- .ai-dedup-explanation { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ui-border); color: var(--el-text-color-regular); font-size: 13px; line-height: 1.7; }
57
- .ai-dedup-explanation h4 { margin: 0 0 8px; color: var(--el-text-color-primary); font-size: 13px; }
58
- .ai-dedup-explanation p { margin: 6px 0; }
65
+ .ai-dedup-label { display: inline-flex; align-items: center; gap: 4px; }
66
+ .ai-dedup-help-button { width: 28px; height: 28px; padding: 0; font-size: 16px; }
67
+ .ai-dedup-explanation { max-width: min(360px, calc(100vw - 40px)); line-height: 1.6; overflow-wrap: anywhere; }
68
+ .ai-dedup-explanation p { margin: 0 0 8px; }
69
+ .ai-dedup-explanation p:last-child { margin-bottom: 0; }
59
70
  </style>
@@ -31,8 +31,8 @@ defineEmits<{
31
31
 
32
32
  const tabs = [
33
33
  { name: 'basic', label: '基础配置' },
34
- { name: 'midscene', label: 'Midscene配置' },
35
34
  { name: 'appium', label: 'Appium配置' },
35
+ { name: 'midscene', label: 'Midscene配置' },
36
36
  ] as const;
37
37
  const activeTab = shallowRef<(typeof tabs)[number]['name']>('basic');
38
38