6868 :chunk-id =" currentChunkId "
6969 :index =" index "
7070 :is-selected ="
71- filterTool .selectedMessageIds .value .has (
71+ activeContext .selectedMessageIds .value .has (
7272 msg .messageId ,
7373 )
7474 "
@@ -111,7 +111,7 @@ import { computed, nextTick, ref, watch } from 'vue';
111111import { useLogStore } from ' @/stores/logStore' ;
112112import { useUiStore } from ' @/stores/uiStore' ;
113113import { useStyleStore } from ' @/stores/styleStore' ;
114- import { useFilter } from ' @/composables/useFilter ' ;
114+ import { useActiveContext } from ' @/composables/useActiveContext ' ;
115115import { useMessageDragDrop } from ' @/composables/useDragDrop' ;
116116import MessageItem from ' @/components/common/MessageItem.vue' ;
117117import { useMessageEditorStore } from ' @/stores/editorStore/messageStore' ;
@@ -128,7 +128,7 @@ const props = defineProps<{
128128}>();
129129const effectiveWindowId = computed (() => props .windowId );
130130const currentChunkId = computed (() => props .originalId );
131- const filterTool = useFilter (effectiveWindowId .value );
131+ const activeContext = useActiveContext (effectiveWindowId .value );
132132const dragDropTool = useMessageDragDrop ();
133133const dropIndicatorIndex = ref <number | null >(null );
134134const uiStore = useUiStore ();
@@ -298,14 +298,14 @@ function handleActionInsert(msg: Message, index: number) {
298298}
299299
300300function handleActionMerge(msg : Message ) {
301- const selectedIds = filterTool .selectedMessageIds .value ;
301+ const selectedIds = activeContext .selectedMessageIds .value ;
302302 if (selectedIds .has (msg .messageId ) && selectedIds .size > 1 ) {
303303 messageEditorStore .mergeMessages (
304304 currentChunkId .value ,
305305 Array .from (selectedIds ),
306306 msg .messageId ,
307307 );
308- filterTool .clearMessageSelection ();
308+ activeContext .clearMessageSelection ();
309309 } else {
310310 messageEditorStore .mergeWithNextMessage (
311311 currentChunkId .value ,
@@ -319,10 +319,10 @@ function handleActionSplit(msgId: string) {
319319}
320320
321321function handleActionDelete(msgId : string ) {
322- const selectedIds = filterTool .selectedMessageIds .value ;
322+ const selectedIds = activeContext .selectedMessageIds .value ;
323323 if (selectedIds .has (msgId )) {
324324 messageEditorStore .batchDeleteMessages (selectedIds );
325- filterTool .clearMessageSelection ();
325+ activeContext .clearMessageSelection ();
326326 } else {
327327 messageEditorStore .deleteMessage (currentChunkId .value , msgId );
328328 }
0 commit comments