Files
Genarrative/apps/ai-game-creator-shell/src/app/expectNever.ts
T
k88936 394b8de9d2 重构:DirectProject 回合错误去前缀、拆分 wire 模块、终态改判别联合
- 三条错误表去冗余前缀:DirectTurnError→TurnError、DirectTurnEnqueueError→EnqueueError、DirectTurnFailure→TurnFailure、DirectTurnDeadline→Deadline、DirectCodexFailureStage→FailureStage、DirectCodexNativeKind→NativeKind、DirectModelCallKind→ModelCallKind
- 用户条目去前缀:DirectCodexUserItem→UserItem 等六个类型;agent/direct_turn_error.rs 移到 codex_app_server/turn_error.rs
- thread_manager/wire.rs 拆为 wire/{mod,clock,items,turn,failure,tests}.rs;direct_turn_failure.rs 的失败载荷并入 wire/failure.rs
- 宿主侧回合终态从 struct TurnTerminal 改为 enum TurnCompletion{Completed,Interrupted,Aborted,Failed},从 wire 移到 thread_manager/turn_completion.rs,status 由变体反推
- 过期回合释放兜底改走 TurnCompletion::Aborted.event
- 同步生成绑定、前端调用点与测试;修正终态单测里过时的 TransportClosed 断言
- 对 src-tauri 全量 cargo fmt,满足 pre-commit 的 rustfmt 门禁
2026-10-02 18:10:17 +08:00

11 lines
516 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 编译期穷尽检查:参数只能是 `never`,`switch` / `if` 链漏掉任何一个变体这一行就编译不过。
*
* 运行时不做事(`void`),所以调用方的 `default` 分支仍需自己决定"漏网之鱼"怎么处理(通常
* 是原样抛出交给既有捕获链路)。放在这里是因为它被认证命令与 Direct 命令两条链路共用,各自
* 复制一份会在新增变体时漏掉其中一处。
*/
export function expectNever(value: never): void {
void value;
}