feat: standardize parameters for mine_resource action in AIPlanner to improve error handling and compatibility with LM Studio responses
This commit is contained in:
17
docs/plan.md
17
docs/plan.md
@@ -87,6 +87,23 @@
|
||||
|
||||
---
|
||||
|
||||
## 2026-03-27 mine_resource 파라미터 강제 표준화 계획
|
||||
|
||||
### 문제 요약
|
||||
- LM Studio가 `mine_resource`에 `tile`, `target`, `resource` 같은 비표준 키를 보내면서 실행기(`mine_resource(ore, count)`)에서 TypeError 발생.
|
||||
|
||||
### 구현 계획
|
||||
1. `ai_planner.py`에서 `mine_resource`는 `ore`, `count`만 남기도록 필터링한다.
|
||||
2. `resource`/`item` 동의어를 `ore`로 매핑하고, `iron`/`copper` 같은 축약값도 정규 ore 이름으로 보정한다.
|
||||
3. `count`가 없거나 비정상이면 기본값(35)으로 보정한다.
|
||||
4. README에 `mine_resource` 파라미터 표준화 동작을 반영한다.
|
||||
|
||||
### 검증 계획
|
||||
- `python -m py_compile ai_planner.py`
|
||||
- 런타임에서 `unexpected keyword argument 'tile'/'target'`가 사라지는지 확인
|
||||
|
||||
---
|
||||
|
||||
## 채굴 시 mining_state 반복 설정 제거 (우클릭 유지)
|
||||
|
||||
### 문제
|
||||
|
||||
Reference in New Issue
Block a user