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

@@ -155,6 +155,11 @@ const buddy = feature('BUDDY')
require('./commands/buddy/index.js') as typeof import('./commands/buddy/index.js')
).default
: null
const pokemonBattle = feature('BUDDY')
? (
require('./commands/pokemon-battle/index.js') as typeof import('./commands/pokemon-battle/index.js')
).default
: null
const poor = feature('POOR')
? (
require('./commands/poor/index.js') as typeof import('./commands/poor/index.js')
@@ -364,6 +369,7 @@ const COMMANDS = memoize((): Command[] => [
...(webCmd ? [webCmd] : []),
...(forkCmd ? [forkCmd] : []),
...(buddy ? [buddy] : []),
...(pokemonBattle ? [pokemonBattle] : []),
...(poor ? [poor] : []),
...(proactive ? [proactive] : []),
...(monitorCmd ? [monitorCmd] : []),