Skip to content

Commit 39f74e4

Browse files
committed
refactor(ipc): 撤下三条低级写原语命令并保留实现
1 parent f7ac5d0 commit 39f74e4

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

‎app/src-tauri/src/app_commands.rs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ pub fn handle() -> impl Fn(tauri::ipc::Invoke<tauri::Wry>) -> bool + Send + Sync
200200
crate::commands_knowledge_canvas::get_canvas_prefs,
201201
crate::commands_knowledge_canvas::save_canvas_prefs,
202202
// 会话管理(REQ-010,ADR-004)
203-
crate::commands_session::create_session,
204203
crate::commands_session::finish_session,
205204
crate::commands_session::list_sessions,
206205
crate::commands_session::get_session_detail,
@@ -209,8 +208,6 @@ pub fn handle() -> impl Fn(tauri::ipc::Invoke<tauri::Wry>) -> bool + Send + Sync
209208
crate::commands_session_delete::batch_delete_sessions,
210209
// REQ-282(v0.19.6):会话改名(title_kind=manual 停止自动覆写)
211210
crate::commands_session::update_session_title,
212-
crate::commands_session::add_session_segment,
213-
crate::commands_session::add_session_ocr_block,
214211
// 会话 → 笔记(v0.7.6 审查硬拆:管线在 commands_session_note.rs,
215212
// 命令按定义模块注册——tauri 宏生成项不随 pub use 重导出)
216213
crate::commands_session_note::session_to_note,

‎app/src-tauri/src/commands_session.rs‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ fn apply_display_no(items: &mut [SessionListItem]) {
3434
}
3535

3636
/// 新建会话(REQ-010;v0.5.0 M1/REQ-043:可指定视频类型档案)。
37-
#[tauri::command]
37+
/// @ai-context 已依规格 §1 L5 行 31 从 IPC 撤下(批 7);实现保留供内部/未来接线,勿再注册。
38+
#[allow(dead_code)] // 批 7:已从 IPC 撤下(规格 §1 L5 行 31)⇒ lib 内暂无调用方,保留实现(同 db_colors.rs:42 先例)
3839
pub async fn create_session(
3940
state: State<'_, AppState>,
4041
title: String,
@@ -180,7 +181,8 @@ pub async fn delete_session(state: State<'_, AppState>, id: i64) -> Result<bool,
180181
}
181182

182183
/// 追加转写段(实时捕获链路调用)。
183-
#[tauri::command]
184+
/// @ai-context 已依规格 §1 L5 行 31 从 IPC 撤下(批 7);实现保留供内部/未来接线,勿再注册。
185+
#[allow(dead_code)] // 批 7:已从 IPC 撤下(规格 §1 L5 行 31)⇒ lib 内暂无调用方,保留实现(同 db_colors.rs:42 先例)
184186
pub async fn add_session_segment(
185187
state: State<'_, AppState>,
186188
session_id: i64,
@@ -210,7 +212,8 @@ pub async fn add_session_segment(
210212
}
211213

212214
/// 追加 OCR 块(实时捕获链路调用)。
213-
#[tauri::command]
215+
/// @ai-context 已依规格 §1 L5 行 31 从 IPC 撤下(批 7);实现保留供内部/未来接线,勿再注册。
216+
#[allow(dead_code)] // 批 7:已从 IPC 撤下(规格 §1 L5 行 31)⇒ lib 内暂无调用方,保留实现(同 db_colors.rs:42 先例)
214217
pub async fn add_session_ocr_block(
215218
state: State<'_, AppState>,
216219
session_id: i64,
@@ -244,6 +247,7 @@ pub async fn add_session_ocr_block(
244247
// ────────────────────────────────────────────────────────────
245248

246249
/// 归一化转写段来源标识(asr | subtitle | fused,其余回退 asr)。
250+
#[allow(dead_code)] // 批 7:唯一调用方 add_session_segment 已从 IPC 撤下(规格要求保留实现)⇒ 随其保留,勿单独删除
247251
fn normalize_source(source: &str) -> String {
248252
match source {
249253
"subtitle" | "fused" => source.to_string(),

0 commit comments

Comments
 (0)