feat: 新增 /pokemon-battle 独立战斗命令,从 BuddyPanel 移除 Battle tab

- 新增 /pokemon-battle 命令,独立全屏战斗面板
- BattlePanel 在主 app Ink 上下文中使用 useInput,通过 inputRef 转发事件
- BuddyPanel 恢复为 Buddy/Pokédex/Egg 三 tab
- BattleFlow 移除内部 useInput,改为暴露 handleInput 方法

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
claude-code-best
2026-04-22 08:51:04 +08:00
parent bd70971632
commit ea0eee05d0
4 changed files with 93 additions and 47 deletions

View File

@@ -0,0 +1,15 @@
import type { Command } from '../../commands.js'
import { isBuddyLive } from '../../buddy/useBuddyNotification.js'
const pokemonBattle = {
type: 'local-jsx',
name: 'pokemon-battle',
description: 'Start a Pokémon battle',
immediate: true,
get isHidden() {
return !isBuddyLive()
},
load: () => import('./pokemon-battle.js'),
} satisfies Command
export default pokemonBattle