Skip to content

Commit 9a49abc

Browse files
2977094657codex
andcommitted
Add detailed chat search click tracing
Co-authored-by: Codex <noreply@openai.com>
1 parent a8ac906 commit 9a49abc

File tree

3 files changed

+376
-36
lines changed

3 files changed

+376
-36
lines changed

frontend/components/chat/ChatOverlays.vue

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
<button
129129
type="button"
130130
class="search-sidebar-close"
131-
@click="closeMessageSearch"
131+
@click="closeMessageSearch('close-button')"
132132
title="关闭搜索 (Esc)"
133133
>
134134
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@@ -175,17 +175,17 @@
175175
:class="{ 'privacy-blur': privacyMode }"
176176
@focus="searchInputFocused = true"
177177
@blur="searchInputFocused = false"
178-
@keydown.enter.exact.prevent="runMessageSearch({ reset: true })"
178+
@keydown.enter.exact.prevent="runMessageSearch({ reset: true, source: 'input-enter' })"
179179
@keydown.enter.shift.prevent="onSearchPrev"
180-
@keydown.escape="closeMessageSearch"
180+
@keydown.escape="closeMessageSearch('input-escape')"
181181
/>
182182

183183
<!-- 清除按钮 -->
184184
<button
185185
v-if="messageSearchQuery"
186186
type="button"
187187
class="search-clear-inline"
188-
@click="messageSearchQuery = ''; runMessageSearch({ reset: true })"
188+
@click="messageSearchQuery = ''; runMessageSearch({ reset: true, source: 'clear-button' })"
189189
>
190190
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
191191
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
@@ -197,7 +197,7 @@
197197
type="button"
198198
class="search-btn-inline"
199199
:disabled="messageSearchLoading"
200-
@click="runMessageSearch({ reset: true })"
200+
@click="runMessageSearch({ reset: true, source: 'search-button' })"
201201
>
202202
<svg v-if="messageSearchLoading" class="animate-spin w-4 h-4" fill="none" viewBox="0 0 24 24">
203203
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
@@ -428,6 +428,8 @@
428428
:key="hit.id + ':' + idx"
429429
class="sidebar-result-card"
430430
:class="{ 'sidebar-result-card-selected': idx === messageSearchSelectedIndex }"
431+
@pointerdown="onSearchHitPointerDown(hit, idx, $event)"
432+
@click.capture="onSearchHitClickCapture(hit, idx, $event)"
431433
@click="onSearchHitClick(hit, idx)"
432434
>
433435
<div class="sidebar-result-row">

0 commit comments

Comments
 (0)