refactor: 移除所有录制功能代码
- 删除录制相关页面组件(RecordReplayPage、ReplayListPage、ReplayPlayerPage) - 删除录制工具文件(recordEventsDb、recordUtils、useRecorder、tabUtils) - 清理 background.ts 和 content.ts 中的录制代码 - 更新 App.tsx 移除录制路由 - 清理 messages.tsx 中的消息定义 - 删除 types.tsx 中的录制状态 - 移除 package.json 中的 rrweb 相关依赖 - 更新 wxt.config.ts 移除 offscreen、downloads 权限 - 删除 offscreen 目录 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-22
@@ -1,28 +1,8 @@
|
||||
import { defineExtensionMessaging } from '@webext-core/messaging';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
interface ProtocolMap {
|
||||
// --- Popup 相关 ---
|
||||
'popup:start': () => { ok: boolean; error?: string };
|
||||
'popup:stop': () => { ok: boolean; error?: string };
|
||||
'popup:started': () => void;
|
||||
'popup:stopped': () => void;
|
||||
'popup:tab-changed': (data: { currentTabId: number; recordingTabId: number | undefined }) => void;
|
||||
'popup:check-status': () => { active: boolean; startTime?: number };
|
||||
'popup:ready': () => void;
|
||||
'popup:get-sessions': () => { id: string; startTime: number; tabId: number; chunkCount: number; totalEvents: number }[];
|
||||
'popup:get-session-events': (sessionId: string) => unknown[];
|
||||
'popup:delete-session': (sessionId: string) => { ok: boolean };
|
||||
'popup:download-session': (sessionId: string) => { ok: boolean };
|
||||
|
||||
// --- Content 相关 ---
|
||||
'content:save-track-events': (event: unknown) => boolean;
|
||||
'content:start-recording': () => { ok: boolean; error?: string };
|
||||
'content:stop-recording': () => { ok: boolean };
|
||||
'content:check-status': () => boolean;
|
||||
|
||||
// --- Offscreen 相关 ---
|
||||
'offscreen:start-recording': (streamId: string) => void;
|
||||
'offscreen:stop-recording': () => void;
|
||||
// Placeholder - 扩展消息协议
|
||||
}
|
||||
|
||||
export const { sendMessage, onMessage } = defineExtensionMessaging<ProtocolMap>();
|
||||
|
||||
Reference in New Issue
Block a user